Loading qemu-options.hx +1 −1 Original line number Diff line number Diff line Loading @@ -1240,7 +1240,7 @@ ETEXI DEF("display", HAS_ARG, QEMU_OPTION_display, "-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off]\n" " [,window_close=on|off][,gl=on|off]\n" " [,window_close=on|off][,gl=on|core|es|off]\n" "-display gtk[,grab_on_hover=on|off][,gl=on|off]|\n" "-display vnc=<display>[,<optargs>]\n" "-display curses\n" Loading ui/sdl2-gl.c +17 −2 Original line number Diff line number Diff line Loading @@ -140,12 +140,27 @@ QEMUGLContext sdl2_gl_create_context(DisplayChangeListener *dcl, SDL_GL_MakeCurrent(scon->real_window, scon->winctx); SDL_GL_SetAttribute(SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1); if (scon->opts->gl == DISPLAYGL_MODE_ON || scon->opts->gl == DISPLAYGL_MODE_CORE) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); } else if (scon->opts->gl == DISPLAYGL_MODE_ES) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); } SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, params->major_ver); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, params->minor_ver); ctx = SDL_GL_CreateContext(scon->real_window); /* If SDL fail to create a GL context and we use the "on" flag, * then try to fallback to GLES. */ if (!ctx && scon->opts->gl == DISPLAYGL_MODE_ON) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); ctx = SDL_GL_CreateContext(scon->real_window); } return (QEMUGLContext)ctx; } Loading vl.c +4 −0 Original line number Diff line number Diff line Loading @@ -2144,6 +2144,10 @@ static void parse_display(const char *p) dpy.has_gl = true; if (strstart(opts, "on", &nextopt)) { dpy.gl = DISPLAYGL_MODE_ON; } else if (strstart(opts, "core", &nextopt)) { dpy.gl = DISPLAYGL_MODE_CORE; } else if (strstart(opts, "es", &nextopt)) { dpy.gl = DISPLAYGL_MODE_ES; } else if (strstart(opts, "off", &nextopt)) { dpy.gl = DISPLAYGL_MODE_OFF; } else { Loading Loading
qemu-options.hx +1 −1 Original line number Diff line number Diff line Loading @@ -1240,7 +1240,7 @@ ETEXI DEF("display", HAS_ARG, QEMU_OPTION_display, "-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off]\n" " [,window_close=on|off][,gl=on|off]\n" " [,window_close=on|off][,gl=on|core|es|off]\n" "-display gtk[,grab_on_hover=on|off][,gl=on|off]|\n" "-display vnc=<display>[,<optargs>]\n" "-display curses\n" Loading
ui/sdl2-gl.c +17 −2 Original line number Diff line number Diff line Loading @@ -140,12 +140,27 @@ QEMUGLContext sdl2_gl_create_context(DisplayChangeListener *dcl, SDL_GL_MakeCurrent(scon->real_window, scon->winctx); SDL_GL_SetAttribute(SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1); if (scon->opts->gl == DISPLAYGL_MODE_ON || scon->opts->gl == DISPLAYGL_MODE_CORE) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); } else if (scon->opts->gl == DISPLAYGL_MODE_ES) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); } SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, params->major_ver); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, params->minor_ver); ctx = SDL_GL_CreateContext(scon->real_window); /* If SDL fail to create a GL context and we use the "on" flag, * then try to fallback to GLES. */ if (!ctx && scon->opts->gl == DISPLAYGL_MODE_ON) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); ctx = SDL_GL_CreateContext(scon->real_window); } return (QEMUGLContext)ctx; } Loading
vl.c +4 −0 Original line number Diff line number Diff line Loading @@ -2144,6 +2144,10 @@ static void parse_display(const char *p) dpy.has_gl = true; if (strstart(opts, "on", &nextopt)) { dpy.gl = DISPLAYGL_MODE_ON; } else if (strstart(opts, "core", &nextopt)) { dpy.gl = DISPLAYGL_MODE_CORE; } else if (strstart(opts, "es", &nextopt)) { dpy.gl = DISPLAYGL_MODE_ES; } else if (strstart(opts, "off", &nextopt)) { dpy.gl = DISPLAYGL_MODE_OFF; } else { Loading