Fix #4022: Mac cursor offset on launch (#13095)

Update config when forcing windowed mode
This commit is contained in:
Aidan Waite 2020-10-17 18:57:03 +09:00 committed by GitHub
parent cd39c30989
commit d287653cb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,7 @@
- Change: [#13160] The lay-out of the Park Cheats tab has been improved.
- Fix: [#1324] Last track piece map selection still visible when placing ride entrance or exit (original bug).
- Fix: [#3200] Close Construction window upon selecting vehicle page.
- Fix: [#4022] Fix Mac cursor offset on launch
- Fix: [#4041] Garbled park option on scenario editor with custom theme.
- Fix: [#5178] Lighting effects cannot be disabled in software mode
- Fix: [#5904] Empty errors on tile inspector base height change.

View File

@ -678,8 +678,13 @@ private:
OnResize(width, height);
UpdateFullscreenResolutions();
SetFullscreenMode(static_cast<FULLSCREEN_MODE>(gConfigGeneral.fullscreen_mode));
// Fix #4022: Force Mac to windowed to avoid cursor offset on launch issue
#ifdef __MACOSX__
gConfigGeneral.fullscreen_mode = static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::WINDOWED);
#else
SetFullscreenMode(static_cast<FULLSCREEN_MODE>(gConfigGeneral.fullscreen_mode));
#endif
TriggerResize();
}