Updated GB_load_gbs (markdown)

Lior Halphon 2024-11-30 21:26:11 +02:00
parent 4a0524b355
commit 7f4506bd02
1 changed files with 15 additions and 1 deletions

@ -6,8 +6,22 @@ In `gb.h`
## Description
TBD
Loads a GBS file into an emulator instance. Returns `0` on success, a positive `errno` value on a POSIX failure, and `-1` on other failures.
In case of a failure, an error message will also be output to the [[log|GB_set_log_callback]]. Warning messages may be output to the [[log|GB_set_log_callback]] 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.
The emulator instance will play the first track of the GBS file. To play another track, call [[GB_gbs_switch_track]].
## Thread Safety
`GB_load_gbs` must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).
## See Also
* [[GB_load_gbs_from_buffer]]
* [[GB_gbs_info_t]]
* [[GB_gbs_switch_track]]
* [[GB_load_rom]]
* [[GB_load_isx]]