System: Add hash to OnGameChanged

This commit is contained in:
Stenzek 2025-02-08 15:03:17 +10:00
parent acb355a8c3
commit 81bca06707
No known key found for this signature in database
4 changed files with 10 additions and 5 deletions

View File

@ -2027,7 +2027,8 @@ void System::ClearRunningGame()
s_state.running_game_entry = nullptr;
s_state.running_game_hash = 0;
Host::OnGameChanged(s_state.running_game_path, s_state.running_game_serial, s_state.running_game_title);
Host::OnGameChanged(s_state.running_game_path, s_state.running_game_serial, s_state.running_game_title,
s_state.running_game_hash);
Achievements::GameChanged(s_state.running_game_path, nullptr, false);
@ -4198,7 +4199,8 @@ void System::UpdateRunningGame(const std::string& path, CDImage* image, bool boo
FullscreenUI::OnRunningGameChanged(s_state.running_game_path, s_state.running_game_serial,
s_state.running_game_title);
Host::OnGameChanged(s_state.running_game_path, s_state.running_game_serial, s_state.running_game_title);
Host::OnGameChanged(s_state.running_game_path, s_state.running_game_serial, s_state.running_game_title,
s_state.running_game_hash);
}
bool System::CheckForRequiredSubQ(Error* error)

View File

@ -109,7 +109,8 @@ void OnSystemAbnormalShutdown(const std::string_view reason);
void OnPerformanceCountersUpdated(const GPUBackend* gpu_backend);
/// Provided by the host; called when the running executable changes.
void OnGameChanged(const std::string& disc_path, const std::string& game_serial, const std::string& game_name);
void OnGameChanged(const std::string& disc_path, const std::string& game_serial, const std::string& game_name,
GameHash game_hash);
/// Called when media capture starts/stops.
void OnMediaCaptureStarted();

View File

@ -2430,7 +2430,8 @@ void Host::OnPerformanceCountersUpdated(const GPUBackend* gpu_backend)
g_emu_thread->updatePerformanceCounters(gpu_backend);
}
void Host::OnGameChanged(const std::string& disc_path, const std::string& game_serial, const std::string& game_name)
void Host::OnGameChanged(const std::string& disc_path, const std::string& game_serial, const std::string& game_name,
GameHash hash)
{
emit g_emu_thread->runningGameChanged(QString::fromStdString(disc_path), QString::fromStdString(game_serial),
QString::fromStdString(game_name));

View File

@ -306,7 +306,8 @@ void Host::OnPerformanceCountersUpdated(const GPUBackend* gpu_backend)
//
}
void Host::OnGameChanged(const std::string& disc_path, const std::string& game_serial, const std::string& game_name)
void Host::OnGameChanged(const std::string& disc_path, const std::string& game_serial, const std::string& game_name,
GameHash hash)
{
INFO_LOG("Disc Path: {}", disc_path);
INFO_LOG("Game Serial: {}", game_serial);