Commit Graph

661 Commits (97cfd40649abab832315f00e6a07e5b6b9a17e23)

Author SHA1 Message Date
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.
1 year 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
Michael Lutz 37116a7575 Codechange: [OSX] Remove old code that has no effect on current OSX versions. 3 years ago
Michael Lutz 883e21dbb7 Codechange: [OSX] We use OpenGL even if Apple doesn't like it. 3 years ago
Michael Lutz 0d5d3083bd Codechange: [OSX] Use more exact enum names where introduced with the 10.12 SDK.
The enum values still have the exact same numerical values, but the 10.12
SDK introduced more explicit names (e.g. like NSEventTypeApplicationDefined
instead of NSApplicationDefined) for several enum constants.
Use them when available.
3 years ago
Patric Stout cf865597f8
Fix: don't propagate shift/ctrl state till next game-tick (#9381)
When the game-loop is very slow, it was easily possible to start
the loop with _shift_pressed being false, but end with
_shift_pressed being true. This doesn't hurt the game as such,
but for the user this can be very weird: I pressed "Buy Vehicle",
pressed shift a bit later, and I still get a cost indication.
3 years ago
Rubidium 357af686dc Cleanup: use true/false instead of 1/0 where applicable 3 years ago
Rubidium f904aef176 Cleanup: use nullptr instead of 0 or NULL 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
glx22 d485b50813 Fix: [MinGW] Ignore wglGetProcAddress() cast warnings 3 years ago
glx22 744a9e4745 Codechange: [WIN32] Add a wrapper around GetProcAddress() 3 years ago
glx22 2df48a78cc Fix: [MinGW32] Can't convert lambda to stdcall 3 years ago
glx22 f4c7d5577e Codechange: [WIN32] Use VersionHelpers where appropriate 3 years ago
Patric Stout 37ae6b8ae3
Add: adhere the autosave_on_exit setting for Null videodriver (#9343)
This is especially useful for automated-testing, to make a save
when the game quits while using "-vnull:ticks=N".
3 years ago
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.
3 years ago
Michael Lutz 97722931a9 Fix: [OpenGL] Increase timeout when waiting for the GPU to be done with the drawing buffer.
The old timeout could be too short if v-sync was on on lower refresh rates.
3 years ago
Patric Stout b136e65cf9
Change: reworked the debug levels for network facility (#9251)
It now follows very simple rules:
0 - Fatal, user should know about this
1 - Error, but we are recovering
2 - Warning, wrong but okay if you don't know
3 - Info, information you might care about
4 -
5 - Debug #1 - High level debug messages
6 - Debug #2 - Low level debug messages
7 - Trace information
3 years ago
Patric Stout 56050fc96f
Fix 91b8ce07: dedicated servers could no longer create screenshots (#9232)
Although most commands are not useful on a dedicated server,
screenshot commands should be dequeued.
3 years ago
Milek7 20762f9117
Codechange: Acquire video buffer before taking game state lock to prevent erratic fast forward behaviour (#9140) 3 years ago
Michael Lutz 91b8ce073f Codechange: Generalise the delayed blitter change to a generic video driver command queue. 3 years ago
Peter Nelson 4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 3 years ago
Michael Lutz f4d5c8d99e
Fix: [OpenGL] Main loop expects to start with the video buffer unmapped. (#9100) 3 years ago
Michael Lutz d1dd997f07 Change: [Win32] Limit the OpenGL video driver to OpenGL 3.2 or newer on Windows. 3 years ago
Michael Lutz ef80baf75c Codechange: [Win32] Try getting an OpenGL 4.5 context first before aiming at 3.2. 3 years ago
Michael Lutz e53313391a Fix: [OpenGL] Check maximum supported texture size against screen resolution. 3 years ago
Michael Lutz 433602b072 Fix #9028: [OpenGL] Clear cursor cache on destroying the OpenGL backend. 3 years ago
Rubidium 468b1c6c5d Fix: [win32] buffer_locked state not initialised, causing _screen.dst_ptr to be potentially not set 3 years ago
Rubidium 8562395413 Fix: [Video] fast forward boolean states not initialised, potentially causing unstoppable fast forward 3 years ago
Rubidium 64e8305874 Fix: [SDL] buffer_locked state not initialised, causing _screen.dst_ptr to be potentially not set 3 years ago
Michael Lutz 5644c00482
Fix: Check for a validly mapped OpenGL screen buffer during driver init. (#9007) 3 years ago