| 78 | } |
| 79 | |
| 80 | int updateMessageDialog() { |
| 81 | if (!message_dialog_running) |
| 82 | return MESSAGE_DIALOG_RESULT_NONE; |
| 83 | |
| 84 | SceCommonDialogStatus status = sceMsgDialogGetStatus(); |
| 85 | if (status == MESSAGE_DIALOG_RESULT_FINISHED) { |
| 86 | if (message_dialog_type == SCE_MSG_DIALOG_BUTTON_TYPE_YESNO || |
| 87 | message_dialog_type == SCE_MSG_DIALOG_BUTTON_TYPE_OK_CANCEL) { |
| 88 | SceMsgDialogResult result; |
| 89 | memset(&result, 0, sizeof(SceMsgDialogResult)); |
| 90 | sceMsgDialogGetResult(&result); |
| 91 | |
| 92 | if (result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_NO) { |
| 93 | status = MESSAGE_DIALOG_RESULT_NO; |
| 94 | } else if (result.buttonId == SCE_MSG_DIALOG_BUTTON_ID_YES) { |
| 95 | status = MESSAGE_DIALOG_RESULT_YES; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | sceMsgDialogTerm(); |
| 100 | |
| 101 | message_dialog_running = 0; |
| 102 | } |
| 103 | |
| 104 | return status; |
| 105 | } |
no test coverage detected