From d287653cb5b294a0aeeefd635bea3ba3d2c4c3c5 Mon Sep 17 00:00:00 2001 From: Aidan Waite Date: Sat, 17 Oct 2020 18:57:03 +0900 Subject: [PATCH] Fix #4022: Mac cursor offset on launch (#13095) Update config when forcing windowed mode --- distribution/changelog.txt | 1 + src/openrct2-ui/UiContext.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 3b47989b10..bdb529d2b7 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -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. diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index c23f38faab..a96a68b458 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -678,8 +678,13 @@ private: OnResize(width, height); UpdateFullscreenResolutions(); - SetFullscreenMode(static_cast(gConfigGeneral.fullscreen_mode)); + // Fix #4022: Force Mac to windowed to avoid cursor offset on launch issue +#ifdef __MACOSX__ + gConfigGeneral.fullscreen_mode = static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::WINDOWED); +#else + SetFullscreenMode(static_cast(gConfigGeneral.fullscreen_mode)); +#endif TriggerResize(); }