The server list was being resorted every frame when the server details of a favorite server were being rendered, which was causing the FPS to drop by a factor of 5.
Use config manager to reset `ui_page` to the default, instead of using `CMenus::PAGE_DDNET` directly (which is the default).
Check current type of serverbrowser instead of checking the current `ui_page` against `CMenus::PAGE_DDNET` and `CMenus::PAGE_KOG`.
Using `dbg_stress 1` now only does the following (in debug build):
- Randomly send inputs.
- Randomly send chat messages.
- Randomly connect/disconnect to server configured with `dbg_stress_server` (`localhost` by default).
Previously it also did the following, which is not useful for this debugging feature and only complicates the code unnecessarily:
- Cause images and sounds not to be loaded.
- Render only every tenth frame.
- Always use inactive graphics refresh rate.
We previously only defined compatibility with Windows Vista and 7. Now we define compatibility with Windows Vista - 11, which is what we currently support.
This means that Windows 8 - 11 will no longer try to run the client in a compatibility mode for Windows 7 applications. This should effectively not change anything, as we don't directly use any of the [components that function differently depending on the compatibility information](https://learn.microsoft.com/en-us/windows/compatibility/application-executable-manifest#manifestation).
Instead of keeping track of a permanently empty `CSnapshot` object in client and server separately, add `CSnapshot::EmptySnapshot` to access a singleton empty `CSnapshot`.
Mark pointer parameters of snapshot functions as `const` when possible.
This mostly reverts #6937 by making our `IOHANDLE` effectively `FILE *` on all systems again. We still use `CreateFileW` to open a `HANDLE` initially so we can specify the necessary flag so the file can be moved/deleted while open, which we can't do with the `FILE *` based `fopen` functions on Windows. This brings back the automatic I/O buffering on Windows, causing significantly less system calls when saving files. Closes#7226.
Simplify the handling of free texture indices by using `-1` only for indices which are currently in use, whereas the size of the vector is now used to indicate the last free index. Otherwise the assertions incorrectly detect the last texture index always being in use because `-1` was used for both states.