mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-10 04:33:15 +00:00
core: Library cleanup (#1631)
* core: Split error codes into separate files * Reduces build times and is cleaner * core: Bring structs and enums to codebase style * core: More style changes
This commit is contained in:
parent
3d0aacd43d
commit
5b6e0ab238
114 changed files with 2158 additions and 2509 deletions
|
@ -2,14 +2,12 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <queue>
|
||||
#include "ime.h"
|
||||
#include "ime_ui.h"
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "common/singleton.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/ime/ime.h"
|
||||
#include "core/libraries/ime/ime_error.h"
|
||||
#include "core/libraries/ime/ime_ui.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "core/linker.h"
|
||||
#include "core/tls.h"
|
||||
|
||||
namespace Libraries::Ime {
|
||||
|
||||
|
@ -37,7 +35,7 @@ public:
|
|||
|
||||
// Open an event to let the game know the IME has started
|
||||
OrbisImeEvent openEvent{};
|
||||
openEvent.id = (ime_mode ? OrbisImeEventId::OPEN : OrbisImeEventId::KEYBOARD_OPEN);
|
||||
openEvent.id = (ime_mode ? OrbisImeEventId::Open : OrbisImeEventId::KeyboardOpen);
|
||||
|
||||
if (ime_mode) {
|
||||
sceImeGetPanelSize(&m_param.ime, &openEvent.param.rect.width,
|
||||
|
@ -45,8 +43,8 @@ public:
|
|||
openEvent.param.rect.x = m_param.ime.posx;
|
||||
openEvent.param.rect.y = m_param.ime.posy;
|
||||
} else {
|
||||
openEvent.param.resourceIdArray.userId = 1;
|
||||
openEvent.param.resourceIdArray.resourceId[0] = 1;
|
||||
openEvent.param.resource_id_array.userId = 1;
|
||||
openEvent.param.resource_id_array.resource_id[0] = 1;
|
||||
}
|
||||
|
||||
Execute(nullptr, &openEvent, true);
|
||||
|
@ -215,15 +213,15 @@ s32 PS4_SYSV_ABI sceImeGetPanelSize(const OrbisImeParam* param, u32* width, u32*
|
|||
}
|
||||
|
||||
switch (param->type) {
|
||||
case OrbisImeType::DEFAULT:
|
||||
case OrbisImeType::BASIC_LATIN:
|
||||
case OrbisImeType::URL:
|
||||
case OrbisImeType::MAIL:
|
||||
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:
|
||||
case OrbisImeType::Number:
|
||||
*width = 370;
|
||||
*height = 402;
|
||||
break;
|
||||
|
@ -315,7 +313,7 @@ void PS4_SYSV_ABI sceImeParamInit(OrbisImeParam* param) {
|
|||
}
|
||||
|
||||
memset(param, 0, sizeof(OrbisImeParam));
|
||||
param->userId = -1;
|
||||
param->user_id = -1;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceImeSetCandidateIndex() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue