libwhb: Initialize FSCmdBlock in WHBUnmountSdCard

This commit is contained in:
CreeperMario 2017-08-06 17:11:15 +09:30
parent 492bad4382
commit c0c1faa1e9
3 changed files with 6 additions and 2 deletions

View File

@ -11,4 +11,6 @@ target_link_libraries(triangle
defaultheap
gx2
gfd
proc_ui)
nsysnet
proc_ui
sysapp)

View File

@ -113,7 +113,7 @@ exit:
WHBLogPrintf("Exiting...");
GX2RDestroyBufferEx(&positionBuffer, 0);
GX2RDestroyBufferEx(&colourBuffer, 0);
//WHBUnmountSdCard(); !! freezes on unmount for unkown reason !!
WHBUnmountSdCard();
WHBGfxShutdown();
WHBProcShutdown();
return result;

View File

@ -67,6 +67,8 @@ WHBUnmountSdCard()
return TRUE;
}
FSInitCmdBlock(&cmd);
result = FSUnmount(&sClient, &cmd, sMountPath, -1);
if (result < 0) {
WHBLogPrintf("%s: FSUnmount error %d", __FUNCTION__, result);