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 defaultheap
gx2 gx2
gfd gfd
proc_ui) nsysnet
proc_ui
sysapp)

View File

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

View File

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