aboutsummaryrefslogtreecommitdiff
path: root/core.h
diff options
context:
space:
mode:
authorneonloop2021-09-06 23:44:53 +0000
committerneonloop2021-09-06 23:44:53 +0000
commit7032dd1ce78e03f1f50475be76ef8b5c642c9d01 (patch)
treea232c4674a942da0bcfceaaddb5e60356a0ab183 /core.h
parent05c5d66301f14bd8ae50490ebdc7e32e371f851b (diff)
downloadpicoarch-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.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/core.h b/core.h
index 8958e9e..847510b 100644
--- a/core.h
+++ b/core.h
@@ -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);