3 GB_load_battery
Lior Halphon edited this page 2024-12-01 01:09:32 +02:00

Definition

int GB_load_battery(GB_gameboy_t *gb, const char *path);

In gb.h

Description

Loads battery-backed information (e.g. battery-powered cartridge RAM or Real-Time Clock information) from the file at path into the emulator instance. Returns 0 on success and a positive value for POSIX failures.

Thread Safety

GB_load_battery must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).

Notes

This function does not consider truncated files as failures. SameBoy battery saves are compatible with most other emulators and vice versa.

See Also