all repos — mgba @ 3889fd4d3f893b9a2445cea2057dbd23c997bf3c

mGBA Game Boy Advance Emulator

SDL: Add integer scaling
Anty-Lemon Anty-Lemon@users.noreply.github.com
Sat, 06 May 2017 18:59:53 -0400
commit

3889fd4d3f893b9a2445cea2057dbd23c997bf3c

parent

b58d216868189f71475404d75839f426cb086d22

M src/platform/sdl/gl-sdl.csrc/platform/sdl/gl-sdl.c

@@ -38,6 +38,7 @@

mGLContextCreate(&renderer->gl); renderer->gl.d.user = renderer; renderer->gl.d.lockAspectRatio = renderer->lockAspectRatio; + renderer->gl.d.lockIntegerScaling = renderer->lockIntegerScaling; renderer->gl.d.filter = renderer->filter; renderer->gl.d.swap = mSDLGLCommonSwap; renderer->gl.d.init(&renderer->gl.d, 0);
M src/platform/sdl/gles2-sdl.csrc/platform/sdl/gles2-sdl.c

@@ -109,6 +109,7 @@

mGLES2ContextCreate(&renderer->gl2); renderer->gl2.d.user = renderer; renderer->gl2.d.lockAspectRatio = renderer->lockAspectRatio; + renderer->gl2.d.lockIntegerScaling = renderer->lockIntegerScaling; renderer->gl2.d.filter = renderer->filter; renderer->gl2.d.swap = mSDLGLCommonSwap; renderer->gl2.d.init(&renderer->gl2.d, 0);
M src/platform/sdl/main.csrc/platform/sdl/main.c

@@ -114,6 +114,7 @@ renderer.fullscreen = renderer.core->opts.fullscreen;

#endif renderer.lockAspectRatio = renderer.core->opts.lockAspectRatio; + renderer.lockIntegerScaling = renderer.core->opts.lockIntegerScaling; renderer.filter = renderer.core->opts.resampleVideo; if (!mSDLInit(&renderer)) {
M src/platform/sdl/main.hsrc/platform/sdl/main.h

@@ -65,6 +65,7 @@ int viewportHeight;

int ratio; bool lockAspectRatio; + bool lockIntegerScaling; bool filter; #ifdef BUILD_GL