Make save slot info work correctly with prefixes / prefix changes
This commit is contained in:
parent
c37d2c69ad
commit
9013904da3
2 changed files with 12 additions and 7 deletions
|
@ -268,13 +268,13 @@ namespace
|
|||
if(smode == SAVE_MOVIE) {
|
||||
//Just do this immediately.
|
||||
do_save_movie(filename);
|
||||
flush_slotinfo(filename);
|
||||
flush_slotinfo(translate_name_mprefix(filename, true));
|
||||
return;
|
||||
}
|
||||
if(location_special == SPECIAL_SAVEPOINT) {
|
||||
//We can save immediately here.
|
||||
do_save_state(filename);
|
||||
flush_slotinfo(filename);
|
||||
flush_slotinfo(translate_name_mprefix(filename, true));
|
||||
return;
|
||||
}
|
||||
queued_saves.insert(filename);
|
||||
|
@ -367,7 +367,7 @@ void update_movie_state()
|
|||
_status.set("!mode", "F");
|
||||
}
|
||||
if(jukebox_size > 0) {
|
||||
std::string sfilen = translate_name_mprefix(save_jukebox_name(save_jukebox_pointer));
|
||||
std::string sfilen = translate_name_mprefix(save_jukebox_name(save_jukebox_pointer), true);
|
||||
_status.set("!saveslot", (stringfmt() << (save_jukebox_pointer + 1)).str());
|
||||
_status.set("!saveslotinfo", get_slotinfo(sfilen));
|
||||
} else {
|
||||
|
@ -983,7 +983,7 @@ namespace
|
|||
our_rom->rtype->runtosave();
|
||||
for(auto i : queued_saves) {
|
||||
do_save_state(i);
|
||||
flush_slotinfo(i);
|
||||
flush_slotinfo(translate_name_mprefix(i, true));
|
||||
}
|
||||
if(do_unsafe_rewind && !unsafe_rewind_obj) {
|
||||
uint64_t t = get_utime();
|
||||
|
|
|
@ -29,6 +29,7 @@ struct loaded_rom* our_rom;
|
|||
bool system_corrupt;
|
||||
movie_logic movb;
|
||||
std::string last_save;
|
||||
void update_movie_state();
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
@ -101,9 +102,13 @@ namespace
|
|||
|
||||
void set_mprefix(const std::string& pfx)
|
||||
{
|
||||
umutex_class h(mprefix_lock);
|
||||
mprefix_valid = (pfx != "");
|
||||
mprefix = pfx;
|
||||
{
|
||||
umutex_class h(mprefix_lock);
|
||||
mprefix_valid = (pfx != "");
|
||||
mprefix = pfx;
|
||||
}
|
||||
update_movie_state();
|
||||
information_dispatch::do_status_update();
|
||||
}
|
||||
|
||||
std::string get_mprefix_for_project(const std::string& prjid)
|
||||
|
|
Loading…
Add table
Reference in a new issue