Commit Graph

25222 Commits

Author SHA1 Message Date
Charles Pigott 672f285218 Update: Changelog for 1.11.2 release 2021-05-03 19:33:42 +01:00
Charles Pigott f11b06ff6a Update: Backport language changes 2021-05-03 19:33:42 +01:00
rubidium42 f9595543ca Fix #9117, 04ce1f07: [Fluidsynth] Infinite wait when stopping song (#9181)
In FluidSynth 2.2.0 an extra state was added to denote stopping. To transition
from this state to a stopped state the rendering needs to be running. Since
04ce1f07 locking was added that skipped the rendering when something else held
a lock, so the state would never get to stopped and join would never return.
2021-05-03 19:33:42 +01:00
PeterN 9aa335aca3 Fix: Query windows may be partially drawn initially. (#9184)
Query window was not marked dirty after being moved on init. It was then marked dirty once the white border flash completed.
2021-05-03 19:33:42 +01:00
PeterN 05aed133c7 Fix #9174: Don't update text effect if it has been reset. (#9183) 2021-05-03 19:33:42 +01:00
Jonathan G Rennison b9ea4f07e4 Fix #9113: Assertion failure when removing airport with order backup (#9182) 2021-05-03 19:33:42 +01:00
Milek7 8b5bd34a65 Codechange: Acquire video buffer before taking game state lock to prevent erratic fast forward behaviour (#9140) 2021-05-03 19:33:42 +01:00
Michael Lutz 72090f39ce Fix #9147: Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread. 2021-05-03 19:33:42 +01:00
Michael Lutz de61dadaa9 Codechange: Generalise the delayed blitter change to a generic video driver command queue. 2021-05-03 19:33:42 +01:00
PeterN d52a66642d Fix: Update text effect size when font zoom is changed. (#9174) 2021-05-03 19:33:42 +01:00
frosch d92d807e1d Fix: [NewGRF] industry variable 66 and object variable 46 clamped the squared-euclidian distance to 16 bit, when they should not. 2021-05-03 19:33:42 +01:00
frosch 60f85dbc37 Fix: [NewGRF] industry variables 65 and 66 ignored the parameter, and always used the north tile. 2021-05-03 19:33:42 +01:00
rubidium42 dbba489fcf Fix: [Network] Reading beyond the length of the server's ID when hashing password
Under normal circumstances the server's ID is 32 characters excluding '\0', however this can be changed at the server. This ID is sent to the server for company name hashing. The client reads it into a statically allocated buffer of 33 bytes, but fills only the bytes it received from the server. However, the hash assumes all 33 bytes are set, thus potentially reading uninitialized data, or a part of the server ID of a previous game in the hashing routine.
It is still reading from memory assigned to the server ID, so nothing bad happens, except that company passwords might not work correctly.
2021-05-03 19:33:42 +01:00
PeterN dd70d0ad85 Fix: Crash when extra viewport height is zero with sign in view. (#9175)
If a viewport sign straddles the top of a viewport, a crash will occur if the viewport height is zero. This is resolved by simply not attempting to draw the viewport in this situation, consistent with other widgets.
2021-05-03 19:33:42 +01:00
rubidium42 a8c5f8a10b Codechange: move some OS abstraction method implementations out of the header 2021-05-03 19:33:42 +01:00
rubidium42 ef258b1686 Codechange: encapsulate network error handling 2021-05-03 19:33:42 +01:00
rubidium42 3265e56294 Codechange: rename NetworkError to ShowNetworkError 2021-05-03 19:33:42 +01:00
Loïc Guilloux 5e7f9cc22c Fix: Don't consider regression AIs when starting a random AI (#9164) 2021-05-03 19:33:42 +01:00
Loïc Guilloux f3b8ff0e17 Change: [Actions] Add a 2 minutes timeout for regression test (#9166) 2021-05-03 19:33:42 +01:00
rubidium42 c3d134793f Fix #6598: Prevent invalid memory accesses when abandoning a join from within a network game
One could join a network game from within an already running network game. This would call a NetworkDisconnect, but keeps the UI alive. If, during that process the join is aborted, e.g. by cancelling on a password dialog, you would still be in your network game but also get shown the server list.
Solve all the underlying problems by falling back to the main UI when (re)connecting to a(nother) server.
2021-05-03 19:33:42 +01:00
rubidium42 59c356ad39 Fix #6598: Do not disconnect before company number validation
NetworkClientConnectGame already does a NetworkDisconnect, so no reason to do it here
2021-05-03 19:33:42 +01:00
Patric Stout 2514cf3c5c Fix b3003dd1: swap SERVER_GAME_INFO with CLIENT_GAME_INFO (#9129)
The idea is that if you query an older server that does not support
this packet yet, the client receives an error. The assumption was
that on every "illegal packet" the connection would be closed. This
turns out to be false.

Now CLIENT_GAME_INFO aligns with the old PACKET_CLIENT_NEWGRFS_CHECKED,
which does a pre-check (which fails), and an error is sent back
and the connection is closed.

This is not a nice solution, but it is the best we got.
2021-05-03 19:33:42 +01:00
Patric Stout 1eb20db8db Add: ability to retrieve game info from server over TCP 2021-05-03 19:33:42 +01:00
Patric Stout 32ead3aba6 Codechange: be explicit in pointer comparisons 2021-05-03 19:33:42 +01:00
Patric Stout cae0b46e38 Codechange: move all NetworkGameInfo related functions to a single file
It currently was a bit scattered over the place. Part of
NetworkGameInfo is also the GRF Identifiers that goes with it.
2021-05-03 19:33:42 +01:00
Patric Stout 4f8a2c2999 Doc: indicate the most common options for CMake 2021-05-03 19:33:42 +01:00
Patric Stout 9932f4ea50 Doc: split up which libraries are used for which situation 2021-05-03 19:33:42 +01:00
Patric Stout 0a5a06c431 Doc: fix OpenGFX / OpenSFX / OpenMSX links in README 2021-05-03 19:33:42 +01:00
Patric Stout d570120e17 Doc: update the supported platforms to match current master 2021-05-03 19:33:42 +01:00
rubidium42 abbbeb752a Change: [Network] Safeguard from using errno/strerror for handling network errors
They are likely not working as expected on Windows, so prevent their usage.
Winsock does not set errno and strerror does not return anything useful for Winsock error numbers.
2021-05-03 19:33:42 +01:00
rubidium42 9afe3d77e6 Codechange: [Network] Do not leak os_abstraction.h via base_media_func.h 2021-05-03 19:33:42 +01:00
rubidium42 6362e29ad7 Codechange: [Network] Do not leak os_abstraction.h via fios.h 2021-05-03 19:33:42 +01:00
rubidium42 bc0501e96f Codechange: [Network] Do not leak os_abstraction.h via network_func 2021-05-03 19:33:42 +01:00
rubidium42 7e6f00c85a Change: [Network] Use string error messages instead of numeric error numbers that need to be looked up 2021-05-03 19:33:42 +01:00
rubidium42 bf07420916 Fix: [Network] errno and strerror do not handle network errors on Windows 2021-05-03 19:33:42 +01:00
rubidium42 21b196d5c4 Fix #9152, Fix #9153: screenshot command showed error messages when successful 2021-05-03 19:33:42 +01:00
Patric Stout 26b7500f3b Remove: performance measurements in YAPF
YAPF was constantly measuring its performance, but only at
certain debug-levels this information was shown.

Now after years, I sincerely wonder if anyone still knows about this
feature and who still use it. Especially with the new framerate window,
this detailed performance is not as meaningful anymore as it once
was.
2021-05-03 19:33:42 +01:00
Patric Stout 9a203b2b2c Cleanup: remove weird left-over comment in yapf.hpp 2021-05-03 19:33:42 +01:00
PeterN c3eae71778 Fix: Incorrect vertical alignment of icon and text in DropDownListIconItem. (#9133)
This happens if the bounding dimensions are changed so that each item is the same size, as happens on the railtype/roadtype dropdown lists, as the vertical offset was calculated before this dimension is changed.
2021-05-03 19:33:42 +01:00
Milek7 b1d3b9544e Codechange: Use __attribute__ access none to silence GCC 11 -Wmaybe-uninitialized warnings (#9124) 2021-05-03 19:33:42 +01:00
PeterN 45c866cbd1 Fix: Count engine details text in lines rather than pixels. (#9107)
This allows the details panel to scale correctly for different zoom levels.
2021-05-03 19:33:42 +01:00
rubidium42 f8f57ab46f Fix: [Network] Prevent stalling save game transfer when compression is slow 2021-05-03 19:33:42 +01:00
PeterN ef48195ffa Fix: Use width of tiny arrow string instead of scaled pixels in ship/aircraft list. (#9102) 2021-05-03 19:33:42 +01:00
Michael Lutz 967c2ed56c Fix: [OpenGL] Main loop expects to start with the video buffer unmapped. (#9100) 2021-05-03 19:33:42 +01:00
PeterN 037bd14ed8 Fix #9097: Upper 16 bits of cargo base payment rate were discarded. (#9098)
NewGRF spec says that base payment rate is 32 bits, but it was loaded into a 16 bit variable. This value is loaded into Money variable after inflation is applied.
2021-05-03 19:33:42 +01:00
rubidium42 8eb53fa1a0 Fix: String validation could leave invalid Utf8 encoded strings (#9096)
In case a character was encoded in multiple bytes, but required fewer bytes to be encoded, the first byte would be copied to the output leaving an invalid Utf8 encoded string. Later uses of the validated string would use the same decode logic, which would yield a question mark and just read a single byte, so nothing dangerous happened.
Furthermore, because the next byte would not be a first byte of an encoded Utf8 character, the last few valid characters could be removed by the validation as well.
2021-05-03 19:33:42 +01:00
glx22 4b14a84510 Fix: [CMake] Check nforenum and grfcodec return value 2021-05-03 19:33:42 +01:00
glx22 4e1b0eda94 Fix: [CMake] Incorrect dependency checks for GRF 2021-05-03 19:33:42 +01:00
Michael Lutz bf727cb26a Codechange: [Win32] Try getting an OpenGL 4.5 context first before aiming at 3.2. 2021-05-03 19:33:42 +01:00
Michael Lutz e609c936a4 Change: [Win32] Limit the OpenGL video driver to OpenGL 3.2 or newer on Windows. 2021-05-03 19:33:42 +01:00