Merge pull request #11485 from MayImilae/remove-filepath-from-states-messaging

Remove Filepath from State Save/Load OSD Messages
This commit is contained in:
Pierre Bourdon 2023-01-26 05:29:21 +01:00 committed by GitHub
commit c6a7465529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@
#include <atomic>
#include <condition_variable>
#include <filesystem>
#include <map>
#include <memory>
#include <mutex>
@ -458,7 +459,8 @@ static void CompressAndDumpState(CompressAndDumpState_args& save_args)
File::Rename(temp_filename, filename);
}
Core::DisplayMessage(fmt::format("Saved State to {}", filename), 2000);
std::filesystem::path tempfilename(filename);
Core::DisplayMessage(fmt::format("Saved State to {}", tempfilename.filename().string()), 2000);
Host_UpdateMainFrame();
}
@ -688,7 +690,9 @@ void LoadAs(const std::string& filename)
{
if (loadedSuccessfully)
{
Core::DisplayMessage(fmt::format("Loaded state from {}", filename), 2000);
std::filesystem::path tempfilename(filename);
Core::DisplayMessage(
fmt::format("Loaded State from {}", tempfilename.filename().string()), 2000);
if (File::Exists(filename + ".dtm"))
Movie::LoadInput(filename + ".dtm");
else if (!Movie::IsJustStartingRecordingInputFromSaveState() &&