mirror of https://github.com/LIJI32/SameBoy.git
Updated GB_load_state_from_buffer (markdown)
parent
8d094f4ae4
commit
5f280d0b48
|
@ -6,8 +6,19 @@ In `save_state.h`
|
|||
|
||||
## Description
|
||||
|
||||
TBD
|
||||
Loads a snapshot of an emulation state of the emulator instance from `path`. Returns `0` on success, `EIO if the buffer is too short, and `-1` on other failures. Detailed error messages will be written to the [[log|GB_set_log_callback]] on failure.
|
||||
|
||||
## Thread Safety
|
||||
|
||||
`GB_load_state_from_buffer` must not be called if the instance is being run in any thread, including the current one (via a callback).
|
||||
|
||||
## Notes
|
||||
|
||||
SameBoy follows the [BESS](https://github.com/LIJI32/SameBoy/blob/master/BESS.md) specification, and will load save states from other BESS-compliant emulators.
|
||||
|
||||
Loading a save state will fail if [[the save state's model|GB_get_state_model_from_buffer]] is from a different [[model family|GB_model_t]]. Loading a save state from a different model in the same model family will not change the current model in the emulator instance. If this behavior is not desired, call [[GB_switch_model_and_reset]] with [[the correct model|GB_get_state_model_from_buffer]] before loading the save state.
|
||||
|
||||
## See Also
|
||||
|
||||
* [[GB_load_state]]
|
||||
* [[GB_save_state_to_buffer]]
|
Loading…
Reference in New Issue