4 GB_get_state_model_from_buffer
Lior Halphon edited this page 2024-12-01 01:09:32 +02:00

Definition

int GB_get_state_model_from_buffer(const uint8_t *buffer, size_t length, GB_model_t *model);

In save_state.h

Description

Retrieves the model used by a a save state file stored in buffer with size length. Populates model and returns 0 on success. Returns EIO if the buffer is not large enough, and -1 on other failures.

Thread Safety

GB_get_state_model_from_buffer is thread-safe and can be called from any thread and context.

Notes

This function also works on save states created by other emulators if they follow the BESS specification.

See Also