Allow XV only in GTK/X11.

This commit is contained in:
Brandon Wright 2018-10-15 14:25:26 -05:00
parent 5e4f12a12b
commit 3829408d3d
1 changed files with 6 additions and 5 deletions

View File

@ -9,9 +9,11 @@
#include "gtk_display_driver.h" #include "gtk_display_driver.h"
#include "gtk_display_driver_gtk.h" #include "gtk_display_driver_gtk.h"
#include "snes_ntsc.h" #include "snes_ntsc.h"
#ifdef USE_XV
#if defined(USE_XV) && defined(GDK_WINDOWING_X11)
#include "gtk_display_driver_xv.h" #include "gtk_display_driver_xv.h"
#endif #endif
#ifdef USE_OPENGL #ifdef USE_OPENGL
#include "gtk_display_driver_opengl.h" #include "gtk_display_driver_opengl.h"
#endif #endif
@ -1575,7 +1577,7 @@ S9xDisplayReconfigure (void)
void void
S9xQueryDrivers (void) S9xQueryDrivers (void)
{ {
#ifdef USE_XV #if defined(USE_XV) && defined(GDK_WINDOWING_X11)
gui_config->allow_xv = S9xXVDisplayDriver::query_availability (); gui_config->allow_xv = S9xXVDisplayDriver::query_availability ();
#else #else
gui_config->allow_xv = 0; gui_config->allow_xv = 0;
@ -1588,7 +1590,6 @@ S9xQueryDrivers (void)
#endif #endif
gui_config->allow_xrandr = 0; gui_config->allow_xrandr = 0;
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (top_level->get_window())); GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (top_level->get_window()));
if (GDK_IS_X11_DISPLAY (display)) if (GDK_IS_X11_DISPLAY (display))
@ -1604,8 +1605,8 @@ S9xQueryDrivers (void)
gui_config->xrr_screen_resources, gui_config->xrr_screen_resources,
gui_config->xrr_screen_resources->crtcs[0]); gui_config->xrr_screen_resources->crtcs[0]);
} }
#endif #endif
return; return;
} }
@ -1691,7 +1692,7 @@ S9xInitDriver (void)
break; break;
#endif #endif
#ifdef USE_XV #if defined(USE_XV) && defined(GDK_WINDOWING_X11)
case HWA_XV: case HWA_XV:
driver = new S9xXVDisplayDriver (top_level, gui_config); driver = new S9xXVDisplayDriver (top_level, gui_config);