Commit graph

19729 commits

Author SHA1 Message Date
Robert Müller b2b0cd0c81 Fix shadowed variable declarations in android_main.cpp 2024-05-21 17:36:46 +02:00
Robert Müller 447321700d
Merge pull request #8388 from def-/pr-polish2
Update Polish translations
2024-05-21 15:31:41 +00:00
Dennis Felsing b4a41ea098
Merge pull request #8387 from ChillerDragon/pr_clang_format_interfaces
Whitelist class names starting with I
2024-05-21 06:59:06 +00:00
ChillerDragon ab64d64fed Whitelist class names starting with I
Fixes clang issues being detected in interface classes such as `class IJob`

Fixes the following clangd error:

``Invalid case style for class 'IJob' (fix available)``
2024-05-21 11:05:39 +08:00
heinrich5991 42fa41092c
Merge pull request #8384 from Robyt3/Client-Demo-Race-Compat-Removal
Remove `cl_ddrace_scoreboard` and `cl_demo_assume_race` settings
2024-05-20 10:09:56 +00:00
Robert Müller 7da8308c3f Remove cl_ddrace_scoreboard and cl_demo_assume_race settings
Time score will now always be used for any game with the flag `GAMEINFOFLAG_TIMESCORE` set in the `CNetObj_GameInfoEx` object. If the flag is not set, points score is used instead.

Backwards compatibility for old demos, that were recorded without this net object and flag, is removed. For old demos, points score is always assumed now.

Closes #6700.
2024-05-20 11:07:01 +02:00
Dennis Felsing b63380f7ce Update Polish translations 2024-05-20 13:36:29 +08:00
Jupeyy 08a8680a8e
Merge pull request #8383 from Robyt3/Graphics-Clear-Revert
Revert "Always clear window with black color instead of background color
2024-05-19 20:05:38 +00:00
heinrich5991 b94dfc5b77
Merge pull request #8382 from Robyt3/Scripts-CopyFix-Performance-Regression
Fix performance regression in `copy_fix.py`
2024-05-19 19:47:38 +00:00
Robert Müller c0a6f5a927 Revert "Always clear window with black color instead of background color"
This reverts commit caa062c88c.

As this decreased FPS and caused the background quad to be rendered twice when using a map background in entities mode.
2024-05-19 20:01:56 +02:00
Robert Müller fd4f61e601 Fix performance regression in copy_fix.py 2024-05-19 19:47:12 +02:00
Dennis Felsing 8a20f0d8a2
Merge pull request #8379 from Robyt3/Android-Landscape-Fullscreen
Force landscape orientation and hide title bar on Android
2024-05-19 13:22:40 +00:00
Robert Müller 05c825947a Force landscape orientation and hide title bar on Android
Always force landscape orientation to be used for the game on Android.

Hide the title bar so it is not shown when starting the game. There is also a bug with SDL currently that leads to the title bar and status bar being shown permanently after minimizing and reopening the app, which is alleviated by hiding the title bar.
2024-05-19 12:58:33 +02:00
Dennis Felsing 85b00ba7c1
Merge pull request #8374 from Robyt3/Graphics-Clear-Black
Always clear window with black color instead of background color
2024-05-18 14:09:23 +00:00
Robert Müller caa062c88c Always clear window with black color instead of background color
Always use black color to clear the window with all graphics backends, instead of using `cl_background_color` or `cl_background_entities_color`, respectively, as the clear color. The respective map background color is rendered using a quad in `CMapLayers` instead, so this should not affect appearance of maps. This does not have any noticeable effect on FPS. Previously, the unused part of the window (when it is resized smaller than 5:4 aspect ratio), was colored using the map background color, whereas now it will be cleared black consistently.

The color parameters of the `IGraphics::Clear` function and of the `SCommand_Clear` command are removed, as we always expect the screen to be cleared black now.

The parameter `ForceClearNow` of the `IGraphics::Clear` function was already unused previously and is also removed.
2024-05-18 15:20:17 +02:00
Dennis Felsing fcacef5fbb
Merge pull request #8362 from Robyt3/Android-Backbutton-Handling
Translate back-button to escape-key on Android, quit if Android back-button is pressed 3 times within 1 second
2024-05-18 01:10:32 +00:00
Dennis Felsing 058382f253
Merge pull request #8367 from Robyt3/Graphics-Backend-Image-Format-Cleanup
Remove redundant graphics backend functions returning RGBA format
2024-05-18 01:09:40 +00:00
Dennis Felsing 1cb9f07e3c
Merge pull request #8370 from Robyt3/Scripts-DrMingw-Show-All-Modules
Also print external module/symbol names in `parse_drmingw.sh`
2024-05-18 01:09:28 +00:00
Robert Müller 91848f0be6 Quit if Android back-button is pressed 3 times within 1 second
Interpret fast repeated presses of the back-button (3 times within 1 second) as a quit-event, so the app can be quit cleanly and quickly without using the UI. The client settings are otherwise not saved if the app is closed by minimizing it using the home button and waiting for the OS to kill it or by discarding it in the recent apps view.
2024-05-17 19:37:44 +02:00
Robert Müller bba606feae Translate back-button to escape-key on Android
Translate the Android back-button to the escape-key, so it can be used to navigate back in menus, open/close the ingame menu, close the editor etc.

Trap the Android back button by setting the `SDL_ANDROID_TRAP_BACK_BUTTON` hint, so it can be handled in our code reliably instead of letting the system handle it.
2024-05-17 19:36:35 +02:00
Robert Müller 554f244ef2 Remove redundant graphics backend functions returning RGBA format
The graphics backends only support the RGBA format with the `SCommand_Texture_Create` and `SCommand_Texture_Update` commands, so the `TexFormatToOpenGLFormat`, `TextureFormatToVulkanFormat` and `TexFormatToNewOpenGLFormat` functions and the command member variables for the format are unnecessary. The `TexFormatToNewOpenGLFormat` function was unused.
2024-05-17 19:36:11 +02:00
Robert Müller c8f6811aba Also print external module/symbol names in parse_drmingw.sh
Example output before this change:

```
Module offset: 0x00007FF7C8DE0000
Image base: 0x0000000140000000
0x0000000772cb5efc: ?? ??:0
0x000000077cd5c3e8: ?? ??:0
0x000000075d063cc3: ?? ??:0
0x000000075d2a3d61: ?? ??:0
0x000000075d0b7fde: ?? ??:0
0x000000075d2a5f18: ?? ??:0
0x000000075d2a6809: ?? ??:0
0x000000075d0b8140: ?? ??:0
0x000000075cf9d41b: ?? ??:0
0x000000014034b4c7: CCommandProcessorFragment_Vulkan::WaitFrame() at src/engine/client/backend/vulkan/backend_vulkan.cpp:2341
0x000000014034a1a5: CCommandProcessorFragment_Vulkan::NextFrame() at src/engine/client/backend/vulkan/backend_vulkan.cpp:2501
0x000000014032d5b6: CCommandProcessorFragment_Vulkan::RunCommand(CCommandBuffer::SCommand const*) at src/engine/client/backend/vulkan/backend_vulkan.cpp:6473
0x000000014001a7e6: CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) at src/engine/client/backend_sdl.cpp:335
0x00000001400168eb: CGraphicsBackend_Threaded::ThreadFunc(void*) at src/engine/client/backend_sdl.cpp:65
0x0000000140237f9a: CWindowsComLifecycle::~CWindowsComLifecycle() at src/base/system.cpp:4660
 (inlined by) thread_run at src/base/system.cpp:796
0x00000007ea7e257d: ?? ??:0
0x00000007eb62aa48: ?? ??:0
```

Output for the same crash dump with this change:

