From 33d2618e5bd7133f3f26681d4c119aa24b34f2fd Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 26 Jan 2017 17:53:07 +0300 Subject: [PATCH] cellOskDialog fixes --- rpcs3/Emu/Cell/Modules/cellOskDialog.cpp | 32 +++++++++++++----------- rpcs3/Emu/Cell/Modules/cellOskDialog.h | 4 +++ rpcs3/emucore.vcxproj | 3 ++- rpcs3/emucore.vcxproj.filters | 3 +++ 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp b/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp index fa97ca0d09..3498edbe21 100644 --- a/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp +++ b/rpcs3/Emu/Cell/Modules/cellOskDialog.cpp @@ -131,14 +131,15 @@ s32 cellOskDialogExtInputDeviceUnlock() return CELL_OSKDIALOG_OK; } -s32 cellOskDialogExtRegisterKeyboardEventHookCallback() +s32 cellOskDialogExtRegisterKeyboardEventHookCallback(u16 hookEventMode, vm::ptr pCallback) { - fmt::throw_exception("Unimplemented" HERE); + cellOskDialog.todo("cellOskDialogExtRegisterKeyboardEventHookCallback(hookEventMode=%u, pCallback=*0x%x)", hookEventMode, pCallback); + return CELL_OK; } -s32 cellOskDialogExtAddJapaneseOptionDictionary(vm::cptr filePath) +s32 cellOskDialogExtAddJapaneseOptionDictionary(vm::cpptr filePath) { - cellOskDialog.todo("cellOskDialogExtAddJapaneseOptionDictionary(filePath=*0x%0x)", filePath); + cellOskDialog.todo("cellOskDialogExtAddJapaneseOptionDictionary(filePath=**0x%0x)", filePath); return CELL_OSKDIALOG_OK; } @@ -148,9 +149,9 @@ s32 cellOskDialogExtEnableClipboard() return CELL_OSKDIALOG_OK; } -s32 cellOskDialogExtSendFinishMessage(vm::ptr finishReason) +s32 cellOskDialogExtSendFinishMessage(s32 /*CellOskDialogFinishReason*/ finishReason) { - cellOskDialog.todo("cellOskDialogExtSendFinishMessage(finishReason=*0x%x)", finishReason); + cellOskDialog.todo("cellOskDialogExtSendFinishMessage(finishReason=%d)", finishReason); return CELL_OSKDIALOG_OK; } @@ -162,7 +163,7 @@ s32 cellOskDialogExtAddOptionDictionary(vm::cptr s32 cellOskDialogExtSetInitialScale(f32 initialScale) { - cellOskDialog.todo("cellOskDialogExtSetInitialScale(initialScale=0x%x)", initialScale); + cellOskDialog.todo("cellOskDialogExtSetInitialScale(initialScale=%f)", initialScale); return CELL_OSKDIALOG_OK; } @@ -174,24 +175,25 @@ s32 cellOskDialogExtInputDeviceLock() s32 cellOskDialogExtSetBaseColor(f32 red, f32 blue, f32 green, f32 alpha) { - cellOskDialog.warning("cellOskDialogExtSetBaseColor(red=0x%x, blue=0x%x, green=0x%x, alpha=0x%x)", red, blue, green, alpha); + cellOskDialog.warning("cellOskDialogExtSetBaseColor(red=%f, blue=%f, green=%f, alpha=%f)", red, blue, green, alpha); return CELL_OSKDIALOG_OK; } -s32 cellOskDialogExtRegisterConfirmWordFilterCallback() +s32 cellOskDialogExtRegisterConfirmWordFilterCallback(vm::ptr pCallback) { - fmt::throw_exception("Unimplemented" HERE); + cellOskDialog.todo("cellOskDialogExtRegisterConfirmWordFilterCallback(pCallback=*0x%x)", pCallback); + return CELL_OK; } s32 cellOskDialogExtUpdateInputText() { - cellOskDialog.todo("cellOskDialogExtUpdateInputText"); + cellOskDialog.todo("cellOskDialogExtUpdateInputText()"); return CELL_OSKDIALOG_OK; } s32 cellOskDialogExtDisableHalfByteKana() { - cellOskDialog.todo("cellOskDialogExtDisableHalfByteKana"); + cellOskDialog.todo("cellOskDialogExtDisableHalfByteKana()"); return CELL_OSKDIALOG_OK; } @@ -203,7 +205,7 @@ s32 cellOskDialogExtSetPointerEnable(b8 enable) s32 cellOskDialogExtUpdatePointerDisplayPos() { - cellOskDialog.todo("cellOskDialogExtUpdatePointerDisplayPos()"); + cellOskDialog.todo("cellOskDialogExtUpdatePointerDisplayPos"); // Missing arguments return CELL_OSKDIALOG_OK; } @@ -213,9 +215,9 @@ s32 cellOskDialogExtEnableHalfByteKana() return CELL_OSKDIALOG_OK; } -s32 cellOskDialogExtRegisterForceFinishCallback() +s32 cellOskDialogExtRegisterForceFinishCallback(vm::ptr pCallback) { - cellOskDialog.todo("cellOskDialogExtRegisterForceFinishCallback()"); + cellOskDialog.todo("cellOskDialogExtRegisterForceFinishCallback(pCallback=*0x%x)", pCallback); return CELL_OSKDIALOG_OK; } diff --git a/rpcs3/Emu/Cell/Modules/cellOskDialog.h b/rpcs3/Emu/Cell/Modules/cellOskDialog.h index 35de53fea5..dc3a2b9cb8 100644 --- a/rpcs3/Emu/Cell/Modules/cellOskDialog.h +++ b/rpcs3/Emu/Cell/Modules/cellOskDialog.h @@ -157,3 +157,7 @@ struct CellOskDialogImeDictionaryInfo vm::bcptr dictionaryPath; }; +using cellOskDialogConfirmWordFilterCallback = int(vm::ptr pConfirmString, s32 wordLength); +using cellOskDialogHardwareKeyboardEventHookCallback = class b8( + vm::ptr keyMessage, vm::ptr action, vm::ptr pActionInfo); +using cellOskDialogForceFinishCallback = class b8(); diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index fc69fc1fe0..1188e6df5d 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -425,6 +425,7 @@ + @@ -689,4 +690,4 @@ - + \ No newline at end of file diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 6f46a9e43d..b8143631ac 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1714,5 +1714,8 @@ Utilities + + Emu\Cell\Modules + \ No newline at end of file