Commit Graph

1675 Commits (36e1b32ccf47586eb3cc6eae90090548ca9d10f5)

Author SHA1 Message Date
Rubidium 36e1b32ccf Codechange: use std::deque of std::unique_ptr to queue packets 5 months ago
Rubidium c77a45ed86 Codechange: use std::unique_ptr for receiving network packets 5 months ago
Rubidium 4b372b6050 Codechange: use std::shared_ptr to manage saveload filters instead of manually trying to avoid double frees 5 months ago
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 5 months ago
Loïc Guilloux 0e738dda88
Fix #11948: [Win32] Convert error messages to utf8 (#11951) 5 months ago
Patric Stout 363e251a10
Change: make -dnet=9 give traces of the details of the network protocol (#11931) 5 months ago
Patric Stout 3e6ed6f44a
Fix #9697: don't extend the Online Players window too wide on opening (#11936) 5 months ago
Jonathan G Rennison 1df7b21ee3
Fix #11889: ConstructWindow not called from SurveyResultTextfileWindow constructor (#11903) 5 months ago
Peter Nelson fef0bfcfd3
Fix: TextfileWindow called virtual methods before constructor completed. (#11889)
SetStringParameters() was called during widget tree init in the constructor.

Calls within a constructor cannot call the derived classes methods. This would result in invalid data being passed to the string system, which could then crash.
5 months ago
Patric Stout 89520f5665
Add: show in multiplayer the amount of hours a game has been unpaused (#11886) 5 months ago
Patric Stout 2bbc95cac3
Fix: update server as offline when unexpected disconnect during refresh (#11891) 5 months ago
Tyler Trahan 28716548d2
Feature: Setting to automatically restart server based on hours played (#11142) 5 months ago
Patric Stout d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) 5 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 5 months ago
Rubidium 2d77f09a81 Codechange: use std::shared_ptr for vector of TCPConnecters 5 months ago
Rubidium 2d77cf9c80 Codechange: replace StrStartsWith/StrEndsWith with starts_with and ends_with 5 months ago
Rubidium aa5ba5bd7f Codechange: allow certain enumeration to be added
Otherwise C++20 doesn't like it.
5 months ago
Peter Nelson 7737aa6640 Codechange: Make all NWidgetPart arrays constexpr.
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
5 months ago
Patric Stout 6550682b49
Codechange: minor bits and pieces related to fmt::format() (#11806)
- Don't make run-time formatting what can be done compile-time.
- Be explicit about run-time formatting.
- Fix datetime printing.
5 months ago
Patric Stout 0b7410d979
Codechange: compile-time validate the string format of IConsolePrint (#11804)
This means we can no longer use runtime picking what string to use.
5 months ago
Rubidium 564441e822 Remove: Debug redirect over network
It does not work for dedicated servers because upon starting the process to
resolve the address to redirect to gets killed. Also with all the async going
on in the network code, the debug redirection will start very late in the
process.
6 months ago
Loïc Guilloux 93ba6d6776
Fix: compilation without precompiled headers (#11770) 6 months ago
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 6 months ago
Peter Nelson 7a5106042f
Codechange: Use CompanyMask and company group statistics for auto clean tests. (#11693)
This function does not need to know how many vehicles there are, only that there is at least one.
6 months ago
Patric Stout 7788b68bbe
Fix: don't unneededly block on transmitting survey on exit (#11687) 6 months ago
Patric Stout 28e2576589
Fix: race-condition when quitting the game with libcurl (#11688)
There could be a callback in _new_http_callbacks that is not
processed yet. All callbacks in _http_callbacks were cancelled,
but not the ones in _new_http_callbacks
6 months ago
Rubidium e3f49ee7a0 Codechange: coding style fixes 6 months ago
Jonathan G Rennison 0075364c89 Fix: curl_global_cleanup called before libcurl HTTP thread exited 6 months ago
Jonathan G Rennison 51ef416b49 Fix: libcurl HTTP thread race at uninit preventing thread exit 6 months ago
Patric Stout aef49e9933
Fix: race-conditions in GUI updates when downloading HTTP files (#11639) 6 months ago
Jonathan G Rennison 502a52edd5
Fix: Spurious cancellations of HTTP content downloads (#11668) 6 months ago
Peter Nelson 7124b4eef1 Codechange: Use std::unique_ptr for all NWidgets. 6 months ago
Peter Nelson 9a3934ae23 Codechange: Use vector/unique_ptr inside widget containers.
This replaces a C-style double-linked-list which required all widgets
to have next/prev pointers, and removes the need for manual pointer management.
6 months ago
Charles Pigott 1e60734660
Fix: Compilation with DEBUG_DUMP_COMMANDS enabled (#11607) 6 months ago
Peter Nelson a0dfb76e34 Codechange: Replace mishmash of types for widget index with WidgetID.
Indices were stored as int, but often passed around as uint/uint8_t and casts.

Now they should all use WidgetID.
6 months ago
Peter Nelson b86182ab84 Codechange: Use std::map to provide indexed widget access.
This removes the need to determine the biggest widget index and replaces C-style memory handling.
6 months ago
Peter Nelson feb94d233d
Codechange: Remove deferred nested_array initialization path. (#11640)
Having two ways (`FillNestedArray` and `SetupSmallestSize`) to initialize
`Window::nested_array` introduces confusion.

Instead, make `FillNestedArray` the canonical way, always call it, and remove
init_array from `SetupSmallestSize`.
6 months ago
Patric Stout 11ba951250
Fix: race-condition when creating new HTTP requests from different threads (#11638) 6 months ago
Peter Nelson 33ff64ef74
Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. (#11637) 6 months ago
Rubidium 2072e532f7 Codechange: replace NULL with nullptr 6 months ago
Peter Nelson 6e8c27b8e5
Change: Hide bevel for resizeable sparse layout windows. (#11572)
When clicked, the button is still highlighted to show that it is active.

The bevel is controlled with widget_data by RWV_SHOW_BEVEL or RWV_HIDE_BEVEL values.
7 months ago
Peter Nelson 09251d993c
Change: Use sparse padding for network server list. (#11571) 7 months ago
Peter Nelson d6060a4d47
Change: Use sparse padding for start network server window. (#11569) 7 months ago
Peter Nelson a759d35f26
Fix #11352: Draw all network server info as multiline strings. (#11567)
This also allows the 'header' (which is not actually a widget) to grow
as necessary to fit the server name.
7 months ago
Peter Nelson dcf730f1f6 Codechange: Optionally allow passing state to GUIList sorter function.
GUIList sorter functions can currently only use global state, which makes per-window-instance sorting difficult.
7 months ago
Peter Nelson 9122b4eb47
Codechange: SetMinimalTextLines(1, 0) is implied for widgets with text. (#11536) 7 months ago
Peter Nelson cc528bd8fc Change: Adjust layout of Content and NewGRF Website buttons for consistency. 7 months ago
Peter Nelson 9a92e02fa7
Change: Add tooltips for text file buttons, and shorten Website / Readme buttons. (#11534) 7 months ago
rubidium42 27082f9efa Codechange: pass std::string references to OpenBrowser 7 months ago
Peter Nelson f268c90bd3
Change: Use sparse padding for content download window. (#11501) 7 months ago