```
Module offset: 0x00007FF7C8DE0000
Image base: 0x0000000140000000

amdvlk64.dll!vk_icdGetInstanceProcAddrSG+0x1f40c
atig6pxx.dll!AmdGetCallbackProcs+0x124
amdvlk64.dll!vk_icdGetInstanceProcAddrSG+0x57773
amdvlk64.dll!vk_icdGetInstanceProcAddrSG+0x297811
amdvlk64.dll!vk_icdGetInstanceProcAddrSG+0xaba8e
amdvlk64.dll!vk_icdGetInstanceProcAddrSG+0x2999c8
amdvlk64.dll!vk_icdGetInstanceProcAddrSG+0x29a2b9
amdvlk64.dll!vk_icdGetInstanceProcAddrSG+0xabbf0
amdvlk64.dll!IcdPresentBuffers+0xb8eb
0x000000014034b4c7: CCommandProcessorFragment_Vulkan::WaitFrame() at src/engine/client/backend/vulkan/backend_vulkan.cpp:2341
0x000000014034a1a5: CCommandProcessorFragment_Vulkan::NextFrame() at src/engine/client/backend/vulkan/backend_vulkan.cpp:2501
0x000000014032d5b6: CCommandProcessorFragment_Vulkan::RunCommand(CCommandBuffer::SCommand const*) at src/engine/client/backend/vulkan/backend_vulkan.cpp:6473
0x000000014001a7e6: CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) at src/engine/client/backend_sdl.cpp:335
0x00000001400168eb: CGraphicsBackend_Threaded::ThreadFunc(void*) at src/engine/client/backend_sdl.cpp:65
0x0000000140237f9a: CWindowsComLifecycle::~CWindowsComLifecycle() at src/base/system.cpp:4660
 (inlined by) thread_run at src/base/system.cpp:796
KERNEL32.DLL!BaseThreadInitThunk+0x1d
ntdll.dll!RtlUserThreadStart+0x28
```

Also improve variable names in the script and add some comments.
2024-05-17 19:35:37 +02:00
archimede67 0f5b14c043
Merge pull request #8360 from Robyt3/UI-ButtonLogic-Consistency
Fix inconsistent behavior of scrollbars, key readers, edit boxes, value selectors and editor sound seekbars
2024-05-16 21:25:46 +00:00
archimede67 8a3635f243
Merge pull request #8371 from Robyt3/Scripts-CopyFix-Lint-Fix
Fix `possibly-used-before-assignment` in `copy_fix.py`
2024-05-16 21:23:55 +00:00
Robert Müller e341c56c35 Fix possibly-used-before-assignment in copy_fix.py
Always initialize the variables `local` and `supported` instead of initializing them conditionally, to fix the false-positive `possibly-used-before-assignment` pylint detection.

Closes #8369.
2024-05-16 20:46:14 +02:00
heinrich5991 392fc0ba9a str_from_intstr_format 2024-05-14 21:37:02 +02:00
Vlad 4532a64b2b Add rescuemodes
May `/rescuemode` be case-insensitive

clang-tidy

conflicts

clang-tidy

