mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-13 13:15:59 +00:00
Merge branch 'main' into Feature/initial-ps4-ime-keyboard
This commit is contained in:
commit
ea1988909d
5 changed files with 71 additions and 16 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();
|
||||||
|
|
|
@ -19,11 +19,40 @@ int PS4_SYSV_ABI sceSysmoduleGetModuleHandleInternal() {
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags, void* info) {
|
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags,
|
||||||
LOG_ERROR(Lib_SysModule, "(STUBBED) called");
|
Kernel::OrbisModuleInfoForUnwind* info) {
|
||||||
Kernel::OrbisModuleInfoForUnwind module_info;
|
LOG_TRACE(Lib_SysModule, "sceSysmoduleGetModuleInfoForUnwind(addr=0x{:X}, flags=0x{:X})", addr,
|
||||||
module_info.st_size = 0x130;
|
flags);
|
||||||
s32 res = Kernel::sceKernelGetModuleInfoForUnwind(addr, flags, &module_info);
|
|
||||||
|
s32 res = Kernel::sceKernelGetModuleInfoForUnwind(addr, flags, info);
|
||||||
|
if (res != 0) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static constexpr std::array<std::string_view, 17> modules_to_hide = {
|
||||||
|
"libc.prx",
|
||||||
|
"libc.sprx",
|
||||||
|
"libSceAudioLatencyEstimation.prx",
|
||||||
|
"libSceFace.prx",
|
||||||
|
"libSceFaceTracker.prx",
|
||||||
|
"libSceFios2.prx",
|
||||||
|
"libSceFios2.sprx",
|
||||||
|
"libSceFontGsm.prx",
|
||||||
|
"libSceHand.prx",
|
||||||
|
"libSceHandTracker.prx",
|
||||||
|
"libSceHeadTracker.prx",
|
||||||
|
"libSceJobManager.prx",
|
||||||
|
"libSceNpCppWebApi.prx",
|
||||||
|
"libSceNpToolkit.prx",
|
||||||
|
"libSceNpToolkit2.prx",
|
||||||
|
"libSceS3DConversion.prx",
|
||||||
|
"libSceSmart.prx",
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::string_view module_name = info->name.data();
|
||||||
|
if (std::ranges::find(modules_to_hide, module_name) != modules_to_hide.end()) {
|
||||||
|
std::ranges::fill(info->name, '\0');
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +85,6 @@ int PS4_SYSV_ABI sceSysmoduleIsLoadedInternal(OrbisSysModuleInternal id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceSysmoduleLoadModule(OrbisSysModule id) {
|
int PS4_SYSV_ABI sceSysmoduleLoadModule(OrbisSysModule id) {
|
||||||
auto color_name = magic_enum::enum_name(id);
|
|
||||||
LOG_ERROR(Lib_SysModule, "(DUMMY) called module = {}", magic_enum::enum_name(id));
|
LOG_ERROR(Lib_SysModule, "(DUMMY) called module = {}", magic_enum::enum_name(id));
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
#include "core/libraries/kernel/process.h"
|
||||||
|
|
||||||
namespace Core::Loader {
|
namespace Core::Loader {
|
||||||
class SymbolsResolver;
|
class SymbolsResolver;
|
||||||
|
@ -152,7 +153,8 @@ enum class OrbisSysModuleInternal : u32 {
|
||||||
};
|
};
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceSysmoduleGetModuleHandleInternal();
|
int PS4_SYSV_ABI sceSysmoduleGetModuleHandleInternal();
|
||||||
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags, void* info);
|
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags,
|
||||||
|
Kernel::OrbisModuleInfoForUnwind* info);
|
||||||
int PS4_SYSV_ABI sceSysmoduleIsCalledFromSysModule();
|
int PS4_SYSV_ABI sceSysmoduleIsCalledFromSysModule();
|
||||||
int PS4_SYSV_ABI sceSysmoduleIsCameraPreloaded();
|
int PS4_SYSV_ABI sceSysmoduleIsCameraPreloaded();
|
||||||
int PS4_SYSV_ABI sceSysmoduleIsLoaded(OrbisSysModule id);
|
int PS4_SYSV_ABI sceSysmoduleIsLoaded(OrbisSysModule id);
|
||||||
|
|
|
@ -142,7 +142,7 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, size_t size,
|
||||||
auto mapping_start = search_start > dmem_area->second.base
|
auto mapping_start = search_start > dmem_area->second.base
|
||||||
? Common::AlignUp(search_start, alignment)
|
? Common::AlignUp(search_start, alignment)
|
||||||
: Common::AlignUp(dmem_area->second.base, alignment);
|
: Common::AlignUp(dmem_area->second.base, alignment);
|
||||||
auto mapping_end = Common::AlignUp(mapping_start + size, alignment);
|
auto mapping_end = mapping_start + size;
|
||||||
|
|
||||||
// Find the first free, large enough dmem area in the range.
|
// Find the first free, large enough dmem area in the range.
|
||||||
while ((!dmem_area->second.is_free || dmem_area->second.GetEnd() < mapping_end) &&
|
while ((!dmem_area->second.is_free || dmem_area->second.GetEnd() < mapping_end) &&
|
||||||
|
@ -151,10 +151,8 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, size_t size,
|
||||||
dmem_area++;
|
dmem_area++;
|
||||||
|
|
||||||
// Update local variables based on the new dmem_area
|
// Update local variables based on the new dmem_area
|
||||||
mapping_start = search_start > dmem_area->second.base
|
mapping_start = Common::AlignUp(dmem_area->second.base, alignment);
|
||||||
? Common::AlignUp(search_start, alignment)
|
mapping_end = mapping_start + size;
|
||||||
: Common::AlignUp(dmem_area->second.base, alignment);
|
|
||||||
mapping_end = Common::AlignUp(mapping_start + size, alignment);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dmem_area == dmem_map.end()) {
|
if (dmem_area == dmem_map.end()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue