mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-23 02:59:18 +01:00
Update src/menu/rom_patch_info.c
test Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
f505135c97
commit
c68e72bb94
@ -121,7 +121,21 @@ rom_patch_load_err_t rom_patch_info_load (char *path)
|
||||
// Though needs conversion from JS to C
|
||||
// apply patch dependent on extension.
|
||||
|
||||
rom_patch_type_t patch_ext_type = PATCH_TYPE_IPS; // FIXME: should be the extension of the file!
|
||||
rom_patch_type_t patch_ext_type;
|
||||
// Determine patch type based on file extension
|
||||
if (file_has_extension(path, "bps")) {
|
||||
patch_ext_type = PATCH_TYPE_BPS;
|
||||
} else if (file_has_extension(path, "ips")) {
|
||||
patch_ext_type = PATCH_TYPE_IPS;
|
||||
} else if (file_has_extension(path, "aps")) {
|
||||
patch_ext_type = PATCH_TYPE_APS;
|
||||
} else if (file_has_extension(path, "ups")) {
|
||||
patch_ext_type = PATCH_TYPE_UPS;
|
||||
} else if (file_has_extension(path, "xdelta")) {
|
||||
patch_ext_type = PATCH_TYPE_XDELTA;
|
||||
} else {
|
||||
return PATCH_ERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
switch (patch_ext_type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user