mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
Implement sceImeDialogGetPanelSize (#2839)
* Implement sceImeDialogGetPanelSize * Fix header * Clang * Adjust values that are different from Ime * Add original sizes as comments * clang * At this point half of the PR is from squidbus, and I'm just typing out what they say --------- Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
This commit is contained in:
parent
a12d447bd6
commit
c01590175a
2 changed files with 31 additions and 4 deletions
|
@ -83,9 +83,35 @@ int PS4_SYSV_ABI sceImeDialogGetPanelPositionAndForm() {
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceImeDialogGetPanelSize() {
|
Error PS4_SYSV_ABI sceImeDialogGetPanelSize(const OrbisImeDialogParam* param, u32* width,
|
||||||
LOG_ERROR(Lib_ImeDialog, "(STUBBED) called");
|
u32* height) {
|
||||||
return ORBIS_OK;
|
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:
|
||||||
|
*width = 500; // original: 793
|
||||||
|
if (True(param->option & OrbisImeDialogOption::Multiline)) {
|
||||||
|
*height = 300; // original: 576
|
||||||
|
} else {
|
||||||
|
*height = 150; // original: 476
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OrbisImeType::Number:
|
||||||
|
*width = 370;
|
||||||
|
*height = 470;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LOG_ERROR(Lib_ImeDialog, "Unknown OrbisImeType: {}", (u32)param->type);
|
||||||
|
return Error::INVALID_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Error::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceImeDialogGetPanelSizeExtended() {
|
int PS4_SYSV_ABI sceImeDialogGetPanelSizeExtended() {
|
||||||
|
|
|
@ -155,7 +155,8 @@ Error PS4_SYSV_ABI sceImeDialogForceClose();
|
||||||
Error PS4_SYSV_ABI sceImeDialogForTestFunction();
|
Error PS4_SYSV_ABI sceImeDialogForTestFunction();
|
||||||
int PS4_SYSV_ABI sceImeDialogGetCurrentStarState();
|
int PS4_SYSV_ABI sceImeDialogGetCurrentStarState();
|
||||||
int PS4_SYSV_ABI sceImeDialogGetPanelPositionAndForm();
|
int PS4_SYSV_ABI sceImeDialogGetPanelPositionAndForm();
|
||||||
int PS4_SYSV_ABI sceImeDialogGetPanelSize();
|
Error PS4_SYSV_ABI sceImeDialogGetPanelSize(const OrbisImeDialogParam* param, u32* width,
|
||||||
|
u32* height);
|
||||||
int PS4_SYSV_ABI sceImeDialogGetPanelSizeExtended();
|
int PS4_SYSV_ABI sceImeDialogGetPanelSizeExtended();
|
||||||
Error PS4_SYSV_ABI sceImeDialogGetResult(OrbisImeDialogResult* result);
|
Error PS4_SYSV_ABI sceImeDialogGetResult(OrbisImeDialogResult* result);
|
||||||
OrbisImeDialogStatus PS4_SYSV_ABI sceImeDialogGetStatus();
|
OrbisImeDialogStatus PS4_SYSV_ABI sceImeDialogGetStatus();
|
||||||
|
|
Loading…
Add table
Reference in a new issue