MCPcopy Create free account
hub / github.com/devkitPro/3ds-hbmenu / titlesCheckUpdate

Function titlesCheckUpdate

source/titles.c:97–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool titlesCheckUpdate(bool async, UIState newState)
98{
99 int i;
100 bool needUpdate = false;
101 for (i = 0; i < 3; i ++)
102 {
103 int num;
104 Result res = AM_GetTitleCount(i, (u32*)&num);
105 if (R_FAILED(res) && s_titles[i].totalNum != 0)
106 {
107 needUpdate = true;
108 s_titles[i].totalNum = 0;
109 } else if (R_SUCCEEDED(res) && s_titles[i].totalNum != num)
110 {
111 needUpdate = true;
112 s_titles[i].totalNum = num;
113 }
114 }
115
116 if (!needUpdate) return false;
117
118 if (async)
119 workerSchedule(titlesUpdate, (void*)newState);
120 else
121 titlesUpdate((void*)newState);
122 return true;
123}
124
125bool titlesLoadSmdh(smdh_s* smdh, u8 mediatype, u64 tid)
126{

Callers 3

launchMenuEntryFunction · 0.85
titleSelectInitFunction · 0.85
titleSelectUpdateFunction · 0.85

Calls 2

workerScheduleFunction · 0.85
titlesUpdateFunction · 0.85

Tested by

no test coverage detected