Commit Graph

51146 Commits

Author SHA1 Message Date
PeterN
9d72eb02f5 Cleanup: Remove old FiosList helper methods. (#9139)
(cherry-picked from commit f018471b36)
2021-05-06 19:35:57 +01:00
glx22
050b95e351 Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
(cherry picked from commit 9a8756d7ed)
2021-05-06 19:35:57 +01:00
glx22
dfe616bef4 Codechange: Replace window related FOR_ALL with range-based for loops
(cherry picked from commit 14e92bd8e2)
2021-05-06 19:32:36 +01:00
PeterN
c7cac34025 Fix: 'Cache' top and bottom lines of textfile viewer to avoid overdraw. (#9131)
* Fix: 'Cache' top and bottom lines of textfile viewer to avoid overdraw.

The text file viewer calculated the number of lines required to set the scrollbar, but did not retain this information, so this was recalculated on every draw operation. This includes overdrawing text outside the bounds of the current scroll position.

With this change the top and bottom lines for each line of text are remembered, and reflowing is avoided where possible. Text outside the current scroll bounds is not drawn.
Additionally the scroll interval is now based on text lines instead of pixel lines, which increases the text capacity depending on the font size.

* Fix: Limit text viewer to showing 64k lines.

Text files with more than 64k wrapped lines would exceed the scrollbar capacity and cause an assert. This is harder to reach now that the scrollbar counts lines instead of pixels.

(cherry picked from commit 0b460bf4a1)
2021-05-06 18:25:45 +01:00
Loïc Guilloux
88bc7bd235 Fix: [MinGW] Set minimum OS version to Windows XP (#9135)
(cherry picked from commit 356bbbb90a)
2021-05-06 18:25:28 +01:00
Peter Nelson
4fc433c871 Cleanup: Replace FOR_ALL_SORTED_CARGOSPECS macro with range iterator.
(cherry picked from commit 20ac0b4148)
2021-05-06 18:21:36 +01:00
Peter Nelson
5e1b4e1844 Cleanup: Replace FOR_ALL_SORTED_ROADTYPES macro with range iterator.
(cherry picked from commit de81afdf4b)
2021-05-06 18:21:30 +01:00
Peter Nelson
571f807b20 Cleanup: Replace FOR_ALL_SORTED_RAILTYPES macro with range iterator.
(cherry picked from commit 3b3d80c8ef)
2021-05-06 18:21:25 +01:00
PeterN
a4821e2732 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.

(cherry picked from commit ae7f07de74)
2021-05-06 11:20:17 +01:00
Jonathan G Rennison
95ca147445 Add cheat: town local authority ratings fixed as Outstanding 2021-05-05 01:17:54 +01:00
Jonathan G Rennison
a9515456cb Merge branch 'master' into jgrpp
# Conflicts:
#	src/network/core/os_abstraction.h
#	src/network/core/tcp_content.h
#	src/network/core/udp.cpp
#	src/table/currency_settings.ini
#	src/table/settings.h.preamble
2021-05-03 21:59:49 +01:00
Jonathan G Rennison
e0d5bf584d Fix assertion failure when removing airport with order backup
See: #252, https://github.com/OpenTTD/OpenTTD/issues/9113
2021-05-03 00:35:47 +01:00
Jonathan G Rennison
ca7dd193d4 Fix #253: Right column width in station window group/sort with large font 2021-05-03 00:28:38 +01:00
Jonathan G Rennison
743c9023c6 Doc: Add element IDs/link anchors to NewGRF additions 2021-05-02 15:28:26 +01:00
Patric Stout
0deb1d852d 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.

(cherry picked from commit 665a3928e2)
2021-04-30 18:04:57 +01:00
Patric Stout
e0041df005 Cleanup: remove weird left-over comment in yapf.hpp
(cherry picked from commit e162aff7a3)
2021-04-30 18:01:10 +01:00
Jonathan G Rennison
a809564bed Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/english.txt
#	src/lang/korean.txt
#	src/network/core/os_abstraction.h
#	src/network/core/packet.cpp
#	src/network/core/tcp_content.h
#	src/network/core/udp.cpp
#	src/table/currency_settings.ini
#	src/table/settings.h.preamble
2021-04-30 00:46:46 +01:00
Patric Stout
8fa53f543a
Change: [Network] lower TCP connect() timeout to 3s (#9112)
Currently we use default OS timeout for TCP connections, which
is around 30s. 99% of the users will never notice this, but there
are a few cases where this is an issue:

- If you have a broken IPv6 connection, using Content Service is
  first tried over IPv6. Only after 30s it times out and tries
  IPv4. Nobody is waiting for that 30s.
- Upcoming STUN support has several methods of establishing a
  connection between client and server. This requires feedback
  from connect() to know if any method worked (they have to be
  tried one by one). With 30s, this would take a very long time.

What is good to mention, is that there is no good value here. Any
value will have edge-cases where the experience is suboptimal. But
with 3s we support most of the stable connections, and if it fails,
the user can just retry. On the other side of the spectrum, with 30s,
it means the user has no possibility to use the service. So worst case
we annoy a few users with them having the retry vs annoying a few
users which have no means of resolving the situation.
2021-04-27 20:18:43 +02:00
rubidium42
015e3b412e Cleanup: remove #ifdefs for compiling the old content server 2021-04-27 19:58:03 +02:00
translators
b89dba7e4e Update: Translations from eints
japanese: 26 changes by scabtert
catalan: 43 changes by J0anJosep
2021-04-27 17:53:43 +00:00
rubidium42
31c87ba908 Fix: truncating strings in settings could leave invalid Utf8 characters 2021-04-27 19:41:51 +02:00
rubidium42
0e449f20dc Codechange: writing and string validation to its own functions 2021-04-27 19:41:51 +02:00
rubidium42
b54d8a49fb Feature: allow non-ASCII currency separators 2021-04-27 19:41:51 +02:00
rubidium42
4880ec29e4 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-04-27 18:17:34 +01:00
rubidium42
8c2e3a004e Codechange: [Network] Do not leak os_abstraction.h via base_media_func.h 2021-04-27 18:17:34 +01:00
rubidium42
84985c1223 Codechange: [Network] Do not leak os_abstraction.h via fios.h 2021-04-27 18:17:34 +01:00
rubidium42
cbad518bf3 Codechange: [Network] Do not leak os_abstraction.h via network_func 2021-04-27 18:17:34 +01:00
rubidium42
cf8c1aa860 Change: [Network] Use string error messages instead of numeric error numbers that need to be looked up 2021-04-27 18:17:34 +01:00
rubidium42
65c5a64719 Fix: [Network] errno and strerror do not handle network errors on Windows 2021-04-27 18:17:34 +01:00
Chris
a934dfe0be
Fix: [NewGRF] Errors with severity ERROR also display a pop-up window (#9119) 2021-04-27 17:57:53 +01:00
translators
8ea06128be Update: Translations from eints
english (us): 39 changes by 2TallTyler
korean: 44 changes by telk5093
german: 43 changes by danidoedel
russian: 7 changes by Ln-Wolf
finnish: 39 changes by hpiirai
2021-04-26 17:53:20 +00:00
Charles Pigott
43b6f6915b Fix 8a95fee4: Missing initialiser in Packet constructor 2021-04-26 06:45:37 +02:00
Jonathan G Rennison
8eb27e1ac7 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/lang/japanese.txt
#	src/network/core/config.h
#	src/network/core/packet.cpp
#	src/network/core/tcp.cpp
#	src/network/network_content.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui_base.h
2021-04-25 22:14:59 +01:00
Jonathan G Rennison
66fda55ec4 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/network/core/packet.cpp
#	src/network/core/packet.h
#	src/network/core/tcp.cpp
#	src/network/core/udp.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/toolbar_gui.cpp
#	src/vehicle_gui_base.h
2021-04-25 20:56:16 +01:00
rubidium42
5afb090082 Change: [Network] Remove now defunct savegame transfer packet limiter 2021-04-25 21:29:23 +02:00
Rubidium
a3c9eca722 Change: use 32 KiB packets to send requests to the content server 2021-04-25 21:27:54 +02:00
Rubidium
21f58ab437 Change: use 32 KiB packets to transfer the savegame 2021-04-25 21:27:54 +02:00
Rubidium
d6000c2ec5 Codechange: differentiate between UDP, TCP and compatibility MTU values 2021-04-25 21:27:54 +02:00
Rubidium
8b302761d4 Codechange: allow different limits in packet sizes 2021-04-25 21:27:54 +02:00
Charles Pigott
97288bc286
Fix #9109: Malformed STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD in Japanese lang (#9110) 2021-04-25 20:11:59 +01:00
PeterN
224625942c
Fix: Count engine details text in lines rather than pixels. (#9107)
This allows the details panel to scale correctly for different zoom levels.
2021-04-25 19:34:16 +01:00
Tyler Trahan
27031b396f
Change: [Actions] Reword bug/crash report instructions (#9104) 2021-04-25 19:27:30 +01:00
translators
b721787c7f Update: Translations from eints
norwegian (bokmal): 4 changes by Anolitt
spanish (mexican): 3 changes by absay
japanese: 60 changes by scabtert, 38 changes by Azusa257
english (us): 3 changes by 2TallTyler
korean: 3 changes by telk5093
russian: 4 changes by Ln-Wolf
finnish: 3 changes by hpiirai
slovak: 20 changes by FuryPapaya
2021-04-25 18:04:52 +00:00
rubidium42
65818db1f4 Fix: [Network] Prevent stalling save game transfer when compression is slow 2021-04-25 19:54:21 +02:00
Jonathan G Rennison
6b2a05d02e Drive through depots: Allow moving between ends when current exit blocked 2021-04-25 18:45:11 +01:00
Jonathan G Rennison
0e3784cdb1
Merge pull request #251 from telk5093/jgrpp
Update: Korean translation
2021-04-25 18:02:47 +01:00
PeterN
f158957a4e
Fix: Use width of tiny arrow string instead of scaled pixels in ship/aircraft list. (#9102) 2021-04-25 17:51:03 +01:00
TELK
22c327266f Update: Korean translation 2021-04-25 21:51:00 +09:00
Jonathan G Rennison
d026da02d7 Fix #249, #250: Typos in timetable setting help texts 2021-04-25 12:54:13 +01:00
Jonathan G Rennison
eb8991da2f Debug: Fix blank detection for persistent storage display 2021-04-25 10:24:28 +01:00