`CMDFLAG_PRACTICE`
2024-05-14 09:19:50 +03:00
ChillerDragon f3a686bc62 Show percentage of loaded rcon commands
closed #7769
2024-05-14 08:46:17 +08:00
heinrich5991 03b13cb9f5
Merge pull request #8355 from Patiga/fix-pixelart
Fix off-by-one error in map_create_pixelart
2024-05-13 22:37:13 +00:00
heinrich5991 3889bf89d8
Merge pull request #8344 from yrrrmmbl/master
add option to show only messages by team members
2024-05-13 17:36:30 +00:00
yrrrmmbl a93ad48dce add cl_show_chat_team to only show team members' messages 2024-05-13 19:18:41 +02:00
Robert Müller f3bb5feffc
Merge pull request #8347 from Jupeyy/pr_vk_minirefactor
Fix segfault when swapchain images change (e.g. toggling Vsync)
2024-05-12 20:16:30 +00:00
Robert Müller 1c123f2324 Fix inconsistent button behavior of remaining UI elements
Fix edit boxes, scrollbars, value selectors and the editor sound seekbar being activated by holding the left mouse button from outside the UI element and then hovering it, which is inconsistent with the behavior of the `DoButtonLogic` function.
2024-05-12 18:16:06 +02:00
Robert Müller d431a5cdeb Fix inconsistent key reader button behavior
Use the `DoButtonLogic` function directly for the key reader buttons in the controls settings. Now, the key reader will only be activated when the left click is initiated and completed inside the key reader button. Previously, the key reader would be activated immediately when holding the left mouse button from outside and then hovering the key reader, and the key reader was already activated by the press-event, whereas now it will only be activated by the release event of the left mouse button. The active key reader UI ID is now tracked as a member variable of `CMenusKeyBinder` to avoid using static variables for this purpose.
2024-05-12 18:15:49 +02:00
Robert Müller e822d6878b Fix scrollregion scrollbar position offset after releasing handle
The scrollregion scrollbar was not being deactivated if the handle is continued to be hovered after releasing it, causing the handle to become offset with the position of the click on the next activation of the handle.
2024-05-12 18:15:39 +02:00
heinrich5991 0562be67f4
Merge pull request #8353 from Robyt3/Client-Demo-Seekbar-UX-Fixes
Fix demo seekbar tooltip not shown while seekbar is active, fix demo seekbar being activated by held button press
2024-05-12 01:45:33 +00:00
heinrich5991 acde8806db
Merge pull request #8354 from Robyt3/Menus-Settings-Controller-Size-Fix
Fix height of controller settings with exactly 1 controller
2024-05-12 01:26:08 +00:00
heinrich5991 0c66786fb6
Merge pull request #8349 from Robyt3/Mapitem-Image-Cleanup
Remove unused `CImageInfo::ImageFormatFromInt`
2024-05-12 01:16:45 +00:00
Patiga 4f62980541 Fix off-by-one error in map_create_pixelart 2024-05-11 19:53:56 +02:00
Robert Müller b8cb67379c Fix height of controller settings with exactly 1 controller
The controller name is also shown if there is only exactly one controller connected, but the height was not increased for the additional row.
2024-05-11 15:10:15 +02:00
Robert Müller c6c8f2eab6 Fix demo seekbar being activated by held button press
The seekbar is immediately activated if the mouse button is held while moving the mouse over the seekbar, which is inconsistent with the general `DoButtonLogic` behavior. This is problematic on Android, where the first mouse button is always pressed while the mouse is being moved, causing the seekbar to steal focus immediately when hovered.
2024-05-11 12:29:33 +02:00
Robert Müller 7d0774a00d Fix demo seekbar tooltip not shown while seekbar is active
The tooltip was not shown if the seekbar is the active item, i.e. when the first mouse button is held down and the seekbar is currently updating the demo player.
2024-05-11 12:26:46 +02:00
Robert Müller 74e2e04b7d Remove unused CImageInfo::ImageFormatFromInt
Since the image format is not parsed from maps anymore, this function is unnecessary.
2024-05-10 21:44:49 +02:00
Robert Müller d34fc96049
Merge pull request #8348 from furo321/map_create_pixelart
Fix issues with `map_create_pixelart`
2024-05-10 18:06:49 +00:00
furo 3491624184 Fix crash when not specifying optimize, centralize or invalid amount of arguments 2024-05-10 19:05:58 +02:00
Jupeyy 15afc50865 Don't recreate DescriptorSetLayouts if swapchain image count changes 2024-05-10 18:48:09 +02:00
Jupeyy 128302d726 Cleanup Vulkan now takes SwapchainCount as explicit parameter.
This fixes a crash if the swapchain count changed.
fixes #8328
2024-05-10 18:48:09 +02:00
Jupeyy 2655627a4b Rename m_CurFrames to make clear it's about the sync objects.
Use one more sync object than there are inflight frames.
Remove unused memory sync objects.
2024-05-10 18:48:05 +02:00
furo 7cd9d8bbb4 Prevent using map_create_pixelart with the same input and output path 2024-05-10 18:42:55 +02:00
furo 39dd6ea499 Fix wrong filename used in dbg_msg 2024-05-10 18:20:33 +02:00