cellOskDialog: fix cellOskDialogAbort error format

This commit is contained in:
Megamouse 2022-04-09 23:41:33 +02:00
parent d84a0c6503
commit 9279736fe6

View File

@ -217,7 +217,7 @@ error_code cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dia
osk->on_osk_close = [wptr = std::weak_ptr<OskDialogBase>(osk)](s32 status)
{
cellOskDialog.error("on_osk_close(status=%d)", status);
cellOskDialog.notice("on_osk_close(status=%d)", status);
const auto osk = wptr.lock();
osk->state = OskDialogState::Closed;
@ -511,17 +511,17 @@ error_code cellOskDialogAbort()
return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED;
}
const s32 result = osk->state.atomic_op([](OskDialogState& state)
const error_code result = osk->state.atomic_op([](OskDialogState& state) -> error_code
{
// Check for open dialog. In this case the dialog is "Open" if it was not unloaded before.
if (state == OskDialogState::Unloaded)
{
return static_cast<s32>(CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED);
return CELL_MSGDIALOG_ERROR_DIALOG_NOT_OPENED;
}
state = OskDialogState::Abort;
return static_cast<s32>(CELL_OK);
return CELL_OK;
});
if (result != CELL_OK)