Block savestates OSM when video frames are dumped.

Also make the dump messages shorter,
especially dump start since it will be recorded.
This commit is contained in:
LunaMoo 2019-05-27 23:32:25 +02:00
parent 738b38a109
commit 57bd3c63f4
4 changed files with 7 additions and 7 deletions

View File

@ -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)
@ -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
@ -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
@ -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);
}
}

View File

@ -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);
}
});

View File

@ -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);
}
}

View File

@ -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);