From e58bd419f67eb853213d382346504988d3f780b9 Mon Sep 17 00:00:00 2001 From: Darkhost1999 <60384196+Darkhost1999@users.noreply.github.com> Date: Sat, 28 Dec 2024 15:20:22 -0600 Subject: [PATCH 1/3] Add empty hdd tmp to UI (#16462) This option is need for those using sprx mods and amongst other homebrew reasons such as apollo savedata. --- rpcs3/rpcs3qt/emu_settings_type.h | 2 + rpcs3/rpcs3qt/settings_dialog.cpp | 3 + rpcs3/rpcs3qt/settings_dialog.ui | 399 ++++++++++++++++-------------- rpcs3/rpcs3qt/tooltips.h | 3 +- 4 files changed, 222 insertions(+), 185 deletions(-) diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index 9eec1956ed..a038fa8c84 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -200,6 +200,7 @@ enum class emu_settings_type KeyboardType, EnterButtonAssignment, EnableHostRoot, + EmptyHdd0Tmp, LimitCacheSize, MaximumCacheSize, ConsoleTimeOffset, @@ -399,6 +400,7 @@ inline static const std::map settings_location { emu_settings_type::KeyboardType, { "System", "Keyboard Type"} }, { emu_settings_type::EnterButtonAssignment, { "System", "Enter button assignment"}}, { emu_settings_type::EnableHostRoot, { "VFS", "Enable /host_root/"}}, + { emu_settings_type::EmptyHdd0Tmp, { "VFS", "Empty /dev_hdd0/tmp/"}}, { emu_settings_type::LimitCacheSize, { "VFS", "Limit disk cache size"}}, { emu_settings_type::MaximumCacheSize, { "VFS", "Disk cache maximum size (MB)"}}, { emu_settings_type::ConsoleTimeOffset, { "System", "Console time offset (s)"}}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 6d17c7e9a5..399e4b72df 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -1428,6 +1428,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceCheckBox(ui->enableHostRoot, emu_settings_type::EnableHostRoot); SubscribeTooltip(ui->enableHostRoot, tooltips.settings.enable_host_root); + m_emu_settings->EnhanceCheckBox(ui->emptyHdd0Tmp, emu_settings_type::EmptyHdd0Tmp); + SubscribeTooltip(ui->emptyHdd0Tmp, tooltips.settings.empty_hdd0_tmp); + m_emu_settings->EnhanceCheckBox(ui->enableCacheClearing, emu_settings_type::LimitCacheSize); SubscribeTooltip(ui->gb_DiskCacheClearing, tooltips.settings.limit_cache_size); if (game) diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 66b3b32088..7f70c304aa 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -1900,206 +1900,237 @@ System - + - + - - - Console Language - - - - - - - - - - - - Keyboard Type - - - - - - - - - - - - Homebrew - - - - - - Enable /host_root/ - - - - - - - - - - - - - - Console Region - - - - - - - - - - - - Console Time - - - - + + + + + Console Language + + - - - - 10 - 0 - - - - Qt::LayoutDirection::LeftToRight - - - false - - - true - - - Qt::AlignmentFlag::AlignCenter - - - false - - - QAbstractSpinBox::ButtonSymbols::UpDownArrows - - - true - - - false - - - true + + + + + + + + + Console Region + + + + + + + + + + + + Enter Button Assignment + + + + + + Enter with the Circle button - + - Set to Now + Enter with the Cross button - - - + + + + + + Disk Cache + + + + + + Clear cache automatically + + + + + + + Cache size: 3072 MB + + + + + + + 512 + + + Qt::Orientation::Horizontal + + + QSlider::TickPosition::TicksBelow + + + 1024 + + + + + + + + + + Qt::Orientation::Vertical + + + + 0 + 0 + + + + + - - - - - - - - - - Enter Button Assignment - - - - - - Enter with the Circle button - - - - - - - Enter with the Cross button - - - - - + + + + + Keyboard Type + + + + + + + + + + + + Console Time + + + + + + + + + 10 + 0 + + + + Qt::LayoutDirection::LeftToRight + + + false + + + true + + + Qt::AlignmentFlag::AlignCenter + + + false + + + QAbstractSpinBox::ButtonSymbols::UpDownArrows + + + true + + + false + + + true + + + + + + + Set to Now + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 0 + 0 + + + + + - - - - - - - - - - - - - Disk Cache - - - - - - Clear cache automatically - - - - - - - Cache size: 3072 MB - - - - - - - 512 - - - Qt::Orientation::Horizontal - - - QSlider::TickPosition::TicksBelow - - - 1024 - - - - - - - - - - - + + + + + Homebrew + + + + + + Enable /host_root/ + + + + + + + Empty /dev_hdd0/tmp/ + + + + + + + + + + Qt::Orientation::Vertical + + + + 0 + 0 + + + + + diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index c6bfa15cf7..d9576fb591 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -260,7 +260,8 @@ public: const QString system_language = tr("Some games may fail to boot if the system language is not available in the game itself.\nOther games will switch language automatically to what is selected here.\nIt is recommended leaving this on a language supported by the game."); const QString keyboard_type = tr("Sets the used keyboard layout.\nCurrently only US, Japanese and German layouts are fully supported at this moment."); const QString enter_button_assignment = tr("The button used for enter/accept/confirm in system dialogs.\nChange this to use the Circle button instead, which is the default configuration on Japanese systems and in many Japanese games.\nIn these cases having the cross button assigned can often lead to confusion."); - const QString enable_host_root = tr("Required for some Homebrew.\nIf unsure, don't use this option."); + const QString enable_host_root = tr("Required for some Homebrew.\nIf unsure, do not use this option."); + const QString empty_hdd0_tmp = tr("Required for some Homebrew or Game Mods.\nIf unsure, do not use this option"); const QString limit_cache_size = tr("Automatically removes older files from disk cache on boot if it grows larger than the specified value.\nGames can use the cache folder to temporarily store data outside of system memory. It is not used for long-term storage.\n\nThis setting is only available in the global configuration."); const QString console_time_offset = tr("Sets the time to be used within the console. This will be applied as an offset that tracks wall clock time.\nCan be reset to current wall clock time by clicking \"Set to Now\"."); } settings; From 1eac13b6bfa13ef9efa70a315c80e2ffba8ee076 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 28 Dec 2024 19:58:41 +0100 Subject: [PATCH 2/3] Windows: log command line args in utf8 --- rpcs3/main.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index d6770127b2..261ed1de99 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -33,7 +33,7 @@ #ifdef _WIN32 #include "module_verifier.hpp" #include "util/dyn_lib.hpp" - +#include // TODO(cjj19970505@live.cn) // When compiling with WIN32_LEAN_AND_MEAN definition @@ -620,11 +620,26 @@ int main(int argc, char** argv) std::string argument_str; for (int i = 0; i < argc; i++) { + if (i > 0) argument_str += " "; argument_str += '\'' + std::string(argv[i]) + '\''; - if (i != argc - 1) argument_str += " "; } + sys_log.notice("argc: %d, argv: %s", argc, argument_str); +#ifdef _WIN32 + int n_args = 0; + if (LPWSTR* arg_list = CommandLineToArgvW(GetCommandLineW(), &n_args)) + { + std::string utf8_args; + for (int i = 0; i < n_args; i++) + { + if (i > 0) utf8_args += " "; + utf8_args += '\'' + wchar_to_utf8(arg_list[i]) + '\''; + } + sys_log.notice("argv_utf8: %s", utf8_args); + } +#endif + // Before we proceed, run some sanity checks run_platform_sanity_checks(); From 418a99a62b814b7f831072610c9e7d7b5e90610c Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 28 Dec 2024 21:00:36 +0100 Subject: [PATCH 3/3] VS: add some missing files to solution filters --- rpcs3/emucore.vcxproj | 3 +++ rpcs3/emucore.vcxproj.filters | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index f311845462..062d481b8a 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -587,7 +587,10 @@ + + + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index c516f50756..3471fdfcbb 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -2650,6 +2650,15 @@ Emu\GPU\RSX\Host Mini-Driver + + Emu\NP + + + Emu\NP + + + Emu\NP +