Skip to content

Commit

Permalink
fixed the typo TID vs PID
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Jul 19, 2020
1 parent 7a682ce commit 3188b73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ void GuiCheats::onInput(u32 kdown)

if (m_debugger->getRunningApplicationPID() == 0)
return;

// BM1
if (m_searchMenuLocation == SEARCH_POINTER)
{
if (kdown & KEY_UP)
Expand Down
16 changes: 5 additions & 11 deletions source/helpers/save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "helpers/account.hpp"
#include "helpers/title.hpp"
#include "helpers/debugger.hpp"

using json = nlohmann::json;

s32 deleteDirRecursively(const char *path, bool isSave)
Expand Down Expand Up @@ -160,9 +159,7 @@ Result _getSaveList(std::vector<FsSaveDataInfo> &saveInfoList)
FsSaveDataInfoReader iterator;
s64 total_entries = 0;
FsSaveDataInfo info;
Debugger *l_debugger = new Debugger(); //Debugger *m_debugger;
u64 runningid = l_debugger->getRunningApplicationPID();

Debugger *l_debugger = new Debugger(); //Debugger *m_debugger;
rc = fsOpenSaveDataInfoReader(&iterator, FsSaveDataSpaceId_User); //See libnx fs.h.
if (R_FAILED(rc))
{
Expand All @@ -175,20 +172,17 @@ Result _getSaveList(std::vector<FsSaveDataInfo> &saveInfoList)
return rc;
if (total_entries == 0)
return MAKERESULT(Module_Libnx, LibnxError_NotFound);

for (; R_SUCCEEDED(rc) && total_entries > 0;
rc = fsSaveDataInfoReaderRead(&iterator, &info, 1, &total_entries))
{
if (runningid == 0)
if ((info.save_data_type == FsSaveDataType_Account) && (info.application_id == l_debugger->getRunningApplicationTID())) // hacked to get only the running title
{
if (info.save_data_type == FsSaveDataType_Account) // hacked to get only the running title if using cheat engine
{
saveInfoList.push_back(info);
}
saveInfoList.push_back(info);
}
if ((info.save_data_type == FsSaveDataType_Account) && (info.application_id == l_debugger->getRunningApplicationPID())) // hacked to get only the running title if using cheat engine
else if ((info.save_data_type == FsSaveDataType_Account) && (l_debugger->getRunningApplicationTID() == 0)) // hacked to get only the running title
{
saveInfoList.push_back(info);
printf("has hit for title\n");
}
}

Expand Down

0 comments on commit 3188b73

Please sign in to comment.