diff --git a/src/core/system.cpp b/src/core/system.cpp index 40716daf1..8221435da 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -1769,16 +1769,28 @@ bool HasMedia() return g_cdrom.HasMedia(); } +const std::string& GetMediaFileName() +{ + return g_cdrom.GetMediaFileName(); +} + bool InsertMedia(const char* path) { std::unique_ptr image = OpenCDImage(path, false); if (!image) + { + g_host_interface->AddFormattedOSDMessage( + 10.0f, g_host_interface->TranslateString("OSDMessage", "Failed to open disc image '%s'."), path); return false; + } UpdateRunningGame(path, image.get()); g_cdrom.InsertMedia(std::move(image)); Log_InfoPrintf("Inserted media from %s (%s, %s)", s_running_game_path.c_str(), s_running_game_code.c_str(), s_running_game_title.c_str()); + g_host_interface->AddFormattedOSDMessage(10.0f, + g_host_interface->TranslateString("OSDMessage", "Inserted disc '%s' (%s)."), + s_running_game_title.c_str(), s_running_game_code.c_str()); if (g_settings.HasAnyPerGameMemoryCards()) { diff --git a/src/core/system.h b/src/core/system.h index f9e58ef62..43251da23 100644 --- a/src/core/system.h +++ b/src/core/system.h @@ -189,6 +189,7 @@ bool DumpVRAM(const char* filename); bool DumpSPURAM(const char* filename); bool HasMedia(); +const std::string& GetMediaFileName(); bool InsertMedia(const char* path); void RemoveMedia();