From f9e24c9d5ffd511b5975a55d3a42530c344057b8 Mon Sep 17 00:00:00 2001 From: Madghostek Date: Wed, 26 Aug 2020 18:48:25 +0200 Subject: [PATCH] fix some warning messages now the full path isn't shown on the statusbar, and if st doesn't exist you get a cool messagebox --- main/savestates.c | 21 ++++++++++++--------- main/vcr.c | 10 +++++----- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/main/savestates.c b/main/savestates.c index 45f9e69d..e505a718 100755 --- a/main/savestates.c +++ b/main/savestates.c @@ -221,22 +221,25 @@ void savestates_load() slot -= 10; filename_f = 1; } - + char fname[200]; + char str[256]; + if (filename_f) { - char str [256]; - if(filename_f) - sprintf(str, "loading %-200s", filename); - else - sprintf(str, "loading slot %d", slot); - display_status(str); + _splitpath(filename, 0, 0, fname,0); + sprintf(str, "loading %s.st", fname); } + else + sprintf(str, "loading slot %d", slot); + display_status(str); f = gzopen(filename, "rb"); if (f == NULL) { - printf("Savestate \"%s\" not found.\n", filename); + printf("Savestate \"%s\" not found.\n", filename); //full path for debug free(filename); + sprintf(str, "Savestate \"%s.st\" not found.", fname); + MessageBox(0, str, "Error", MB_ICONWARNING); warn_savestate_not_exist(); savestates_job_success = FALSE; return; @@ -359,7 +362,7 @@ void savestates_load() break; } printWarning(errStr); - if (VCR_isRecording) VCR_stopRecord(); + if (VCR_isRecording()) VCR_stopRecord(); else VCR_stopPlayback(); savestates_job_success = FALSE; goto failedLoad; diff --git a/main/vcr.c b/main/vcr.c index b67c915c..cc17fda7 100755 --- a/main/vcr.c +++ b/main/vcr.c @@ -1383,7 +1383,7 @@ VCR_startPlayback( const char *filename, const char *authorUTF8, const char *des strncpy(name, input_name, 64); if(name[0] && m_header.inputPluginName[0] && stricmp(m_header.inputPluginName, name) != 0) { - printf("Warning: The movie was recorded with the input plugin \"%s\",\nbut you are using the input plugin \"%s\",\nso the movie may not play properly.", m_header.inputPluginName, name); + printf("Warning: The movie was recorded with the input plugin \"%s\",\nbut you are using the input plugin \"%s\",\nso the movie may not play properly.\n", m_header.inputPluginName, name); } // if(TempRomSettings.GfxPluginName[0]) // strncpy(name, TempRomSettings.GfxPluginName, 64); @@ -1391,7 +1391,7 @@ VCR_startPlayback( const char *filename, const char *authorUTF8, const char *des strncpy(name, gfx_name, 64); if(name[0] && m_header.videoPluginName[0] && stricmp(m_header.videoPluginName, name) != 0) { - printf("Warning: The movie was recorded with the graphics plugin \"%s\",\nbut you are using the graphics plugin \"%s\",\nso the movie might not play properly.", m_header.videoPluginName, name); + printf("Warning: The movie was recorded with the graphics plugin \"%s\",\nbut you are using the graphics plugin \"%s\",\nso the movie might not play properly.\n", m_header.videoPluginName, name); } // if(TempRomSettings.SoundPluginName[0]) // strncpy(name, TempRomSettings.SoundPluginName, 64); @@ -1399,7 +1399,7 @@ VCR_startPlayback( const char *filename, const char *authorUTF8, const char *des strncpy(name, sound_name, 64); if(name[0] && m_header.soundPluginName[0] && stricmp(m_header.soundPluginName, name) != 0) { - printf("Warning: The movie was recorded with the sound plugin \"%s\",\nbut you are using the sound plugin \"%s\",\nso the movie might not play properly.", m_header.soundPluginName, name); + printf("Warning: The movie was recorded with the sound plugin \"%s\",\nbut you are using the sound plugin \"%s\",\nso the movie might not play properly.\n", m_header.soundPluginName, name); } // if(TempRomSettings.RspPluginName[0]) // strncpy(name, TempRomSettings.RspPluginName, 64); @@ -1407,7 +1407,7 @@ VCR_startPlayback( const char *filename, const char *authorUTF8, const char *des strncpy(name, rsp_name, 64); if(name[0] && m_header.rspPluginName[0] && stricmp(m_header.rspPluginName, name) != 0) { - printf("Warning: The movie was recorded with the RSP plugin \"%s\",\nbut you are using the RSP plugin \"%s\",\nso the movie probably won't play properly.", m_header.rspPluginName, name); + printf("Warning: The movie was recorded with the RSP plugin \"%s\",\nbut you are using the RSP plugin \"%s\",\nso the movie probably won't play properly.\n", m_header.rspPluginName, name); } @@ -1572,7 +1572,7 @@ VCR_updateScreen() #ifdef LUA_SPEEDMODE if(maximumSpeedMode)redraw = 1; #endif - printf("Screen update!\n"); + //printf("Screen update!\n"); if(redraw) { updateScreen(); }