mirror of https://github.com/snes9xgit/snes9x.git
GTK+: Mandate OpenGL on Wayland.
Warn users if their OpenGL stack is too old.
This commit is contained in:
parent
e5aed9f8d5
commit
3e87063780
|
@ -1631,6 +1631,12 @@ S9xDeinitUpdate (int width, int height)
|
|||
static void
|
||||
S9xInitDriver ()
|
||||
{
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
|
||||
{
|
||||
gui_config->hw_accel = HWA_OPENGL;
|
||||
}
|
||||
#endif
|
||||
switch (gui_config->hw_accel)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
|
|
|
@ -538,10 +538,19 @@ int S9xOpenGLDisplayDriver::create_context ()
|
|||
version = epoxy_gl_version ();
|
||||
if (version < 20)
|
||||
{
|
||||
printf ("OpenGL version is only %d.%d. Need 2.0.\n"
|
||||
"Trying to run anyway.",
|
||||
printf ("OpenGL version is only %d.%d. Required version is 2.0.",
|
||||
version / 10,
|
||||
version % 10);
|
||||
if (epoxy_has_gl_extension ("GL_EXT_fragment_shader") ||
|
||||
epoxy_has_gl_extension ("GL_ARB_fragment_shader"))
|
||||
{
|
||||
printf ("Found GLSL capability. Continuing, but things may not work well.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("No GLSL available. Aborting.\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int profile_mask = 0;
|
||||
|
|
Loading…
Reference in New Issue