mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-11 16:05:23 +01:00
clang-cl translations
This commit is contained in:
commit
86c55c45cc
|
|
@ -25,6 +25,9 @@ mkdir ./bin/config/input_configs
|
|||
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
|
||||
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
|
||||
|
||||
# Set Qt plugin & translation path
|
||||
cp D:/a/rpcs3/rpcs3/rpcs3/qt/etc/qt.conf ./bin/qt.conf
|
||||
|
||||
# Download translations
|
||||
mkdir -p ./bin/qt6/translations
|
||||
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
|
|
|
|||
2
.github/workflows/rpcs3.yml
vendored
2
.github/workflows/rpcs3.yml
vendored
|
|
@ -373,8 +373,6 @@ jobs:
|
|||
mingw-w64-clang-x86_64-qt6-declarative
|
||||
mingw-w64-clang-x86_64-qt6-multimedia
|
||||
mingw-w64-clang-x86_64-qt6-svg
|
||||
mingw-w64-clang-x86_64-qt6-tools
|
||||
mingw-w64-clang-x86_64-qt6-translations
|
||||
base-devel
|
||||
curl
|
||||
git
|
||||
|
|
|
|||
2
3rdparty/libsdl-org/SDL
vendored
2
3rdparty/libsdl-org/SDL
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit a962f40bbba175e9716557a25d5d7965f134a3d3
|
||||
Subproject commit f5e5f6588921eed3d7d048ce43d9eb1ff0da0ffc
|
||||
36
3rdparty/libsdl-org/SDL.vcxproj
vendored
36
3rdparty/libsdl-org/SDL.vcxproj
vendored
|
|
@ -23,7 +23,6 @@
|
|||
<ClInclude Include="SDL\include\SDL3\SDL_clipboard.h" />
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_copying.h" />
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_cpuinfo.h" />
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_dlopennote.h" />
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_egl.h" />
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_endian.h" />
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_error.h" />
|
||||
|
|
@ -103,7 +102,6 @@
|
|||
<ClInclude Include="SDL\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="SDL\src\camera\SDL_camera_c.h" />
|
||||
<ClInclude Include="SDL\src\camera\SDL_syscamera.h" />
|
||||
<ClInclude Include="SDL\src\core\SDL_core_unsupported.h" />
|
||||
<ClInclude Include="SDL\src\core\windows\SDL_directx.h" />
|
||||
<ClInclude Include="SDL\src\core\windows\SDL_gameinput.h" />
|
||||
<ClInclude Include="SDL\src\core\windows\SDL_hid.h" />
|
||||
|
|
@ -132,8 +130,6 @@
|
|||
<ClInclude Include="SDL\src\filesystem\SDL_sysfilesystem.h" />
|
||||
<ClInclude Include="SDL\src\gpu\SDL_sysgpu.h" />
|
||||
<ClInclude Include="SDL\src\gpu\vulkan\SDL_gpu_vulkan_vkfuncs.h" />
|
||||
<ClInclude Include="SDL\src\haptic\hidapi\SDL_hidapihaptic.h" />
|
||||
<ClInclude Include="SDL\src\haptic\hidapi\SDL_hidapihaptic_c.h" />
|
||||
<ClInclude Include="SDL\src\io\SDL_asyncio_c.h" />
|
||||
<ClInclude Include="SDL\src\io\SDL_sysasyncio.h" />
|
||||
<ClInclude Include="SDL\src\haptic\SDL_haptic_c.h" />
|
||||
|
|
@ -144,11 +140,7 @@
|
|||
<ClInclude Include="SDL\src\hidapi\SDL_hidapi_c.h" />
|
||||
<ClInclude Include="SDL\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_flydigi.h" />
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_nintendo.h" />
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_sinput.h" />
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_report_descriptor.h" />
|
||||
<ClInclude Include="SDL\src\joystick\SDL_gamepad_c.h" />
|
||||
<ClInclude Include="SDL\src\joystick\SDL_gamepad_db.h" />
|
||||
<ClInclude Include="SDL\src\joystick\SDL_joystick_c.h" />
|
||||
|
|
@ -164,7 +156,6 @@
|
|||
<ClInclude Include="SDL\src\libm\math_private.h" />
|
||||
<ClInclude Include="SDL\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="SDL\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="SDL\src\misc\SDL_libusb.h" />
|
||||
<ClInclude Include="SDL\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="SDL\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="SDL\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
|
|
@ -184,6 +175,7 @@
|
|||
<ClInclude Include="SDL\src\render\software\SDL_drawline.h" />
|
||||
<ClInclude Include="SDL\src\render\software\SDL_drawpoint.h" />
|
||||
<ClInclude Include="SDL\src\render\software\SDL_render_sw_c.h" />
|
||||
<ClInclude Include="SDL\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="SDL\src\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="SDL\src\render\vulkan\SDL_shaders_vulkan.h" />
|
||||
<ClInclude Include="SDL\src\SDL_assert_c.h" />
|
||||
|
|
@ -192,35 +184,20 @@
|
|||
<ClCompile Include="SDL\src\camera\dummy\SDL_camera_dummy.c" />
|
||||
<ClCompile Include="SDL\src\camera\mediafoundation\SDL_camera_mediafoundation.c" />
|
||||
<ClCompile Include="SDL\src\camera\SDL_camera.c" />
|
||||
<ClCompile Include="SDL\src\core\windows\pch_cpp.cpp" />
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_gameinput.cpp" />
|
||||
<ClCompile Include="SDL\src\dialog\SDL_dialog.c" />
|
||||
<ClCompile Include="SDL\src\dialog\SDL_dialog_utils.c" />
|
||||
<ClCompile Include="SDL\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="SDL\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
<ClCompile Include="SDL\src\haptic\hidapi\SDL_hidapihaptic.c" />
|
||||
<ClCompile Include="SDL\src\haptic\hidapi\SDL_hidapihaptic_lg4ff.c" />
|
||||
<ClCompile Include="SDL\src\io\windows\SDL_asyncio_windows_ioring.c" />
|
||||
<ClCompile Include="SDL\src\gpu\SDL_gpu.c" />
|
||||
<ClCompile Include="SDL\src\gpu\d3d12\SDL_gpu_d3d12.c" />
|
||||
<ClCompile Include="SDL\src\gpu\vulkan\SDL_gpu_vulkan.c" />
|
||||
<ClCompile Include="SDL\src\io\generic\SDL_asyncio_generic.c" />
|
||||
<ClCompile Include="SDL\src\io\SDL_asyncio.c" />
|
||||
<ClCompile Include="SDL\src\joystick\gdk\SDL_gameinputjoystick.cpp" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_8bitdo.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_flydigi.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_gip.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_lg4ff.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_sinput.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steam_triton.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_switch2.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_zuiki.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_report_descriptor.c" />
|
||||
<ClCompile Include="SDL\src\main\generic\SDL_sysmain_callbacks.c" />
|
||||
<ClCompile Include="SDL\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="SDL\src\main\SDL_runapp.c" />
|
||||
<ClCompile Include="SDL\src\main\windows\SDL_sysmain_runapp.c" />
|
||||
<ClCompile Include="SDL\src\misc\SDL_libusb.c" />
|
||||
<ClCompile Include="SDL\src\render\vulkan\SDL_render_vulkan.c" />
|
||||
<ClCompile Include="SDL\src\render\vulkan\SDL_shaders_vulkan.c" />
|
||||
<ClCompile Include="SDL\src\SDL_guid.c" />
|
||||
|
|
@ -264,7 +241,6 @@
|
|||
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_xcb.h" />
|
||||
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_xlib.h" />
|
||||
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_xlib_xrandr.h" />
|
||||
<ClInclude Include="SDL\src\video\miniz.h" />
|
||||
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenevents_c.h" />
|
||||
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenframebuffer_c.h" />
|
||||
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenopengles.h" />
|
||||
|
|
@ -280,14 +256,13 @@
|
|||
<ClInclude Include="SDL\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_rotate.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_stb_c.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_surface_c.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_video_unsupported.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="SDL\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="SDL\src\video\windows\SDL_msctf.h" />
|
||||
<ClInclude Include="SDL\src\video\windows\SDL_surface_utils.h" />
|
||||
<ClInclude Include="SDL\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="SDL\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="SDL\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
|
|
@ -328,6 +303,7 @@
|
|||
<ClCompile Include="SDL\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="SDL\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="SDL\src\core\SDL_core_unsupported.c" />
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_gameinput.c" />
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_immdevice.c" />
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_windows.c" />
|
||||
|
|
@ -357,6 +333,7 @@
|
|||
<ClCompile Include="SDL\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="SDL\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="SDL\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="SDL\src\joystick\gdk\SDL_gameinputjoystick.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_combined.c" />
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
|
|
@ -416,6 +393,7 @@
|
|||
<ClCompile Include="SDL\src\render\software\SDL_drawline.c" />
|
||||
<ClCompile Include="SDL\src\render\software\SDL_drawpoint.c" />
|
||||
<ClCompile Include="SDL\src\render\software\SDL_render_sw.c" />
|
||||
<ClCompile Include="SDL\src\render\software\SDL_rotate.c" />
|
||||
<ClCompile Include="SDL\src\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="SDL\src\SDL.c" />
|
||||
<ClCompile Include="SDL\src\SDL_assert.c" />
|
||||
|
|
@ -486,7 +464,6 @@
|
|||
<ClCompile Include="SDL\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_rotate.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_stb.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_surface.c" />
|
||||
|
|
@ -494,11 +471,12 @@
|
|||
<ClCompile Include="SDL\src\video\SDL_video_unsupported.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_vulkan_utils.c" />
|
||||
<ClCompile Include="SDL\src\video\SDL_yuv.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_surface_utils.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsclipboard.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsevents.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsframebuffer.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsgameinput.cpp" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowskeyboard.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsgameinput.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsmessagebox.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsmodes.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsmouse.c" />
|
||||
|
|
|
|||
147
3rdparty/libsdl-org/SDL.vcxproj.filters
vendored
147
3rdparty/libsdl-org/SDL.vcxproj.filters
vendored
|
|
@ -214,9 +214,6 @@
|
|||
<Filter Include="io\windows">
|
||||
<UniqueIdentifier>{000028b2ea36d7190d13777a4dc70000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="haptic\hidapi">
|
||||
<UniqueIdentifier>{695ffc61-5497-4227-b415-15e9bdd5b6bf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_begin_code.h">
|
||||
|
|
@ -702,6 +699,9 @@
|
|||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_std_func.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\windows\SDL_surface_utils.h">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\windows\SDL_windowsclipboard.h">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -831,6 +831,9 @@
|
|||
<ClInclude Include="SDL\src\render\software\SDL_render_sw_c.h">
|
||||
<Filter>render\software</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\render\software\SDL_rotate.h">
|
||||
<Filter>render\software</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\render\software\SDL_triangle.h">
|
||||
<Filter>render\software</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -908,6 +911,12 @@
|
|||
<ClInclude Include="SDL\src\hidapi\SDL_hidapi_c.h" />
|
||||
<ClInclude Include="SDL\src\thread\generic\SDL_sysrwlock_c.h" />
|
||||
<ClInclude Include="SDL\src\thread\generic\SDL_sysrwlock_c.h" />
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||
<ClInclude Include="SDL\src\render\vulkan\SDL_shaders_vulkan.h">
|
||||
<Filter>render\vulkan</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -941,60 +950,6 @@
|
|||
<ClInclude Include="SDL\include\SDL3\SDL_storage.h" />
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_time.h" />
|
||||
<ClInclude Include="SDL\src\events\SDL_categories_c.h" />
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_std.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_common.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_internal.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx_func.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_sse.h">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\miniz.h">
|
||||
<Filter>video</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\SDL_rotate.h">
|
||||
<Filter>video</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\video\SDL_video_unsupported.h">
|
||||
<Filter>video</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\misc\SDL_libusb.h">
|
||||
<Filter>misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\haptic\hidapi\SDL_hidapihaptic.h">
|
||||
<Filter>haptic\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\haptic\hidapi\SDL_hidapihaptic_c.h">
|
||||
<Filter>haptic\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\core\SDL_core_unsupported.h">
|
||||
<Filter>core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_flydigi.h">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_nintendo.h">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_sinput.h">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\src\joystick\hidapi\SDL_report_descriptor.h">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SDL\include\SDL3\SDL_dlopennote.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SDL\src\audio\wasapi\SDL_wasapi.c" />
|
||||
|
|
@ -1082,6 +1037,9 @@
|
|||
<ClCompile Include="SDL\src\core\SDL_core_unsupported.c">
|
||||
<Filter>core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_gameinput.c">
|
||||
<Filter>core\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_hid.c">
|
||||
<Filter>core\windows</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -1208,6 +1166,9 @@
|
|||
<ClCompile Include="SDL\src\joystick\dummy\SDL_sysjoystick.c">
|
||||
<Filter>joystick\dummy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\gdk\SDL_gameinputjoystick.c">
|
||||
<Filter>joystick\gdk</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_combined.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -1367,6 +1328,9 @@
|
|||
<ClCompile Include="SDL\src\video\dummy\SDL_nullvideo.c">
|
||||
<Filter>video\dummy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_surface_utils.c">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsclipboard.c">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -1379,6 +1343,9 @@
|
|||
<ClCompile Include="SDL\src\video\windows\SDL_windowskeyboard.c">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsgameinput.c">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsmessagebox.c">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -1541,6 +1508,9 @@
|
|||
<ClCompile Include="SDL\src\render\software\SDL_render_sw.c">
|
||||
<Filter>render\software</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\render\software\SDL_rotate.c">
|
||||
<Filter>render\software</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\render\software\SDL_triangle.c">
|
||||
<Filter>render\software</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -1565,6 +1535,9 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\thread\generic\SDL_sysrwlock.c" />
|
||||
<ClCompile Include="SDL\src\thread\generic\SDL_sysrwlock.c" />
|
||||
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
<ClCompile Include="SDL\src\render\vulkan\SDL_render_vulkan.c">
|
||||
<Filter>render\vulkan</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -1606,66 +1579,6 @@
|
|||
<ClCompile Include="SDL\src\storage\generic\SDL_genericstorage.c" />
|
||||
<ClCompile Include="SDL\src\storage\steam\SDL_steamstorage.c" />
|
||||
<ClCompile Include="SDL\src\storage\SDL_storage.c" />
|
||||
<ClCompile Include="SDL\src\video\windows\SDL_windowsgameinput.cpp">
|
||||
<Filter>video\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx.c">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_sse.c">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_std.c">
|
||||
<Filter>video\yuv2rgb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\video\SDL_rotate.c">
|
||||
<Filter>video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\misc\SDL_libusb.c">
|
||||
<Filter>misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\haptic\hidapi\SDL_hidapihaptic.c">
|
||||
<Filter>haptic\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\haptic\hidapi\SDL_hidapihaptic_lg4ff.c">
|
||||
<Filter>haptic\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\core\windows\pch_cpp.cpp">
|
||||
<Filter>core\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\core\windows\SDL_gameinput.cpp">
|
||||
<Filter>core\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\gdk\SDL_gameinputjoystick.cpp">
|
||||
<Filter>joystick\gdk</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_8bitdo.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_flydigi.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_gip.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_lg4ff.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_sinput.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steam_triton.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_switch2.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_zuiki.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SDL\src\joystick\hidapi\SDL_report_descriptor.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="SDL\src\core\windows\version.rc" />
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ These are the essentials tools to build RPCS3 on Linux. Some of them can be inst
|
|||
|
||||
#### Debian & Ubuntu
|
||||
|
||||
sudo apt-get install build-essential ninja-build libasound2-dev libpulse-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git libevdev-dev libsdl3-3.2 libsdl3-dev libjack-dev libsndio-dev
|
||||
sudo apt-get install build-essential ninja-build libasound2-dev libpulse-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git libevdev-dev libsdl3-dev libjack-dev libsndio-dev libcurl4-openssl-dev qt6-base-dev qt6-base-private-dev qt6-multimedia-dev qt6-svg-dev libxkbcommon-dev
|
||||
|
||||
Ubuntu is usually horrendously out of date, and some packages need to be downloaded by hand. This part is for Qt, GCC, Vulkan, and CMake
|
||||
|
||||
|
|
|
|||
|
|
@ -901,6 +901,22 @@ std::string_view fs::get_parent_dir_view(std::string_view path, u32 parent_level
|
|||
return result;
|
||||
}
|
||||
|
||||
std::string fs::get_path_if_dir(const std::string& path)
|
||||
{
|
||||
if (path.empty() || !fs::is_dir(path))
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
// If delimiters are already present at the end of the string then nothing else to do
|
||||
if (usz sz = path.find_last_of(delim); sz != umax && (sz + 1) == path.size())
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
return path + '/';
|
||||
}
|
||||
|
||||
bool fs::get_stat(const std::string& path, stat_t& info)
|
||||
{
|
||||
// Ensure consistent information on failure
|
||||
|
|
|
|||
|
|
@ -195,6 +195,9 @@ namespace fs
|
|||
return std::string{get_parent_dir_view(path, parent_level)};
|
||||
}
|
||||
|
||||
// Return "path" plus an ending delimiter (if missing) if "path" is an existing directory. Otherwise, an empty string
|
||||
std::string get_path_if_dir(const std::string& path);
|
||||
|
||||
// Get file information
|
||||
bool get_stat(const std::string& path, stat_t& info);
|
||||
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ public:
|
|||
const std::array<u8, 7>& get_new_location();
|
||||
void connect_usb_device(std::shared_ptr<usb_device> dev, bool update_usb_devices = false);
|
||||
void disconnect_usb_device(std::shared_ptr<usb_device> dev, bool update_usb_devices = false);
|
||||
void reconnect_usb_device(u32 assigned_number);
|
||||
|
||||
// Map of devices actively handled by the ps3(device_id, device)
|
||||
std::map<u32, std::pair<UsbInternalDevice, std::shared_ptr<usb_device>>> handled_devices;
|
||||
|
|
@ -205,19 +206,23 @@ private:
|
|||
{0x1BAD, 0x3430, 0x343F, "Harmonix Button Guitar - Wii", nullptr, nullptr},
|
||||
{0x1BAD, 0x3530, 0x353F, "Harmonix Real Guitar - Wii", nullptr, nullptr},
|
||||
|
||||
//Top Shot Elite controllers
|
||||
// Top Shot Elite controllers
|
||||
{0x12BA, 0x04A0, 0x04A0, "Top Shot Elite", nullptr, nullptr},
|
||||
{0x12BA, 0x04A1, 0x04A1, "Top Shot Fearmaster", nullptr, nullptr},
|
||||
{0x12BA, 0x04B0, 0x04B0, "Rapala Fishing Rod", nullptr, nullptr},
|
||||
|
||||
|
||||
// GT5 Wheels&co
|
||||
// Wheels
|
||||
#ifdef HAVE_SDL3
|
||||
{0x046D, 0xC283, 0xC29B, "lgFF_c283_c29b", &usb_device_logitech_g27::get_num_emu_devices, &usb_device_logitech_g27::make_instance},
|
||||
#else
|
||||
{0x046D, 0xC283, 0xC29B, "lgFF_c283_c29b", nullptr, nullptr},
|
||||
#endif
|
||||
{0x046D, 0xCA03, 0xCA03, "lgFF_ca03_ca03", nullptr, nullptr},
|
||||
{0x044F, 0xB652, 0xB652, "Thrustmaster FGT FFB old", nullptr, nullptr},
|
||||
{0x044F, 0xB653, 0xB653, "Thrustmaster RGT FFB Pro", nullptr, nullptr},
|
||||
{0x044F, 0xB654, 0xB654, "Thrustmaster FGT FFB", nullptr, nullptr},
|
||||
{0x044F, 0xb655, 0xb655, "Thrustmaster FGT Rumble 3-in-1", nullptr, nullptr},
|
||||
{0x044F, 0xB65A, 0xB65A, "Thrustmaster F430", nullptr, nullptr},
|
||||
{0x044F, 0xB65D, 0xB65D, "Thrustmaster FFB", nullptr, nullptr},
|
||||
{0x044F, 0xB65E, 0xB65E, "Thrustmaster TRS", nullptr, nullptr},
|
||||
|
|
@ -225,7 +230,6 @@ private:
|
|||
|
||||
// GT6
|
||||
{0x2833, 0x0001, 0x0001, "Oculus", nullptr, nullptr},
|
||||
{0x046D, 0xCA03, 0xCA03, "lgFF_ca03_ca03", nullptr, nullptr},
|
||||
|
||||
// Buzz controllers
|
||||
{0x054C, 0x1000, 0x1040, "buzzer0", &usb_device_buzz::get_num_emu_devices, &usb_device_buzz::make_instance},
|
||||
|
|
@ -968,6 +972,21 @@ void usb_handler_thread::disconnect_usb_device(std::shared_ptr<usb_device> dev,
|
|||
}
|
||||
}
|
||||
|
||||
void usb_handler_thread::reconnect_usb_device(u32 assigned_number)
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
ensure(assigned_number != 0);
|
||||
for (const auto& dev : usb_devices)
|
||||
{
|
||||
if (dev->assigned_number == assigned_number)
|
||||
{
|
||||
disconnect_usb_device(dev, false);
|
||||
connect_usb_device(dev, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void connect_usb_controller(u8 index, input::product_type type)
|
||||
{
|
||||
auto usbh = g_fxo->try_get<named_thread<usb_handler_thread>>();
|
||||
|
|
@ -1061,18 +1080,7 @@ void reconnect_usb(u32 assigned_number)
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard lock(usbh->mutex);
|
||||
for (auto& [nr, pair] : usbh->handled_devices)
|
||||
{
|
||||
auto& [internal_dev, dev] = pair;
|
||||
if (nr == assigned_number)
|
||||
{
|
||||
usbh->disconnect_usb_device(dev, false);
|
||||
usbh->connect_usb_device(dev, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
usbh->reconnect_usb_device(assigned_number);
|
||||
}
|
||||
|
||||
void handle_hotplug_event(bool connected)
|
||||
|
|
|
|||
|
|
@ -1752,7 +1752,7 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp
|
|||
{
|
||||
if (!SDL_RunHapticEffect(m_haptic_handle, m_effect_slots[i].effect_id, 1))
|
||||
{
|
||||
logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s\n", m_effect_slots[i].last_effect.type, i, SDL_GetError());
|
||||
logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s", m_effect_slots[i].last_effect.type, i, SDL_GetError());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1796,14 +1796,14 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp
|
|||
{
|
||||
if (!SDL_RunHapticEffect(m_haptic_handle, m_effect_slots[i].effect_id, 1))
|
||||
{
|
||||
logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s\n", m_effect_slots[i].last_effect.type, i, SDL_GetError());
|
||||
logitech_g27_log.error("Failed playing sdl effect %d on slot %d, %s", m_effect_slots[i].last_effect.type, i, SDL_GetError());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!SDL_StopHapticEffect(m_haptic_handle, m_effect_slots[i].effect_id))
|
||||
{
|
||||
logitech_g27_log.error("Failed stopping sdl effect %d on slot %d, %s\n", m_effect_slots[i].last_effect.type, i, SDL_GetError());
|
||||
logitech_g27_log.error("Failed stopping sdl effect %d on slot %d, %s", m_effect_slots[i].last_effect.type, i, SDL_GetError());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1824,11 +1824,11 @@ void usb_device_logitech_g27::interrupt_transfer(u32 buf_size, u8* buf, u32 endp
|
|||
{
|
||||
if (cmd == 0x02)
|
||||
{
|
||||
logitech_g27_log.error("Tried to play effect slot %d but it was never uploaded\n", i);
|
||||
logitech_g27_log.error("Tried to play effect slot %d but it was never uploaded", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
logitech_g27_log.error("Tried to stop effect slot %d but it was never uploaded\n", i);
|
||||
logitech_g27_log.error("Tried to stop effect slot %d but it was never uploaded", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,11 +149,6 @@ namespace rpcs3::utils
|
|||
return emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
||||
}
|
||||
|
||||
std::string get_games_dir()
|
||||
{
|
||||
return g_cfg_vfs.get(g_cfg_vfs.games_dir, get_emu_dir());
|
||||
}
|
||||
|
||||
std::string get_hdd0_dir()
|
||||
{
|
||||
return g_cfg_vfs.get(g_cfg_vfs.dev_hdd0, get_emu_dir());
|
||||
|
|
@ -184,11 +179,31 @@ namespace rpcs3::utils
|
|||
return g_cfg_vfs.get(g_cfg_vfs.dev_bdvd, get_emu_dir());
|
||||
}
|
||||
|
||||
std::string get_games_dir()
|
||||
{
|
||||
return g_cfg_vfs.get(g_cfg_vfs.games_dir, get_emu_dir());
|
||||
}
|
||||
|
||||
std::string get_hdd0_game_dir()
|
||||
{
|
||||
return get_hdd0_dir() + "game/";
|
||||
}
|
||||
|
||||
std::string get_hdd0_locks_dir()
|
||||
{
|
||||
return get_hdd0_game_dir() + "$locks/";
|
||||
}
|
||||
|
||||
std::string get_hdd1_cache_dir()
|
||||
{
|
||||
return get_hdd1_dir() + "caches/";
|
||||
}
|
||||
|
||||
std::string get_games_shortcuts_dir()
|
||||
{
|
||||
return get_games_dir() + "shortcuts/";
|
||||
}
|
||||
|
||||
u64 get_cache_disk_usage()
|
||||
{
|
||||
if (const u64 data_size = fs::get_dir_size(rpcs3::utils::get_cache_dir(), 1); data_size != umax)
|
||||
|
|
@ -226,6 +241,98 @@ namespace rpcs3::utils
|
|||
return cache_dir;
|
||||
}
|
||||
|
||||
std::string get_data_dir()
|
||||
{
|
||||
return fs::get_config_dir() + "data/";
|
||||
}
|
||||
|
||||
std::string get_icons_dir()
|
||||
{
|
||||
return fs::get_config_dir() + "Icons/game_icons/";
|
||||
}
|
||||
|
||||
std::string get_savestates_dir()
|
||||
{
|
||||
return fs::get_config_dir() + "savestates/";
|
||||
}
|
||||
|
||||
std::string get_captures_dir()
|
||||
{
|
||||
return fs::get_config_dir() + "captures/";
|
||||
}
|
||||
|
||||
std::string get_recordings_dir()
|
||||
{
|
||||
return fs::get_config_dir() + "recordings/";
|
||||
}
|
||||
|
||||
std::string get_screenshots_dir()
|
||||
{
|
||||
return fs::get_config_dir() + "screenshots/";
|
||||
}
|
||||
|
||||
std::string get_cache_dir_by_serial(const std::string& serial)
|
||||
{
|
||||
return get_cache_dir() + (serial == "vsh.self" ? "vsh" : serial);
|
||||
}
|
||||
|
||||
std::string get_data_dir(const std::string& serial)
|
||||
{
|
||||
return get_data_dir() + serial;
|
||||
}
|
||||
|
||||
std::string get_icons_dir(const std::string& serial)
|
||||
{
|
||||
return get_icons_dir() + serial;
|
||||
}
|
||||
|
||||
std::string get_savestates_dir(const std::string& serial)
|
||||
{
|
||||
return get_savestates_dir() + serial;
|
||||
}
|
||||
|
||||
std::string get_recordings_dir(const std::string& serial)
|
||||
{
|
||||
return get_recordings_dir() + serial;
|
||||
}
|
||||
|
||||
std::string get_screenshots_dir(const std::string& serial)
|
||||
{
|
||||
return get_screenshots_dir() + serial;
|
||||
}
|
||||
|
||||
std::set<std::string> get_dir_list(const std::string& base_dir, const std::string& serial)
|
||||
{
|
||||
std::set<std::string> dir_list;
|
||||
|
||||
for (const auto& entry : fs::dir(base_dir))
|
||||
{
|
||||
// Check for sub folder starting with serial (e.g. BCES01118_BCES01118)
|
||||
if (entry.is_directory && entry.name.starts_with(serial))
|
||||
{
|
||||
dir_list.insert(base_dir + entry.name);
|
||||
}
|
||||
}
|
||||
|
||||
return dir_list;
|
||||
}
|
||||
|
||||
std::set<std::string> get_file_list(const std::string& base_dir, const std::string& serial)
|
||||
{
|
||||
std::set<std::string> file_list;
|
||||
|
||||
for (const auto& entry : fs::dir(base_dir))
|
||||
{
|
||||
// Check for files starting with serial (e.g. BCES01118_BCES01118)
|
||||
if (!entry.is_directory && entry.name.starts_with(serial))
|
||||
{
|
||||
file_list.insert(base_dir + entry.name);
|
||||
}
|
||||
}
|
||||
|
||||
return file_list;
|
||||
}
|
||||
|
||||
std::string get_rap_file_path(const std::string_view& rap)
|
||||
{
|
||||
const std::string home_dir = get_hdd0_dir() + "home";
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "util/types.hpp"
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
enum class game_content_type
|
||||
{
|
||||
|
|
@ -26,21 +27,42 @@ namespace rpcs3::utils
|
|||
// VFS directories and disk usage
|
||||
std::vector<std::pair<std::string, u64>> get_vfs_disk_usage();
|
||||
std::string get_emu_dir();
|
||||
std::string get_games_dir();
|
||||
std::string get_hdd0_dir();
|
||||
std::string get_hdd1_dir();
|
||||
std::string get_flash_dir();
|
||||
std::string get_flash2_dir();
|
||||
std::string get_flash3_dir();
|
||||
std::string get_bdvd_dir();
|
||||
std::string get_games_dir();
|
||||
|
||||
std::string get_hdd0_game_dir();
|
||||
std::string get_hdd0_locks_dir();
|
||||
std::string get_hdd1_cache_dir();
|
||||
std::string get_games_shortcuts_dir();
|
||||
|
||||
// Cache directories and disk usage
|
||||
u64 get_cache_disk_usage();
|
||||
std::string get_cache_dir();
|
||||
std::string get_cache_dir(std::string_view module_path);
|
||||
|
||||
std::string get_data_dir();
|
||||
std::string get_icons_dir();
|
||||
std::string get_savestates_dir();
|
||||
std::string get_captures_dir();
|
||||
std::string get_recordings_dir();
|
||||
std::string get_screenshots_dir();
|
||||
|
||||
// get_cache_dir_by_serial() named in this way to avoid conflict (wrong invocation) with get_cache_dir()
|
||||
std::string get_cache_dir_by_serial(const std::string& serial);
|
||||
std::string get_data_dir(const std::string& serial);
|
||||
std::string get_icons_dir(const std::string& serial);
|
||||
std::string get_savestates_dir(const std::string& serial);
|
||||
std::string get_recordings_dir(const std::string& serial);
|
||||
std::string get_screenshots_dir(const std::string& serial);
|
||||
|
||||
std::set<std::string> get_dir_list(const std::string& base_dir, const std::string& serial);
|
||||
std::set<std::string> get_file_list(const std::string& base_dir, const std::string& serial);
|
||||
|
||||
std::string get_rap_file_path(const std::string_view& rap);
|
||||
bool verify_c00_unlock_edat(const std::string_view& content_id, bool fast = false);
|
||||
std::string get_sfo_dir_from_game_path(const std::string& game_path, const std::string& title_id = "");
|
||||
|
|
|
|||
|
|
@ -289,6 +289,12 @@
|
|||
<ClCompile Include="QTGeneratedFiles\Debug\moc_flow_widget_item.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Debug\moc_game_list_actions.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Debug\moc_game_list_context_menu.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Debug\moc_game_compatibility.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -586,6 +592,12 @@
|
|||
<ClCompile Include="QTGeneratedFiles\Release\moc_flow_widget_item.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Release\moc_game_list_actions.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Release\moc_game_list_context_menu.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Release\moc_game_compatibility.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
|
@ -833,7 +845,9 @@
|
|||
<ClCompile Include="rpcs3qt\flow_widget.cpp" />
|
||||
<ClCompile Include="rpcs3qt\flow_widget_item.cpp" />
|
||||
<ClCompile Include="rpcs3qt\game_list.cpp" />
|
||||
<ClCompile Include="rpcs3qt\game_list_actions.cpp" />
|
||||
<ClCompile Include="rpcs3qt\game_list_base.cpp" />
|
||||
<ClCompile Include="rpcs3qt\game_list_context_menu.cpp" />
|
||||
<ClCompile Include="rpcs3qt\game_list_delegate.cpp" />
|
||||
<ClCompile Include="rpcs3qt\game_list_grid_item.cpp" />
|
||||
<ClCompile Include="rpcs3qt\game_list_table.cpp" />
|
||||
|
|
@ -1458,6 +1472,26 @@
|
|||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DMINIUPNP_STATICLIB -DHAVE_SDL3 -DWITH_DISCORD_RPC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I.\..\3rdparty\libsdl-org\SDL\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="rpcs3qt\game_list_actions.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DMINIUPNP_STATICLIB -DHAVE_SDL3 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DMINIUPNP_STATICLIB -DHAVE_SDL3 -DWITH_DISCORD_RPC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I.\..\3rdparty\libsdl-org\SDL\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="rpcs3qt\game_list_context_menu.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DMINIUPNP_STATICLIB -DHAVE_SDL3 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DMINIUPNP_STATICLIB -DHAVE_SDL3 -DWITH_DISCORD_RPC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I.\..\3rdparty\libsdl-org\SDL\include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="rpcs3qt\game_list_delegate.h" />
|
||||
<CustomBuild Include="rpcs3qt\game_list_table.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
|
|
@ -2236,4 +2270,4 @@
|
|||
<UserProperties MocDir=".\QTGeneratedFiles\$(ConfigurationName)" Qt5Version_x0020_x64="$(DefaultQtVersion)" RccDir=".\QTGeneratedFiles" UicDir=".\QTGeneratedFiles" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -1254,6 +1254,24 @@
|
|||
<ClCompile Include="Input\sdl_camera_video_sink.cpp">
|
||||
<Filter>Io\camera</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rpcs3qt\game_list_context_menu.cpp">
|
||||
<Filter>Gui\game list</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rpcs3qt\game_list_actions.cpp">
|
||||
<Filter>Gui\game list</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Debug\moc_game_list_context_menu.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Debug\moc_game_list_actions.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Release\moc_game_list_actions.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QTGeneratedFiles\Release\moc_game_list_context_menu.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Input\ds4_pad_handler.h">
|
||||
|
|
@ -1837,6 +1855,12 @@
|
|||
<CustomBuild Include="rpcs3qt\debugger_add_bp_window.h">
|
||||
<Filter>Gui\debugger</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="rpcs3qt\game_list_context_menu.h">
|
||||
<Filter>Gui\game list</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="rpcs3qt\game_list_actions.h">
|
||||
<Filter>Gui\game list</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="rpcs3.ico" />
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ add_library(rpcs3_ui STATIC
|
|||
flow_widget_item.cpp
|
||||
game_compatibility.cpp
|
||||
game_list.cpp
|
||||
game_list_actions.cpp
|
||||
game_list_base.cpp
|
||||
game_list_context_menu.cpp
|
||||
game_list_delegate.cpp
|
||||
game_list_frame.cpp
|
||||
game_list_grid.cpp
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ void cg_disasm_window::dropEvent(QDropEvent* ev)
|
|||
{
|
||||
if (IsValidFile(*ev->mimeData(), true))
|
||||
{
|
||||
ev->acceptProposedAction();
|
||||
ShowDisasm();
|
||||
}
|
||||
}
|
||||
|
|
@ -154,7 +155,7 @@ void cg_disasm_window::dragEnterEvent(QDragEnterEvent* ev)
|
|||
{
|
||||
if (IsValidFile(*ev->mimeData()))
|
||||
{
|
||||
ev->accept();
|
||||
ev->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -162,11 +163,6 @@ void cg_disasm_window::dragMoveEvent(QDragMoveEvent* ev)
|
|||
{
|
||||
if (IsValidFile(*ev->mimeData()))
|
||||
{
|
||||
ev->accept();
|
||||
ev->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
void cg_disasm_window::dragLeaveEvent(QDragLeaveEvent* ev)
|
||||
{
|
||||
ev->accept();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,5 +36,4 @@ protected:
|
|||
void dropEvent(QDropEvent* ev) override;
|
||||
void dragEnterEvent(QDragEnterEvent* ev) override;
|
||||
void dragMoveEvent(QDragMoveEvent* ev) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent* ev) override;
|
||||
};
|
||||
|
|
|
|||
1604
rpcs3/rpcs3qt/game_list_actions.cpp
Normal file
1604
rpcs3/rpcs3qt/game_list_actions.cpp
Normal file
File diff suppressed because it is too large
Load diff
113
rpcs3/rpcs3qt/game_list_actions.h
Normal file
113
rpcs3/rpcs3qt/game_list_actions.h
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
#pragma once
|
||||
|
||||
#include "gui_game_info.h"
|
||||
#include "shortcut_utils.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class progress_dialog;
|
||||
class game_list_frame;
|
||||
class gui_settings;
|
||||
|
||||
class game_list_actions : QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
game_list_actions(game_list_frame* frame, std::shared_ptr<gui_settings> gui_settings);
|
||||
virtual ~game_list_actions();
|
||||
|
||||
enum content_type
|
||||
{
|
||||
NO_CONTENT = 0,
|
||||
DISC = (1 << 0),
|
||||
DATA = (1 << 1),
|
||||
LOCKS = (1 << 2),
|
||||
CACHES = (1 << 3),
|
||||
CUSTOM_CONFIG = (1 << 4),
|
||||
ICONS = (1 << 5),
|
||||
SHORTCUTS = (1 << 6),
|
||||
SAVESTATES = (1 << 7),
|
||||
CAPTURES = (1 << 8),
|
||||
RECORDINGS = (1 << 9),
|
||||
SCREENSHOTS = (1 << 10)
|
||||
};
|
||||
|
||||
struct content_info
|
||||
{
|
||||
u16 content_types = NO_CONTENT; // Always set by SetContentList()
|
||||
bool clear_on_finish = true; // Always overridden by BatchRemoveContentLists()
|
||||
|
||||
bool is_single_selection = false;
|
||||
u16 in_games_dir_count = 0;
|
||||
QString info;
|
||||
std::map<std::string, std::set<std::string>> name_list;
|
||||
std::map<std::string, std::set<std::string>> path_list;
|
||||
std::set<std::string> disc_list;
|
||||
std::set<std::string> removed_disc_list; // Filled in by RemoveContentList()
|
||||
};
|
||||
|
||||
static bool IsGameRunning(const std::string& serial);
|
||||
|
||||
void CreateShortcuts(const std::vector<game_info>& games, const std::set<gui::utils::shortcut_location>& locations);
|
||||
|
||||
void ShowRemoveGameDialog(const std::vector<game_info>& games);
|
||||
void ShowGameInfoDialog(const std::vector<game_info>& games);
|
||||
|
||||
void BatchCreateCPUCaches(const std::vector<game_info>& games = {}, bool is_fast_compilation = false, bool is_interactive = false);
|
||||
void BatchRemoveCustomConfigurations(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
void BatchRemoveCustomPadConfigurations(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
void BatchRemoveShaderCaches(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
void BatchRemovePPUCaches(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
void BatchRemoveSPUCaches(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
void BatchRemoveHDD1Caches(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
void BatchRemoveAllCaches(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
|
||||
// NOTES:
|
||||
// - SetContentList() MUST always be called to set the content's info to be removed by:
|
||||
// - RemoveContentList()
|
||||
// - BatchRemoveContentLists()
|
||||
//
|
||||
void SetContentList(u16 content_types, const content_info& content_info);
|
||||
void BatchRemoveContentLists(const std::vector<game_info>& games = {}, bool is_interactive = false);
|
||||
|
||||
void ClearContentList(bool refresh = false);
|
||||
content_info GetContentInfo(const std::vector<game_info>& games);
|
||||
|
||||
bool ValidateRemoval(const std::string& serial, const std::string& path, const std::string& desc, bool is_interactive = false);
|
||||
bool ValidateBatchRemoval(const std::string& desc, bool is_interactive = false);
|
||||
|
||||
static bool CreateCPUCaches(const std::string& path, const std::string& serial = {}, bool is_fast_compilation = false);
|
||||
static bool CreateCPUCaches(const game_info& game, bool is_fast_compilation = false);
|
||||
bool RemoveCustomConfiguration(const std::string& serial, const game_info& game = nullptr, bool is_interactive = false);
|
||||
bool RemoveCustomPadConfiguration(const std::string& serial, const game_info& game = nullptr, bool is_interactive = false);
|
||||
bool RemoveShaderCache(const std::string& serial, bool is_interactive = false);
|
||||
bool RemovePPUCache(const std::string& serial, bool is_interactive = false);
|
||||
bool RemoveSPUCache(const std::string& serial, bool is_interactive = false);
|
||||
bool RemoveHDD1Cache(const std::string& serial, bool is_interactive = false);
|
||||
bool RemoveAllCaches(const std::string& serial, bool is_interactive = false);
|
||||
bool RemoveContentList(const std::string& serial, bool is_interactive = false);
|
||||
|
||||
static bool RemoveContentPath(const std::string& path, const std::string& desc);
|
||||
static u32 RemoveContentPathList(const std::set<std::string>& path_list, const std::string& desc);
|
||||
static bool RemoveContentBySerial(const std::string& base_dir, const std::string& serial, const std::string& desc);
|
||||
|
||||
private:
|
||||
game_list_frame* m_game_list_frame = nullptr;
|
||||
std::shared_ptr<gui_settings> m_gui_settings;
|
||||
|
||||
// NOTE:
|
||||
// m_content_info is used by:
|
||||
// - SetContentList()
|
||||
// - ClearContentList()
|
||||
// - GetContentInfo()
|
||||
// - RemoveContentList()
|
||||
// - BatchRemoveContentLists()
|
||||
//
|
||||
content_info m_content_info;
|
||||
|
||||
void BatchActionBySerials(progress_dialog* pdlg, const std::set<std::string>& serials,
|
||||
QString progressLabel, std::function<bool(const std::string&)> action,
|
||||
std::function<void(u32, u32)> cancel_log, std::function<void()> action_on_finish, bool refresh_on_finish,
|
||||
bool can_be_concurrent = false, std::function<bool()> should_wait_cb = {});
|
||||
};
|
||||
|
|
@ -15,7 +15,7 @@ public:
|
|||
[[maybe_unused]] const std::vector<game_info>& game_data,
|
||||
[[maybe_unused]] const std::map<QString, QString>& notes_map,
|
||||
[[maybe_unused]] const std::map<QString, QString>& title_map,
|
||||
[[maybe_unused]] const std::string& selected_item_id,
|
||||
[[maybe_unused]] const std::set<std::string>& selected_item_ids,
|
||||
[[maybe_unused]] bool play_hover_movies){};
|
||||
|
||||
void set_icon_size(QSize size) { m_icon_size = std::move(size); }
|
||||
|
|
|
|||
907
rpcs3/rpcs3qt/game_list_context_menu.cpp
Normal file
907
rpcs3/rpcs3qt/game_list_context_menu.cpp
Normal file
|
|
@ -0,0 +1,907 @@
|
|||
#include "stdafx.h"
|
||||
#include "game_list_context_menu.h"
|
||||
#include "game_list_frame.h"
|
||||
#include "gui_settings.h"
|
||||
#include "category.h"
|
||||
#include "input_dialog.h"
|
||||
#include "qt_utils.h"
|
||||
#include "shortcut_utils.h"
|
||||
#include "settings_dialog.h"
|
||||
#include "pad_settings_dialog.h"
|
||||
#include "patch_manager_dialog.h"
|
||||
#include "persistent_settings.h"
|
||||
|
||||
#include "Utilities/File.h"
|
||||
#include "Emu/system_utils.hpp"
|
||||
|
||||
#include "QApplication"
|
||||
#include "QClipboard"
|
||||
#include "QDesktopServices"
|
||||
#include "QFileDialog"
|
||||
#include "QInputDialog"
|
||||
#include "QMessageBox"
|
||||
|
||||
LOG_CHANNEL(game_list_log, "GameList");
|
||||
LOG_CHANNEL(sys_log, "SYS");
|
||||
|
||||
std::string get_savestate_file(std::string_view title_id, std::string_view boot_pat, s64 rel_id, u64 aggregate_file_size = umax);
|
||||
|
||||
game_list_context_menu::game_list_context_menu(game_list_frame* frame)
|
||||
: QMenu(frame)
|
||||
, m_game_list_frame(ensure(frame))
|
||||
, m_game_list_actions(ensure(frame->actions()))
|
||||
, m_gui_settings(ensure(frame->get_gui_settings()))
|
||||
, m_emu_settings(ensure(frame->get_emu_settings()))
|
||||
, m_persistent_settings(ensure(frame->get_persistent_settings()))
|
||||
{
|
||||
}
|
||||
|
||||
game_list_context_menu::~game_list_context_menu()
|
||||
{
|
||||
}
|
||||
|
||||
void game_list_context_menu::show_menu(const std::vector<game_info>& games, const QPoint& global_pos)
|
||||
{
|
||||
if (games.empty()) return;
|
||||
|
||||
if (games.size() == 1)
|
||||
{
|
||||
show_single_selection_context_menu(games.front(), global_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
show_multi_selection_context_menu(games, global_pos);
|
||||
}
|
||||
}
|
||||
|
||||
void game_list_context_menu::show_single_selection_context_menu(const game_info& gameinfo, const QPoint& global_pos)
|
||||
{
|
||||
ensure(!!gameinfo);
|
||||
|
||||
GameInfo current_game = gameinfo->info;
|
||||
const std::string serial = current_game.serial;
|
||||
const QString name = QString::fromStdString(current_game.name).simplified();
|
||||
const bool is_current_running_game = game_list_actions::IsGameRunning(serial);
|
||||
|
||||
// Make Actions
|
||||
QAction* boot = new QAction(gameinfo->has_custom_config
|
||||
? (is_current_running_game
|
||||
? tr("&Reboot with Global Configuration")
|
||||
: tr("&Boot with Global Configuration"))
|
||||
: (is_current_running_game
|
||||
? tr("&Reboot")
|
||||
: tr("&Boot")));
|
||||
|
||||
QFont font = boot->font();
|
||||
font.setBold(true);
|
||||
|
||||
if (gameinfo->has_custom_config)
|
||||
{
|
||||
QAction* boot_custom = addAction(is_current_running_game
|
||||
? tr("&Reboot with Custom Configuration")
|
||||
: tr("&Boot with Custom Configuration"));
|
||||
boot_custom->setFont(font);
|
||||
connect(boot_custom, &QAction::triggered, m_game_list_frame, [this, gameinfo]
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT m_game_list_frame->RequestBoot(gameinfo);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
boot->setFont(font);
|
||||
}
|
||||
|
||||
addAction(boot);
|
||||
|
||||
{
|
||||
QAction* boot_default = addAction(is_current_running_game
|
||||
? tr("&Reboot with Default Configuration")
|
||||
: tr("&Boot with Default Configuration"));
|
||||
|
||||
connect(boot_default, &QAction::triggered, m_game_list_frame, [this, gameinfo]
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT m_game_list_frame->RequestBoot(gameinfo, cfg_mode::default_config);
|
||||
});
|
||||
|
||||
QAction* boot_manual = addAction(is_current_running_game
|
||||
? tr("&Reboot with Manually Selected Configuration")
|
||||
: tr("&Boot with Manually Selected Configuration"));
|
||||
|
||||
connect(boot_manual, &QAction::triggered, m_game_list_frame, [this, gameinfo]
|
||||
{
|
||||
if (const std::string file_path = QFileDialog::getOpenFileName(m_game_list_frame, "Select Config File", "", tr("Config Files (*.yml);;All files (*.*)")).toStdString(); !file_path.empty())
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT m_game_list_frame->RequestBoot(gameinfo, cfg_mode::custom_selection, file_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
sys_log.notice("Manual config selection aborted.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
extern bool is_savestate_compatible(const std::string& filepath);
|
||||
|
||||
if (const std::string sstate = get_savestate_file(serial, current_game.path, 1); is_savestate_compatible(sstate))
|
||||
{
|
||||
const bool has_ambiguity = !get_savestate_file(serial, current_game.path, 2).empty();
|
||||
|
||||
QAction* boot_state = addAction(is_current_running_game
|
||||
? tr("&Reboot with last SaveState")
|
||||
: tr("&Boot with last SaveState"));
|
||||
|
||||
connect(boot_state, &QAction::triggered, m_game_list_frame, [this, gameinfo, sstate]
|
||||
{
|
||||
sys_log.notice("Booting savestate from gamelist per context menu...");
|
||||
Q_EMIT m_game_list_frame->RequestBoot(gameinfo, cfg_mode::custom, "", sstate);
|
||||
});
|
||||
|
||||
if (has_ambiguity)
|
||||
{
|
||||
QAction* choose_state = addAction(is_current_running_game
|
||||
? tr("&Choose SaveState to reboot")
|
||||
: tr("&Choose SaveState to boot"));
|
||||
|
||||
connect(choose_state, &QAction::triggered, m_game_list_frame, [this, gameinfo]
|
||||
{
|
||||
// If there is any ambiguity, launch the savestate manager
|
||||
Q_EMIT m_game_list_frame->RequestSaveStateManager(gameinfo);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
addSeparator();
|
||||
|
||||
QAction* configure = addAction(gameinfo->has_custom_config
|
||||
? tr("&Change Custom Configuration")
|
||||
: tr("&Create Custom Configuration From Global Settings"));
|
||||
QAction* create_game_default_config = gameinfo->has_custom_config ? nullptr
|
||||
: addAction(tr("&Create Custom Configuration From Default Settings"));
|
||||
QAction* pad_configure = addAction(gameinfo->has_custom_pad_config
|
||||
? tr("&Change Custom Gamepad Configuration")
|
||||
: tr("&Create Custom Gamepad Configuration"));
|
||||
QAction* configure_patches = addAction(tr("&Manage Game Patches"));
|
||||
|
||||
addSeparator();
|
||||
|
||||
// Create LLVM cache
|
||||
QAction* create_cpu_cache = addAction(tr("&Create LLVM Cache"));
|
||||
|
||||
// Remove menu
|
||||
QMenu* remove_menu = addMenu(tr("&Remove"));
|
||||
|
||||
if (gameinfo->has_custom_config)
|
||||
{
|
||||
QAction* remove_custom_config = remove_menu->addAction(tr("&Remove Custom Configuration"));
|
||||
connect(remove_custom_config, &QAction::triggered, this, [this, serial, gameinfo]()
|
||||
{
|
||||
if (m_game_list_actions->RemoveCustomConfiguration(serial, gameinfo, true))
|
||||
{
|
||||
m_game_list_frame->ShowCustomConfigIcon(gameinfo);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (gameinfo->has_custom_pad_config)
|
||||
{
|
||||
QAction* remove_custom_pad_config = remove_menu->addAction(tr("&Remove Custom Gamepad Configuration"));
|
||||
connect(remove_custom_pad_config, &QAction::triggered, this, [this, serial, gameinfo]()
|
||||
{
|
||||
if (m_game_list_actions->RemoveCustomPadConfiguration(serial, gameinfo, true))
|
||||
{
|
||||
m_game_list_frame->ShowCustomConfigIcon(gameinfo);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const std::string cache_base_dir = fs::get_path_if_dir(rpcs3::utils::get_cache_dir_by_serial(serial));
|
||||
const bool has_hdd1_cache_dir = !rpcs3::utils::get_dir_list(rpcs3::utils::get_hdd1_cache_dir(), serial).empty();
|
||||
const std::string savestates_dir = fs::get_path_if_dir(rpcs3::utils::get_savestates_dir(serial));
|
||||
|
||||
if (!cache_base_dir.empty())
|
||||
{
|
||||
remove_menu->addSeparator();
|
||||
|
||||
QAction* remove_shader_cache = remove_menu->addAction(tr("&Remove Shader Cache"));
|
||||
remove_shader_cache->setEnabled(!is_current_running_game);
|
||||
connect(remove_shader_cache, &QAction::triggered, this, [this, serial]()
|
||||
{
|
||||
m_game_list_actions->RemoveShaderCache(serial, true);
|
||||
});
|
||||
|
||||
QAction* remove_ppu_cache = remove_menu->addAction(tr("&Remove PPU Cache"));
|
||||
remove_ppu_cache->setEnabled(!is_current_running_game);
|
||||
connect(remove_ppu_cache, &QAction::triggered, this, [this, serial]()
|
||||
{
|
||||
m_game_list_actions->RemovePPUCache(serial, true);
|
||||
});
|
||||
|
||||
QAction* remove_spu_cache = remove_menu->addAction(tr("&Remove SPU Cache"));
|
||||
remove_spu_cache->setEnabled(!is_current_running_game);
|
||||
connect(remove_spu_cache, &QAction::triggered, this, [this, serial]()
|
||||
{
|
||||
m_game_list_actions->RemoveSPUCache(serial, true);
|
||||
});
|
||||
}
|
||||
|
||||
if (has_hdd1_cache_dir)
|
||||
{
|
||||
QAction* remove_hdd1_cache = remove_menu->addAction(tr("&Remove HDD1 Cache"));
|
||||
remove_hdd1_cache->setEnabled(!is_current_running_game);
|
||||
connect(remove_hdd1_cache, &QAction::triggered, this, [this, serial]()
|
||||
{
|
||||
m_game_list_actions->RemoveHDD1Cache(serial, true);
|
||||
});
|
||||
}
|
||||
|
||||
if (!cache_base_dir.empty() || has_hdd1_cache_dir)
|
||||
{
|
||||
QAction* remove_all_caches = remove_menu->addAction(tr("&Remove All Caches"));
|
||||
remove_all_caches->setEnabled(!is_current_running_game);
|
||||
connect(remove_all_caches, &QAction::triggered, this, [this, serial]()
|
||||
{
|
||||
m_game_list_actions->RemoveAllCaches(serial, true);
|
||||
});
|
||||
}
|
||||
|
||||
if (!savestates_dir.empty())
|
||||
{
|
||||
remove_menu->addSeparator();
|
||||
|
||||
QAction* remove_savestates = remove_menu->addAction(tr("&Remove Savestates"));
|
||||
remove_savestates->setEnabled(!is_current_running_game);
|
||||
connect(remove_savestates, &QAction::triggered, this, [this, serial]()
|
||||
{
|
||||
m_game_list_actions->SetContentList(game_list_actions::content_type::SAVESTATES, {});
|
||||
m_game_list_actions->RemoveContentList(serial, true);
|
||||
});
|
||||
}
|
||||
|
||||
// Disable the Remove menu if empty
|
||||
remove_menu->setEnabled(!remove_menu->isEmpty());
|
||||
|
||||
addSeparator();
|
||||
|
||||
// Manage Game menu
|
||||
QMenu* manage_game_menu = addMenu(tr("&Manage Game"));
|
||||
|
||||
// Create game shortcuts
|
||||
QAction* create_desktop_shortcut = manage_game_menu->addAction(tr("&Create Desktop Shortcut"));
|
||||
connect(create_desktop_shortcut, &QAction::triggered, this, [this, gameinfo]()
|
||||
{
|
||||
m_game_list_actions->CreateShortcuts({gameinfo}, {gui::utils::shortcut_location::desktop});
|
||||
});
|
||||
#ifdef _WIN32
|
||||
QAction* create_start_menu_shortcut = manage_game_menu->addAction(tr("&Create Start Menu Shortcut"));
|
||||
#elif defined(__APPLE__)
|
||||
QAction* create_start_menu_shortcut = manage_game_menu->addAction(tr("&Create Launchpad Shortcut"));
|
||||
#else
|
||||
QAction* create_start_menu_shortcut = manage_game_menu->addAction(tr("&Create Application Menu Shortcut"));
|
||||
#endif
|
||||
connect(create_start_menu_shortcut, &QAction::triggered, this, [this, gameinfo]()
|
||||
{
|
||||
m_game_list_actions->CreateShortcuts({gameinfo}, {gui::utils::shortcut_location::applications});
|
||||
});
|
||||
|
||||
manage_game_menu->addSeparator();
|
||||
|
||||
// Hide/rename game in game list
|
||||
QAction* hide_serial = manage_game_menu->addAction(tr("&Hide In Game List"));
|
||||
hide_serial->setCheckable(true);
|
||||
hide_serial->setChecked(m_game_list_frame->hidden_list().contains(QString::fromStdString(serial)));
|
||||
QAction* rename_title = manage_game_menu->addAction(tr("&Rename In Game List"));
|
||||
|
||||
// Edit tooltip notes/reset time played
|
||||
QAction* edit_notes = manage_game_menu->addAction(tr("&Edit Tooltip Notes"));
|
||||
QAction* reset_time_played = manage_game_menu->addAction(tr("&Reset Time Played"));
|
||||
|
||||
manage_game_menu->addSeparator();
|
||||
|
||||
// Remove game
|
||||
QAction* remove_game = manage_game_menu->addAction(tr("&Remove %1").arg(gameinfo->localized_category));
|
||||
remove_game->setEnabled(!is_current_running_game);
|
||||
|
||||
// Game info
|
||||
QAction* game_info = manage_game_menu->addAction(tr("&Game Info"));
|
||||
connect(game_info, &QAction::triggered, this, [this, gameinfo]()
|
||||
{
|
||||
m_game_list_actions->ShowGameInfoDialog({gameinfo});
|
||||
});
|
||||
|
||||
// Custom Images menu
|
||||
QMenu* icon_menu = addMenu(tr("&Custom Images"));
|
||||
const std::array<QAction*, 3> custom_icon_actions =
|
||||
{
|
||||
icon_menu->addAction(tr("&Import Custom Icon")),
|
||||
icon_menu->addAction(tr("&Replace Custom Icon")),
|
||||
icon_menu->addAction(tr("&Remove Custom Icon"))
|
||||
};
|
||||
icon_menu->addSeparator();
|
||||
const std::array<QAction*, 3> custom_gif_actions =
|
||||
{
|
||||
icon_menu->addAction(tr("&Import Hover Gif")),
|
||||
icon_menu->addAction(tr("&Replace Hover Gif")),
|
||||
icon_menu->addAction(tr("&Remove Hover Gif"))
|
||||
};
|
||||
icon_menu->addSeparator();
|
||||
const std::array<QAction*, 3> custom_shader_icon_actions =
|
||||
{
|
||||
icon_menu->addAction(tr("&Import Custom Shader Loading Background")),
|
||||
icon_menu->addAction(tr("&Replace Custom Shader Loading Background")),
|
||||
icon_menu->addAction(tr("&Remove Custom Shader Loading Background"))
|
||||
};
|
||||
|
||||
if (const std::string custom_icon_dir_path = rpcs3::utils::get_icons_dir(serial);
|
||||
fs::create_path(custom_icon_dir_path))
|
||||
{
|
||||
enum class icon_action
|
||||
{
|
||||
add,
|
||||
replace,
|
||||
remove
|
||||
};
|
||||
enum class icon_type
|
||||
{
|
||||
game_list,
|
||||
hover_gif,
|
||||
shader_load
|
||||
};
|
||||
|
||||
const auto handle_icon = [this, serial](const QString& game_icon_path, const QString& suffix, icon_action action, icon_type type)
|
||||
{
|
||||
QString icon_path;
|
||||
|
||||
if (action != icon_action::remove)
|
||||
{
|
||||
QString msg;
|
||||
switch (type)
|
||||
{
|
||||
case icon_type::game_list:
|
||||
msg = tr("Select Custom Icon");
|
||||
break;
|
||||
case icon_type::hover_gif:
|
||||
msg = tr("Select Custom Hover Gif");
|
||||
break;
|
||||
case icon_type::shader_load:
|
||||
msg = tr("Select Custom Shader Loading Background");
|
||||
break;
|
||||
}
|
||||
icon_path = QFileDialog::getOpenFileName(m_game_list_frame, msg, "", tr("%0 (*.%0);;All files (*.*)").arg(suffix));
|
||||
}
|
||||
if (action == icon_action::remove || !icon_path.isEmpty())
|
||||
{
|
||||
bool refresh = false;
|
||||
|
||||
QString msg;
|
||||
switch (type)
|
||||
{
|
||||
case icon_type::game_list:
|
||||
msg = tr("Remove Custom Icon of %0?").arg(QString::fromStdString(serial));
|
||||
break;
|
||||
case icon_type::hover_gif:
|
||||
msg = tr("Remove Custom Hover Gif of %0?").arg(QString::fromStdString(serial));
|
||||
break;
|
||||
case icon_type::shader_load:
|
||||
msg = tr("Remove Custom Shader Loading Background of %0?").arg(QString::fromStdString(serial));
|
||||
break;
|
||||
}
|
||||
|
||||
if (action == icon_action::replace || (action == icon_action::remove &&
|
||||
QMessageBox::question(m_game_list_frame, tr("Confirm Removal"), msg) == QMessageBox::Yes))
|
||||
{
|
||||
if (QFile file(game_icon_path); file.exists() && !file.remove())
|
||||
{
|
||||
game_list_log.error("Could not remove old file: '%s'", game_icon_path, file.errorString());
|
||||
QMessageBox::warning(m_game_list_frame, tr("Warning!"), tr("Failed to remove the old file!"));
|
||||
return;
|
||||
}
|
||||
|
||||
game_list_log.success("Removed file: '%s'", game_icon_path);
|
||||
if (action == icon_action::remove)
|
||||
{
|
||||
refresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (action != icon_action::remove)
|
||||
{
|
||||
if (!QFile::copy(icon_path, game_icon_path))
|
||||
{
|
||||
game_list_log.error("Could not import file '%s' to '%s'.", icon_path, game_icon_path);
|
||||
QMessageBox::warning(m_game_list_frame, tr("Warning!"), tr("Failed to import the new file!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
game_list_log.success("Imported file '%s' to '%s'", icon_path, game_icon_path);
|
||||
refresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (refresh)
|
||||
{
|
||||
m_game_list_frame->Refresh(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const std::vector<std::tuple<icon_type, QString, QString, const std::array<QAction*, 3>&>> icon_map =
|
||||
{
|
||||
{icon_type::game_list, "/ICON0.PNG", "png", custom_icon_actions},
|
||||
{icon_type::hover_gif, "/hover.gif", "gif", custom_gif_actions},
|
||||
{icon_type::shader_load, "/PIC1.PNG", "png", custom_shader_icon_actions},
|
||||
};
|
||||
|
||||
for (const auto& [type, icon_name, suffix, actions] : icon_map)
|
||||
{
|
||||
const QString icon_path = QString::fromStdString(custom_icon_dir_path) + icon_name;
|
||||
|
||||
if (QFile::exists(icon_path))
|
||||
{
|
||||
actions[static_cast<int>(icon_action::add)]->setVisible(false);
|
||||
connect(actions[static_cast<int>(icon_action::replace)], &QAction::triggered, m_game_list_frame, [handle_icon, icon_path, t = type, s = suffix] { handle_icon(icon_path, s, icon_action::replace, t); });
|
||||
connect(actions[static_cast<int>(icon_action::remove)], &QAction::triggered, m_game_list_frame, [handle_icon, icon_path, t = type, s = suffix] { handle_icon(icon_path, s, icon_action::remove, t); });
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(actions[static_cast<int>(icon_action::add)], &QAction::triggered, m_game_list_frame, [handle_icon, icon_path, t = type, s = suffix] { handle_icon(icon_path, s, icon_action::add, t); });
|
||||
actions[static_cast<int>(icon_action::replace)]->setVisible(false);
|
||||
actions[static_cast<int>(icon_action::remove)]->setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
game_list_log.error("Could not create path '%s'", custom_icon_dir_path);
|
||||
icon_menu->setEnabled(false);
|
||||
}
|
||||
|
||||
addSeparator();
|
||||
|
||||
// Open Folder menu
|
||||
QMenu* open_folder_menu = addMenu(tr("&Open Folder"));
|
||||
|
||||
const bool is_disc_game = QString::fromStdString(current_game.category) == cat::cat_disc_game;
|
||||
const std::string data_dir = fs::get_path_if_dir(rpcs3::utils::get_data_dir(serial));
|
||||
const std::string captures_dir = fs::get_path_if_dir(rpcs3::utils::get_captures_dir());
|
||||
const std::string recordings_dir = fs::get_path_if_dir(rpcs3::utils::get_recordings_dir(serial));
|
||||
const std::string screenshots_dir = fs::get_path_if_dir(rpcs3::utils::get_screenshots_dir(serial));
|
||||
std::set<std::string> data_dir_list;
|
||||
|
||||
if (is_disc_game)
|
||||
{
|
||||
QAction* open_disc_game_folder = open_folder_menu->addAction(tr("&Open Disc Game Folder"));
|
||||
connect(open_disc_game_folder, &QAction::triggered, this, [current_game]()
|
||||
{
|
||||
gui::utils::open_dir(current_game.path);
|
||||
});
|
||||
|
||||
// It could be an empty list for a disc game
|
||||
data_dir_list = rpcs3::utils::get_dir_list(rpcs3::utils::get_hdd0_game_dir(), serial);
|
||||
}
|
||||
else
|
||||
{
|
||||
data_dir_list.insert(current_game.path);
|
||||
}
|
||||
|
||||
if (!data_dir_list.empty()) // "true" if a path is present (it could be an empty list for a disc game)
|
||||
{
|
||||
QAction* open_data_folder = open_folder_menu->addAction(tr("&Open %0 Folder").arg(is_disc_game ? tr("Game Data") : gameinfo->localized_category));
|
||||
connect(open_data_folder, &QAction::triggered, this, [data_dir_list]()
|
||||
{
|
||||
for (const std::string& data_dir : data_dir_list)
|
||||
{
|
||||
gui::utils::open_dir(data_dir);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (gameinfo->has_custom_config)
|
||||
{
|
||||
QAction* open_config_folder = open_folder_menu->addAction(tr("&Open Custom Config Folder"));
|
||||
connect(open_config_folder, &QAction::triggered, this, [serial]()
|
||||
{
|
||||
const std::string config_path = rpcs3::utils::get_custom_config_path(serial);
|
||||
|
||||
if (fs::is_file(config_path))
|
||||
gui::utils::open_dir(config_path);
|
||||
});
|
||||
}
|
||||
|
||||
// This is a debug feature, let's hide it by reusing debug tab protection
|
||||
if (m_gui_settings->GetValue(gui::m_showDebugTab).toBool() && !cache_base_dir.empty())
|
||||
{
|
||||
QAction* open_cache_folder = open_folder_menu->addAction(tr("&Open Cache Folder"));
|
||||
connect(open_cache_folder, &QAction::triggered, this, [cache_base_dir]()
|
||||
{
|
||||
gui::utils::open_dir(cache_base_dir);
|
||||
});
|
||||
}
|
||||
|
||||
if (!data_dir.empty())
|
||||
{
|
||||
QAction* open_data_folder = open_folder_menu->addAction(tr("&Open Data Folder"));
|
||||
connect(open_data_folder, &QAction::triggered, this, [data_dir]()
|
||||
{
|
||||
gui::utils::open_dir(data_dir);
|
||||
});
|
||||
}
|
||||
|
||||
if (!savestates_dir.empty())
|
||||
{
|
||||
QAction* open_savestates_folder = open_folder_menu->addAction(tr("&Open Savestates Folder"));
|
||||
connect(open_savestates_folder, &QAction::triggered, this, [savestates_dir]()
|
||||
{
|
||||
gui::utils::open_dir(savestates_dir);
|
||||
});
|
||||
}
|
||||
|
||||
if (!captures_dir.empty())
|
||||
{
|
||||
QAction* open_captures_folder = open_folder_menu->addAction(tr("&Open Captures Folder"));
|
||||
connect(open_captures_folder, &QAction::triggered, this, [captures_dir]()
|
||||
{
|
||||
gui::utils::open_dir(captures_dir);
|
||||
});
|
||||
}
|
||||
|
||||
if (!recordings_dir.empty())
|
||||
{
|
||||
QAction* open_recordings_folder = open_folder_menu->addAction(tr("&Open Recordings Folder"));
|
||||
connect(open_recordings_folder, &QAction::triggered, this, [recordings_dir]()
|
||||
{
|
||||
gui::utils::open_dir(recordings_dir);
|
||||
});
|
||||
}
|
||||
|
||||
if (!screenshots_dir.empty())
|
||||
{
|
||||
QAction* open_screenshots_folder = open_folder_menu->addAction(tr("&Open Screenshots Folder"));
|
||||
connect(open_screenshots_folder, &QAction::triggered, this, [screenshots_dir]()
|
||||
{
|
||||
gui::utils::open_dir(screenshots_dir);
|
||||
});
|
||||
}
|
||||
|
||||
// Copy Info menu
|
||||
QMenu* info_menu = addMenu(tr("&Copy Info"));
|
||||
QAction* copy_info = info_menu->addAction(tr("&Copy Name + Serial"));
|
||||
QAction* copy_name = info_menu->addAction(tr("&Copy Name"));
|
||||
QAction* copy_serial = info_menu->addAction(tr("&Copy Serial"));
|
||||
|
||||
addSeparator();
|
||||
|
||||
QAction* check_compat = addAction(tr("&Check Game Compatibility"));
|
||||
QAction* download_compat = addAction(tr("&Download Compatibility Database"));
|
||||
|
||||
connect(boot, &QAction::triggered, m_game_list_frame, [this, gameinfo]()
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT m_game_list_frame->RequestBoot(gameinfo, cfg_mode::global);
|
||||
});
|
||||
|
||||
auto configure_l = [this, current_game, gameinfo](bool create_cfg_from_global_cfg)
|
||||
{
|
||||
settings_dialog dlg(m_gui_settings, m_emu_settings, 0, m_game_list_frame, ¤t_game, create_cfg_from_global_cfg);
|
||||
|
||||
connect(&dlg, &settings_dialog::EmuSettingsApplied, [this, gameinfo]()
|
||||
{
|
||||
if (!gameinfo->has_custom_config)
|
||||
{
|
||||
gameinfo->has_custom_config = true;
|
||||
m_game_list_frame->ShowCustomConfigIcon(gameinfo);
|
||||
}
|
||||
Q_EMIT m_game_list_frame->NotifyEmuSettingsChange();
|
||||
});
|
||||
|
||||
dlg.exec();
|
||||
};
|
||||
|
||||
if (create_game_default_config)
|
||||
{
|
||||
connect(configure, &QAction::triggered, m_game_list_frame, [configure_l]() { configure_l(true); });
|
||||
connect(create_game_default_config, &QAction::triggered, m_game_list_frame, [configure_l = std::move(configure_l)]() { configure_l(false); });
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(configure, &QAction::triggered, m_game_list_frame, [configure_l = std::move(configure_l)]() { configure_l(true); });
|
||||
}
|
||||
|
||||
connect(pad_configure, &QAction::triggered, m_game_list_frame, [this, current_game, gameinfo]()
|
||||
{
|
||||
pad_settings_dialog dlg(m_gui_settings, m_game_list_frame, ¤t_game);
|
||||
|
||||
if (dlg.exec() == QDialog::Accepted && !gameinfo->has_custom_pad_config)
|
||||
{
|
||||
gameinfo->has_custom_pad_config = true;
|
||||
m_game_list_frame->ShowCustomConfigIcon(gameinfo);
|
||||
}
|
||||
});
|
||||
connect(hide_serial, &QAction::triggered, m_game_list_frame, [this, serial = QString::fromStdString(serial)](bool checked)
|
||||
{
|
||||
if (checked)
|
||||
m_game_list_frame->hidden_list().insert(serial);
|
||||
else
|
||||
m_game_list_frame->hidden_list().remove(serial);
|
||||
|
||||
m_gui_settings->SetValue(gui::gl_hidden_list, QStringList(m_game_list_frame->hidden_list().values()));
|
||||
m_game_list_frame->Refresh();
|
||||
});
|
||||
connect(create_cpu_cache, &QAction::triggered, m_game_list_frame, [this, gameinfo]
|
||||
{
|
||||
if (m_gui_settings->GetBootConfirmation(m_game_list_frame))
|
||||
{
|
||||
m_game_list_actions->CreateCPUCaches(gameinfo);
|
||||
}
|
||||
});
|
||||
connect(remove_game, &QAction::triggered, this, [this, gameinfo]
|
||||
{
|
||||
m_game_list_actions->ShowRemoveGameDialog({gameinfo});
|
||||
});
|
||||
connect(configure_patches, &QAction::triggered, m_game_list_frame, [this, gameinfo]()
|
||||
{
|
||||
patch_manager_dialog patch_manager(m_gui_settings, m_game_list_frame->GetGameInfo(), gameinfo->info.serial, gameinfo->GetGameVersion(), m_game_list_frame);
|
||||
patch_manager.exec();
|
||||
});
|
||||
connect(check_compat, &QAction::triggered, this, [serial = QString::fromStdString(serial)]
|
||||
{
|
||||
const QString link = "https://rpcs3.net/compatibility?g=" + serial;
|
||||
QDesktopServices::openUrl(QUrl(link));
|
||||
});
|
||||
connect(download_compat, &QAction::triggered, m_game_list_frame, [this]
|
||||
{
|
||||
ensure(m_game_list_frame->GetGameCompatibility())->RequestCompatibility(true);
|
||||
});
|
||||
connect(rename_title, &QAction::triggered, m_game_list_frame, [this, name, serial = QString::fromStdString(serial), global_pos]
|
||||
{
|
||||
const QString custom_title = m_persistent_settings->GetValue(gui::persistent::titles, serial, "").toString();
|
||||
const QString old_title = custom_title.isEmpty() ? name : custom_title;
|
||||
|
||||
input_dialog dlg(128, old_title, tr("Rename Title"), tr("%0\n%1\n\nYou can clear the line in order to use the original title.").arg(name).arg(serial), name, m_game_list_frame);
|
||||
dlg.move(global_pos);
|
||||
|
||||
if (dlg.exec() == QDialog::Accepted)
|
||||
{
|
||||
const QString new_title = dlg.get_input_text().simplified();
|
||||
|
||||
if (new_title.isEmpty() || new_title == name)
|
||||
{
|
||||
m_game_list_frame->titles().erase(serial);
|
||||
m_persistent_settings->RemoveValue(gui::persistent::titles, serial);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_game_list_frame->titles().insert_or_assign(serial, new_title);
|
||||
m_persistent_settings->SetValue(gui::persistent::titles, serial, new_title);
|
||||
}
|
||||
m_game_list_frame->Refresh(true); // full refresh in order to reliably sort the list
|
||||
}
|
||||
});
|
||||
connect(edit_notes, &QAction::triggered, m_game_list_frame, [this, name, serial = QString::fromStdString(serial)]
|
||||
{
|
||||
bool accepted = false;
|
||||
const QString old_notes = m_persistent_settings->GetValue(gui::persistent::notes, serial, "").toString();
|
||||
const QString new_notes = QInputDialog::getMultiLineText(m_game_list_frame, tr("Edit Tooltip Notes"), tr("%0\n%1").arg(name).arg(serial), old_notes, &accepted);
|
||||
|
||||
if (accepted)
|
||||
{
|
||||
if (new_notes.simplified().isEmpty())
|
||||
{
|
||||
m_game_list_frame->notes().erase(serial);
|
||||
m_persistent_settings->RemoveValue(gui::persistent::notes, serial);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_game_list_frame->notes().insert_or_assign(serial, new_notes);
|
||||
m_persistent_settings->SetValue(gui::persistent::notes, serial, new_notes);
|
||||
}
|
||||
m_game_list_frame->Refresh();
|
||||
}
|
||||
});
|
||||
connect(reset_time_played, &QAction::triggered, m_game_list_frame, [this, name, serial = QString::fromStdString(serial)]
|
||||
{
|
||||
if (QMessageBox::question(m_game_list_frame, tr("Confirm Reset"), tr("Reset time played?\n\n%0 [%1]").arg(name).arg(serial)) == QMessageBox::Yes)
|
||||
{
|
||||
m_persistent_settings->SetPlaytime(serial, 0, false);
|
||||
m_persistent_settings->SetLastPlayed(serial, 0, true);
|
||||
m_game_list_frame->Refresh();
|
||||
}
|
||||
});
|
||||
connect(copy_info, &QAction::triggered, this, [name, serial = QString::fromStdString(serial)]
|
||||
{
|
||||
QApplication::clipboard()->setText(name % QStringLiteral(" [") % serial % QStringLiteral("]"));
|
||||
});
|
||||
connect(copy_name, &QAction::triggered, this, [name]
|
||||
{
|
||||
QApplication::clipboard()->setText(name);
|
||||
});
|
||||
connect(copy_serial, &QAction::triggered, this, [serial = QString::fromStdString(serial)]
|
||||
{
|
||||
QApplication::clipboard()->setText(serial);
|
||||
});
|
||||
|
||||
// Disable options depending on software category
|
||||
const QString category = QString::fromStdString(current_game.category);
|
||||
|
||||
if (category == cat::cat_ps3_os)
|
||||
{
|
||||
remove_game->setEnabled(false);
|
||||
}
|
||||
else if (category != cat::cat_disc_game && category != cat::cat_hdd_game)
|
||||
{
|
||||
check_compat->setEnabled(false);
|
||||
}
|
||||
|
||||
exec(global_pos);
|
||||
}
|
||||
|
||||
void game_list_context_menu::show_multi_selection_context_menu(const std::vector<game_info>& games, const QPoint& global_pos)
|
||||
{
|
||||
ensure(!games.empty());
|
||||
|
||||
// Create LLVM cache
|
||||
QAction* create_cpu_cache = addAction(tr("&Create LLVM Cache"));
|
||||
connect(create_cpu_cache, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchCreateCPUCaches(games, false, true);
|
||||
});
|
||||
|
||||
// Remove menu
|
||||
QMenu* remove_menu = addMenu(tr("&Remove"));
|
||||
|
||||
QAction* remove_custom_config = remove_menu->addAction(tr("&Remove Custom Configuration"));
|
||||
connect(remove_custom_config, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchRemoveCustomConfigurations(games, true);
|
||||
});
|
||||
|
||||
QAction* remove_custom_pad_config = remove_menu->addAction(tr("&Remove Custom Gamepad Configuration"));
|
||||
connect(remove_custom_pad_config, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchRemoveCustomPadConfigurations(games, true);
|
||||
});
|
||||
|
||||
remove_menu->addSeparator();
|
||||
|
||||
QAction* remove_shader_cache = remove_menu->addAction(tr("&Remove Shader Cache"));
|
||||
connect(remove_shader_cache, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchRemoveShaderCaches(games, true);
|
||||
});
|
||||
|
||||
QAction* remove_ppu_cache = remove_menu->addAction(tr("&Remove PPU Cache"));
|
||||
connect(remove_ppu_cache, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchRemovePPUCaches(games, true);
|
||||
});
|
||||
|
||||
QAction* remove_spu_cache = remove_menu->addAction(tr("&Remove SPU Cache"));
|
||||
connect(remove_spu_cache, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchRemoveSPUCaches(games, true);
|
||||
});
|
||||
|
||||
QAction* remove_hdd1_cache = remove_menu->addAction(tr("&Remove HDD1 Cache"));
|
||||
connect(remove_hdd1_cache, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchRemoveHDD1Caches(games, true);
|
||||
});
|
||||
|
||||
QAction* remove_all_caches = remove_menu->addAction(tr("&Remove All Caches"));
|
||||
connect(remove_all_caches, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->BatchRemoveAllCaches(games, true);
|
||||
});
|
||||
|
||||
remove_menu->addSeparator();
|
||||
|
||||
QAction* remove_savestates = remove_menu->addAction(tr("&Remove Savestates"));
|
||||
connect(remove_savestates, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->SetContentList(game_list_actions::content_type::SAVESTATES, {});
|
||||
m_game_list_actions->BatchRemoveContentLists(games, true);
|
||||
});
|
||||
|
||||
// Disable the Remove menu if empty
|
||||
remove_menu->setEnabled(!remove_menu->isEmpty());
|
||||
|
||||
addSeparator();
|
||||
|
||||
// Manage Game menu
|
||||
QMenu* manage_game_menu = addMenu(tr("&Manage Game"));
|
||||
|
||||
// Create game shortcuts
|
||||
QAction* create_desktop_shortcut = manage_game_menu->addAction(tr("&Create Desktop Shortcut"));
|
||||
connect(create_desktop_shortcut, &QAction::triggered, m_game_list_frame, [this, games]()
|
||||
{
|
||||
if (QMessageBox::question(m_game_list_frame, tr("Confirm Creation"), tr("Create desktop shortcut?")) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
m_game_list_actions->CreateShortcuts(games, {gui::utils::shortcut_location::desktop});
|
||||
});
|
||||
|
||||
#ifdef _WIN32
|
||||
QAction* create_start_menu_shortcut = manage_game_menu->addAction(tr("&Create Start Menu Shortcut"));
|
||||
#elif defined(__APPLE__)
|
||||
QAction* create_start_menu_shortcut = manage_game_menu->addAction(tr("&Create Launchpad Shortcut"));
|
||||
#else
|
||||
QAction* create_start_menu_shortcut = manage_game_menu->addAction(tr("&Create Application Menu Shortcut"));
|
||||
#endif
|
||||
connect(create_start_menu_shortcut, &QAction::triggered, m_game_list_frame, [this, games]()
|
||||
{
|
||||
if (QMessageBox::question(m_game_list_frame, tr("Confirm Creation"), tr("Create shortcut?")) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
m_game_list_actions->CreateShortcuts(games, {gui::utils::shortcut_location::applications});
|
||||
});
|
||||
|
||||
manage_game_menu->addSeparator();
|
||||
|
||||
// Hide game in game list
|
||||
QAction* hide_serial = manage_game_menu->addAction(tr("&Hide In Game List"));
|
||||
connect(hide_serial, &QAction::triggered, m_game_list_frame, [this, games]()
|
||||
{
|
||||
if (QMessageBox::question(m_game_list_frame, tr("Confirm Hiding"), tr("Hide in game list?")) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
for (const auto& game : games)
|
||||
{
|
||||
m_game_list_frame->hidden_list().insert(QString::fromStdString(game->info.serial));
|
||||
}
|
||||
|
||||
m_gui_settings->SetValue(gui::gl_hidden_list, QStringList(m_game_list_frame->hidden_list().values()));
|
||||
m_game_list_frame->Refresh();
|
||||
});
|
||||
|
||||
// Show game in game list
|
||||
QAction* show_serial = manage_game_menu->addAction(tr("&Show In Game List"));
|
||||
connect(show_serial, &QAction::triggered, m_game_list_frame, [this, games]()
|
||||
{
|
||||
for (const auto& game : games)
|
||||
{
|
||||
m_game_list_frame->hidden_list().remove(QString::fromStdString(game->info.serial));
|
||||
}
|
||||
|
||||
m_gui_settings->SetValue(gui::gl_hidden_list, QStringList(m_game_list_frame->hidden_list().values()));
|
||||
m_game_list_frame->Refresh();
|
||||
});
|
||||
|
||||
manage_game_menu->addSeparator();
|
||||
|
||||
// Reset time played
|
||||
QAction* reset_time_played = manage_game_menu->addAction(tr("&Reset Time Played"));
|
||||
connect(reset_time_played, &QAction::triggered, m_game_list_frame, [this, games]()
|
||||
{
|
||||
if (QMessageBox::question(m_game_list_frame, tr("Confirm Reset"), tr("Reset time played?")) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
for (const auto& game : games)
|
||||
{
|
||||
const auto serial = QString::fromStdString(game->info.serial);
|
||||
|
||||
m_persistent_settings->SetPlaytime(serial, 0, false);
|
||||
m_persistent_settings->SetLastPlayed(serial, 0, true);
|
||||
}
|
||||
|
||||
m_game_list_frame->Refresh();
|
||||
});
|
||||
|
||||
manage_game_menu->addSeparator();
|
||||
|
||||
// Remove game
|
||||
QAction* remove_game = manage_game_menu->addAction(tr("&Remove Game"));
|
||||
connect(remove_game, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->ShowRemoveGameDialog(games);
|
||||
});
|
||||
|
||||
// Game info
|
||||
QAction* game_info = manage_game_menu->addAction(tr("&Game Info"));
|
||||
connect(game_info, &QAction::triggered, this, [this, games]()
|
||||
{
|
||||
m_game_list_actions->ShowGameInfoDialog(games);
|
||||
});
|
||||
|
||||
exec(global_pos);
|
||||
}
|
||||
32
rpcs3/rpcs3qt/game_list_context_menu.h
Normal file
32
rpcs3/rpcs3qt/game_list_context_menu.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include "gui_game_info.h"
|
||||
|
||||
#include "QMenu"
|
||||
|
||||
class game_list_actions;
|
||||
class game_list_frame;
|
||||
class gui_settings;
|
||||
class emu_settings;
|
||||
class persistent_settings;
|
||||
|
||||
class game_list_context_menu : QMenu
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
game_list_context_menu(game_list_frame* frame);
|
||||
virtual ~game_list_context_menu();
|
||||
|
||||
void show_menu(const std::vector<game_info>& games, const QPoint& global_pos);
|
||||
|
||||
private:
|
||||
void show_single_selection_context_menu(const game_info& gameinfo, const QPoint& global_pos);
|
||||
void show_multi_selection_context_menu(const std::vector<game_info>& games, const QPoint& global_pos);
|
||||
|
||||
game_list_frame* m_game_list_frame = nullptr;
|
||||
std::shared_ptr<game_list_actions> m_game_list_actions;
|
||||
std::shared_ptr<gui_settings> m_gui_settings;
|
||||
std::shared_ptr<emu_settings> m_emu_settings;
|
||||
std::shared_ptr<persistent_settings> m_persistent_settings;
|
||||
};
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,20 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include "game_list.h"
|
||||
#include "game_list_actions.h"
|
||||
#include "custom_dock_widget.h"
|
||||
#include "shortcut_utils.h"
|
||||
#include "Utilities/lockless.h"
|
||||
#include "Utilities/mutex.h"
|
||||
#include "util/auto_typemap.hpp"
|
||||
#include "Emu/config_mode.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QToolBar>
|
||||
#include <QStackedWidget>
|
||||
#include <QSet>
|
||||
#include <QTableWidgetItem>
|
||||
#include <QFutureWatcher>
|
||||
#include <QTimer>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
|
@ -56,20 +54,34 @@ public:
|
|||
void SetShowHidden(bool show);
|
||||
|
||||
game_compatibility* GetGameCompatibility() const { return m_game_compat; }
|
||||
|
||||
const std::vector<game_info>& GetGameInfo() const;
|
||||
|
||||
void CreateShortcuts(const std::vector<game_info>& games, const std::set<gui::utils::shortcut_location>& locations);
|
||||
const std::vector<game_info>& GetGameInfo() const { return m_game_data; }
|
||||
std::shared_ptr<game_list_actions> actions() const { return m_game_list_actions; }
|
||||
std::shared_ptr<gui_settings> get_gui_settings() const { return m_gui_settings; }
|
||||
std::shared_ptr<emu_settings> get_emu_settings() const { return m_emu_settings; }
|
||||
std::shared_ptr<persistent_settings> get_persistent_settings() const { return m_persistent_settings; }
|
||||
std::map<QString, QString>& notes() { return m_notes; }
|
||||
std::map<QString, QString>& titles() { return m_titles; }
|
||||
QSet<QString>& hidden_list() { return m_hidden_list; }
|
||||
|
||||
bool IsEntryVisible(const game_info& game, bool search_fallback = false) const;
|
||||
|
||||
void ShowCustomConfigIcon(const game_info& game);
|
||||
|
||||
// Enqueue slot for refreshed signal
|
||||
// Allowing for an individual container for each distinct use case (currently disabled and contains only one such entry)
|
||||
template <typename KeySlot = void, typename Func>
|
||||
void AddRefreshedSlot(Func&& func)
|
||||
{
|
||||
// NOTE: Remove assert when the need for individual containers arises
|
||||
static_assert(std::is_void_v<KeySlot>);
|
||||
|
||||
connect(this, &game_list_frame::Refreshed, this, [this, func = std::move(func)]() mutable
|
||||
{
|
||||
func(m_refresh_funcs_manage_type->get<GameIdsTable<KeySlot>>().m_done_paths);
|
||||
}, Qt::SingleShotConnection);
|
||||
}
|
||||
|
||||
public Q_SLOTS:
|
||||
void BatchCreateCPUCaches(const std::vector<game_info>& game_data = {}, bool is_fast_compilation = false);
|
||||
void BatchRemovePPUCaches();
|
||||
void BatchRemoveSPUCaches();
|
||||
void BatchRemoveCustomConfigurations();
|
||||
void BatchRemoveCustomPadConfigurations();
|
||||
void BatchRemoveShaderCaches();
|
||||
void SetListMode(bool is_list);
|
||||
void SetSearchText(const QString& text);
|
||||
void SetShowCompatibilityInGrid(bool show);
|
||||
|
|
@ -87,6 +99,7 @@ private Q_SLOTS:
|
|||
void doubleClickedSlot(QTableWidgetItem* item);
|
||||
void doubleClickedSlot(const game_info& game);
|
||||
void ItemSelectionChangedSlot();
|
||||
|
||||
Q_SIGNALS:
|
||||
void GameListFrameClosed();
|
||||
void NotifyGameSelection(const game_info& game);
|
||||
|
|
@ -97,7 +110,12 @@ Q_SIGNALS:
|
|||
void Refreshed();
|
||||
void RequestSaveStateManager(const game_info& game);
|
||||
|
||||
public:
|
||||
protected:
|
||||
/** Override inherited method from Qt to allow signalling when close happened.*/
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
private:
|
||||
template <typename KeyType>
|
||||
struct GameIdsTable
|
||||
{
|
||||
|
|
@ -105,50 +123,14 @@ public:
|
|||
std::set<std::string> m_done_paths;
|
||||
};
|
||||
|
||||
// Enqueue slot for refreshed signal
|
||||
// Allowing for an individual container for each distinct use case (currently disabled and contains only one such entry)
|
||||
template <typename KeySlot = void, typename Func>
|
||||
void AddRefreshedSlot(Func&& func)
|
||||
{
|
||||
// NOTE: Remove assert when the need for individual containers arises
|
||||
static_assert(std::is_void_v<KeySlot>);
|
||||
|
||||
connect(this, &game_list_frame::Refreshed, this, [this, func = std::move(func)]() mutable
|
||||
{
|
||||
func(m_refresh_funcs_manage_type->get<GameIdsTable<KeySlot>>().m_done_paths);
|
||||
}, Qt::SingleShotConnection);
|
||||
}
|
||||
|
||||
protected:
|
||||
/** Override inherited method from Qt to allow signalling when close happened.*/
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
private:
|
||||
void push_path(const std::string& path, std::vector<std::string>& legit_paths);
|
||||
|
||||
QString get_header_text(int col) const;
|
||||
QString get_action_text(int col) const;
|
||||
|
||||
void ShowCustomConfigIcon(const game_info& game);
|
||||
bool SearchMatchesApp(const QString& name, const QString& serial, bool fallback = false) const;
|
||||
|
||||
bool RemoveCustomConfiguration(const std::string& title_id, const game_info& game = nullptr, bool is_interactive = false);
|
||||
bool RemoveCustomPadConfiguration(const std::string& title_id, const game_info& game = nullptr, bool is_interactive = false);
|
||||
bool RemoveShadersCache(const std::string& base_dir, bool is_interactive = false);
|
||||
bool RemovePPUCache(const std::string& base_dir, bool is_interactive = false);
|
||||
bool RemoveSPUCache(const std::string& base_dir, bool is_interactive = false);
|
||||
void RemoveHDD1Cache(const std::string& base_dir, const std::string& title_id, bool is_interactive = false);
|
||||
static bool CreateCPUCaches(const std::string& path, const std::string& serial = {}, bool is_fast_compilation = false);
|
||||
static bool CreateCPUCaches(const game_info& game, bool is_fast_compilation = false);
|
||||
|
||||
static bool RemoveContentPath(const std::string& path, const std::string& desc);
|
||||
static u32 RemoveContentPathList(const std::vector<std::string>& path_list, const std::string& desc);
|
||||
static bool RemoveContentBySerial(const std::string& base_dir, const std::string& serial, const std::string& desc);
|
||||
static std::vector<std::string> GetDirListBySerial(const std::string& base_dir, const std::string& serial);
|
||||
void BatchActionBySerials(progress_dialog* pdlg, const std::set<std::string>& serials, QString progressLabel, std::function<bool(const std::string&)> action, std::function<void(u32, u32)> cancel_log, bool refresh_on_finish, bool can_be_concurrent = false, std::function<bool()> should_wait_cb = {});
|
||||
static std::string GetCacheDirBySerial(const std::string& serial);
|
||||
static std::string GetDataDirBySerial(const std::string& serial);
|
||||
std::string CurrentSelectionPath();
|
||||
std::set<std::string> CurrentSelectionPaths();
|
||||
|
||||
game_info GetGameInfoByMode(const QTableWidgetItem* item) const;
|
||||
static game_info GetGameInfoFromItem(const QTableWidgetItem* item);
|
||||
|
|
@ -156,6 +138,8 @@ private:
|
|||
void WaitAndAbortRepaintThreads();
|
||||
void WaitAndAbortSizeCalcThreads();
|
||||
|
||||
std::shared_ptr<game_list_actions> m_game_list_actions;
|
||||
|
||||
// Which widget we are displaying depends on if we are in grid or list mode.
|
||||
QMainWindow* m_game_dock = nullptr;
|
||||
QStackedWidget* m_central_widget = nullptr;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,8 @@
|
|||
#include "game_list_grid_item.h"
|
||||
#include "gui_settings.h"
|
||||
#include "qt_utils.h"
|
||||
#include "Utilities/File.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QStringBuilder>
|
||||
|
||||
game_list_grid::game_list_grid()
|
||||
: flow_widget(nullptr), game_list_base()
|
||||
|
|
@ -42,7 +40,7 @@ void game_list_grid::populate(
|
|||
const std::vector<game_info>& game_data,
|
||||
const std::map<QString, QString>& notes_map,
|
||||
const std::map<QString, QString>& title_map,
|
||||
const std::string& selected_item_id,
|
||||
const std::set<std::string>& selected_item_ids,
|
||||
bool play_hover_movies)
|
||||
{
|
||||
clear_list();
|
||||
|
|
@ -112,7 +110,7 @@ void game_list_grid::populate(
|
|||
item->set_video_path(game->info.movie_path);
|
||||
}
|
||||
|
||||
if (selected_item_id == game->info.path + game->info.icon_path)
|
||||
if (selected_item_ids.contains(game->info.path + game->info.icon_path))
|
||||
{
|
||||
selected_item = item;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public:
|
|||
const std::vector<game_info>& game_data,
|
||||
const std::map<QString, QString>& notes_map,
|
||||
const std::map<QString, QString>& title_map,
|
||||
const std::string& selected_item_id,
|
||||
const std::set<std::string>& selected_item_ids,
|
||||
bool play_hover_movies) override;
|
||||
|
||||
void repaint_icons(std::vector<game_info>& game_data, const QColor& icon_color, const QSize& icon_size, qreal device_pixel_ratio) override;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ game_list_table::game_list_table(game_list_frame* frame, std::shared_ptr<persist
|
|||
setItemDelegate(new game_list_delegate(this));
|
||||
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
verticalScrollBar()->setSingleStep(20);
|
||||
|
|
@ -204,7 +204,7 @@ void game_list_table::populate(
|
|||
const std::vector<game_info>& game_data,
|
||||
const std::map<QString, QString>& notes_map,
|
||||
const std::map<QString, QString>& title_map,
|
||||
const std::string& selected_item_id,
|
||||
const std::set<std::string>& selected_item_ids,
|
||||
bool play_hover_movies)
|
||||
{
|
||||
clear_list();
|
||||
|
|
@ -219,7 +219,7 @@ void game_list_table::populate(
|
|||
|
||||
int row = 0;
|
||||
int index = -1;
|
||||
int selected_row = -1;
|
||||
std::set<int> selected_rows;
|
||||
|
||||
const auto get_title = [&title_map](const QString& serial, const std::string& name) -> QString
|
||||
{
|
||||
|
|
@ -378,15 +378,18 @@ void game_list_table::populate(
|
|||
setItem(row, static_cast<int>(gui::game_list_columns::compat), compat_item);
|
||||
setItem(row, static_cast<int>(gui::game_list_columns::dir_size), new custom_table_widget_item(game_size != umax ? gui::utils::format_byte_size(game_size) : tr("Unknown"), Qt::UserRole, QVariant::fromValue<qulonglong>(game_size)));
|
||||
|
||||
if (selected_item_id == game->info.path + game->info.icon_path)
|
||||
if (selected_item_ids.contains(game->info.path + game->info.icon_path))
|
||||
{
|
||||
selected_row = row;
|
||||
selected_rows.insert(row);
|
||||
}
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
selectRow(selected_row);
|
||||
for (int selected_row : selected_rows)
|
||||
{
|
||||
selectionModel()->select(model()->index(selected_row, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
||||
}
|
||||
}
|
||||
|
||||
void game_list_table::repaint_icons(std::vector<game_info>& game_data, const QColor& icon_color, const QSize& icon_size, qreal device_pixel_ratio)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public:
|
|||
const std::vector<game_info>& game_data,
|
||||
const std::map<QString, QString>& notes_map,
|
||||
const std::map<QString, QString>& title_map,
|
||||
const std::string& selected_item_id,
|
||||
const std::set<std::string>& selected_item_ids,
|
||||
bool play_hover_movies) override;
|
||||
|
||||
void repaint_icons(std::vector<game_info>& game_data, const QColor& icon_color, const QSize& icon_size, qreal device_pixel_ratio) override;
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ void log_viewer::dropEvent(QDropEvent* ev)
|
|||
{
|
||||
if (is_valid_file(*ev->mimeData(), true))
|
||||
{
|
||||
ev->acceptProposedAction();
|
||||
show_log();
|
||||
}
|
||||
}
|
||||
|
|
@ -454,7 +455,7 @@ void log_viewer::dragEnterEvent(QDragEnterEvent* ev)
|
|||
{
|
||||
if (is_valid_file(*ev->mimeData()))
|
||||
{
|
||||
ev->accept();
|
||||
ev->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -462,15 +463,10 @@ void log_viewer::dragMoveEvent(QDragMoveEvent* ev)
|
|||
{
|
||||
if (is_valid_file(*ev->mimeData()))
|
||||
{
|
||||
ev->accept();
|
||||
ev->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
void log_viewer::dragLeaveEvent(QDragLeaveEvent* ev)
|
||||
{
|
||||
ev->accept();
|
||||
}
|
||||
|
||||
bool log_viewer::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
if (object != m_log_text)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,5 @@ protected:
|
|||
void dropEvent(QDropEvent* ev) override;
|
||||
void dragEnterEvent(QDragEnterEvent* ev) override;
|
||||
void dragMoveEvent(QDragMoveEvent* ev) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent* ev) override;
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot)
|
|||
|
||||
if (enable_play_last)
|
||||
{
|
||||
ui->sysPauseAct->setText(tr("&Play last played game"));
|
||||
ui->sysPauseAct->setText(tr("&Play Last Played Game"));
|
||||
ui->sysPauseAct->setIcon(m_icon_play);
|
||||
ui->toolbar_start->setToolTip(start_tooltip);
|
||||
}
|
||||
|
|
@ -2401,7 +2401,7 @@ void main_window::CreateShortCuts(const std::map<std::string, QString>& paths, b
|
|||
|
||||
if (!game_data_shortcuts.empty() && !locations.empty())
|
||||
{
|
||||
m_game_list_frame->CreateShortcuts(game_data_shortcuts, locations);
|
||||
m_game_list_frame->actions()->CreateShortcuts(game_data_shortcuts, locations);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2428,7 +2428,7 @@ void main_window::PrecompileCachesFromInstalledPackages(const std::map<std::stri
|
|||
|
||||
if (!game_data.empty())
|
||||
{
|
||||
m_game_list_frame->BatchCreateCPUCaches(game_data, true);
|
||||
m_game_list_frame->actions()->BatchCreateCPUCaches(game_data, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2722,15 +2722,43 @@ void main_window::CreateConnects()
|
|||
});
|
||||
connect(ui->exitAct, &QAction::triggered, this, &QWidget::close);
|
||||
|
||||
connect(ui->batchCreateCPUCachesAct, &QAction::triggered, m_game_list_frame, [list = m_game_list_frame]() { list->BatchCreateCPUCaches(); });
|
||||
connect(ui->batchRemoveCustomConfigurationsAct, &QAction::triggered, m_game_list_frame, &game_list_frame::BatchRemoveCustomConfigurations);
|
||||
connect(ui->batchRemoveCustomPadConfigurationsAct, &QAction::triggered, m_game_list_frame, &game_list_frame::BatchRemoveCustomPadConfigurations);
|
||||
connect(ui->batchRemoveShaderCachesAct, &QAction::triggered, m_game_list_frame, &game_list_frame::BatchRemoveShaderCaches);
|
||||
connect(ui->batchRemovePPUCachesAct, &QAction::triggered, m_game_list_frame, &game_list_frame::BatchRemovePPUCaches);
|
||||
connect(ui->batchRemoveSPUCachesAct, &QAction::triggered, m_game_list_frame, &game_list_frame::BatchRemoveSPUCaches);
|
||||
connect(ui->removeHDD1CachesAct, &QAction::triggered, this, &main_window::RemoveHDD1Caches);
|
||||
connect(ui->removeAllCachesAct, &QAction::triggered, this, &main_window::RemoveAllCaches);
|
||||
connect(ui->removeSavestatesAct, &QAction::triggered, this, &main_window::RemoveSavestates);
|
||||
connect(ui->batchCreateCPUCachesAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchCreateCPUCaches({}, false, true);
|
||||
});
|
||||
connect(ui->batchRemoveCustomConfigurationsAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchRemoveCustomConfigurations({}, true);
|
||||
});
|
||||
connect(ui->batchRemoveCustomPadConfigurationsAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchRemoveCustomPadConfigurations({}, true);
|
||||
});
|
||||
connect(ui->batchRemoveShaderCachesAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchRemoveShaderCaches({}, true);
|
||||
});
|
||||
connect(ui->batchRemovePPUCachesAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchRemovePPUCaches({}, true);
|
||||
});
|
||||
connect(ui->batchRemoveSPUCachesAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchRemoveSPUCaches({}, true);
|
||||
});
|
||||
connect(ui->removeHDD1CachesAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchRemoveHDD1Caches({}, true);
|
||||
});
|
||||
connect(ui->removeAllCachesAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->BatchRemoveAllCaches({}, true);
|
||||
});
|
||||
connect(ui->removeSavestatesAct, &QAction::triggered, this, [this]()
|
||||
{
|
||||
m_game_list_frame->actions()->SetContentList(game_list_actions::content_type::SAVESTATES, {});
|
||||
m_game_list_frame->actions()->BatchRemoveContentLists({}, true);
|
||||
});
|
||||
connect(ui->cleanUpGameListAct, &QAction::triggered, this, &main_window::CleanUpGameList);
|
||||
|
||||
connect(ui->removeFirmwareCacheAct, &QAction::triggered, this, &main_window::RemoveFirmwareCache);
|
||||
|
|
@ -3659,67 +3687,6 @@ void main_window::SetIconSizeActions(int idx) const
|
|||
ui->setIconSizeLargeAct->setChecked(true);
|
||||
}
|
||||
|
||||
void main_window::RemoveHDD1Caches()
|
||||
{
|
||||
if (fs::remove_all(rpcs3::utils::get_hdd1_dir() + "caches", false))
|
||||
{
|
||||
QMessageBox::information(this, tr("HDD1 Caches Removed"), tr("HDD1 caches successfully removed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, tr("Error"), tr("Could not remove HDD1 caches"));
|
||||
}
|
||||
}
|
||||
|
||||
void main_window::RemoveAllCaches()
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Confirm Removal"), tr("Remove all caches?")) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
const std::string cache_base_dir = rpcs3::utils::get_cache_dir();
|
||||
u64 caches_count = 0;
|
||||
u64 caches_removed = 0;
|
||||
|
||||
for (const game_info& game : m_game_list_frame->GetGameInfo()) // Loop on detected games
|
||||
{
|
||||
if (game && QString::fromStdString(game->info.category) != cat::cat_ps3_os && fs::exists(cache_base_dir + game->info.serial)) // If not OS category and cache exists
|
||||
{
|
||||
caches_count++;
|
||||
|
||||
if (fs::remove_all(cache_base_dir + game->info.serial))
|
||||
{
|
||||
caches_removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (caches_count == caches_removed)
|
||||
{
|
||||
QMessageBox::information(this, tr("Caches Removed"), tr("%0 cache(s) successfully removed").arg(caches_removed));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, tr("Error"), tr("Could not remove %0 of %1 cache(s)").arg(caches_count - caches_removed).arg(caches_count));
|
||||
}
|
||||
|
||||
RemoveHDD1Caches();
|
||||
}
|
||||
|
||||
void main_window::RemoveSavestates()
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Confirm Removal"), tr("Remove savestates?")) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
if (fs::remove_all(fs::get_config_dir() + "savestates", false))
|
||||
{
|
||||
QMessageBox::information(this, tr("Savestates Removed"), tr("Savestates successfully removed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, tr("Error"), tr("Could not remove savestates"));
|
||||
}
|
||||
}
|
||||
|
||||
void main_window::CleanUpGameList()
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Confirm Removal"), tr("Remove invalid game paths from game list?\n"
|
||||
|
|
@ -4077,15 +4044,18 @@ main_window::drop_type main_window::IsValidFile(const QMimeData& md, QStringList
|
|||
|
||||
void main_window::dropEvent(QDropEvent* event)
|
||||
{
|
||||
event->accept();
|
||||
|
||||
QStringList drop_paths;
|
||||
const drop_type type = IsValidFile(*event->mimeData(), &drop_paths);
|
||||
|
||||
switch (IsValidFile(*event->mimeData(), &drop_paths)) // get valid file paths and drop type
|
||||
if (type != drop_type::drop_error)
|
||||
{
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
|
||||
switch (type) // get valid file paths and drop type
|
||||
{
|
||||
case drop_type::drop_error:
|
||||
{
|
||||
event->ignore();
|
||||
break;
|
||||
}
|
||||
case drop_type::drop_rap_edat_pkg: // install the packages
|
||||
|
|
@ -4167,15 +4137,16 @@ void main_window::dropEvent(QDropEvent* event)
|
|||
|
||||
void main_window::dragEnterEvent(QDragEnterEvent* event)
|
||||
{
|
||||
event->setAccepted(IsValidFile(*event->mimeData()) != drop_type::drop_error);
|
||||
if (IsValidFile(*event->mimeData()) != drop_type::drop_error)
|
||||
{
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
void main_window::dragMoveEvent(QDragMoveEvent* event)
|
||||
{
|
||||
event->setAccepted(IsValidFile(*event->mimeData()) != drop_type::drop_error);
|
||||
}
|
||||
|
||||
void main_window::dragLeaveEvent(QDragLeaveEvent* event)
|
||||
{
|
||||
event->accept();
|
||||
if (IsValidFile(*event->mimeData()) != drop_type::drop_error)
|
||||
{
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,9 +114,6 @@ private Q_SLOTS:
|
|||
void SetIconSizeActions(int idx) const;
|
||||
void ResizeIcons(int index);
|
||||
|
||||
void RemoveHDD1Caches();
|
||||
void RemoveAllCaches();
|
||||
void RemoveSavestates();
|
||||
void CleanUpGameList();
|
||||
|
||||
void RemoveFirmwareCache();
|
||||
|
|
@ -131,7 +128,6 @@ protected:
|
|||
void dropEvent(QDropEvent* event) override;
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
void dragMoveEvent(QDragMoveEvent* event) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent* event) override;
|
||||
|
||||
private:
|
||||
void ConfigureGuiFromSettings();
|
||||
|
|
|
|||
|
|
@ -1174,7 +1174,7 @@
|
|||
</action>
|
||||
<action name="batchRemoveCustomPadConfigurationsAct">
|
||||
<property name="text">
|
||||
<string>Remove Custom Pad Configurations</string>
|
||||
<string>Remove Custom Gamepad Configurations</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="batchRemoveShaderCachesAct">
|
||||
|
|
|
|||
|
|
@ -1020,6 +1020,8 @@ void patch_manager_dialog::dropEvent(QDropEvent* event)
|
|||
return;
|
||||
}
|
||||
|
||||
event->acceptProposedAction();
|
||||
|
||||
QMessageBox box(QMessageBox::Icon::Question, tr("Patch Manager"), tr("What do you want to do with the patch file?"), QMessageBox::StandardButton::Cancel, this);
|
||||
QPushButton* button_yes = box.addButton(tr("Import"), QMessageBox::YesRole);
|
||||
QPushButton* button_no = box.addButton(tr("Validate"), QMessageBox::NoRole);
|
||||
|
|
@ -1123,7 +1125,7 @@ void patch_manager_dialog::dragEnterEvent(QDragEnterEvent* event)
|
|||
{
|
||||
if (is_valid_file(*event->mimeData()))
|
||||
{
|
||||
event->accept();
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1131,15 +1133,10 @@ void patch_manager_dialog::dragMoveEvent(QDragMoveEvent* event)
|
|||
{
|
||||
if (is_valid_file(*event->mimeData()))
|
||||
{
|
||||
event->accept();
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
void patch_manager_dialog::dragLeaveEvent(QDragLeaveEvent* event)
|
||||
{
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void patch_manager_dialog::download_update(bool automatic, bool auto_accept)
|
||||
{
|
||||
patch_log.notice("Patch download triggered (automatic=%d, auto_accept=%d)", automatic, auto_accept);
|
||||
|
|
|
|||
|
|
@ -83,6 +83,5 @@ protected:
|
|||
void dropEvent(QDropEvent* event) override;
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
void dragMoveEvent(QDragMoveEvent* event) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent* event) override;
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue