File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2121,13 +2121,14 @@ bool saves_create_slot(gamedata* game, bool write_to_disk)
21212121 return true ;
21222122}
21232123
2124- bool saves_create_slot (fs::path path)
2124+ bool saves_create_slot (fs::path path, bool write_to_disk )
21252125{
21262126 if (!fs::exists (path))
21272127 return false ;
21282128
21292129 auto & save = saves.emplace_back ();
21302130 save.path = path;
2131+ save.write_to_disk = write_to_disk;
21312132 return true ;
21322133}
21332134
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace fs = std::filesystem;
1010struct save_t
1111{
1212 fs::path path;
13- bool write_to_disk;
13+ bool write_to_disk = true ;
1414 // If loaded is false, this is null.
1515 // If loaded is true and `game` is null, this memory is owned by save_t.
1616 // If loaded is true and `game` is not null, this points to the header field in `game`.
@@ -45,7 +45,7 @@ void saves_unselect();
4545int32_t saves_count ();
4646int32_t saves_current_selection ();
4747bool saves_create_slot (gamedata* game, bool write_to_disk = true );
48- bool saves_create_slot (fs::path path);
48+ bool saves_create_slot (fs::path path, bool write_to_disk = true );
4949bool saves_is_slot_loaded (int32_t index, bool full_data = false );
5050const save_t * saves_get_slot (int32_t index, bool full_data = false );
5151const save_t * saves_get_current_slot ();
Original file line number Diff line number Diff line change @@ -5141,7 +5141,7 @@ int main(int argc, char **argv)
51415141 if (replay_is_active () && replay_get_meta_str (" sav" ).size ())
51425142 {
51435143 auto save_path = replay_get_replay_path ().parent_path () / replay_get_meta_str (" sav" );
5144- bool success = saves_create_slot (save_path);
5144+ bool success = saves_create_slot (save_path, false );
51455145 if (!success)
51465146 Z_error_fatal (" Failed to load replay's save file" );
51475147 }
You can’t perform that action at this time.
0 commit comments