all repos — mgba @ 86cf8a90a35bd1b210aa21e8252164dc6f9928c2

mGBA Game Boy Advance Emulator

SDL: Prevent resizing below 1x resolution with integer scaling
Anty-Lemon Anty-Lemon@users.noreply.github.com
Sat, 06 May 2017 19:41:07 -0400
commit

86cf8a90a35bd1b210aa21e8252164dc6f9928c2

parent

3889fd4d3f893b9a2445cea2057dbd23c997bf3c

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/platform/sdl/gl-common.csrc/platform/sdl/gl-common.c

@@ -38,6 +38,9 @@ renderer->glCtx = SDL_GL_CreateContext(renderer->window);

SDL_GL_SetSwapInterval(1); SDL_GetWindowSize(renderer->window, &renderer->viewportWidth, &renderer->viewportHeight); renderer->player.window = renderer->window; + if (renderer->lockIntegerScaling) { + SDL_SetWindowMinimumSize(renderer->window, renderer->width, renderer->height); + } #else SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); #ifdef COLOR_16_BIT