diff options
author | neonloop | 2021-09-06 23:44:53 +0000 |
---|---|---|
committer | neonloop | 2021-09-06 23:44:53 +0000 |
commit | 7032dd1ce78e03f1f50475be76ef8b5c642c9d01 (patch) | |
tree | a232c4674a942da0bcfceaaddb5e60356a0ab183 /core.h | |
parent | 05c5d66301f14bd8ae50490ebdc7e32e371f851b (diff) | |
download | picoarch-7032dd1ce78e03f1f50475be76ef8b5c642c9d01.tar.gz picoarch-7032dd1ce78e03f1f50475be76ef8b5c642c9d01.tar.bz2 picoarch-7032dd1ce78e03f1f50475be76ef8b5c642c9d01.zip |
Adds ips/bps softpatching
Patches named like the content will be auto-applied in memory when the
game is loaded.
Example: /roms/game.gba will apply patches named /roms/game.ips,
/roms/game.ips1, /roms/game.IPS2, /roms/game.bps, etc. This only
happens in memory, original files are unmodified.
Patches are loaded in case-insensitive alphabetical order. Note that
.ips12 loads before .ips2, but after .ips02.
Only supports cores that load from memory (see libretro page at
https://docs.libretro.com/guides/softpatching/ for compatibility list)
Diffstat (limited to 'core.h')
-rw-r--r-- | core.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2,6 +2,7 @@ #define _CORE_H__ #include "cheat.h" +#include "content.h" #include "libretro.h" #include "main.h" @@ -32,7 +33,7 @@ struct core_cbs { extern struct core_cbs current_core; extern char core_path[MAX_PATH]; -extern char content_path[MAX_PATH]; +extern struct content *content; extern struct cheats *cheats; extern double sample_rate; @@ -60,8 +61,9 @@ bool disc_switch_index(unsigned index); bool disc_replace_index(unsigned index, const char *content_path); void core_extract_name(const char* core_file, char *buf, size_t len); -int core_load(const char *corefile); -int core_load_content(const char *path); +int core_open(const char *corefile); +void core_load(void); +int core_load_content(struct content *content); void core_apply_cheats(struct cheats *cheats); void core_unload_content(void); const char **core_extensions(void); |