Show localized text "Press a key…" instead of "???" while waiting for a key to be pressed.
Render button with green background while waiting for a key to be pressed.
Inline unnecessary `DoButton_KeySelect` function.
Fix names of static variables.
Prevent potential dead lock when using `/map` chat command in combination with Teehistorian. Closes#7619. I could not reproduce the issue on Windows though.
This also means resetting game settings should actually be efficient now, because it only involves iterating over all game settings and directly resetting their value.
Previously, only one buffer was allocated to store each snapshot holder structure, the snapshot data and alternative snapshot data. This prevents tools like ASAN from detecting some invalid accesses, e.g. to the snapshot holder structure by underflowing the snapshot data pointer. Now three separate allocations are used instead. This hopefully helps debugging #2677.
We support little and big endian but not PDP endian (Middle-endian).
Define endianness as string `CONF_ARCH_ENDIAN_STRING` to avoid conditional compilation when printing endianness.
On Windows the function `setsockopt` does not set `errno` on errors but instead `WSAGetLastError` must be used. This is encapsulated in the `net_errno` function.
The variable `Id` is translated for old clients and is not guranteed to
be the real id. While `m_ClientID` is the real ID. That can also be used
to index the CServer::m_aClients[] array to get the authed state.
closed#7599
Fixes
```
valgrind ./DDNet-Server "dbg_dummies 1"
[..]
2023-12-07 18:01:33 I chat: *** 'Debug dummy 1' entered and joined the
game
==75634== Conditional jump or move depends on uninitialised value(s)
==75634== at 0x2DAA83: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:17)
==75634== by 0x2DAD79: CVariableInt::Compress(void const*, int,
void*, int) (compression.cpp:98)
==75634== by 0x23EC50: CServer::DoSnapshot() (server.cpp:1046)
==75634== by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634== by 0x230173: main (main.cpp:193)
==75634==
==75634== Conditional jump or move depends on uninitialised value(s)
==75634== at 0x2DAAF7: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:25)
==75634== by 0x2DAD79: CVariableInt::Compress(void const*, int,
void*, int) (compression.cpp:98)
==75634== by 0x23EC50: CServer::DoSnapshot() (server.cpp:1046)
==75634== by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634== by 0x230173: main (main.cpp:193)
==75634==
==75634== Conditional jump or move depends on uninitialised value(s)
==75634== at 0x2DAA83: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:17)
==75634== by 0x32E812: CPacker::AddInt(int) (packer.cpp:20)
==75634== by 0x23ED51: CServer::DoSnapshot() (server.cpp:1059)
==75634== by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634== by 0x230173: main (main.cpp:193)
==75634==
==75634== Conditional jump or move depends on uninitialised value(s)
==75634== at 0x2DAAF7: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:25)
==75634== by 0x32E812: CPacker::AddInt(int) (packer.cpp:20)
==75634== by 0x23ED51: CServer::DoSnapshot() (server.cpp:1059)
==75634== by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634== by 0x230173: main (main.cpp:193)
==75634==
```
Which is using ID 0 as index in the m_aClients array but only ID 63 was
ever initialized.