net-profile/pumpnet: Support nxa profiles

This commit is contained in:
icex2
2020-10-06 23:29:00 +02:00
parent 8cc7c33133
commit 54e691a05c
2 changed files with 51 additions and 7 deletions
+45 -7
View File
@@ -5,6 +5,8 @@
#include "asset/nx2/lib/usb-rank.h"
#include "asset/nx2/lib/usb-save.h"
#include "asset/nxa/lib/usb-rank.h"
#include "asset/nxa/lib/usb-save.h"
#include "capnhook/hook/filehook.h"
@@ -107,6 +109,42 @@ static const struct profile_virtual_mnt_point_info _patch_net_profile_virtual_mn
}
},
}
},
{
.player = {
{
.file_info = {
{
.player = 0,
.file_type = PUMPNET_LIB_FILE_TYPE_SAVE,
.file_path = "/mnt/0/nxasave.bin",
.file_size = ASSET_NXA_USB_SAVE_SIZE
},
{
.player = 0,
.file_type = PUMPNET_LIB_FILE_TYPE_RANK,
.file_path = "/mnt/0/nxarank.bin",
.file_size = ASSET_NXA_USB_RANK_SIZE
}
}
},
{
.file_info = {
{
.player = 1,
.file_type = PUMPNET_LIB_FILE_TYPE_SAVE,
.file_path = "/mnt/1/nxasave.bin",
.file_size = ASSET_NXA_USB_SAVE_SIZE
},
{
.player = 1,
.file_type = PUMPNET_LIB_FILE_TYPE_RANK,
.file_path = "/mnt/1/nxarank.bin",
.file_size = ASSET_NXA_USB_RANK_SIZE
}
}
},
}
}
};
@@ -531,22 +569,22 @@ void patch_net_profile_init(
idx = 0;
break;
// case PUMPNET_LIB_GAME_NXA:
// idx = 1;
// break;
case ASSET_GAME_VERSION_NXA:
idx = 1;
break;
//
// case PUMPNET_LIB_GAME_FST:
// case ASSET_GAME_VERSION_FIESTA:
// idx = 2;
// break;
//
// case PUMPNET_LIB_GAME_FEX:
// case ASSET_GAME_VERSION_FIESTA_EX:
// idx = 3;
// break;
//
// case PUMPNET_LIB_GAME_F2:
// case ASSET_GAME_VERSION_FIESTA_2:
// idx = 4;
// break;
case ASSET_GAME_VERSION_NXA:
case ASSET_GAME_VERSION_FIESTA:
case ASSET_GAME_VERSION_FIESTA_EX:
case ASSET_GAME_VERSION_FIESTA_2:
+6
View File
@@ -28,6 +28,9 @@ static char* _pumpnet_lib_get_endpoint_save(enum asset_game_version game, const
case ASSET_GAME_VERSION_NX2:
return util_str_merge(server_addr, USBPROFILE_ENDPOINT "/nx2/save");
case ASSET_GAME_VERSION_NXA:
return util_str_merge(server_addr, USBPROFILE_ENDPOINT "/nxa/save");
default:
log_die("Unsupported game version %d", game);
return NULL;
@@ -40,6 +43,9 @@ static char* _pumpnet_lib_get_endpoint_rank(enum asset_game_version game, const
case ASSET_GAME_VERSION_NX2:
return util_str_merge(server_addr, USBPROFILE_ENDPOINT "/nx2/rank");
case ASSET_GAME_VERSION_NXA:
return util_str_merge(server_addr, USBPROFILE_ENDPOINT "/nxa/rank");
default:
log_die("Unsupported game version %d", game);
return NULL;