diff --git a/CHANGES b/CHANGES index ad4dd9378..41419ef4c 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ Misc: - GBA Memory: Use a dynamically sized mask for ROM memory - Qt: Remove useless help icons in dialogs - ARM7: Combine shifter-immediate and shifter-register functions to reduce binary size + - SDL: Support fullscreen in SDL 1.2 0.3.0: (2015-08-16) Features: diff --git a/src/platform/sdl/gl-common.c b/src/platform/sdl/gl-common.c index 30158653d..9cb330c41 100644 --- a/src/platform/sdl/gl-common.c +++ b/src/platform/sdl/gl-common.c @@ -39,9 +39,9 @@ void GBASDLGLCommonInit(struct SDLSoftwareRenderer* renderer) { #else SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); #ifdef COLOR_16_BIT - SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 16, SDL_OPENGL); + SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 16, SDL_OPENGL | (SDL_FULLSCREEN * renderer->fullscreen)); #else - SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 32, SDL_OPENGL); + SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 32, SDL_OPENGL | (SDL_FULLSCREEN * renderer->fullscreen)); #endif #endif } diff --git a/src/platform/sdl/main.c b/src/platform/sdl/main.c index 78dda4706..292130f04 100644 --- a/src/platform/sdl/main.c +++ b/src/platform/sdl/main.c @@ -75,6 +75,8 @@ int main(int argc, char** argv) { #if SDL_VERSION_ATLEAST(2, 0, 0) renderer.player.fullscreen = opts.fullscreen; renderer.player.windowUpdated = 0; +#else + renderer.fullscreen = opts.fullscreen; #endif renderer.ratio = graphicsOpts.multiplier; if (renderer.ratio == 0) { diff --git a/src/platform/sdl/main.h b/src/platform/sdl/main.h index 66ae8c75c..3cc362407 100644 --- a/src/platform/sdl/main.h +++ b/src/platform/sdl/main.h @@ -49,6 +49,8 @@ struct SDLSoftwareRenderer { SDL_Texture* sdlTex; SDL_Renderer* sdlRenderer; SDL_GLContext* glCtx; +#else + bool fullscreen; #endif int viewportWidth;