Commit Graph

376 Commits (83d63464db912f030b4cbf2936a878d1c86c338d)

Author SHA1 Message Date
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 5 months ago
Loïc Guilloux 0e738dda88
Fix #11948: [Win32] Convert error messages to utf8 (#11951) 5 months ago
Peter Nelson 6a2c37b4ed
Fix 09f585b: Crash if font name ends with comma or comma and whitespace on Linux. (#11838) 5 months ago
Peter Nelson ae575a7a5b Codechange: Store text run positions in vector of points.
This simplifies the interlaced vector of x/y positions.
5 months ago
Peter Nelson f7cc88f370 Codechange: Return vector references instead of pointer to first item. 5 months ago
Michael Lutz 20f1a0dc57 Fix: [OSX] Spurious log message when a sprite glyph was layouted. 6 months ago
Michael Lutz 36cf6b1d13 Feature: Scalable OpenTTD TrueType font made by Zephyris.
This uses the normal variant for the small font, not the all-caps version.
6 months ago
Michael Lutz 6e766a2e81 Change: Allow TrueType fonts to provide our private-use glyphs. 6 months ago
Loïc Guilloux 93ba6d6776
Fix: compilation without precompiled headers (#11770) 6 months ago
Loïc Guilloux 03df70ce8a
Fix #11752: [Win32] Wrong multi-line text layout due to incorrect partial run handling (#11761) 6 months ago
Patric Stout d3ee045c2d
Codechange: refactor the Windows-only DllLoader in a cross-platform LibraryLoader (#11751) 6 months ago
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 6 months ago
Rubidium e3f49ee7a0 Codechange: coding style fixes 6 months ago
Peter Nelson b85ecf9ac2
Codechange: Replace pointer to Sprite array with reference to SpriteCollection. (#11580)
Add `SpriteLoader::SpriteCollection` type which is an array of `SpriteLoad::Sprite`.

This removes the ambiguity of what `SpriteLoader::Sprite *` is pointing to,
and cleans up mismatches using both dereference -> and array access [] for the
same object.
6 months ago
rubidium42 27082f9efa Codechange: pass std::string references to OpenBrowser 7 months ago
Peter Nelson 1071acb483
Codechange: Redundant use of char * and c_str(). (#11454) 8 months ago
Peter Nelson d4008850e3 Codechange: Ensure function opening `{` is on new line. 8 months ago
Michael Lutz 86e28e79fb Fix #11402: Make string filter locale-aware. 8 months ago
Rubidium c6411168d8 Cleanup: missing spaces before continuation * in some comments 8 months ago
Rubidium f16399f4c9 Codechange: replace x.size() > 0 with !x.empty() 8 months ago
Rubidium c9276c2959 Codechange: replace x.size() == 0 with x.empty() 8 months ago
Loïc Guilloux 0458c15060
Cleanup: [MacOS] Remove unneeded WITH_SDL checks (#11360) 9 months ago
frosch 55da426d44 Codechange: All ParagraphLayoutFactory::AppendToBuffer assume that the buffer has at least some space.
Assert on that.
9 months ago
frosch 5733145c59 Cleanup: Remove unneeded parameters. 9 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 9 months ago
frosch a3f661cb66
Fix: compilation failed on gcc 10.2 due to missing include. (#11300)
'_exit' is defined in 'unistd.h'.
10 months ago
Patric Stout 37e2f99c09
Change: store crash logs in JSON format (#11232) 10 months ago
Patric Stout ba67f39db6
Codechange: vendor the nlohmann-json library (#11290) 10 months ago
Patric Stout a3d631ffed
Change: make nlohmann a mandatory library to build OpenTTD (#11235) 10 months ago
Patric Stout b0d7cfaa3d
Change: [Win32] don't allocate 192KiB of memory on the stack on crash (#11240)
Heap is out of the question, as it might be corrupted.
Allocating this much on stack is silly.

So instead, allocate virtual pages to write the information in.
10 months ago
Patric Stout d4312c59a4
Codechange: [MacOS] use backtrace() instead of our custom variant (#11233)
As mentioned in the comment, we only did it ourselves as we once
were compatible with versions before 10.5. But that time has long
gone. So let's update the code to a bit more modern approach.
10 months ago
Patric Stout b00e483b0f
Change: recover when possible from crashes during a crash (#11238) 10 months ago
Patric Stout 29a37c2e0b
Change: [Win32] unify the crashlog handler with the other OSes (#11236)
While at it, make the crash text a bit more readable, and sync
this with MacOS.
10 months ago
Patric Stout 45cc3acaf5
Codechange: [Win32] unify AppendDecodedStacktrace and LogStacktrace (#11220)
AppendDecodedStacktrace was already doing the same as LogStacktrace,
just with a different name.
10 months ago
Patric Stout 352ac264a5
Remove: [Win32] module-list from crash.log (#11219)
Only Windows implemented this, and it opens the files to read them
to get a CRC. Doing this in a crash-handler is strange at best.

Lastly, nobody has actually ever used this information to come to
some sort of conclusion. The module-list is used in combination
with the crash.dmp, but this information is already embedded in
there.
10 months ago
Patric Stout f120d2beb8
Add: use breakpad to create crash.dmp on MacOS / Linux too (#11202)
Normally only the Windows platform could create a crash.dmp, making
analysing crash-reports from MacOS / Linux rather tricky.
10 months ago
Patric Stout 8f6df242c4
Remove: [Win32] (pointer-only) stack trace in crash.log (#11211)
It only contains pointers, which nobody can decipher anyway.
So instead, just report "Not supported", like other targets do
when they can't print a sane stack trace.
10 months ago
Patric Stout a5aebeb1b5
Remove: [Win32] register values in crash.log (#11212) 10 months ago
Patric Stout cd10ddf9ae
Remove: last remnants of SunOS (#11210)
We have no evidence SunOS has been tried in the last few years,
and the code is awkward enough to just remove.
11 months ago
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
12 months ago
Rubidium d5c75bd655 Codechange: use std::string instead of a temporary buffer for iconv calls 1 year ago
Rubidium 69d5b9d326 Cleanup: unused NO_THREADS #ifdefs 1 year ago
PeterN 8465559488
Codechange: Pass face index as font os_handle for FreeType fonts. (#11073)
This allows fallback font detection to test the specific face within the
font rather instead of only the first.
1 year ago
Rubidium 714ff35e9d Codechange: move to std::string over stredup + free 1 year ago
Rubidium 09f585b772 Codechange: use std::string over stredup+free for splitting font name 1 year ago
Owen Rudge 1a3d1bca59 Remove: OS/2 port 1 year ago
Rubidium b2a8d8aea4 Codechange: use std::string for Windows' ISO code mangling 1 year ago
PeterN f249715db3
Fix #10964: Missing FontConfig format for language. (#10965) 1 year ago
PeterN eda3defcb5
Codechange: Pass language for font detection as std::string. (#10964) 1 year ago
PeterN 7a0b6b7ddf
Codechange: Remove Freetype bits on Win32/OSX. (#10960)
These platforms have their own specific font rendering.
1 year ago