Skip to content

Commit

Permalink
enhancement: apply scaling factor to emulation window also (fixes #1421)
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Sep 10, 2024
1 parent 1bdeb60 commit e96b382
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/osdep/amiberry_gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,17 @@ 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
{
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:");
Expand Down Expand Up @@ -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 };
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit e96b382

Please sign in to comment.