Implement sceImeDialogGetPanelSize

This commit is contained in:
kalaposfos13 2025-04-24 20:28:06 +02:00
parent ce3aded3e5
commit 0e0b94d044

View File

@ -83,9 +83,31 @@ int PS4_SYSV_ABI sceImeDialogGetPanelPositionAndForm() {
return ORBIS_OK;
}
int PS4_SYSV_ABI sceImeDialogGetPanelSize() {
LOG_ERROR(Lib_ImeDialog, "(STUBBED) called");
return ORBIS_OK;
Error PS4_SYSV_ABI sceImeDialogGetPanelSize(const OrbisImeDialogParam* param, u32* width, u32* height) {
LOG_INFO(Lib_ImeDialog, "called");
if (!width || !height) {
return Error::INVALID_ADDRESS;
}
switch (param->type) {
case OrbisImeType::Default:
case OrbisImeType::BasicLatin:
case OrbisImeType::Url:
case OrbisImeType::Mail:
// We set our custom sizes, commented sizes are the original ones
*width = 500; // 793
*height = 100; // 408
break;
case OrbisImeType::Number:
*width = 370;
*height = 402;
break;
default:
LOG_ERROR(Lib_ImeDialog, "Unknown OrbisImeType: {}", (u32)param->type);
}
return Error::OK;
}
int PS4_SYSV_ABI sceImeDialogGetPanelSizeExtended() {