Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11485 from MayImilae/remove-filepath-from-states-…
…messaging

Remove Filepath from State Save/Load OSD Messages
  • Loading branch information
delroth committed Jan 26, 2023
2 parents 70b2a67 + ed121ee commit c6a7465
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Core/Core/State.cpp
Expand Up @@ -5,6 +5,7 @@

#include <atomic>
#include <condition_variable>
#include <filesystem>
#include <map>
#include <memory>
#include <mutex>
Expand Down Expand Up @@ -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();
}

Expand Down Expand Up @@ -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() &&
Expand Down

0 comments on commit c6a7465

Please sign in to comment.