Commit graph

20769 commits

Author SHA1 Message Date
Dennis Felsing 6911944c57
Merge pull request #8659 from Robyt3/Client-Dummy-Connecting-Improvement
Improve dummy connecting button and error handling
2024-07-27 22:11:47 +00:00
Dennis Felsing 3a7d66c971
Merge pull request #8657 from Robyt3/Input-IME-Extended
Support IME composition strings of arbitrary length
2024-07-27 22:02:35 +00:00
Robert Müller b61005d3e7 Improve dummy connecting button and error handling
Track whether the dummy is currently connecting separately so the dummy being disconnected due to errors can be detected. Show an error message as echo in the chat when the dummy could not be connected, e.g. when the server is full.

Use the global time for limiting the dummy connecting delay instead of using game ticks, so the delay also works correctly when having connection problems (i.e., when ticks do not advance). Handle the dummy connecting being delayed separately from the dummy currently connecting.

Add tooltips for the "Connect dummy"-button when it's disable due to dummy not being allow on the server or when connecting is delayed.

Add console error messages for `dummy_connect` command.
2024-07-27 22:44:15 +02:00
Robert Müller fb832b482c Fix memory leak of non-RGBA image data, clear all image info
The image data was not being freed when `IGraphics::LoadTextureRawMove` is used with images that are not in RGBA format as this falls back to using `IGraphics::LoadTextureRaw` which requires manually freeing the image data.

Also consistently clear all image info in `LoadTextureRawMove`. This makes it necessary to store the size of the preview image in the editor separately, as previously the width and height of the unloaded image info were being used to render the preview image.
2024-07-27 21:24:32 +02:00
Robert Müller 8a3929d48c Support IME composition strings of arbitrary length
Previously, IME composition strings were limited to at most 32 bytes, e.g. 10 Hiragana characters. Now, `SDL_TextEditingExtEvent` (`SDL_TEXTEDITING_EXT`) is supported, which uses heap-allocated composition strings of arbitrary length.

On the other hand, the buffer for input event text was larger than necessary, as SDL text events only contain at most 32 bytes (`SDL_TEXTINPUTEVENT_TEXT_SIZE` is not used directly to avoid the include). With the hint for extended IME handling enabled, long composition text will be sent as multiple text events (without breaking UTF-8).
2024-07-27 17:32:41 +02:00
Robert Müller 78cbb45d49
Merge pull request #8656 from ChillerDragon/pr_editor_oninit
Rename editor component `Init` to `OnInit`
2024-07-27 14:26:27 +00:00
ChillerDragon 3c5320aa90 Rename editor component Init to OnInit
This matches the naming convention used for client components and the
`GameServer()->OnInit()`
2024-07-27 22:07:56 +08:00
Dennis Felsing 9b08eda763
Merge pull request #8655 from Robyt3/Android-Manifest-Vulkan-OGL
Update Vulkan and OpenGL ES versions specified in Android manifest
2024-07-27 12:10:28 +00:00
Robert Müller 2b3ae2425d Update Vulkan and OpenGL ES versions specified in Android manifest
Specify that Vulkan 1.1.0 is used if supported.

Remove explicit requirement of OpenGL ES 3.0 as OpenGL ES 1.0 is also supported as fallback and the client should pick the highest supported version.
2024-07-27 12:06:39 +02:00
Dennis Felsing a1ef70c114
Merge pull request #8654 from Robyt3/Image-Manipulation-Minor-Refactoring
Minor refactoring of `DilateImage`, `ResizeImage` and related functions
2024-07-26 22:41:00 +00:00
Robert Müller f79ea492fa Minor refactoring of ResizeImage and related functions
Avoid duplicate code by using arrays and loops.

Move local variable declarations closer to their usages.

Use `mem_copy` instead of for-loops.
2024-07-26 21:10:05 +02:00
Robert Müller bfc4902910 Minor refactoring of DilateImage and related functions
Add constants for BPP and alpha threshold during Dilate, as dilating only works for RGBA images and we only use a fixed alpha threshold.

