all repos — mgba @ d5b8fdf81cff2e1cc2dc2836926aa9919ce3146e

mGBA Game Boy Advance Emulator

SDL: Fix SDL 1.2 build
Jeffrey Pfau jeffrey@endrift.com
Wed, 05 Nov 2014 03:42:19 -0800
commit

d5b8fdf81cff2e1cc2dc2836926aa9919ce3146e

parent

9cc43cd8838a7d6c7f7aae1e98b884f002021acf

3 files changed, 2 insertions(+), 3 deletions(-)

jump to
M src/platform/sdl/main.csrc/platform/sdl/main.c

@@ -64,6 +64,7 @@ #if SDL_VERSION_ATLEAST(2, 0, 0)

renderer.events.fullscreen = opts.fullscreen; renderer.events.windowUpdated = 0; #endif + renderer.ratio = graphicsOpts.multiplier; if (!_GBASDLInit(&renderer)) { freeArguments(&args);
M src/platform/sdl/main.hsrc/platform/sdl/main.h

@@ -25,12 +25,11 @@ #ifndef BUILD_GL

SDL_Texture* tex; SDL_Renderer* sdlRenderer; #endif -#else - int ratio; #endif int viewportWidth; int viewportHeight; + int ratio; #ifdef BUILD_GL GLuint tex;
M src/platform/sdl/sw-sdl.csrc/platform/sdl/sw-sdl.c

@@ -37,7 +37,6 @@ #else

SDL_Surface* surface = SDL_GetVideoSurface(); SDL_LockSurface(surface); - renderer->ratio = graphicsOpts.multiplier; if (renderer->ratio == 1) { renderer->d.outputBuffer = surface->pixels; #ifdef COLOR_16_BIT