diff --git a/src/gtk-glade/gdk_3Demu.cpp b/src/gtk-glade/gdk_3Demu.cpp index cbfe46f8e..e979965f7 100644 --- a/src/gtk-glade/gdk_3Demu.cpp +++ b/src/gtk-glade/gdk_3Demu.cpp @@ -154,11 +154,11 @@ initialise_gdk_3d( void) { } int -init_opengl_gdk_3Demu( void) { +init_opengl_gdk_3Demu( GdkDrawable * drawable) { GdkGLConfig *glconfig; /* create the off screen pixmap */ - target_pixmap = gdk_pixmap_new ( NULL, 256, 192, 24); + target_pixmap = gdk_pixmap_new ( drawable, 256, 192, -1); if ( target_pixmap == NULL) { g_print (_("*** Failed to create pixmap.\n")); diff --git a/src/gtk-glade/gdk_3Demu.h b/src/gtk-glade/gdk_3Demu.h index 6d587017c..8a0a0686e 100644 --- a/src/gtk-glade/gdk_3Demu.h +++ b/src/gtk-glade/gdk_3Demu.h @@ -27,6 +27,6 @@ */ int -init_opengl_gdk_3Demu( void); +init_opengl_gdk_3Demu( GdkDrawable * drawable); #endif diff --git a/src/gtk-glade/main.cpp b/src/gtk-glade/main.cpp index f48d1f355..612293103 100755 --- a/src/gtk-glade/main.cpp +++ b/src/gtk-glade/main.cpp @@ -497,7 +497,7 @@ common_gtk_glade_main( struct configured_features *my_config) { #ifdef GTKGLEXT_AVAILABLE if ( !use_null_3d) { /* setup the gdk 3D emulation */ - if ( init_opengl_gdk_3Demu()) { + if ( init_opengl_gdk_3Demu(GDK_DRAWABLE(pWindow->window))) { NDS_3D_SetDriver(1); if (!gpu3D->NDS_3D_Init()) { diff --git a/src/gtk/gdk_3Demu.cpp b/src/gtk/gdk_3Demu.cpp index d5a936152..f914a3eba 100644 --- a/src/gtk/gdk_3Demu.cpp +++ b/src/gtk/gdk_3Demu.cpp @@ -151,11 +151,11 @@ _oglrender_init( void) { } int -init_opengl_gdk_3Demu( void) { +init_opengl_gdk_3Demu( GdkDrawable * drawable) { GdkGLConfig *glconfig; /* create the off screen pixmap */ - target_pixmap = gdk_pixmap_new ( NULL, 256, 192, 24); + target_pixmap = gdk_pixmap_new ( drawable, 256, 192, -1); if ( target_pixmap == NULL) { g_print ("*** Failed to create pixmap.\n"); diff --git a/src/gtk/gdk_3Demu.h b/src/gtk/gdk_3Demu.h index 0015ba9a2..9b2e881fa 100644 --- a/src/gtk/gdk_3Demu.h +++ b/src/gtk/gdk_3Demu.h @@ -27,6 +27,6 @@ */ int -init_opengl_gdk_3Demu( void); +init_opengl_gdk_3Demu( GdkDrawable * drawable); #endif diff --git a/src/gtk/main.cpp b/src/gtk/main.cpp index 9f7ede253..2967c5bb0 100644 --- a/src/gtk/main.cpp +++ b/src/gtk/main.cpp @@ -1878,7 +1878,7 @@ common_gtk_main( struct configured_features *my_config) #ifdef GTKGLEXT_AVAILABLE if ( !use_null_3d) { /* setup the gdk 3D emulation */ - if ( init_opengl_gdk_3Demu()) { + if ( init_opengl_gdk_3Demu(GDK_DRAWABLE(pWindow->window))) { NDS_3D_SetDriver ( 1); if (!gpu3D->NDS_3D_Init ()) {