Commit Graph

691 Commits

Author SHA1 Message Date
dP
9df4f2c4fc Update to 12.0-beta1 2021-08-15 14:57:29 +03:00
Patric Stout
fa1e27994d Feature: allow the use of TURN to connect client and server together
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.

It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
2021-07-20 19:57:23 +02:00
Patric Stout
66dc0ce196 Codechange: C++-ify the usage of IniFile in settings.cpp
Instead of creating the object on heap and use a pointer, create
the object on stack and use a guaranteed-not-null pointer.
The size of IniFile doesn't warrent the forcing to heap.

Additionally, use a subclass instead of a function to do some
initial bookkeeping on an IniFile meant to read a configuration.
2021-07-02 14:30:14 +02:00
rubidium42
55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
glx22
5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
glx22
994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +02:00
glx22
e66e25ff71 Fix #9269, f6d5c01: Hide windows without abusing WC_INVALID 2021-05-15 21:08:49 +02:00
Rubidium
7755f81bb8 Codechange: make explicit that virtual functions in a con/destructor are resolved statically
This as during construction the sub class has not been initialized yet, and
during destruction the sub class has already been destroyed, so the overriding
virtual function would be accessing uninitialized data.
2021-05-13 10:03:26 +02:00
frosch
f6d5c0136e Codechange: make Window destruction not rely on undefined behavior. 2021-05-12 23:22:41 +02:00
frosch
f96f113951 Codechange: use IterateFromBack/Front only if the order is important.
Use Iterate if the order does not matter.
2021-05-12 23:22:41 +02:00
frosch
22567a1f43 Codechange: use iterators instead of 'subranges' when iterating from a specific window.
Using iterators makes it easier to include or exclude the start window in the iteration.
2021-05-12 23:22:41 +02:00
frosch
95abdfdef9 Cleanup: remove unneeded labels and gotos.
The window list supports deletion of arbitrary windows, while iterating over it.
2021-05-12 23:22:41 +02:00
Peter Nelson
d8e06e590a Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.
Similar code is already repeated in other locations.
2021-05-08 09:53:55 +01:00
Peter Nelson
52b16237ad Codechange: Don't update window contents if scrollbar position has not moved. 2021-05-08 09:52:54 +01:00
Peter Nelson
8321ef0061 Codechange: Set specific widgets dirty instead of window. 2021-05-08 09:52:54 +01:00
Peter Nelson
4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 2021-04-30 17:08:15 +01:00
glx22
14e92bd8e2 Codechange: Replace window related FOR_ALL with range-based for loops 2021-04-29 21:08:24 +02:00
Didac Perez Parera
0cb99c5523 Codechange: nullptr deletion in DeleteWindowById (#8941) 2021-04-10 10:19:14 +01:00
dP
1a961a0600 Merge branch 'master' into 1.11 2021-03-18 00:21:09 +03:00
dP
c36ef2b3f3 Merge remote-tracking branch 'upstream/1.11' into 1.11 2021-03-15 20:11:52 +03:00
dP
595606287d Update to 1.11.0-RC1 2021-03-15 12:57:26 +03:00
Patric Stout
853bfc3562 Codechange: replace _realtime_tick with std::chrono for mouse events 2021-02-27 00:36:14 +01:00
Michael Lutz
8906e9e0fd Codechange: Consistently use screen size and not driver resolution for determining window sizes. 2021-02-14 11:50:18 +01:00
dP
363cfa7e8c Add hotkey to rotate depot while building, default to middle mouse button (SDL2 only for now) 2021-01-27 01:13:37 +03:00
dP
c47930887b Merge remote-tracking branch 'upstream/1.11' into 1.11 2021-01-25 22:53:44 +03:00
dP
5e4506f493 Update to 1.11.0-beta1 2021-01-23 17:31:11 +03:00
glx
c0d7949d7c Fix: Don't use a timer for hundredth tick determination 2021-01-10 14:07:17 +01:00
Charles Pigott
9b800a96ed Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Michael Lutz
dd138fc460 Codechange: Stringify config file paths. 2020-12-27 13:19:25 +01:00
Charles Pigott
cfa1b1e006 Fix: Compile warnings when asserts are disabled 2020-12-06 19:27:39 +00:00
TechGeekNZ
a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
2020-07-27 17:31:29 +01:00
dP
7441767ed8 Make modifier key functions configurable 2020-07-13 01:35:07 +03:00
TechGeekNZ
ee570e1b6d Cleanup: Fix typos in code comments. 2020-06-09 13:15:47 +01:00
TechGeekNZ
8652a4db76 Cleanup: Give SetDirtyBlocks a more descriptive name. 2020-06-09 13:15:47 +01:00
dP
9b9a850d0b Merge 1.10.0-RC1 2020-02-18 20:56:38 +03:00
dP
d4ae6a1d91 Update to 1.10.0-RC1 2020-02-18 18:13:33 +03:00
glx
341941af85 Fix #7952: don't try to access destroyed QueryStrings 2020-01-22 19:53:27 +00:00
dP
1492a22027 Update to 1.10.0-beta2 2020-01-06 19:06:51 +03:00
dP
c7c3966eec Update to 1.10.0-beta2 2020-01-06 18:49:34 +03:00
S. D. Cloudt
13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Jonathan G Rennison
1dba06656d Codechange: Add utility function for whether the focused window is a console 2019-11-10 17:58:42 +00:00
Jonathan G Rennison
81f159434d Codechange: Add EditBoxGainedFocus method to VideoDriver base class 2019-11-10 17:58:42 +00:00
dP
ceea4c88be Merge 1.10.0-beta1 2019-11-01 16:08:44 +03:00
dP
599ccf0c2b Update to 1.10.0-beta1 2019-10-31 22:24:28 +03:00
dP
b84a475e14 Initialize with OpenTTD 1.9.3 2019-10-31 21:58:04 +03:00
JMcKiern
04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Pavel Stupnikov
4934dc1083 Update to 1.9.2 2019-07-12 02:46:41 +03:00
Pavel Stupnikov
383c7fcc21 Update to 1.9.2
--HG--
branch : openttd
2019-07-09 19:35:53 +03:00
peter1138
82989ef076 Fix: Clicking on scrollbar 'thumb' moved position up instantly. 2019-05-02 22:16:26 +01:00
glx
410b81537c Fix 801cbea9c: operator< is not always the best idea
Also removes unused and anyway broken SmallMap::SortByKey() function.
2019-04-13 21:05:25 +02:00