mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
cellOskDialog: fix cellOskDialogUnloadAsync return string
fixes Class of Heroes 2G
This commit is contained in:
parent
3406acd8c9
commit
f9c1b15bf4
@ -224,14 +224,18 @@ error_code getText(vm::ptr<CellOskDialogCallbackReturnParam> OutputInfo, bool is
|
||||
}
|
||||
}
|
||||
|
||||
const bool is_valid = OutputInfo->pResultString && (OutputInfo->result == CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK || (is_unload && OutputInfo->result == CELL_OSKDIALOG_INPUT_FIELD_RESULT_NO_INPUT_TEXT));
|
||||
bool do_copy = OutputInfo->pResultString && (OutputInfo->result == CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK || (is_unload && OutputInfo->result == CELL_OSKDIALOG_INPUT_FIELD_RESULT_NO_INPUT_TEXT));
|
||||
|
||||
for (u32 i = 0; i < CELL_OSKDIALOG_STRING_SIZE - 1; i++)
|
||||
{
|
||||
osk->osk_text_old[i] = osk->osk_text[i];
|
||||
|
||||
if (is_valid && i < OutputInfo->numCharsResultString)
|
||||
if (do_copy && i < OutputInfo->numCharsResultString)
|
||||
{
|
||||
if (osk->osk_text[i] == 0)
|
||||
{
|
||||
do_copy = false;
|
||||
}
|
||||
OutputInfo->pResultString[i] = osk->osk_text[i];
|
||||
}
|
||||
}
|
||||
@ -443,6 +447,11 @@ error_code cellOskDialogExtRegisterConfirmWordFilterCallback(vm::ptr<cellOskDial
|
||||
{
|
||||
cellOskDialog.warning("cellOskDialogExtRegisterConfirmWordFilterCallback(pCallback=*0x%x)", pCallback);
|
||||
|
||||
if (!pCallback)
|
||||
{
|
||||
return CELL_OSKDIALOG_ERROR_PARAM;
|
||||
}
|
||||
|
||||
auto osk = fxm::get<OskDialogBase>();
|
||||
if (!osk)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user