Move local variable declarations closer to their usages.

Use `mem_copy` instead of for-loop.

Use `nullptr` instead of `NULL`.
2024-07-26 21:10:05 +02:00
Dennis Felsing 36b8d81d1a Only ban VPNs for a minute 2024-07-26 17:23:04 +02:00
archimede67 08f955bff0
Merge pull request #8651 from Robyt3/Client-Saves-File-Header-Fix
Fix CSV header being written multiple times to `ddnet-saves.txt`
2024-07-25 22:02:06 +00:00
Robert Müller 5e655615cb Fix CSV header being written multiple times to ddnet-saves.txt
It is implementation-defined whether the file position returned by `ftell` denotes the beginning or the end of the file when opening in append-mode. This was causing the condition `io_tell(File) == 0` to always be true, so the CSV header was also written to `ddnet-saves.txt` every time that a new save code is written. Now, we check if the file already exists before appending and only write the CSV header once when the file does not exist yet.
2024-07-25 20:27:09 +02:00
Dennis Felsing 27ca58f257
Merge pull request #8649 from furo321/remove-servers_legacy
Remove `servers_legacy` support
2024-07-25 15:48:02 +00:00
furo 8f96584f40 Remove servers_legacy support 2024-07-25 17:24:39 +02:00
Dennis Felsing cd81b1f253
Merge pull request #8645 from Robyt3/Client-HUD-Score-Team-Colors
Use same Red/Blue team colors for score HUD as for scoreboard
2024-07-24 16:46:53 +00:00
Robert Müller fddba0cc76
Merge pull request #8641 from def-/pr-formatting
Also trim search strings in highlights
2024-07-24 16:31:02 +00:00
Robert Müller eb956e72d1 Use same Red/Blue team colors for score HUD as for scoreboard 2024-07-24 18:29:00 +02:00
Dennis Felsing 04a4491731
Merge pull request #8642 from Learath2/pr_save_issue
Try fix issue with savegames
2024-07-24 15:53:42 +00:00
Learath2 90c4a552ed Try fix issue with savegames 2024-07-24 17:36:12 +02:00
Dennis Felsing 1c2d7262d0 Also trim search strings in highlights 2024-07-24 15:23:05 +02:00
Dennis Felsing a84a53c5fe
Merge pull request #8640 from Robyt3/Server-DNSBL-Ban-Only-New
Only apply DNSBL bans once when player joins
2024-07-24 11:08:40 +00:00
Robert Müller 7f2908d822 Only apply DNSBL bans once when player joins
Only ban DNSBL blacklisted players once when joining immediately after the DNSBL result is available, to prevent current players from having their runs ended when the `sv_dnsbl_ban` setting is enabled.

Note that enabling `sv_dnsbl` and `sv_dnsbl_ban` at the same time will still cause the players to be banned immediately. To prevent this, first enable `sv_dnsbl` for at least one tick, then enable `sv_dnsbl_ban`.

Closes #2640.
2024-07-24 12:50:06 +02:00
Jupeyy c7bcdc3f63
Merge pull request #8575 from DynamoFox/fix-dgpu-selection
Fix  'auto' GPU identification on hybrid GPU systems
2024-07-23 20:29:28 +00:00
DynamoFox 9365e1453f Fix 'auto' GPU identification and display
* Refactors the previous code segment
* Fixes 'auto' GPU identification and display in DDNet Graphics tab of
  the settings. The 'auto' GPU is the best one encountered in the VK
  physical device enumeration array until we encounter one that is
  at least "integrated" when accessing them in increasing order
* Selects the first GPU that matches a name when using one by user
  specified name
