Skip to content

Commit

Permalink
fix some warning messages
Browse files Browse the repository at this point in the history
now the full path isn't shown on the statusbar, and if st doesn't exist you get a cool messagebox
  • Loading branch information
Madghostek committed Aug 26, 2020
1 parent 9a9c056 commit f9e24c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
21 changes: 12 additions & 9 deletions main/savestates.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions main/vcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1383,31 +1383,31 @@ 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);
// else
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);
// else
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);
// else
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);
}


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

0 comments on commit f9e24c9

Please sign in to comment.