MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / Exit

Function Exit

Goldleaf/source/base.cpp:267–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void Exit() {
268 if(g_MainApplication) {
269 g_MainApplication->Close();
270 }
271
272 romfsExit();
273
274 if(g_UpdatedNeedsRename) {
275 const auto cur_nro_file = __system_argv[0];
276 auto sd_exp = fs::GetSdCardExplorer();
277 sd_exp->DeleteFile(cur_nro_file);
278 sd_exp->RenameFile(GLEAF_PATH_TEMP_UPDATE_NRO, cur_nro_file);
279 }
280
281 {
282 ScopedLock lk(g_LogLock);
283 for(auto &it : g_ThreadLogBufferList) {
284 delete[] it.second;
285 }
286 }
287
288 cnt::FinalizeTickets();
289 cnt::FinalizeApplications();
290 fs::Finalize();
291 drive::Finalize();
292 amssuExit();
293 usb::Finalize();
294 setsysExit();
295 setExit();
296 psmExit();
297 esExit();
298 nsExit();
299 accountExit();
300 ncmExit();
301 nifmExit();
302 pdmqryExit();
303
304 exit(0);
305}
306
307char *GetLogBuffer() {
308 ScopedLock lk(g_LogLock);

Callers 1

mainFunction · 0.70

Calls 6

GetSdCardExplorerFunction · 0.85
FinalizeTicketsFunction · 0.85
FinalizeApplicationsFunction · 0.85
FinalizeFunction · 0.50
DeleteFileMethod · 0.45
RenameFileMethod · 0.45

Tested by

no test coverage detected