mirror of
https://github.com/LIV2/amiberry.git
synced 2025-12-05 22:22:44 +00:00
enhancement: remember window sizes for P96 screens also (#1568)
P96 screens would always resize the window to the resolution set. However, if the user had resized the window to other dimensions, it would be preferable to keep those, instead. This change does that, with the following catch: Only if the amiga window if larger than the requested RTG resolution, will it be kept. If it's smaller, the window will resize to accomodate the new resolution, to avoid scaling it down.
This commit is contained in:
parent
b3365c9120
commit
08d809e49e
@ -2476,7 +2476,14 @@ bool target_graphics_buffer_update(const int monid, const bool force)
|
||||
{
|
||||
if (mon->amiga_window && isfullscreen() == 0)
|
||||
{
|
||||
SDL_SetWindowSize(mon->amiga_window, w, h);
|
||||
if (mon->amigawin_rect.w > w || mon->amigawin_rect.h > h)
|
||||
{
|
||||
SDL_SetWindowSize(mon->amiga_window, mon->amigawin_rect.w, mon->amigawin_rect.h);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_SetWindowSize(mon->amiga_window, w, h);
|
||||
}
|
||||
}
|
||||
#ifdef USE_OPENGL
|
||||
renderQuad = { dx, dy, w, h };
|
||||
@ -2522,7 +2529,7 @@ bool target_graphics_buffer_update(const int monid, const bool force)
|
||||
|
||||
if (mon->amiga_window && isfullscreen() == 0)
|
||||
{
|
||||
if (mon->amigawin_rect.w != 800 && mon->amigawin_rect.h != 600)
|
||||
if (mon->amigawin_rect.w > 800 && mon->amigawin_rect.h != 600)
|
||||
{
|
||||
SDL_SetWindowSize(mon->amiga_window, mon->amigawin_rect.w, mon->amigawin_rect.h);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user