From 7032dd1ce78e03f1f50475be76ef8b5c642c9d01 Mon Sep 17 00:00:00 2001 From: neonloop Date: Mon, 6 Sep 2021 23:44:53 +0000 Subject: 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) --- patch.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 patch.h (limited to 'patch.h') diff --git a/patch.h b/patch.h new file mode 100644 index 0000000..47d2aad --- /dev/null +++ b/patch.h @@ -0,0 +1,7 @@ +#ifndef PATCH_H +#define PATCH_H + +int patch(const void *in, size_t in_size, + const uint8_t *patch, size_t patch_size, + void **out, size_t *out_size); +#endif -- cgit v1.2.3