Skip to content

Commit

Permalink
Block savestates OSM when video frames are dumped.
Browse files Browse the repository at this point in the history
Also make the dump messages shorter,
especially dump start since it will be recorded.
  • Loading branch information
LunaMoo committed May 27, 2019
1 parent 738b38a commit 57bd3c6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions UI/EmuScreen.cpp
Expand Up @@ -107,7 +107,7 @@ static void __EmuScreenVblank()
if (g_Config.bDumpFrames && !startDumping)
{
avi.Start(PSP_CoreParameter().renderWidth, PSP_CoreParameter().renderHeight);
osm.Show(sy->T("AVI Dump started."), 3.0f);
osm.Show(sy->T("AVI Dump started."), 0.5f);
startDumping = true;
}
if (g_Config.bDumpFrames && startDumping)
Expand All @@ -117,7 +117,7 @@ static void __EmuScreenVblank()
else if (!g_Config.bDumpFrames && startDumping)
{
avi.Stop();
osm.Show(sy->T("AVI Dump stopped."), 3.0f);
osm.Show(sy->T("AVI Dump stopped."), 1.0f);
startDumping = false;
}
#endif
Expand Down Expand Up @@ -347,7 +347,7 @@ EmuScreen::~EmuScreen() {
if (g_Config.bDumpFrames && startDumping)
{
avi.Stop();
osm.Show("AVI Dump stopped.", 3.0f);
osm.Show("AVI Dump stopped.", 1.0f);
startDumping = false;
}
#endif
Expand All @@ -371,7 +371,7 @@ void EmuScreen::dialogFinished(const Screen *dialog, DialogResult result) {
}

static void AfterSaveStateAction(SaveState::Status status, const std::string &message, void *) {
if (!message.empty()) {
if (!message.empty() && !g_Config.bDumpFrames) {
osm.Show(message, status == SaveState::Status::SUCCESS ? 2.0 : 5.0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion UI/NativeApp.cpp
Expand Up @@ -676,7 +676,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch

if (!boot_filename.empty() && stateToLoad != NULL) {
SaveState::Load(stateToLoad, [](SaveState::Status status, const std::string &message, void *) {
if (!message.empty()) {
if (!message.empty() && !g_Config.bDumpFrames) {
osm.Show(message, status == SaveState::Status::SUCCESS ? 2.0 : 5.0);
}
});
Expand Down
2 changes: 1 addition & 1 deletion UI/PauseScreen.cpp
Expand Up @@ -271,7 +271,7 @@ void SaveSlotView::Draw(UIContext &dc) {
}

static void AfterSaveStateAction(SaveState::Status status, const std::string &message, void *) {
if (!message.empty()) {
if (!message.empty() && !g_Config.bDumpFrames) {
osm.Show(message, status == SaveState::Status::SUCCESS ? 2.0 : 5.0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Windows/MainWindowMenu.cpp
Expand Up @@ -447,7 +447,7 @@ namespace MainWindow {
}

static void SaveStateActionFinished(SaveState::Status status, const std::string &message, void *userdata) {
if (!message.empty()) {
if (!message.empty() && !g_Config.bDumpFrames) {
osm.Show(message, status == SaveState::Status::SUCCESS ? 2.0 : 5.0);
}
PostMessage(MainWindow::GetHWND(), WM_USER_SAVESTATE_FINISH, 0, 0);
Expand Down

0 comments on commit 57bd3c6

Please sign in to comment.