1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

overlays: do not open home menu in VSH

This commit is contained in:
Megamouse 2023-01-19 19:11:46 +01:00
parent 44771150b7
commit d3183708e8
7 changed files with 16 additions and 8 deletions

View File

@ -2043,7 +2043,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, utils::serial* ar)
// Initialize memory stats (according to sdk version)
u32 mem_size;
if (g_ps3_process_info.get_cellos_appname() == "vsh.self"sv)
if (Emu.IsVsh())
{
// Because vsh.self comes before any generic application, more memory is available to it
mem_size = 0xF000000;
@ -2096,7 +2096,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, utils::serial* ar)
load_libs.emplace("libsysmodule.sprx");
}
if (ar || g_ps3_process_info.get_cellos_appname() == "vsh.self"sv)
if (ar || Emu.IsVsh())
{
// Cannot be used with vsh.self or savestates (they self-manage itself)
load_libs.clear();
@ -2271,7 +2271,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, utils::serial* ar)
ppu->cmd_push({ppu_cmd::initialize, 0});
if (!entry && g_ps3_process_info.get_cellos_appname() != "vsh.self"sv)
if (!entry && !Emu.IsVsh())
{
// Set TLS args, call sys_initialize_tls
ppu->cmd_list

View File

@ -432,7 +432,7 @@ error_code sys_event_queue_receive(ppu_thread& ppu, u32 equeue_id, vm::ptr<sys_e
// "/dev_flash/vsh/module/msmw2.sprx" seems to rely on some cryptic shared memory behaviour that we don't emulate correctly
// This is a hack to avoid waiting for 1m40s every time we boot vsh
if (queue.key == 0x8005911000000012 && g_ps3_process_info.get_cellos_appname() == "vsh.self"sv)
if (queue.key == 0x8005911000000012 && Emu.IsVsh())
{
sys_event.todo("sys_event_queue_receive(equeue_id=0x%x, *0x%x, timeout=0x%llx) Bypassing timeout for msmw2.sprx", equeue_id, dummy_event, timeout);
timeout = 1;

View File

@ -44,7 +44,7 @@ bool ps3_process_info_t::has_debug_perm() const
return (ctrl_flags1 & (0xa << 28)) != 0;
}
// If a SELF file is of CellOS return its filename, otheriwse return an empty string
// If a SELF file is of CellOS return its filename, otheriwse return an empty string
std::string_view ps3_process_info_t::get_cellos_appname() const
{
if (!has_root_perm() || !Emu.GetTitleID().empty())

View File

@ -3274,4 +3274,9 @@ utils::serial* Emulator::DeserialManager() const
return m_ar.get();
}
bool Emulator::IsVsh()
{
return g_ps3_process_info.get_cellos_appname() == "vsh.self"sv;
}
Emulator Emu;

View File

@ -340,6 +340,8 @@ public:
static game_boot_result GetElfPathFromDir(std::string& elf_path, const std::string& path);
static void GetBdvdDir(std::string& bdvd_dir, std::string& sfb_dir, std::string& game_dir, const std::string& elf_dir);
friend void init_fxo_for_exec(utils::serial*, bool);
static bool IsVsh();
};
extern Emulator Emu;

View File

@ -242,6 +242,8 @@ void pad_thread::operator()()
{
Init();
const bool is_vsh = Emu.IsVsh();
pad::g_reset = false;
pad::g_started = true;
@ -401,7 +403,7 @@ void pad_thread::operator()()
}
// Handle home menu if requested
if (!m_home_menu_open && Emu.IsRunning())
if (!is_vsh && !m_home_menu_open && Emu.IsRunning())
{
for (usz i = 0; i < m_pads.size(); i++)
{

View File

@ -21,7 +21,6 @@
#include "Emu/Io/Null/null_music_handler.h"
#include "Emu/Cell/Modules/cellAudio.h"
#include "Emu/Cell/lv2/sys_rsxaudio.h"
#include "Emu/Cell/lv2/sys_process.h"
#include "Emu/RSX/Overlays/overlay_perf_metrics.h"
#include "Emu/system_utils.hpp"
#include "Emu/vfs_config.h"
@ -660,7 +659,7 @@ void gui_application::OnEmuSettingsChange()
if (!Emu.IsStopped())
{
// Force audio provider
if (g_ps3_process_info.get_cellos_appname() == "vsh.self"sv)
if (Emu.IsVsh())
{
g_cfg.audio.provider.set(audio_provider::rsxaudio);
}