Core: properly distinguish between ES title switches (Wii titles) and normal loading (GC, also called for Wii..); update config for ES title change, generate textures for both situations

This commit is contained in:
iwubcode
2025-01-26 16:37:21 -06:00
parent d03f9032c1
commit e18d98d4fc
7 changed files with 56 additions and 20 deletions

View File

@ -44,8 +44,11 @@
#include "Core/HLE/HLE.h"
#include "Core/HW/DVD/DVDInterface.h"
#include "Core/HW/EXI/EXI_Device.h"
#include "Core/HW/GCKeyboard.h"
#include "Core/HW/GCPad.h"
#include "Core/HW/SI/SI.h"
#include "Core/HW/SI/SI_Device.h"
#include "Core/HW/Wiimote.h"
#include "Core/Host.h"
#include "Core/IOS/ES/ES.h"
#include "Core/IOS/ES/Formats.h"
@ -239,7 +242,20 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, const std::stri
DolphinAnalytics::Instance().ReportGameStart();
}
void SConfig::OnNewTitleLoad(const Core::CPUThreadGuard& guard)
void SConfig::OnESTitleChanged()
{
auto& system = Core::System::GetInstance();
Pad::LoadConfig();
Keyboard::LoadConfig();
if (system.IsWii() && !Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
{
Wiimote::LoadConfig();
}
ReloadTextures(system);
}
void SConfig::OnTitleDirectlyBooted(const Core::CPUThreadGuard& guard)
{
auto& system = guard.GetSystem();
if (!Core::IsRunningOrStarting(system))
@ -253,9 +269,27 @@ void SConfig::OnNewTitleLoad(const Core::CPUThreadGuard& guard)
}
CBoot::LoadMapFromFilename(guard, ppc_symbol_db);
HLE::Reload(system);
PatchEngine::Reload(system);
HiresTexture::Update();
WC24PatchEngine::Reload();
// Note: Wii is handled by ES title change
if (!system.IsWii())
{
ReloadTextures(system);
}
}
void SConfig::ReloadTextures(Core::System& system)
{
Pad::GenerateDynamicInputTextures();
Keyboard::GenerateDynamicInputTextures();
if (system.IsWii() && !Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
{
Wiimote::GenerateDynamicInputTextures();
}
HiresTexture::Update();
}
void SConfig::LoadDefaults()