Commit Graph

150 Commits

Author SHA1 Message Date
Hielke Morsink 5fa53ad528
Rename global config functions to use TitleCase 2022-10-16 21:46:08 +02:00
Hielke Morsink abac080d3e
Rename public general config data members 2022-10-16 21:46:01 +02:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Hielke Morsink 7f29e4e39c
Make `rct_windowclass` strong type `WindowClass`
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
Michał Janiszewski a9fe4da279 Use SDL_ShowMessageBox's 'close' value for dummy UI context 2022-08-04 18:42:34 +02:00
Michał Janiszewski a6e84fab5c Add a message box with buttons to UiContext 2022-08-04 18:42:33 +02:00
Raymond Zhao 7399163a3c
Use more smart ptrs and u8strings (#17611)
* Use smart ptr for PlatformUiContext and WindowManager

* Remove more delete calls

* Apply PR feedback
2022-07-28 18:19:38 +01:00
Cory Sanin 05f1007dd9
Fix #16989: Re-focusing maximised window triggers a restore and maximise
Fixes #16989 by removing an SDL hack. Originally added to address issue #2158, I can't reproduce this issue with the hack removed. Tested on Linux (by CorySanin) and Windows (by Broxzier).
2022-07-02 21:48:43 +02:00
Hielke Morsink 1fc2312abd
Move most command logic from sequence player
This commit also moves everything related to the OpenRCT2::Title namespace.

Can be compiled with ENABLE_SCRIPTING disabled.
2022-06-28 21:57:26 +02:00
Ted John 585ebed600
Fix #17297: Crash when switching language (#17370)
* Refactor all uses of IAudioChannel and the audio mixer.
* Use shared_ptr to avoid dead pointers hanging about.
* Reload particular audio channels where necessary after object reload.
2022-06-27 17:41:53 +01:00
Ted John b441cf768c
Log SDL2 version on startup 2022-05-10 21:54:04 +02:00
Tulio Leao 397bc51e68 Rename _sdlfsFlags to _sdlFullscreenFlags 2022-03-18 00:38:26 -03:00
duncanspumpkin f835a5b521 Apply clang-tidy to static variables 2022-03-18 00:38:26 -03:00
Michael Steenbeek 5edc561715
Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Gymnasiast 98cd39a375
Always use SNN for non-integer scaling 2022-01-24 17:46:22 +01:00
ζeh Matt 94e20ba7fe
Rename some Update functions to Tick 2021-12-13 19:04:48 +02:00
Hielke Morsink 9dd20ec619
Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
ζeh Matt 05e58cda11
Merge pull request #15538 from ZehMatt/feature/parallel-draw
Implement multithreaded drawing
2021-10-09 05:53:48 -07:00
Gaven Rendell 86cf0dc916 Remove Windows check 2021-10-08 21:27:48 +01:00
Gaven Rendell 33fa31e6d0 Exclude Win/Mac from ignoring mod key 2021-10-08 21:25:36 +01:00
Gaven Rendell 7787bb46e0 Handle mod key edge-cases in tiling WMs
This commit ignores keypresses when the mod key is held.

The reasoning is that an odd interaction happens between SDL applications and
tiling window managers. Tiling window managers like Xmonad and i3 usually use
the mod ("windows") key and a number to change workspaces. When changing
workspaces, however, the WMs still send the number key through instead of
"eating" it. It's not clear why, exactly, but it seems universal.

Mod+1 -> Goes to workspace #1
Mod+2 -> Goes to workspace #2
...
Mod+9 -> Goes to workspace #9

Most applications don't even see the number key being sent, so if you move to
workspace 1, Firefox won't type "1" into the browser bar, Vim won't type "1"
into your file, etc. But SDL applications, for whatever reason, DO see this
keydown. Of course, they'll handle it like a regular key press. So if you move
to workspace 1, which contains OpenRCT, it inadvertently toggles x-ray mode.

I first found this bug in another SDL game, The Powder Toy. After some
discussion with the devs, they fixed it like this, by ignoring keydown events
when the mod key is pressed, since the mod key is reserved for the window
manager anyway. It works well and should be in the next release.

c7619387ac...93b920a57f

I did the same thing here.
2021-10-08 21:25:33 +01:00
ζeh Matt a0e7752f26
Pass rct_drawpixelinfo explicit to avoid races 2021-10-06 23:48:07 +03:00
Hielke Morsink c887a049d2
Fix various Cppcheck warnings (#15081) 2021-07-24 23:41:50 +02:00
Ted John b3f6437092 Apply suggestions from code review 2021-02-21 03:14:19 +00:00
Ted John cacfb8be07 Refactor dead key handling 2021-02-21 03:14:19 +00:00
Gymnasiast d5eb1cc036 Fix dead key handling
This fixes deadkey handling on at least US International on Linux.
2021-02-21 03:14:19 +00:00
Ted John 59b4be6a12 Move InputManager to UiContext 2021-02-21 03:14:19 +00:00
Ted John e7ae9f9f15 Read legacy shortcuts and move to constants 2021-02-21 03:14:17 +00:00
Ted John 9964df5335 Implement gamepad support 2021-02-21 03:13:28 +00:00
Ted John c8f31dea7f Process keyboard input events 2021-02-21 03:13:28 +00:00
Ted John ccae533978 Add input manager 2021-02-21 03:13:27 +00:00
Keith Stellyes 268e39d12a
GOG installer extraction for POSIX 2021-01-03 17:53:14 +01:00
Gymnasiast d963438c4f
Check if platform has a file picker 2020-11-08 14:06:42 +01:00
Łukasz Pękalski 88a6a085e4
Close #12455: Refactor MOUSE_STATE to use strong enum (#13361)
* Close #12455: Refactor MOUSE_STATE to use strong enum

refactor: MouseState to strong enum

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-03 18:41:19 -03:00
pizza2004 b0fd5f93d7
Refactor UI/Interface misc to TitleCase (#13354)
* Refactor LandTool to Namespace

* Refactor Theme to TitleCase

* Refactor ViewportInteraction to TitleCase
2020-11-03 10:59:00 +00:00
pizza2004 1643c62939 Refactor UI/Input MouseInput to Title Case 2020-11-02 07:05:33 -07:00
Łukasz Pękalski 9dcbf6d4e6
Close #4865: Offer an option to disable inhibiting the monitor power (#13243)
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-10-20 22:02:44 +02:00
Aidan Waite d287653cb5
Fix #4022: Mac cursor offset on launch (#13095)
Update config when forcing windowed mode
2020-10-17 11:57:03 +02:00
Julia Pinheiro cba1d48226
Close #12408: Refactor CURSOR_ID to use strong enum 2020-10-11 18:01:14 +02:00
Julia Pinheiro 8800c32e52
Close #12404: Refactor DRAWING_ENGINE to use strong enum (#13070) 2020-10-02 22:41:30 -03:00
Michał Janiszewski 0ae86d0558
Don't use empty resolutions (#12980) 2020-09-20 23:13:10 -03:00
Gymnasiast 31d20cefb2
Rename rain to weather where appropriate
Co-authored-by: Brett Penzer <brettpenzer123@live.co.uk>
2020-09-14 21:57:54 +02:00
Tom Parsons 9cdae2d1e2
Fix #12401: Refactor SCALE_QUALITY to use strong enum (#12673) 2020-08-20 23:32:56 -03:00
Michał Janiszewski 352870b503 Add OpenURL method, with implementation for Linux and Windows 2020-07-26 22:09:29 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Thamara Andrade 8ce799a72e
Close #12118: Prefer foward declaration of *Coords* in headers (#12142)
* Removing unnecessary world/Location includes in headers
* Prefer foward declaration of *Coords* in header files
Closes #12118
2020-07-06 10:10:39 -03:00
Ted John c67962577a Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING 2020-04-26 14:35:08 +01:00
Ted John bac91cd563 Allow scripting to be compile-disabled 2020-04-26 14:35:03 +01:00
Ted John b47bcabaf1 Move ui scripting API to libopenrct2ui 2020-04-26 14:34:59 +01:00
Tulio Leao b948d65c33
Use named casts on openrct2-ui root folder (#11137) 2020-04-18 12:15:07 +02:00