System: Add path/image to game change notification

This commit is contained in:
Connor McLaughlin
2021-02-21 16:53:14 +10:00
parent 77090865c1
commit 7501e89b7a
11 changed files with 30 additions and 17 deletions

View File

@ -172,7 +172,6 @@ void HostInterface::DestroySystem()
UpdateSoftwareCursor();
ReleaseHostDisplay();
OnSystemDestroyed();
OnRunningGameChanged();
}
void HostInterface::ReportError(const char* message)
@ -471,7 +470,10 @@ void HostInterface::OnSystemPerformanceCountersUpdated() {}
void HostInterface::OnSystemStateSaved(bool global, s32 slot) {}
void HostInterface::OnRunningGameChanged() {}
void HostInterface::OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code,
const std::string& game_title)
{
}
void HostInterface::OnControllerTypeChanged(u32 slot) {}

View File

@ -143,7 +143,8 @@ public:
/// This is the APK for Android builds, or the program directory for standalone builds.
virtual std::unique_ptr<ByteStream> OpenPackageFile(const char* path, u32 flags) = 0;
virtual void OnRunningGameChanged();
virtual void OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code,
const std::string& game_title);
virtual void OnSystemPerformanceCountersUpdated();
protected:

View File

@ -913,6 +913,8 @@ void Shutdown()
s_media_playlist_filename.clear();
s_cheat_list.reset();
s_state = State::Shutdown;
g_host_interface->OnRunningGameChanged(s_running_game_path, nullptr, s_running_game_code, s_running_game_title);
}
bool CreateGPU(GPURenderer renderer)
@ -1882,7 +1884,7 @@ void UpdateRunningGame(const char* path, CDImage* image)
g_texture_replacements.SetGameID(s_running_game_code);
g_host_interface->OnRunningGameChanged();
g_host_interface->OnRunningGameChanged(s_running_game_path, image, s_running_game_code, s_running_game_title);
}
bool CheckForSBIFile(CDImage* image)