Improvements

This commit is contained in:
Robin Jones 2024-03-07 22:40:35 +00:00
parent dfe4a20643
commit 682669c978
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,36 @@
#include <fatfs/ff.h>
#include <libdragon.h>
#include "rom_patcher.h"
rom_patcher_err_t rom_patcher_load_file (char *path)
{
// ROM file should be loaded befoe patch is applied.
// apply patch dependent on extension.
//return apply_patch_type_ips(path);
//return apply_patch_type_bps(path);
//return apply_patch_type_aps(path);
//return apply_patch_type_xdelta(path);
return PATCH_ERR_IO;
}
rom_patcher_err_t apply_patch_type_ips(char *path)
{
return PATCH_ERR_INVALID;
}
rom_patcher_err_t apply_patch_type_bps(char *path)
{
return PATCH_ERR_INVALID;
}
rom_patcher_err_t apply_patch_type_aps(char *path)
{
return PATCH_ERR_INVALID;
}
rom_patcher_err_t apply_patch_type_xdelta(char *path)
{
return PATCH_ERR_UNSUPPORTED;
}

View File

@ -17,8 +17,9 @@ typedef enum {
PATCH_ERR_IO, PATCH_ERR_IO,
PATCH_ERR_NO_FILE, PATCH_ERR_NO_FILE,
PATCH_ERR_INVALID, PATCH_ERR_INVALID,
PATCH_ERR_UNSUPPORTED,
} rom_patcher_err_t; } rom_patcher_err_t;
rom_patcher_err_t rom_patcher_load (char *path); rom_patcher_err_t rom_patcher_load_file (char *path);
#endif #endif