From 056dcf52ca973dc8cfce2e552a098a3fc653d696 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 12 Jul 2024 16:27:50 +0300 Subject: [PATCH] initial ime dialog handling --- src/core/libraries/dialogs/ime_dialog.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/libraries/dialogs/ime_dialog.cpp b/src/core/libraries/dialogs/ime_dialog.cpp index 89136a03..5e2c2ffc 100644 --- a/src/core/libraries/dialogs/ime_dialog.cpp +++ b/src/core/libraries/dialogs/ime_dialog.cpp @@ -9,6 +9,8 @@ namespace Libraries::ImeDialog { +static OrbisImeDialogStatus g_ime_dlg_status = OrbisImeDialogStatus::ORBIS_IME_DIALOG_STATUS_NONE; + int PS4_SYSV_ABI sceImeDialogAbort() { LOG_ERROR(Lib_ImeDialog, "(STUBBED) called"); return ORBIS_OK; @@ -45,18 +47,22 @@ int PS4_SYSV_ABI sceImeDialogGetPanelSizeExtended() { } int PS4_SYSV_ABI sceImeDialogGetResult(OrbisImeDialogResult* result) { + result->endstatus = OrbisImeDialogEndStatus::ORBIS_IME_DIALOG_END_STATUS_OK; LOG_ERROR(Lib_ImeDialog, "(STUBBED) called"); return ORBIS_OK; } int PS4_SYSV_ABI sceImeDialogGetStatus() { - LOG_ERROR(Lib_ImeDialog, "(STUBBED) called"); - return ORBIS_OK; + if (g_ime_dlg_status == OrbisImeDialogStatus::ORBIS_IME_DIALOG_STATUS_RUNNING) { + return OrbisImeDialogStatus::ORBIS_IME_DIALOG_STATUS_FINISHED; + } + return g_ime_dlg_status; } int PS4_SYSV_ABI sceImeDialogInit(const OrbisImeDialogParam* param, const OrbisImeParamExtended* extended) { LOG_ERROR(Lib_ImeDialog, "(STUBBED) called"); + g_ime_dlg_status = OrbisImeDialogStatus::ORBIS_IME_DIALOG_STATUS_RUNNING; return ORBIS_OK; } @@ -82,6 +88,7 @@ int PS4_SYSV_ABI sceImeDialogSetPanelPosition() { int PS4_SYSV_ABI sceImeDialogTerm() { LOG_ERROR(Lib_ImeDialog, "(STUBBED) called"); + g_ime_dlg_status = OrbisImeDialogStatus::ORBIS_IME_DIALOG_STATUS_NONE; return ORBIS_OK; }