Commit Graph

689 Commits (05b55c4d4349b69026213ce12e1a41af8e87b069)

Author SHA1 Message Date
Peter Nelson d4008850e3 Codechange: Ensure function opening `{` is on new line. 8 months ago
Rubidium c6411168d8 Cleanup: missing spaces before continuation * in some comments 8 months ago
frosch 5733145c59 Cleanup: Remove unneeded parameters. 9 months ago
frosch b5885295f0 Codechange: Use parameters, which should be used. 9 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 9 months ago
Rubidium 8c742b456f Codechange: use Textbuf directly, instead via several virtual functions in Window 10 months ago
glx22 4eddec9e79 Add: [Emscripten] Support for bootstrapping 10 months ago
glx22 3d1c4a8589 Codechange: [Emscripten] Improve syncfs synchronisation on exit/abort 10 months ago
Patric Stout 502414b567
Fix: [Emscripten] config not saved on exit game (#11248)
When changing a Game Option and pressing Exit Game, the changes
were not actually stored. This because the post-mainloop code
was never executed for Emscripten.
10 months ago
Patric Stout 5ac333c2cc
Fix: [MacOS] screen looks blue-ish when using newer SDKs (#11207)
The define kCGBitmapByteOrder32Host changed (around SDK 12?)
into an enum, which means an old #ifndef was triggering,
overwriting the value to 0. Sadly, 0 means Order16Big, causing
RGBA to become GRAB, which results in strange colours.

As we no longer support PPC, drop that piece of code completely.
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 3f18a8863a Codechange: use std::getline to read strings from stdin 1 year ago
Rubidium fd380127f0 Codechange: use SignalObjectAndWait since we do not support older than Windows XP anymore 1 year ago
Owen Rudge 1a3d1bca59 Remove: OS/2 port 1 year ago
Patric Stout 6869f387ba
Fix 07add7a9: [Win32] use full monitor resolution for fullscreen (#10985)
On Windows in fullscreen you cannot reach the top with
the cursor for the halve of the height of your toolbar.

Additionally, on Win10 in fullscreen you can see the actual toolbar.
1 year ago
Rubidium d5c0d3beb7 Codechange: unify the formatting of the game's caption 1 year ago
Patric Stout 07add7a96e
Fix: [Win32] position window in center of workspace of primary display (#10942) 1 year ago
Patric Stout 0e56a73fb8
Fix: disable hardware acceleration when GPU driver crashed the game last attempt (#10928) 1 year ago
Patric Stout 0d840b4570 Codechange: remove queue_wrap / last_position from mouse movement
No backend uses it anymore, so also no longer any need to support
it.
1 year ago
Patric Stout a969a78f81 Fix: [SDL] unify the way X11 and Wayland handle mouse events
Basically, we drop RelativeMode completely, and use the same trick
as used by the Windows driver: read all motion events till the last
one, and use that as value.
1 year ago
PeterN d086f288cd
Codechange: Remove duplicated includes. (#10888)
These are now included by stdafx.h so don't need to be included again.
1 year ago
Rubidium 275ebf4509 Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*> 1 year ago
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 1 year ago
Patric Stout 60399e17bd Codechange: C++-ify the Layouter and related functions
They all now access a std::string_view, instead of a "const char *"
or std::string (in some cases).

Additionally, GetCharAtPosition and friends now return an index
instead of a "const char *", as it makes for a more clear interface.
1 year ago
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 1 year ago
PeterN e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Charles Pigott b282664242 Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives 1 year ago
Tyler Trahan 066ae6f3fb Codechange: Simplify some CodeQL-flagged trivial switches 1 year ago
Rubidium 24b5033a06 Fix #10568: "can savegame be loaded check" failed in dedicated server
* If loading fails, it usually returns SL_REINIT which doesn't trigger check
 * If savegame has NewGRFs, it complains NewGRFs are not allowed in intro game
1 year ago
rubidium42 6ba55e663e Codechange: do not hide variables with other variables 1 year ago
Rubidium ae422be979 Cleanup: remove/replace trailing ; with . in comments 1 year ago
Henry Wilson 0b2567d882 Codechange: Remove shift as fast-forward key when _DEBUG is defined 1 year ago
Rubidium 46dfb309bc Fix #10309: [SDL] Uninitialized width and height when turning off full screen 1 year ago
Rubidium 0251786f46 Fix: virtual call from constructor
That fills an instance variable that is only read from the Game Options window
and that is overwritten when the video driver is started. Since you cannot get
into the Game Options window without starting the video driver, it is just
pointless and wrong code that would never be noticed by the end user.
2 years ago
Patric Stout 1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" (#10306)
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2 years ago
Peter Nelson 9666e46739 Feature: Variable GUI scale.
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2 years ago
PeterN 4031894aef
Cleanup: Remove svn-style `$Id$` comments. (#10122) 2 years ago
Bouke Haarsma 45d98f689a Fix #9993: Handle DPI changes on macOS and Windows 2 years ago
Bouke Haarsma f3fd9b5895
Codechange: typo in code comment (#10061) 2 years ago
Niels Martin Hansen 345dcd3c7b Add: Show current video driver info in Options window 2 years ago
Michael Lutz 57b992717b Codechange: Extend DrawSpriteToRgbaBuffer to work with 8bpp blitters. 3 years ago
Michael Lutz 69c8ed9965 Codechange: [OSX] Simplify touchbar button data definition. 3 years ago
Michael Lutz b351cbe490 Fix #9743: [OSX] Only (re-)create touchbar sprites when requested by the main loop. 3 years ago
Michael Lutz f40e82a19d Fix #9743: [OSX] Don't try to render touchbar sprites with invalid zoom level. 3 years ago
Michael Lutz 80fc5fb46c Change: [OSX] Allow touchbar usage on all supported OS versions.
Touchbar support was introduced in 10.12.2. There's no need to limit
support to 10.15+, as the convenience class NSButtonTouchBarItem is
easily replicated.
3 years ago
Charles Pigott 86c295bb3b Change: Ignore refresh_rate setting when vsync is enabled 3 years ago
Danny de Bruijne 753b1d7e15 Feature: Add selected toolbar buttons to MacBook Pro Touch Bar 3 years ago
embeddedt 883e4ea325
Change: [Emscripten] set default scrolling mode to non-pointer-locking (#9191) 3 years ago
Patric Stout 74186998a2 Codechange: use _cur_palette the same in all the drivers
It was a bit of a mixed bag. With this change, gfx.cpp is in
control who accesses _cur_palette from the video-drivers.
3 years ago