Commit Graph

25189 Commits

Author SHA1 Message Date
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
Michael Lutz 59ce9b4d2f Fix: [OpenGL] Check maximum supported texture size against screen resolution. 2021-05-03 19:33:42 +01:00
PeterN ceee558fe5 Codechange: Scale rating minigraphs on station window list. (#9075)
Minigraphs did not adjust size to accomodate large text, either by font size or font zoom, leading to cropped labels.
Minigraphs and spacing are now scaled by font zoom, as this seems to behave better than gui zoom in this instance.
2021-05-03 19:33:42 +01:00
Loïc Guilloux 2bc7e5a8e2 Fix 799eb31: [CMake] Don't include regression AIs in bundles (#9068) 2021-05-03 19:33:42 +01:00
Loïc Guilloux 8d1d271cda Fix d4f0b6f4: [CMake] CMAKE_PROJECT_VERSION_XXX are not in CMake 3.9 (#9154) 2021-05-03 19:33:42 +01:00
glx22 c454cc09b3 Fix: Auto-fill version details in rev.cpp and ottres.rc 2021-05-03 19:33:42 +01:00
Charles Pigott 0be22efffc Add: Changelog entries for 1.11.1 release 2021-04-18 21:31:21 +01:00
Charles Pigott 4f8b2aa003 Update: Backport language changes 2021-04-18 21:31:21 +01:00
stormcone 57f01188c2 Add: Hotkey to focus the build object class name filter editbox. 2021-04-18 21:31:21 +01:00
stormcone bcb6174bf3 Add: Hotkey to focus the rail station class name filter editbox. 2021-04-18 21:31:21 +01:00
Peter Nelson 7b56a630aa Fix #9042: Make multiplayer server list height auto-fill window.
#9042 did not fix all combinations of scaling options. This additional
change makes the server list automatically fill available height.
2021-04-18 21:31:21 +01:00
Rubidium 4e5be077ff Fix #6322: [Script] Try to let the script die when no memory can be allocated instead of crashing the whole game 2021-04-18 21:31:21 +01:00
Rubidium 7aaaa2c5f5 Change: [Script] Let Script_FatalError use std::string instead of const char * 2021-04-18 21:31:21 +01:00
dP c9c208f78e Fix: Do not unlock railtypes when enabling wagons with GameScript 2021-04-18 21:31:21 +01:00
Milek7 522069d146 Fix: Corrupted savegame could cause heap corruption by writing outside link graph edge matrix. (#9046) 2021-04-18 21:31:21 +01:00
Milek7 e379c818b3 Fix: Corrupted savegame could crash the game by providing invalid gamelog enums. (#9045) 2021-04-18 21:31:21 +01:00
PeterN eb5ae95c90 Fix: Inconsistent button sizing on AI/GS setting window depending on scale settings. (#9044) 2021-04-18 21:31:21 +01:00
Peter Nelson e8965d32d9 Fix: Sizing of Multiplayer server list incorrect when GUI zoom doesn't match Font zoom.
The server information panel was scaled by GUI scale, which could result in a panel that is longer than the server list. This height difference is then maintained when the window is resized to fill the screen.
Instead, specify the minimum size by number of text lines and (summed total) padding.
2021-04-18 21:31:21 +01:00
PeterN 790b4f3076 Change: Improve layout and spacing of vehicle group widgets. (#9041)
Existing layout included a blank widget above the group list to align with the vehicle list, however since then an additional sort-by row was added.
Group list size tweaks to match normal row size (at least with normal gui and text size.)
Removed reduction of 2 rows in the group list <- main culprit of odd sizing.
Removed fill attribute on buttons which gave strange sizes, and put it on the group info widget instead.
Tweaked various soft-padding values to line up (centreing text with a 1px offset does not make centred text.)
2021-04-18 21:31:21 +01:00
Rubidium 4f0f113887 Fix #7513: recursive array/class/table release caused stack overflow 2021-04-18 21:31:21 +01:00
Rubidium 53ce868185 Fix #7513: recursive garbage collection caused stack overflow 2021-04-18 21:31:21 +01:00
Milek7 144ed59aef Fix: Add virtual destructor to link graph Path.
Classes derived from Path were freed through base class pointer, but no virtual destructor was present.
2021-04-18 21:31:21 +01:00
Michael Lutz 40f7d085f4 Fix #9028: [OpenGL] Clear cursor cache on destroying the OpenGL backend. 2021-04-18 21:31:21 +01:00
Rubidium 1f34264017 Fix: [win32] buffer_locked state not initialised, causing _screen.dst_ptr to be potentially not set 2021-04-18 21:31:21 +01:00
Rubidium fa57e33dfe Fix: [Video] fast forward boolean states not initialised, potentially causing unstoppable fast forward 2021-04-18 21:31:21 +01:00
Rubidium dee9d6dfd4 Fix: [SDL] buffer_locked state not initialised, causing _screen.dst_ptr to be potentially not set 2021-04-18 21:31:21 +01:00
rubidium42 961cda50bc Fix #8874: show a warning when a NewGRF scan is requested multiple times from the console (#9022) 2021-04-18 21:31:21 +01:00
Wim Leflere fe43c2d18f Fix: clang-cl build (#9018)
Remove macro redefinitions
Add final and fallthrough attributes for clang-cl
2021-04-18 21:31:21 +01:00
PeterN 59406363bb Fix #9015: Don't set free space value if not requested. (#9016) 2021-04-18 21:31:21 +01:00
rubidium42 cbc1d0c893 Fix #9008: Validate starting year given on the command line. (#9014)
An invalid starting year causes all sorts of weird behaviour and crashes in map generation.

Now just set the appropriate setting via IConsoleSetSetting so the validation
and, if needed, clamping is performed on the starting year value.
2021-04-18 21:31:21 +01:00
Rubidium 3d0c109d82 Change: add some hints about the getaddrinfo warning to the troubleshooting part of the documentation 2021-04-18 21:31:21 +01:00
Rubidium e0594d6cac Change: warn the user about the resolving of an address being extra very slow 2021-04-18 21:31:21 +01:00
Rubidium 51cb9e71e5 Fix: split the UDP blocking of sockets to only the socket involved, and when another thread is busy do not attempt to process the packets of that socket 2021-04-18 21:31:21 +01:00
Rubidium 27630d255c Change: move some things only relevant to UDP from network.cpp to network_udp.cpp 2021-04-18 21:31:21 +01:00