From e96b382bde0f1af5c9fb53b7cb4f898175179ff6 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Tue, 10 Sep 2024 15:59:23 +0200 Subject: [PATCH] enhancement: apply scaling factor to emulation window also (fixes #1421) --- src/osdep/amiberry_gfx.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osdep/amiberry_gfx.cpp b/src/osdep/amiberry_gfx.cpp index d6f42a27..ad70dedd 100644 --- a/src/osdep/amiberry_gfx.cpp +++ b/src/osdep/amiberry_gfx.cpp @@ -285,8 +285,8 @@ static void SDL2_init() mon->amiga_window = SDL_CreateWindow("Amiberry", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - 800, - 600, + 800 * amiberry_options.window_scaling, + 600 * amiberry_options.window_scaling, mode); } else @@ -294,8 +294,8 @@ static void SDL2_init() mon->amiga_window = SDL_CreateWindow("Amiberry", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - 600, - 800, + 600 * amiberry_options.window_scaling, + 800 * amiberry_options.window_scaling, mode); } check_error_sdl(mon->amiga_window == nullptr, "Unable to create window:"); @@ -2456,7 +2456,7 @@ bool target_graphics_buffer_update(int monid, bool force) { if (mon->amiga_window && isfullscreen() == 0) { - SDL_SetWindowSize(mon->amiga_window, w, h); + SDL_SetWindowSize(mon->amiga_window, w * amiberry_options.window_scaling, h * amiberry_options.window_scaling); } #ifdef USE_OPENGL renderQuad = { dx, dy, w, h }; @@ -2502,7 +2502,7 @@ bool target_graphics_buffer_update(int monid, bool force) if (mon->amiga_window && isfullscreen() == 0) { - SDL_SetWindowSize(mon->amiga_window, scaled_width, scaled_height); + SDL_SetWindowSize(mon->amiga_window, scaled_width * amiberry_options.window_scaling, scaled_height * amiberry_options.window_scaling); } #ifdef USE_OPENGL if (!currprefs.gfx_auto_crop && !currprefs.gfx_manual_crop) {