mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-08-21 18:05:23 -05:00
fix stuff up a little
This commit is contained in:
@@ -61,10 +61,8 @@ namespace data
|
||||
//Game icon
|
||||
icn icon;
|
||||
|
||||
//FUCK IT
|
||||
FsSaveDataInfo info;
|
||||
|
||||
private:
|
||||
FsSaveDataInfo info;
|
||||
std::string title, titleSafe;
|
||||
uint64_t id;
|
||||
};
|
||||
|
||||
@@ -210,10 +210,10 @@ namespace data
|
||||
size_t outSz = 0;
|
||||
|
||||
info = inf;
|
||||
if(inf.save_data_type == FsSaveDataType_Account)
|
||||
id = inf.application_id;
|
||||
if(inf.save_data_type == FsSaveDataType_System)
|
||||
id = inf.system_save_data_id;
|
||||
else
|
||||
id = inf.save_data_id;
|
||||
id = inf.application_id;
|
||||
|
||||
if(R_SUCCEEDED(nsGetApplicationControlData(NsApplicationControlSource_Storage, id, dat, sizeof(NsApplicationControlData), &outSz)) && outSz >= sizeof(dat->nacp) \
|
||||
&& R_SUCCEEDED(nacpGetLanguageEntry(&dat->nacp, &ent)) && ent != NULL)
|
||||
|
||||
12
src/file.cpp
12
src/file.cpp
@@ -22,7 +22,7 @@ static Result fsMountBCAT(FsFileSystem *out, data::titledata& open)
|
||||
{
|
||||
FsSaveDataAttribute attr;
|
||||
std::memset(&attr, 0, sizeof(FsSaveDataAttribute));
|
||||
attr.application_id = open.info.application_id;
|
||||
attr.application_id = open.getID();
|
||||
attr.save_data_type = FsSaveDataType_Bcat;
|
||||
|
||||
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_User, &attr);
|
||||
@@ -32,7 +32,7 @@ static Result fsMountDeviceSave(FsFileSystem *out, data::titledata& open)
|
||||
{
|
||||
FsSaveDataAttribute attr;
|
||||
std::memset(&attr, 0, sizeof(FsSaveDataAttribute));
|
||||
attr.application_id = open.info.application_id;
|
||||
attr.application_id = open.getID();
|
||||
attr.save_data_type = FsSaveDataType_Device;
|
||||
|
||||
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_User, &attr);
|
||||
@@ -67,13 +67,13 @@ namespace fs
|
||||
{
|
||||
FsFileSystem sv;
|
||||
|
||||
if(open.info.save_data_type == FsSaveDataType_Account && R_FAILED(fsOpen_SaveData(&sv, open.info.application_id, usr.getUID())))
|
||||
if(open.getType() == FsSaveDataType_Account && R_FAILED(fsOpen_SaveData(&sv, open.getID(), usr.getUID())))
|
||||
return false;
|
||||
else if(open.info.save_data_type == FsSaveDataType_System && R_FAILED(fsOpen_SystemSaveData(&sv, FsSaveDataSpaceId_System, open.info.save_data_id, (AccountUid){0})))
|
||||
else if(open.getType() == FsSaveDataType_System && R_FAILED(fsOpen_SystemSaveData(&sv, FsSaveDataSpaceId_System, open.getID(), (AccountUid){0})))
|
||||
return false;
|
||||
else if(open.info.save_data_type == FsSaveDataType_Bcat && R_FAILED(fsMountBCAT(&sv, open)))
|
||||
else if(open.getType() == FsSaveDataType_Bcat && R_FAILED(fsMountBCAT(&sv, open)))
|
||||
return false;
|
||||
else if(open.info.save_data_type == FsSaveDataType_Device && R_FAILED(fsMountDeviceSave(&sv, open)))
|
||||
else if(open.getType() == FsSaveDataType_Device && R_FAILED(fsMountDeviceSave(&sv, open)))
|
||||
return false;
|
||||
|
||||
if(fsdevMountDevice("sv", sv) == -1)
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace ui
|
||||
}
|
||||
else if(down & KEY_Y || fldNav[1].getEvent() == BUTTON_RELEASED)
|
||||
{
|
||||
if(data::curData.info.save_data_type != FsSaveDataType_SystemBcat && folderMenu.getSelected() > 0)
|
||||
if(data::curData.getType() != FsSaveDataType_SystemBcat && folderMenu.getSelected() > 0)
|
||||
{
|
||||
std::string scanPath = util::getTitleDir(data::curUser, data::curData);
|
||||
fs::dirList list(scanPath);
|
||||
|
||||
@@ -158,10 +158,10 @@ namespace util
|
||||
std::string ret = d.getTitle() + "\n";
|
||||
|
||||
char id[18];
|
||||
sprintf(id, " %016lX", d.info.application_id);
|
||||
sprintf(id, " %016lX", d.getID());
|
||||
ret += std::string(id) + "\n\n";
|
||||
|
||||
switch(d.info.save_data_type)
|
||||
switch(d.getType())
|
||||
{
|
||||
case FsSaveDataType_System:
|
||||
ret += "System Save\n\n";
|
||||
|
||||
Reference in New Issue
Block a user