-
-
Notifications
You must be signed in to change notification settings - Fork 212
GB_load_gbs_from_buffer
int GB_load_gbs_from_buffer(GB_gameboy_t *gb, const uint8_t *buffer, size_t size, GB_gbs_info_t *info);
In gb.h
Loads a GBS from buffer
with length size
into an emulator instance. Returns 0
on success, and -1
on failures.
In case of a failure, an error message will also be output to the log. Warning messages may be output to the log upon success.
Upon success, and if info
is not NULL
, the GB_gbs_info_t struct pointed by info
will be filled with metadata from the GBS file.
After loading a GBS file, you must call GB_gbs_switch_track to specify the track to play. See GB_gbs_switch_track for more information.
GB_load_gbs_from_buffer
must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).