Peter Nelson
b414060f7c
Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.
...
Similar code is already repeated in other locations.
(cherry picked from commit d8e06e590a
)
2021-05-08 10:22:22 +01:00
Peter Nelson
065ae3964a
Codechange: Don't update window contents if scrollbar position has not moved.
...
(cherry picked from commit 52b16237ad
)
2021-05-08 10:22:22 +01:00
Peter Nelson
ad554d913f
Codechange: Set specific widgets dirty instead of window.
...
(cherry picked from commit 8321ef0061
)
2021-05-08 10:22:22 +01:00
embeddedt
0676c1f470
Fix: [Emscripten] Use non-XDG directories to simplify lolac storage ( #9207 )
...
(cherry picked from commit a879996012
)
2021-05-08 10:22:04 +01:00
Jonathan G Rennison
26992089d6
Fix use of _mm_cvtsi64_si128 which is not available on 32 bit x86
...
See: #254
2021-05-07 03:30:36 +01:00
Jonathan G Rennison
011b3b8b8d
Avoid data race on map size when clearing link graph jobs in InitializeGame
2021-05-07 00:58:52 +01:00
Jonathan G Rennison
9900adae70
Fix #254 : AdjustBrightnessOfTwoPixels used in 32bpp-sse2 but requires SSE3
2021-05-06 21:26:15 +01:00
rubidium42
9bfcea0397
Cleanup: [Fluidsynth] Comply better with the coding style
...
(cherry picked from commit a432009f06
)
2021-05-06 21:22:42 +01:00
Tyler Trahan
54deb7516c
Change: Use gender-neutral pronouns in english.txt ( #9189 )
...
(cherry picked from commit 176d65b472
)
2021-05-06 21:22:14 +01:00
glx22
8333323090
Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops
...
(cherry picked from commit 2feb801e56
)
2021-05-06 21:21:41 +01:00
glx22
72cfb991e5
Codechange: Replace FOR_ALL_SEARCHPATHS with range-based for loops
...
(cherry picked from commit 983c7ade60
)
2021-05-06 21:17:32 +01:00
glx22
ffd30cf91b
Codechange: Replace FOR_ALL_TARS with range-based for loops
...
(cherry picked from commit 34215f7faa
)
2021-05-06 21:15:07 +01:00
rubidium42
e71798381b
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.
(cherry picked from commit 6bd7f8816d
)
2021-05-06 21:13:47 +01:00
PeterN
0d1c848f78
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.
(cherry picked from commit 08781d96ed
)
2021-05-06 21:13:46 +01:00
PeterN
b36bfc7ab0
Fix #9174 : Don't update text effect if it has been reset. ( #9183 )
...
(cherry picked from commit 0bc6f32346
)
2021-05-06 21:13:46 +01:00
Milek7
deb2ad8997
Codechange: Acquire video buffer before taking game state lock to prevent erratic fast forward behaviour ( #9140 )
...
(cherry picked from commit 20762f9117
)
2021-05-06 21:12:59 +01:00
Peter Nelson
01d40812fa
Codechange: Validate custom station platform layout tiles are permitted values only.
...
(cherry picked from commit 756034fa27
)
2021-05-06 21:10:33 +01:00
Peter Nelson
da571d6481
Codechange: Use std::vector for NewGRF station tile sprite layouts.
...
(cherry picked from commit a3e49178d1
)
2021-05-06 21:10:33 +01:00
Peter Nelson
72bc8c7595
Codechange: Use std::vector for NewGRF station platform layouts.
...
This avoids the need to custom memory management and additional members.
This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
(cherry picked from commit bd1a20f6ee
)
2021-05-06 21:10:31 +01:00
Michael Lutz
2e6cadb005
Fix #9147 : Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread.
...
(cherry picked from commit 1f159f79de
)
2021-05-06 20:52:00 +01:00
Michael Lutz
1b46ef756e
Codechange: Generalise the delayed blitter change to a generic video driver command queue.
...
(cherry picked from commit 91b8ce073f
)
2021-05-06 20:52:00 +01:00
frosch
e856d3f8fe
Fix: [NewGRF] industry variable 66 and object variable 46 clamped the squared-euclidian distance to 16 bit, when they should not.
...
(cherry picked from commit 2cf5df2a50
)
2021-05-06 20:52:00 +01:00
frosch
dbcd115a4c
Fix: [NewGRF] industry variables 65 and 66 ignored the parameter, and always used the north tile.
...
(cherry picked from commit 84aa17cea6
)
2021-05-06 20:52:00 +01:00
rubidium42
59a817f21f
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.
(cherry picked from commit 56aa6d0edd
)
2021-05-06 20:52:00 +01:00
PeterN
43fe7463ba
Fix: Update text effect size when font zoom is changed. ( #9174 )
...
(cherry picked from commit 18651dd8b1
)
2021-05-06 20:52:00 +01:00
PeterN
f9a03c4e63
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.
(cherry picked from commit 256dbee255
)
2021-05-06 20:52:00 +01:00
Peter Nelson
0b4d45af93
Codechange: Warn if randomaction2 group count is not a power of 2.
...
Previously noted by a comment, this does not need to be guarded against as non-powers of 2 will not cause issues beyond the choice of results being reduced.
(cherry picked from commit 18fb1c3866
)
2021-05-06 20:52:00 +01:00
Peter Nelson
02a62e4c98
Cleanup: Use range iterator to evaluate DeterministicSpriteGroup.
...
(cherry picked from commit 6b0b1bb3de
)
2021-05-06 20:52:00 +01:00
Peter Nelson
f5722a999e
Cleanup: Use std::vector in RandomSpriteGroup.
...
(cherry picked from commit 913d8a7f28
)
2021-05-06 20:25:59 +01:00
Peter Nelson
a69a1d19a9
Cleanup: Use std::vector in DeterministicSpriteGroup.
...
(cherry picked from commit 1aeaf39954
)
2021-05-06 20:21:57 +01:00
Peter Nelson
d3b9d19c5a
Cleanup: Use std::vector in RealSpriteGroup.
...
(cherry picked from commit f785a70a2b
)
2021-05-06 20:21:57 +01:00
Loïc Guilloux
d4c466200f
Fix: Don't consider regression AIs when starting a random AI ( #9164 )
...
(cherry picked from commit 376f2509ad
)
2021-05-06 20:15:46 +01:00
rubidium42
03f8ed7d3f
Feature: make the town directory horizontally resizable
...
(cherry picked from commit 0345f99180
)
2021-05-06 20:15:19 +01:00
Loïc Guilloux
1ac0f186c8
Fix d4f0b6f4
: [CMake] CMAKE_PROJECT_VERSION_XXX are not in CMake 3.9 ( #9154 )
...
(cherry picked from commit 2985277bec
)
2021-05-06 20:15:17 +01:00
rubidium42
442f6d7063
Fix #9152 , Fix #9153 : screenshot command showed error messages when successful
...
(cherry picked from commit 40528db993
)
2021-05-06 20:13:47 +01:00
Peter Nelson
78ccee01d4
Codechange: Scale sprite font height once on init instead of every call to GetHeight().
...
Scaling is not expensive, but it does not change either, and this avoids the need for a virtual method call. This cascades back to all GetCharacterHeight(FS_xxx) and FONT_HEIGHT_xxx calls.
(cherry picked from commit 9c6c0a0966
)
2021-05-06 20:11:59 +01:00
Peter Nelson
dc746288ce
Cleanup: Use GetDefaultFontHeight() call instead of direct access.
...
This makes this part of font size setup in FreeTypeFontCache consist with OSX and Windows variants.
(cherry picked from commit ce55cd0ce7
)
2021-05-06 20:11:59 +01:00
Peter Nelson
b997bb0cee
Fix: Cargo legend blob in cargo payment rate window did not rescale.
...
(cherry picked from commit 49aa392440
)
2021-05-06 20:11:59 +01:00
Peter Nelson
2a87430036
Fix: Scale cargo lines in industry chain window.
...
Replaces constant pixel values with values scaled based on font size.
This allows the industry chain to maintain a consistent look across
different sizes. Previously all except cargo line height were fixed.
(cherry picked from commit 055067c49c
)
2021-05-06 20:11:59 +01:00
Peter Nelson
d3e70ff521
Fix: Scale industry chain legend blob by font size.
...
(cherry picked from commit 254ffe9dcc
)
2021-05-06 20:11:59 +01:00
Peter Nelson
f0a884bfa0
Fix: Improved scaling and spacing of sign list window.
...
Both company icon sprite and text now centred within each row, and extra
padding added to avoid the sprites running into each other.
(cherry picked from commit 957beaaefc
)
2021-05-06 20:11:59 +01:00
Peter Nelson
d7ed6d5ade
Fix: Scale legend blobs in Fund new industry window.
...
(cherry picked from commit 617e85cc65
)
2021-05-06 20:11:59 +01:00
Peter Nelson
ce69d6e216
Fix: Scale smallmap legend 'blob' to fit text.
...
(cherry picked from commit 5434d63f91
)
2021-05-06 20:11:59 +01:00
Peter Nelson
6e272df9b0
Fix: Tidy up sizing of sprite aligner window sprite list.
...
(cherry picked from commit af70195e44
)
2021-05-06 20:11:59 +01:00
Peter Nelson
c3cd3bae71
Fix: Company Key window scaling.
...
(cherry picked from commit 1df510c297
)
2021-05-06 20:11:59 +01:00
Peter Nelson
1a904590cf
Fix: Use unscaled values for padding OSK
...
(cherry picked from commit 09206be054
)
2021-05-06 20:11:59 +01:00
Peter Nelson
ff8d1222d9
Codechange: Use text lines instead of pixel height of font for link graph widgets.
...
(cherry picked from commit 56a6f66903
)
2021-05-06 20:11:59 +01:00
Peter Nelson
a4a0da1d4b
Codechange: Apply minimum size to toolbar widgets
...
(cherry picked from commit 63cc340dc1
)
2021-05-06 20:11:59 +01:00
Peter Nelson
2b233a2a8c
Codechange: No longer necessary to manually resize volume sliders.
...
(cherry picked from commit d32df00b5c
)
2021-05-06 20:11:59 +01:00
Peter Nelson
a469b4f395
Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.
...
(cherry picked from commit 4791ff2862
)
2021-05-06 20:11:55 +01:00