mirror of https://github.com/OpenRCT2/OpenRCT2.git
Update the window size when using maximise on macOS
This commit is contained in:
parent
08ccdd6bf0
commit
67b4d919b4
|
@ -75,6 +75,7 @@ Includes all git commit authors. Aliases are GitHub user names.
|
|||
* Daniel Trujillo Viedma (gDanix)
|
||||
* Jonathan Haas (HaasJona)
|
||||
* Jake Breen (Haekb)
|
||||
* Marco Benzi Tobar (Lisergishnu)
|
||||
|
||||
## Toolchain
|
||||
* (Balletie) - macOS
|
||||
|
|
|
@ -569,4 +569,9 @@ bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer, size_t size)
|
|||
}
|
||||
#endif // NO_TTF
|
||||
|
||||
sint32 platform_get_non_window_flags()
|
||||
{
|
||||
return SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -279,4 +279,9 @@ uint8 platform_get_locale_measurement_format()
|
|||
}
|
||||
}
|
||||
|
||||
sint32 platform_get_non_window_flags()
|
||||
{
|
||||
return SDL_WINDOW_MINIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -239,4 +239,9 @@ void core_init();
|
|||
void macos_disallow_automatic_window_tabbing();
|
||||
#endif
|
||||
|
||||
// On macOS the resizing behaviour effectively resizes the window in the same
|
||||
// way a normal drag would do, given constraints in the user desktop (e.g. the dock
|
||||
// positioning). So it follows that the finished window size should be saved.
|
||||
sint32 platform_get_non_window_flags();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -194,9 +194,7 @@ static void platform_resize(sint32 width, sint32 height)
|
|||
|
||||
// Check if the window has been resized in windowed mode and update the config file accordingly
|
||||
// This is called in rct2_update and is only called after resizing a window has finished
|
||||
const sint32 nonWindowFlags =
|
||||
SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
if (!(flags & nonWindowFlags)) {
|
||||
if (!(flags & platform_get_non_window_flags())) {
|
||||
if (width != gConfigGeneral.window_width || height != gConfigGeneral.window_height) {
|
||||
gConfigGeneral.window_width = width;
|
||||
gConfigGeneral.window_height = height;
|
||||
|
|
|
@ -1237,4 +1237,9 @@ bool platform_setup_uri_protocol()
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
sint32 platform_get_non_window_flags()
|
||||
{
|
||||
return SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue