MCPcopy Create free account
hub / github.com/doldecomp/mkdd / waitCheck

Function waitCheck

src/Osako/CardAgent.cpp:522–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520 }
521
522 void waitCheck()
523 {
524 s32 chan = msChan;
525 CardMgr::TaskStatus taskStatus = CardMgr::msaCardData[chan].mTaskStatus;
526 if (taskStatus != CardMgr::mcTaskDone)
527 return;
528
529 if (taskStatus == CardMgr::mcTaskDone)
530 CardMgr::msaCardData[chan].mTaskStatus = CardMgr::mcNoTask;
531
532 if (FLAG_OFF(msFlags, 4))
533 {
534 mspPrintMemoryCard->closeWindowNoSe();
535 msState = 0xe;
536 return;
537 }
538
539 switch (CardMgr::msaCardData[msChan].mCardStatus)
540 {
541 case CARD_RESULT_READY:
542 {
543 switch (msCommand)
544 {
545 case mcCommand2:
546 case mcCommand3:
547 case mcCommand4:
548 case mcCommand6:
549 open();
550 break;
551 case mcCommand5:
552 checkFree();
553 break;
554 }
555 break;
556 }
557 case CARD_RESULT_BROKEN:
558 {
559 if (FLAG_OFF(CardMgr::msaCardData[msChan].mProcessFlag, 8))
560 {
561 errorIOError();
562 break;
563 }
564 }
565 case CARD_RESULT_ENCODING:
566 errorEncoding();
567 break;
568 case CARD_RESULT_FATAL_ERROR:
569#line 627
570 JUT_ASSERT_MSG(0, "Program Error at CardAgent!\n")
571 break;
572 case CARD_RESULT_IOERROR:
573 errorIOError();
574 break;
575 case CARD_RESULT_NOCARD:
576 errorNoCard();
577 break;
578 case CARD_RESULT_WRONGDEVICE:
579 errorWrongDevice();

Callers 1

calcFunction · 0.85

Calls 8

openFunction · 0.85
checkFreeFunction · 0.85
errorIOErrorFunction · 0.85
errorEncodingFunction · 0.85
errorNoCardFunction · 0.85
errorWrongDeviceFunction · 0.85
checkFunction · 0.85
closeWindowNoSeMethod · 0.80

Tested by

no test coverage detected