Commit Graph

91 Commits

Author SHA1 Message Date
Patric Stout d3ee045c2d
Codechange: refactor the Windows-only DllLoader in a cross-platform LibraryLoader (#11751) 2024-01-10 21:38:58 +00:00
rubidium42 27082f9efa Codechange: pass std::string references to OpenBrowser 2023-11-29 02:02:30 +01:00
Michael Lutz 86e28e79fb Fix #11402: Make string filter locale-aware. 2023-11-03 22:34:01 +01:00
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +02:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium b2a8d8aea4 Codechange: use std::string for Windows' ISO code mangling 2023-06-07 08:27:18 +02:00
Rubidium d68b5c9162 Codechange: replace buffer + strecpy with std::string for getting clipboard contents 2023-06-03 20:14:33 +02:00
Rubidium 324c43eeb2 Codechange: let FiosGetDiskFreeSpace only return disk space and split FiosGetCurrentPath off 2023-05-31 10:56:33 +02:00
Rubidium f2e704b9a7 Codechange: use std::string for FiosIsRoot 2023-05-31 10:56:33 +02:00
Rubidium 13789d1703 Codechange: use std::string for FiosIsValidFile 2023-05-31 10:56:33 +02:00
PeterN d086f288cd
Codechange: Remove duplicated includes. (#10888)
These are now included by stdafx.h so don't need to be included again.
2023-05-29 14:29:00 +01:00
Rubidium 275ebf4509 Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*> 2023-05-21 15:12:02 +02:00
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 2023-05-17 10:14:41 +01:00
Rubidium 3a822fcd01 Codechange: Make FiosItem's name and title std::string 2023-04-29 13:23:34 +02:00
Rubidium c829930440 Codechange: replace strnatcmp with C++ string capable version 2023-04-29 12:07:45 +02:00
Rubidium df19673fbd Codechange: let convert_to_fs accept std::string 2023-04-29 12:07:45 +02:00
Rubidium f5f6306af3 Codechange: use string/fmt instead of printf for ShowInfo(F) 2023-04-24 17:51:54 +02:00
Rubidium 9e89eb5726 Codechange: move main function(s) to separate files 2023-04-16 18:58:21 +02:00
Charles Pigott b282664242 Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives 2023-04-15 16:57:00 +01:00
glx22 16abdd5254 Change: [Win32] Set the console codepage to UTF-8 2021-07-16 23:01:08 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
glx22 744a9e4745 Codechange: [WIN32] Add a wrapper around GetProcAddress() 2021-06-10 23:17:29 +02:00
glx22 f4c7d5577e Codechange: [WIN32] Use VersionHelpers where appropriate 2021-06-10 23:17:29 +02:00
Patric Stout ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
2021-05-29 11:21:38 +02:00
PeterN f018471b36
Cleanup: Remove old FiosList helper methods. (#9139) 2021-04-29 22:46:42 +01:00
PeterN 56f982fa7f
Fix #9015: Don't set free space value if not requested. (#9016) 2021-04-11 13:07:08 +01:00
Wim Leflere 5233fd2751
Change: [win32] Use user UI language for initial language selection (#8973) (#8974) 2021-04-09 11:22:03 +02:00
Niels Martin Hansen 746f1ca11a Codechange: Remove the now meaningless console_cp parameter from OTTD2FS 2021-04-07 09:31:47 +02:00
Niels Martin Hansen e0561dbded Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers 2021-04-07 09:31:47 +02:00
Niels Martin Hansen cc465efa67 Change: [Win32] Use more modern way of getting free disk space 2021-02-23 11:25:39 +01:00
Niels Martin Hansen b427ddce88 Codechange: Switch to explicit wide strings 2021-02-23 11:25:39 +01:00
Niels Martin Hansen beeb9e0a1b Remove: [Win32] Last pretenses of being able to build for Windows 95 2021-02-23 11:25:39 +01:00
Michael Lutz ef478ade64 Add: [Win32] Video driver that uses OpenGL to transfer the video buffer to the screen. 2021-02-22 22:16:07 +01:00
glx22 348f322df1 Fix f1f281b31: [Win32] MinGW doesn't know timeapi.h 2021-02-13 19:07:42 +01:00
Loïc Guilloux f1f281b318
Fix: [Win32] Set minimum resolution for timers to 1ms. (#8660) 2021-02-09 21:21:57 +01:00
Patric Stout ab7da117e0
Add: always set PERSONAL_DIR "/content_download" in search path (#8481)
This means that if you start OpenTTD with "-c" to indicate another
location to store files, it can still read the content you already
downloaded from your PERSONAL_DIR. This folder is, however,
read-only.

This is useful for situations where you downloaded OpenGFX via
the content-service, but want to run the regression or want to
run with a clean configuration. With this change, you no longer
need to download OpenGFX again.
2021-01-03 11:10:56 +01:00
Michael Lutz f3326d34e7 Codechange: Use std::string in FIO search path handling. 2020-12-27 13:19:25 +01:00
Michael Lutz 0c6e8a8123 Codechange: Store file search paths as std::string. 2020-12-27 13:19:25 +01:00
Michael Lutz dd138fc460 Codechange: Stringify config file paths. 2020-12-27 13:19:25 +01:00
Patric Stout b7851e51ad Fix: set SP_WORKING_DIR earlier with '-c'
On Windows, relative folders don't work so well. So we need to
lookup the full path. This is best done in DetermineBasePaths()
and as a bonus that only sets SP_WORKING_DIR once.
2020-12-13 22:45:50 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
glx22 3e608afa6c
Fix: [Windows] OpenTTD window may be inactive when an error happens (#7482) 2019-04-07 21:52:30 +02:00
Michael Lutz 967b27a2c1 Codechange: C++11 STL has a function for getting the number of CPU cores. 2019-04-06 11:27:39 +02:00
Michael Lutz ae748166d0 Codechange: Use platform independent C++11 function for sleeping on a thread. 2019-04-06 11:27:39 +02:00
Michael Lutz 05bc2ed7cb Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
2019-04-06 11:27:39 +02:00
Charles Pigott fe8c24e081 Codechange: Remove unnecessarily defined functions under MinGW 2019-01-17 21:55:15 +00:00
Charles Pigott 2d981a4b2c Fix: A few minor compile warnings under MinGW 2019-01-17 21:55:15 +00:00
glx 92d3358db5 Fix: [Win32] don't mess with std[out|err|in] if we can't allocate a console 2019-01-05 18:10:14 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00