1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00
Commit Graph

136 Commits

Author SHA1 Message Date
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
Tulio Leao
724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Michael Steenbeek
d395d67b95 Merge pull request #10846 from tupaschoal/const-ref-screencoords
Prefer const ref to send ScreenCoordsXY over
2020-03-01 14:17:51 +01:00
Tulio Leao
9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Tulio Leao
826478a8ef Use ScreenCoordsXY on UiContext.cpp 2020-02-22 16:01:20 -03:00
Michael Steenbeek
d7f23bc5bf Close #6898: Remove LOADMM and LOADRCT1 commands (#10546) 2020-01-12 14:26:33 +01:00
Duncan
099404b505 Merge pull request #10381 from tupaschoal/cursorsate-store-coords
Make CursorState store a ScreenCoordsXY object
2019-12-18 20:10:51 +00:00
Tulio Leao
c2c40fa951 Create ScreenCoordsXY on UIContext mouse/finger functions (#10382) 2019-12-17 18:46:28 +01:00
Tulio Leao
2cd3add373 Make CursorState store a ScreenCoordsXY object 2019-12-14 23:30:55 -03:00
Tulio Leao
9d09f1b95c Use ScreenCoordsXY on context cursor operations (#10364) 2019-12-14 22:52:18 +01:00
Tom Lankhorst
6eea943083 Pass SDL_WINDOW_ALLOW_HIGHDPI to SDL_CreateWindow (#10125) 2019-10-21 22:36:05 +02:00
Tulio Leao
5f916b79ae Use ScreenCoordsXY for MouseInput (#10120) 2019-10-20 19:10:30 +02:00
Matt
951f5009ef Refactor window storage to use std::list instead of std::vector 2019-05-29 19:32:18 +02:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00