diff --git a/src/drivers/sdl/sdl-opengl.cpp b/src/drivers/sdl/sdl-opengl.cpp index 53187751..02b38cc1 100644 --- a/src/drivers/sdl/sdl-opengl.cpp +++ b/src/drivers/sdl/sdl-opengl.cpp @@ -222,6 +222,14 @@ InitOpenGL(int l, InitBlitToHigh(4,0xFF,0xFF00,0xFF0000,efx&2,0,0); #endif } + + if(screen->flags & SDL_FULLSCREEN) + { + xscale=(double)screen->w / (double)(r-l); + yscale=(double)screen->h / (double)(b-t); + if(xscalecurrent_w; + } + if(s_nativeHeight < 0) { + s_nativeHeight = vinf->current_h; + } + // check if we are rendering fullscreen if(s_fullscreen) { flags |= SDL_FULLSCREEN; @@ -314,7 +324,9 @@ InitVideo(FCEUGI *gi) } - s_screen = SDL_SetVideoMode(xres, yres, desbpp, flags); + s_screen = SDL_SetVideoMode(s_useOpenGL ? s_nativeWidth : xres, + s_useOpenGL ? s_nativeHeight : yres, + desbpp, flags); if(!s_screen) { FCEUD_PrintError(SDL_GetError()); return -1; @@ -359,7 +371,7 @@ InitVideo(FCEUGI *gi) } #endif -#ifdef _GTK +#if defined(_GTK) && defined(SDL_VIDEO_DRIVER_X11) int noGui; g_config->getOption("SDL.NoGUI", &noGui); if(noGui == 0)