Commit graph

20329 commits

Author SHA1 Message Date
Dennis Felsing dac12c7afd
Merge pull request #8665 from Robyt3/Client-DirectInput-Removal
Remove unused `CClient::DirectInput` function
2024-07-29 21:47:36 +00:00
Robert Müller 92b0b90b29 Remove unused CClient::DirectInput function
The function is unused and because the message is not flushed it would also not have worked correctly. The `NETMSG_INPUT` message is already packed and flushed in the `CClient::SendInput` function.

Closes #8408.
2024-07-29 21:43:50 +02:00
Dennis Felsing 83c9b6cae6
Merge pull request #8663 from Robyt3/Menus-Checker-Fix-Optimization
Smoother menu checker background scrolling on loading screens, fix menu checker background on wide resolutions and optimize it
2024-07-28 22:19:19 +00:00
Robert Müller 5bd0b06c52 Fix menu checker background on wide resolutions and optimize it
The maximum width and height were swapped as the loop bounds, so the menu checker background did not have the correct width on very wide resolutions.

This was not noticed on common resolutions because twice as many quads as necessary were also being rendered for each row of the background. The bounds of the inner loop are adjusted and only every second x-value is iterated, which reduced the total number of quads for the checker background rendering by more than half.
2024-07-28 20:49:09 +02:00
Robert Müller 23fb01f9dd Smoother menu checker background scrolling on loading screens
Update global time also while rendering loading screens and shift the menu checker background based on the global time so it's smoother while loading.
2024-07-28 20:38:51 +02:00
Jupeyy 26b9d16e05
Merge pull request #8662 from Robyt3/Android-Manifest-Required-Attribute
Add `required` attributes to Android manifest
2024-07-28 17:56:53 +00:00
Robert Müller 0983e813d0 Add required attributes to Android manifest
Fix incorrect default value for Vulkan, which is not required.
2024-07-28 19:38:37 +02:00
Dennis Felsing a898604d03
Merge pull request #8660 from n0Ketchp/patch-20
Update spanish.txt
2024-07-28 12:22:33 +00:00
noKetchup 38773e39a8
Update spanish.txt 2024-07-28 00:29:15 -04:00
Dennis Felsing 1d92b5acd6
Merge pull request #8658 from Robyt3/Client-Image-Non-Rgba-Leak
Fix memory leak of non-RGBA image data, clear all image info
2024-07-27 22:12:42 +00:00
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