Closed andres-asm closed 7 years ago
So... I have been messing with the savestate code and I... kinda fixed it But I don't know why.
Example: If you make a save in SFIII it works fine If you close RA and restart it, and load the state it hangs
Example: Make a state in sfa3 mid fight Load the state, works fine Restart, load state right away, garbled music
This fixes it:
diff --git a/src/burner/libretro/libretro.cpp b/src/burner/libretro/libretro.cpp index 577b14e..73baab8 100644 --- a/src/burner/libretro/libretro.cpp +++ b/src/burner/libretro/libretro.cpp @@ -1421,7 +1421,7 @@ size_t retro_serialize_size() BurnAcb = burn_dummy_state_cb; state_size = 0; - BurnAreaScan(ACB_FULLSCAN | ACB_WRITE, 0); + BurnAreaScan(ACB_VOLATILE | ACB_WRITE | ACB_READ, 0); return state_size; } @@ -1432,7 +1432,7 @@ bool retro_serialize(void *data, size_t size) BurnAcb = burn_write_state_cb; write_state_ptr = (uint8_t*)data; - BurnAreaScan(ACB_FULLSCAN | ACB_WRITE, 0); + BurnAreaScan(ACB_VOLATILE | ACB_WRITE | ACB_READ, 0); return true; } @@ -1443,7 +1443,7 @@ bool retro_unserialize(const void *data, size_t size) return false; BurnAcb = burn_read_state_cb; read_state_ptr = (const uint8_t*)data; - BurnAreaScan(ACB_FULLSCAN | ACB_READ, 0); + BurnAreaScan(ACB_VOLATILE | ACB_WRITE | ACB_READ, 0); return true; } @@ -2079,8 +2079,8 @@ static bool init_input(void) /* serialization quirks for netplay, cps3 seems problematic, neogeo, cps1 and 2 seem to be good to go */ uint64_t serialization_quirks = RETRO_SERIALIZATION_QUIRK_SINGLE_SESSION; - if(!strcmp(systemname, "CPS-3")) - environ_cb(RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS, &serialization_quirks); + /*if(!strcmp(systemname, "CPS-3")) + environ_cb(RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS, &serialization_quirks);*/ return has_analog; }
So with the CPS3 hack and this change we have netplay working better under a common platform. For cross platform we still have to fix the savestates so they are always the same size
So... I have been messing with the savestate code and I... kinda fixed it But I don't know why.
Example: If you make a save in SFIII it works fine If you close RA and restart it, and load the state it hangs
Example: Make a state in sfa3 mid fight Load the state, works fine Restart, load state right away, garbled music
This fixes it: