Commit Graph

69 Commits

Author SHA1 Message Date
Rubidium
87ccff16b5 Codechange: use std::string for the screenshot name/path 2023-06-04 16:53:10 +02:00
Rubidium
30b9e02dd9 Codechange: replace crashlog filenames with std::string in Crashlog 2023-05-25 05:42:10 +02:00
Rubidium
19304bd3d5 Codechange: replace seprintf with fmt::format for filling the crash log data 2023-05-25 05:42:10 +02:00
Rubidium
a19a43a4f7 Codechange: use fmt::format and time conversions over "custom" implementation 2023-05-22 15:36:09 +02:00
Rubidium
c518293135 Codechange: replace printf with fmt::print 2023-05-21 15:12:02 +02:00
Patric Stout
0850193a38
Fix: survey result on crash only worked on Linux (#10855)
Every OS-specific crashlog handler has their own MakeCrashLog
in some form. In result, only Linux was calling the generic one.
2023-05-21 12:57:32 +02:00
Patric Stout
7634553d22 Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.

When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU

All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
2023-05-14 23:22:02 +02:00
Rubidium
ab51175db2 Codechange: use std::string for script config 2023-05-14 22:54:10 +02:00
Rubidium
51c6b8c1e4 Codechange: use fmt::format_to for gamelog message creation over seprintf 2023-05-04 23:23:32 +02:00
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 2023-05-04 13:14:12 +00:00
Peter Nelson
00bf42353a Codechange: Place gamelog into its own class, along with internal data.
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
2023-05-02 19:47:55 +01:00
Patric Stout
81d4fa6999 Feature: drop ICU-lx in favour of directly interfacing with harfbuzz
This means we have RTL support again with ICU 58+. It makes use of:
- ICU for bidi-itemization
- ICU for script-itemization
- OpenTTD for style-itemization
- harfbuzz for shaping
2023-05-01 22:17:56 +02:00
Rubidium
f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Patric Stout
64523709bf
Add: use https:// for content-service connections (#10448)
This requires the use of WinHTTP (for Windows) or libcurl (for all
others except Emscripten). Emscripten does not support http(s)
calls currently.

On Linux it requires ca-certificates to be installed, so the HTTPS
certificate can be validated. It is really likely this is installed
on any modern machine, as most connections these days are HTTPS.

(On MacOS and Windows the certificate store is filled by default)

Reminder: in case the http(s):// connection cannot be established,
OpenTTD falls back to a custom TCP-based connection to fetch the
content from the content-service. Emscripten will always do this.
2023-02-12 12:07:31 +01:00
Rubidium
d51d08ddcb Codechange: put stack variables in global variables for gamelog/crashlog 2023-01-28 17:23:30 +01:00
Rubidium
7cdc23fd64 Codechange: hide the map's size related fields in the Map structure 2023-01-21 17:11:40 +01:00
Niels Martin Hansen
5b86bce7b2 Change: Log video driver info string instead of just name in crashlog 2022-05-03 21:03:30 +02:00
glx22
b6c5f49379 Change: add a timestamp in name of crash files 2022-02-02 21:32:01 +01:00
Patric Stout
bcd7a7aafe
Codechange: rename _SQ64 into POINTER_IS_64BIT (#9313) 2021-05-30 10:40:03 +02:00
rubidium42
aa5a8fe28a Codechange: use thread safe time functions
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
2021-05-14 23:22:29 +02:00
Michael Lutz
dd138fc460 Codechange: Stringify config file paths. 2020-12-27 13:19:25 +01:00
Michael Lutz
a49fdb7ebb Codechange: Store base set related texts in std::strings. 2020-05-21 20:02:34 +02:00
glx
3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt
13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
nikolas
2d27e8e685 Add #6173: New SDL 2 based video and sound drivers (#7086) 2019-09-19 17:18:50 +02:00
Charles Pigott
47d0d86a3c Fix #7255: Prevent crashlog corruption by only printing the 32 most recent news messages 2019-04-29 17:43:27 +01:00
Henry Wilson
7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Jonathan G Rennison
1a115e1cc8 Change: Include _current_company in crashlog AI config line
_current_company is not currently logged anywhere in the crashlog.
_local_company is logged, despite being much less useful than
_current_company.
This change logs _current_company alongside _local_company.
2019-03-11 12:47:46 +00:00
Patric Stout
36105841b9 Codechange: ICU_SORT is in reality ICU_I18N (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
2019-03-11 10:16:00 +01:00
Patric Stout
52d7e7d45e Codechange: ICU_LAYOUT is in reality ICU_LX (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
2019-03-11 10:16:00 +01:00
Patric Stout
7adae09897 Codechange: liblzma is called liblzma, how ever strange that might be
It is the only library we use that calls itself with 'lib' in the
name. This might be confusing, but with the arrival of cmake a lot
of these things are automated. And detection will find 'liblzma',
not 'lzma', like with 'lzo', 'zlib', ..
2019-03-11 10:16:00 +01:00
Charles Pigott
c3bc7d657e Codechange: Remove ability for SDL to be dynamically loaded on Windows 2019-03-02 17:13:05 +01:00
Charles Pigott
62d79900ec Add: List recent news messages in crashlog output 2018-04-13 22:08:13 +02:00
alberth
0adfb1ac6f (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 2016-09-04 16:06:50 +00:00
alberth
597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 2016-09-04 12:57:43 +00:00
frosch
1b84d893e0 (svn r27573) -Fix [FS#6467]: Compilation failure with gcc 6.1 due to headers included after safeguards.h (JGR) 2016-05-22 10:15:35 +00:00
rubidium
69fac508c3 (svn r27367) -Codechange: make a distinction between the layouting part of ICU (lx) or the sorting/collation part of ICU (i18n) 2015-08-09 12:33:27 +00:00
rubidium
b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 2014-04-28 21:06:51 +00:00
rubidium
0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium
2618d960e3 (svn r26209) -Codechange: remove some template magic and simplify some code 2014-01-02 22:41:58 +00:00
rubidium
00c05e79b1 (svn r26170) -Feature-ish: add the currently used fonts to the crash log 2013-12-22 17:46:27 +00:00
frosch
edd9c0553a (svn r24804) -Add: Separate subdirectory for screenshots. 2012-12-09 16:52:43 +00:00
rubidium
d175528220 (svn r23660) -Feature-ish: add the game script to the crash log 2011-12-22 20:05:52 +00:00
truebrain
cc12942d70 (svn r23384) -Remove: no longer allow a binary to be without AI support; the parts some compilers failed at, are integrated in other parts of the code now too 2011-12-01 12:03:34 +00:00
rubidium
6c9078fd30 (svn r21844) -Codechange: move documentation towards the code to make it more likely to be updates [a-c]. 2011-01-18 22:17:15 +00:00
rubidium
f4e4056aed (svn r21161) -Codechange: make the currently used language easier accessible 2010-11-13 11:25:58 +00:00
rubidium
59519edd34 (svn r21044) -Feature: XZ/LZMA2 savegame support. New default reduces savegame size by 10 to 30% with slightly more CPU usage. With maximum settings it reduces savegame size by 20 to 30%, but that takes 7 to 14 times longer. Map saving + downloading takes, on average, 5% less. 2010-10-27 16:42:20 +00:00
rubidium
91f31b59e8 (svn r20439) -Fix [FS#4023]: MinGW compiler complaining about converting -1 to an unsigned int 2010-08-10 16:15:42 +00:00
rubidium
0dde0a7585 (svn r20138) -Change: also put the base set version number in the crash log 2010-07-14 09:06:41 +00:00