Commit Graph
58 Commits
Author SHA1 Message Date
Matthias Moninger 379287ed0f Remove legacy stuff in common.h (#20523)
* Remove old interop macro

* Remove legacy string macro things

* Unbreak the posix/linux/unix builds

* Add String::IEquals and use it for case insensitive compare

* Add missing include for posix

* Replace _strnicmp with String::StartsWith

* Add LoByte and HiByte into Util.h, swap macros

* Fix android build

* Hopefully last of the string things

* Replace STUB directly with the warning
2023-07-02 12:59:20 +03:00
Hielke Morsinkandduncanspumpkin 6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek b4480b344e Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00:00
James103 73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01: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
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
jazzysoggy c0853b56ad Fix Format_VA. Rename Format to StdFormat.
author jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1655955994 -0400
committer jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1656516326 -0400

Fixed Format_VA and renamed Format to StdFormat. Both now output to Std::String, while taking the same input as before. Changed functions that use these two to account for this output difference
2022-07-24 19:30:57 +02:00
Gymnasiast 3890aa50b7 Fix filters KDialog
They were case sensitive and did not display correctly.
2022-04-16 18:41:20 +02:00
Gymnasiast b27c48f035 Fix Zenity/Kdialog not opening in paths with single quotes 2022-04-16 18:41:20 +02:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Gymnasiast 55591b1b2f Merge old and new FileDialogDesc 2022-01-29 13:55:10 +01:00
Gymnasiast 919c73d030 C++-ify most path handling 2022-01-08 16:58:57 +01:00
Hielke Morsink 76b5479bbb Fix undefined use of cctype functions 2021-11-06 16:27:54 +01:00
Hielke Morsink 4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Michael Steenbeek 430711a33b Cache HasFilePicker() value in UiContext 2021-03-20 14:51:15 +01: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
Keith Stellyes 171132fb6d Add Execute and FindApp to Platform class 2020-10-22 21:17:28 +02: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
Tulio Leao b948d65c33 Use named casts on openrct2-ui root folder (#11137) 2020-04-18 12:15:07 +02:00
niaandMichael Steenbeek addd27d4dc Support NetBSD and simplify platform ifdefs. (#10271)
For files intended to support unixy freedesktopy systems,
reduce the ifdef down to __unix__ && !__APPLE__ && !__ANDROID__,
rather than naming linux and all the BSDs and so on by hand.

Should simplify adding support for systems like illumos in the
future.

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2019-12-22 17:07:39 +01:00
Ted John 15cb3e1889 Remove unnecessary new line characters from log calls (#9237) 2019-05-12 13:48:56 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Aaron van Geffen e1d6585423 Simplify EscapePathForShell by using std functions. 2018-09-13 23:20:17 +02:00
Gymnasiast e84348309c Add function to shell-escape path 2018-09-13 22:20:45 +02:00
Gymnasiast 40cd64c916 Add Linux support 2018-09-13 22:20:45 +02:00
Christian Schubert 6e6753aaf1 Added MacOS OpenFolder support. 2018-09-13 22:19:51 +02:00
clang-format d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-formatandHielke Morsink b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-formatandHielke Morsink 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format 9c022606f1 clang-format UI root 2018-07-23 16:00:14 +02:00
Brian Callahan 66bfd42551 Do not print which(1) errors to the console
On first launch of the game, OpenRCT2 tries to find Gnome or KDE eyecandy dialog programs zenity and kdialog to inform the user to set the `game_path`. It will fall back to an SDL popup with manual instructions if neither is found, which looks fine. However, if OpenRCT2 is launched from the command line, which will print "file not found" errors if you don't have zenity and/or kdialog installed, which might potentially confuse the user.

This patch routes the error messages to `/dev/null`, as we don't really care if those programs are not found.

See this thread on the OpenBSD mailing list: https://marc.info/?l=openbsd-ports&m=153020454402268&w=2
2018-07-07 20:53:50 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John 7b610fd3c0 Use shared_ptr more for UiContext in relation to DrawingEngine 2018-05-11 20:37:48 +01:00
Hielke Morsink 8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
Hielke Morsink bc44792da9 Pack nested namespaces together 2018-05-04 22:54:43 +02:00
Hielke Morsink 3b697c071d Only append default extension when none is provided
This should give Linux the same behaviour as Windows. It requires testing, I don't have access to a Linux machine.
2018-03-24 13:25:41 +01:00
Michael Steenbeek 755add6c9a Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Krutonium fd459f0791 Add a visible notification for missing KDialog/Zenity 2017-10-14 22:16:51 +02:00
Daniel Trujillo Viedma 39ecd37d27 Fix fault in #6401: append extensions only when saving 2017-10-11 09:43:49 +02:00
Daniel Trujillo Viedma 9dc04ed07a Fix #3510: Auto append file extension when not specified on save 2017-10-10 09:55:40 +02:00
Michał Janiszewski 5b0636cf0d Adapt Linux UiContext to Emscripten 2017-09-08 11:57:24 +02:00
David CARLIER 04ed2d78d2 Fix building on FreeBSD 2017-06-27 08:56:03 +02:00
Brian Callahan fe8f949b3f Add OpenBSD support. 2017-06-25 23:25:46 +02:00
Marijn van der Werf 8766ec37a1 Add Android project 2017-06-15 14:22:15 +02:00
Ted John af91b9f4b4 Fix #5521: Infinite loop on first run if neither Zenity nor kdialog are installed (#5526) 2017-06-03 22:13:20 +01:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Ted John 4932537a91 Fix kdialog implementation 2017-05-29 22:38:46 +02:00