2024-07-23 21:31:32 +02:00
Emir Marincic 5b81b292dc
Merge pull request #8638 from AMDmi3/patch-1
Install icons and desktop file conditionally
2024-07-23 14:31:06 +00:00
Dmitry Marakasov 7f1123e92b
Install icons and desktop file conditionally
Only install client/server icons and desktop file if corresponding targets are enabled
2024-07-23 17:13:17 +03:00
Jupeyy fe2843bb31
Merge pull request #8637 from Robyt3/UI-Input-Console-Activation-Fix
Fix text input rapidly activated/deactivated when closing console
2024-07-23 11:29:40 +00:00
Robert Müller 8b3e686fdb Fix text input rapidly activated/deactivated when closing console
Fixes virtual keyboard on Android flashing rapidly when the console is closed.
2024-07-23 12:51:36 +02:00
Dennis Felsing b7e1af4bbe
Merge pull request #8636 from archimede67/fix-teamcount-rendering
Fix team number and team size rendering
2024-07-23 08:55:54 +00:00
Corantin H 5f8e2742a6 Fix team number and team size rendering
Fix team number and team size rendering outside of the scoreboard when the team is rendered on both sides
Fix team number and team size alignment
2024-07-23 10:10:43 +02:00
heinrich5991 7e45b9b3ce
Merge pull request #8634 from def-/pr-rust
ci: Install Rust on macOS
2024-07-22 22:54:42 +00:00
Dennis Felsing 6dc0abf7a2 ci: Install Rust on macOS
Fixes: #8631
2024-07-23 00:36:08 +02:00
Dennis Felsing 712aed780f Version 18.4 2024-07-22 17:56:21 +02:00
Dennis Felsing 3297aa336a
Merge pull request #8626 from By622/patch-18
Update traditional_chinese.txt
2024-07-21 13:18:09 +00:00
Dennis Felsing 4df9b8c069
Merge pull request #8625 from By622/patch-15
Update simplified_chinese.txt
2024-07-21 13:14:58 +00:00
Dennis Felsing d0492e61dc
Update data/languages/traditional_chinese.txt
Co-authored-by: furo <furo@posteo.net>
2024-07-21 14:58:31 +02:00
By e20f43479b Update simplified_chinese.txt 2024-07-21 14:56:55 +02:00
Dennis Felsing d8cee35f73
Merge pull request #8628 from Jupeyy/pr_gpu_if
Check API version before adding GPU to GPU list
2024-07-21 12:55:31 +00:00
Robert Müller 606212f2d0
Merge pull request #8629 from MilkeeyCat/pr_refactor_text_alignment_of_movement_information
Use text containers to render movement information
2024-07-21 12:05:59 +00:00
MilkeeyCat ec37efdcfd refactor: use text containers to render movement information
closes #8622
2024-07-21 14:43:22 +03:00
Jupeyy e96275943b
Check API version before adding GPU to GPU list
Signed-off-by: Jupeyy <jupjopjap@gmail.com>
2024-07-21 13:29:49 +02:00
heinrich5991 cd3a97c125
Merge pull request #8627 from Robyt3/Client-GetServerInfo-Cleanup
Avoid copies of server info in `CGameClient::OnNewSnapshot`
2024-07-21 11:19:10 +00:00
Robert Müller 74426b05a3 Avoid copies of server info in CGameClient::OnNewSnapshot
Only copy the server info with the `GetServerInfo` function once, as it should not change within a call of the `CGameClient::OnNewSnapshot` function.
2024-07-21 12:53:29 +02:00
By b24a377b13
Update traditional_chinese.txt 2024-07-21 16:52:37 +08:00
Robert Müller 3d804910e6 Minor refactoring of RenderNameplate
- Reduce duplicate code and dead stores for color and input data.
- Move variable declarations closer to their usages.
- Remove unnecessary `Graphics()->TextureClear` before `Graphics()->TextureSet`.
- Mark variables `const` and remove unnecessary temporary variables.
- Remove unnecessary default arguments of `Text` and `TextWidth` functions.
- Use `WithAlpha` for colors.
2024-07-20 13:32:14 +02:00
Robert Müller 3afdc20df2 Rename clan related variables, removing Name from name 2024-07-20 13:19:03 +02:00
Robert Müller 0222e4ae96 Avoid duplicate calculations of nameplate text width
Get name/clan bounding box size from the text container index instead of calculating it twice.
2024-07-20 13:18:41 +02:00