diff --git a/src/frontend-common/common_host_interface.cpp b/src/frontend-common/common_host_interface.cpp index 3c95ba85d..fb8dc0a35 100644 --- a/src/frontend-common/common_host_interface.cpp +++ b/src/frontend-common/common_host_interface.cpp @@ -2213,6 +2213,15 @@ CommonHostInterface::GetExtendedSaveStateInfo(const char* game_code, s32 slot) header.game_code[sizeof(header.game_code) - 1] = 0; ssi.game_code = header.game_code; + if (header.media_filename_length > 0 && + (header.offset_to_media_filename + header.media_filename_length) <= stream->GetSize()) + { + stream->SeekAbsolute(header.offset_to_media_filename); + ssi.media_path.resize(header.media_filename_length); + if (!stream->Read2(ssi.media_path.data(), header.media_filename_length)) + std::string().swap(ssi.media_path); + } + if (header.screenshot_width > 0 && header.screenshot_height > 0 && header.screenshot_size > 0 && (static_cast(header.offset_to_screenshot) + static_cast(header.screenshot_size)) <= stream->GetSize()) { diff --git a/src/frontend-common/common_host_interface.h b/src/frontend-common/common_host_interface.h index c65d60b52..36a0897b2 100644 --- a/src/frontend-common/common_host_interface.h +++ b/src/frontend-common/common_host_interface.h @@ -67,13 +67,13 @@ public: struct ExtendedSaveStateInfo { std::string path; + std::string title; + std::string game_code; + std::string media_path; u64 timestamp; s32 slot; bool global; - std::string title; - std::string game_code; - u32 screenshot_width; u32 screenshot_height; std::vector screenshot_data;