all repos — mgba @ 147852898c8c1c8b50970ea8033583c4603f9702

mGBA Game Boy Advance Emulator

SDL: Support fullscreen in SDL 1.2
Jeffrey Pfau jeffrey@endrift.com
Thu, 27 Aug 2015 19:24:14 -0700
commit

147852898c8c1c8b50970ea8033583c4603f9702

parent

11f3a6e43d73e8b0ad8be94c6d43fd9345b1bef2

4 files changed, 7 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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.csrc/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.hsrc/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;