SDL: Support fullscreen in SDL 1.2
Jeffrey Pfau jeffrey@endrift.com
Thu, 27 Aug 2015 19:24:14 -0700
4 files changed,
7 insertions(+),
2 deletions(-)
M
CHANGES
→
CHANGES
@@ -11,6 +11,7 @@ - Qt: Increase usability of key mapper
- 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:
M
src/platform/sdl/gl-common.c
→
src/platform/sdl/gl-common.c
@@ -39,9 +39,9 @@ renderer->player.window = renderer->window;
#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 }
M
src/platform/sdl/main.c
→
src/platform/sdl/main.c
@@ -75,6 +75,8 @@ renderer.viewportHeight = opts.height;
#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) {
M
src/platform/sdl/main.h
→
src/platform/sdl/main.h
@@ -49,6 +49,8 @@ SDL_Window* window;
SDL_Texture* sdlTex; SDL_Renderer* sdlRenderer; SDL_GLContext* glCtx; +#else + bool fullscreen; #endif int viewportWidth;