mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
Merge remote-tracking branch 'origin/main' into fix_lseek_for_xna
This commit is contained in:
commit
27aa629ebb
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -111,10 +111,10 @@ jobs:
|
||||
- name: Setup Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.7.3
|
||||
version: 6.8.2
|
||||
host: windows
|
||||
target: desktop
|
||||
arch: win64_msvc2019_64
|
||||
arch: win64_msvc2022_64
|
||||
archives: qtbase qttools
|
||||
modules: qtmultimedia
|
||||
|
||||
@ -228,7 +228,7 @@ jobs:
|
||||
- name: Setup Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.7.3
|
||||
version: 6.8.2
|
||||
host: mac
|
||||
target: desktop
|
||||
arch: clang_64
|
||||
|
11
.github/workflows/scripts/update_translation.sh
vendored
Executable file
11
.github/workflows/scripts/update_translation.sh
vendored
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo apt-get -y install qt6-l10n-tools python3
|
||||
|
||||
SCRIPT_PATH="src/qt_gui/translations/update_translation.sh"
|
||||
|
||||
chmod +x "$SCRIPT_PATH"
|
||||
|
||||
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPT_PATH"
|
31
.github/workflows/update_translation.yml
vendored
Normal file
31
.github/workflows/update_translation.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Update Translation
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Every day at 12am UTC.
|
||||
workflow_dispatch: # As well as manually.
|
||||
|
||||
jobs:
|
||||
update:
|
||||
if: github.repository == 'shadps4-emu/shadPS4'
|
||||
name: "Update Translation"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set execution permissions for the script
|
||||
run: chmod +x ./.github/workflows/scripts/update_translation.sh
|
||||
|
||||
- name: Update Base Translation
|
||||
run: ./.github/workflows/scripts/update_translation.sh
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
title: "Qt GUI: Update Translation"
|
||||
commit-message: "[ci skip] Qt GUI: Update Translation."
|
||||
committer: "shadPS4 Bot <Shadps4Boot@users.noreply.github.com>"
|
||||
author: "shadPS4 Bot <Shadps4Boot@users.noreply.github.com>"
|
||||
body: "Daily update of translation sources."
|
||||
branch: update-translation
|
||||
delete-branch: true
|
@ -399,6 +399,18 @@ set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h
|
||||
|
||||
set(LIBC_SOURCES src/core/libraries/libc_internal/libc_internal.cpp
|
||||
src/core/libraries/libc_internal/libc_internal.h
|
||||
src/core/libraries/libc_internal/libc_internal_mspace.cpp
|
||||
src/core/libraries/libc_internal/libc_internal_mspace.h
|
||||
src/core/libraries/libc_internal/libc_internal_io.cpp
|
||||
src/core/libraries/libc_internal/libc_internal_io.h
|
||||
src/core/libraries/libc_internal/libc_internal_memory.cpp
|
||||
src/core/libraries/libc_internal/libc_internal_memory.h
|
||||
src/core/libraries/libc_internal/libc_internal_str.cpp
|
||||
src/core/libraries/libc_internal/libc_internal_str.h
|
||||
src/core/libraries/libc_internal/libc_internal_stream.cpp
|
||||
src/core/libraries/libc_internal/libc_internal_stream.h
|
||||
src/core/libraries/libc_internal/libc_internal_math.cpp
|
||||
src/core/libraries/libc_internal/libc_internal_math.h
|
||||
)
|
||||
|
||||
set(IME_LIB src/core/libraries/ime/error_dialog.cpp
|
||||
@ -754,11 +766,11 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
||||
src/shader_recompiler/ir/passes/identity_removal_pass.cpp
|
||||
src/shader_recompiler/ir/passes/ir_passes.h
|
||||
src/shader_recompiler/ir/passes/lower_buffer_format_to_raw.cpp
|
||||
src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp
|
||||
src/shader_recompiler/ir/passes/resource_tracking_pass.cpp
|
||||
src/shader_recompiler/ir/passes/ring_access_elimination.cpp
|
||||
src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp
|
||||
src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp
|
||||
src/shader_recompiler/ir/passes/shared_memory_to_storage_pass.cpp
|
||||
src/shader_recompiler/ir/passes/ssa_rewrite_pass.cpp
|
||||
src/shader_recompiler/ir/abstract_syntax_list.h
|
||||
src/shader_recompiler/ir/attribute.cpp
|
||||
@ -1016,7 +1028,7 @@ if (APPLE)
|
||||
|
||||
if (ARCHITECTURE STREQUAL "x86_64")
|
||||
# Reserve system-managed memory space.
|
||||
target_link_options(shadps4 PRIVATE -Wl,-no_pie,-no_fixup_chains,-no_huge,-pagezero_size,0x4000,-segaddr,TCB_SPACE,0x4000,-segaddr,GUEST_SYSTEM,0x400000,-image_base,0x20000000000)
|
||||
target_link_options(shadps4 PRIVATE -Wl,-no_pie,-no_fixup_chains,-no_huge,-pagezero_size,0x4000,-segaddr,TCB_SPACE,0x4000,-segaddr,SYSTEM_MANAGED,0x400000,-segaddr,SYSTEM_RESERVED,0x7FFFFC000,-image_base,0x20000000000)
|
||||
endif()
|
||||
|
||||
# Replacement for std::chrono::time_zone
|
||||
|
@ -143,6 +143,9 @@ Logo is done by [**Xphalnos**](https://github.com/Xphalnos)
|
||||
If you want to contribute, please look the [**CONTRIBUTING.md**](https://github.com/shadps4-emu/shadPS4/blob/main/CONTRIBUTING.md) file.\
|
||||
Open a PR and we'll check it :)
|
||||
|
||||
# Translations
|
||||
|
||||
If you want to translate shadPS4 to your language we use [**crowdin**](https://crowdin.com/project/shadps4-emulator).
|
||||
# Contributors
|
||||
|
||||
<a href="https://github.com/shadps4-emu/shadPS4/graphs/contributors">
|
||||
|
@ -3,9 +3,12 @@ version = 1
|
||||
[[annotations]]
|
||||
path = [
|
||||
"REUSE.toml",
|
||||
"crowdin.yml",
|
||||
"CMakeSettings.json",
|
||||
".github/FUNDING.yml",
|
||||
".github/shadps4.png",
|
||||
".github/workflows/scripts/update_translation.sh",
|
||||
".github/workflows/update_translation.yml",
|
||||
".gitmodules",
|
||||
"dist/MacOSBundleInfo.plist.in",
|
||||
"dist/net.shadps4.shadPS4.desktop",
|
||||
@ -32,6 +35,7 @@ path = [
|
||||
"src/images/folder_icon.png",
|
||||
"src/images/github.png",
|
||||
"src/images/grid_icon.png",
|
||||
"src/images/keyboard_icon.png",
|
||||
"src/images/iconsize_icon.png",
|
||||
"src/images/ko-fi.png",
|
||||
"src/images/list_icon.png",
|
||||
@ -52,6 +56,7 @@ path = [
|
||||
"src/images/website.png",
|
||||
"src/shadps4.qrc",
|
||||
"src/shadps4.rc",
|
||||
"src/qt_gui/translations/update_translation.sh",
|
||||
]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "shadPS4 Emulator Project"
|
||||
|
3
crowdin.yml
Normal file
3
crowdin.yml
Normal file
@ -0,0 +1,3 @@
|
||||
files:
|
||||
- source: /src/qt_gui/translations/en_US.ts
|
||||
translation: /%original_path%/%locale_with_underscore%.ts
|
@ -37,6 +37,12 @@ sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declar
|
||||
sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers
|
||||
```
|
||||
|
||||
#### NixOS
|
||||
|
||||
```
|
||||
nix-shell shell.nix
|
||||
```
|
||||
|
||||
#### Other Linux distributions
|
||||
|
||||
You can try one of two methods:
|
||||
@ -49,7 +55,7 @@ distrobox create --name archlinux --init --image archlinux:latest
|
||||
```
|
||||
|
||||
and install the dependencies on that container as cited above.
|
||||
This option is **highly recommended** for NixOS and distributions with immutable/atomic filesystems (example: Fedora Kinoite, SteamOS).
|
||||
This option is **highly recommended** for distributions with immutable/atomic filesystems (example: Fedora Kinoite, SteamOS).
|
||||
|
||||
### Cloning
|
||||
|
||||
|
@ -25,7 +25,7 @@ Once you are within the installer:
|
||||
|
||||
Beware, this requires you to create a Qt account. If you do not want to do this, please follow the MSYS2/MinGW compilation method instead.
|
||||
|
||||
1. Under the current, non beta version of Qt (at the time of writing 6.7.3), select the option `MSVC 2022 64-bit` or similar, as well as `QT Multimedia`.
|
||||
1. Under the current, non beta version of Qt (at the time of writing 6.8.2), select the option `MSVC 2022 64-bit` or similar, as well as `QT Multimedia`.
|
||||
If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `MSVC 2022 ARM64` instead.
|
||||
|
||||
Go through the installation normally. If you know what you are doing, you may unselect individual components that eat up too much disk space.
|
||||
@ -35,7 +35,7 @@ Beware, this requires you to create a Qt account. If you do not want to do this,
|
||||
Once you are finished, you will have to configure Qt within Visual Studio:
|
||||
|
||||
1. Tools -> Options -> Qt -> Versions
|
||||
2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.7.3\msvc2022_64`
|
||||
2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.8.2\msvc2022_64`
|
||||
3. Enable the default checkmark on the new version you just created.
|
||||
|
||||
### (Prerequisite) Download [**Git for Windows**](https://git-scm.com/download/win)
|
||||
@ -55,7 +55,7 @@ Go through the Git for Windows installation as normal
|
||||
3. If you want to build shadPS4 with the Qt Gui:
|
||||
1. Click x64-Clang-Release and select "Manage Configurations"
|
||||
2. Look for "CMake command arguments" and add to the text field
|
||||
`-DENABLE_QT_GUI=ON -DCMAKE_PREFIX_PATH=C:\Qt\6.7.3\msvc2022_64`
|
||||
`-DENABLE_QT_GUI=ON -DCMAKE_PREFIX_PATH=C:\Qt\6.8.2\msvc2022_64`
|
||||
(Change Qt path if you've installed it to non-default path)
|
||||
3. Press CTRL+S to save and wait a moment for CMake generation
|
||||
4. Change the project to build to shadps4.exe
|
||||
@ -64,7 +64,7 @@ Go through the Git for Windows installation as normal
|
||||
Your shadps4.exe will be in `C:\path\to\source\Build\x64-Clang-Release\`
|
||||
|
||||
To automatically populate the necessary files to run shadPS4.exe, run in a command prompt or terminal:
|
||||
`C:\Qt\6.7.3\msvc2022_64\bin\windeployqt6.exe "C:\path\to\shadps4.exe"`
|
||||
`C:\Qt\6.8.2\msvc2022_64\bin\windeployqt6.exe "C:\path\to\shadps4.exe"`
|
||||
(Change Qt path if you've installed it to non-default path)
|
||||
|
||||
## Option 2: MSYS2/MinGW
|
||||
|
70
shell.nix
Normal file
70
shell.nix
Normal file
@ -0,0 +1,70 @@
|
||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
with import (fetchTarball "https://github.com/nixos/nixpkgs/archive/cfd19cdc54680956dc1816ac577abba6b58b901c.tar.gz") { };
|
||||
|
||||
pkgs.mkShell {
|
||||
name = "shadps4-build-env";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.llvmPackages_18.clang
|
||||
pkgs.cmake
|
||||
pkgs.pkg-config
|
||||
pkgs.git
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pkgs.alsa-lib
|
||||
pkgs.libpulseaudio
|
||||
pkgs.openal
|
||||
pkgs.openssl
|
||||
pkgs.zlib
|
||||
pkgs.libedit
|
||||
pkgs.udev
|
||||
pkgs.libevdev
|
||||
pkgs.SDL2
|
||||
pkgs.jack2
|
||||
pkgs.sndio
|
||||
pkgs.qt6.qtbase
|
||||
pkgs.qt6.qttools
|
||||
pkgs.qt6.qtmultimedia
|
||||
|
||||
pkgs.vulkan-headers
|
||||
pkgs.vulkan-utility-libraries
|
||||
pkgs.vulkan-tools
|
||||
|
||||
pkgs.ffmpeg
|
||||
pkgs.fmt
|
||||
pkgs.glslang
|
||||
pkgs.libxkbcommon
|
||||
pkgs.wayland
|
||||
pkgs.xorg.libxcb
|
||||
pkgs.xorg.xcbutil
|
||||
pkgs.xorg.xcbutilkeysyms
|
||||
pkgs.xorg.xcbutilwm
|
||||
pkgs.sdl3
|
||||
pkgs.stb
|
||||
pkgs.qt6.qtwayland
|
||||
pkgs.wayland-protocols
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Entering shadPS4 dev shell"
|
||||
export QT_QPA_PLATFORM="wayland"
|
||||
export QT_PLUGIN_PATH="${pkgs.qt6.qtwayland}/lib/qt-6/plugins:${pkgs.qt6.qtbase}/lib/qt-6/plugins"
|
||||
export QML2_IMPORT_PATH="${pkgs.qt6.qtbase}/lib/qt-6/qml"
|
||||
export CMAKE_PREFIX_PATH="${pkgs.vulkan-headers}:$CMAKE_PREFIX_PATH"
|
||||
|
||||
# OpenGL
|
||||
export LD_LIBRARY_PATH="${
|
||||
pkgs.lib.makeLibraryPath [
|
||||
pkgs.libglvnd
|
||||
pkgs.vulkan-tools
|
||||
]
|
||||
}:$LD_LIBRARY_PATH"
|
||||
|
||||
export LDFLAGS="-L${pkgs.llvmPackages_18.libcxx}/lib -lc++"
|
||||
export LC_ALL="C.UTF-8"
|
||||
export XAUTHORITY=${builtins.getEnv "XAUTHORITY"}
|
||||
'';
|
||||
}
|
@ -31,6 +31,7 @@ std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
|
||||
|
||||
namespace Config {
|
||||
|
||||
static bool isHDRAllowed = false;
|
||||
static bool isNeo = false;
|
||||
static bool isFullscreen = false;
|
||||
static std::string fullscreenMode = "borderless";
|
||||
@ -54,6 +55,7 @@ static bool isDebugDump = false;
|
||||
static bool isShaderDebug = false;
|
||||
static bool isShowSplash = false;
|
||||
static bool isAutoUpdate = false;
|
||||
static bool isAlwaysShowChangelog = false;
|
||||
static bool isNullGpu = false;
|
||||
static bool shouldCopyGPUBuffers = false;
|
||||
static bool shouldDumpShaders = false;
|
||||
@ -66,9 +68,12 @@ static bool vkCrashDiagnostic = false;
|
||||
static bool vkHostMarkers = false;
|
||||
static bool vkGuestMarkers = false;
|
||||
static bool rdocEnable = false;
|
||||
static bool isFpsColor = true;
|
||||
static s16 cursorState = HideCursorState::Idle;
|
||||
static int cursorHideTimeout = 5; // 5 seconds (default)
|
||||
static bool useUnifiedInputConfig = true;
|
||||
static bool overrideControllerColor = false;
|
||||
static int controllerCustomColorRGB[3] = {0, 0, 255};
|
||||
static bool separateupdatefolder = false;
|
||||
static bool compatibilityData = false;
|
||||
static bool checkCompatibilityOnStartup = false;
|
||||
@ -94,13 +99,17 @@ u32 m_window_size_H = 720;
|
||||
std::vector<std::string> m_pkg_viewer;
|
||||
std::vector<std::string> m_elf_viewer;
|
||||
std::vector<std::string> m_recent_files;
|
||||
std::string emulator_language = "en";
|
||||
std::string emulator_language = "en_US";
|
||||
static int backgroundImageOpacity = 50;
|
||||
static bool showBackgroundImage = true;
|
||||
|
||||
// Language
|
||||
u32 m_language = 1; // english
|
||||
|
||||
bool allowHDR() {
|
||||
return isHDRAllowed;
|
||||
}
|
||||
|
||||
bool GetUseUnifiedInputConfig() {
|
||||
return useUnifiedInputConfig;
|
||||
}
|
||||
@ -109,6 +118,24 @@ void SetUseUnifiedInputConfig(bool use) {
|
||||
useUnifiedInputConfig = use;
|
||||
}
|
||||
|
||||
bool GetOverrideControllerColor() {
|
||||
return overrideControllerColor;
|
||||
}
|
||||
|
||||
void SetOverrideControllerColor(bool enable) {
|
||||
overrideControllerColor = enable;
|
||||
}
|
||||
|
||||
int* GetControllerCustomColor() {
|
||||
return controllerCustomColorRGB;
|
||||
}
|
||||
|
||||
void SetControllerCustomColor(int r, int b, int g) {
|
||||
controllerCustomColorRGB[0] = r;
|
||||
controllerCustomColorRGB[1] = b;
|
||||
controllerCustomColorRGB[2] = g;
|
||||
}
|
||||
|
||||
std::string getTrophyKey() {
|
||||
return trophyKey;
|
||||
}
|
||||
@ -232,6 +259,10 @@ bool autoUpdate() {
|
||||
return isAutoUpdate;
|
||||
}
|
||||
|
||||
bool alwaysShowChangelog() {
|
||||
return isAlwaysShowChangelog;
|
||||
}
|
||||
|
||||
bool nullGpu() {
|
||||
return isNullGpu;
|
||||
}
|
||||
@ -252,6 +283,10 @@ bool isRdocEnabled() {
|
||||
return rdocEnable;
|
||||
}
|
||||
|
||||
bool fpsColor() {
|
||||
return isFpsColor;
|
||||
}
|
||||
|
||||
u32 vblankDiv() {
|
||||
return vblankDivider;
|
||||
}
|
||||
@ -332,10 +367,18 @@ void setAutoUpdate(bool enable) {
|
||||
isAutoUpdate = enable;
|
||||
}
|
||||
|
||||
void setAlwaysShowChangelog(bool enable) {
|
||||
isAlwaysShowChangelog = enable;
|
||||
}
|
||||
|
||||
void setNullGpu(bool enable) {
|
||||
isNullGpu = enable;
|
||||
}
|
||||
|
||||
void setAllowHDR(bool enable) {
|
||||
isHDRAllowed = enable;
|
||||
}
|
||||
|
||||
void setCopyGPUCmdBuffers(bool enable) {
|
||||
shouldCopyGPUBuffers = enable;
|
||||
}
|
||||
@ -651,6 +694,7 @@ void load(const std::filesystem::path& path) {
|
||||
if (data.contains("General")) {
|
||||
const toml::value& general = data.at("General");
|
||||
|
||||
isHDRAllowed = toml::find_or<bool>(general, "allowHDR", false);
|
||||
isNeo = toml::find_or<bool>(general, "isPS4Pro", false);
|
||||
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
|
||||
fullscreenMode = toml::find_or<std::string>(general, "FullscreenMode", "borderless");
|
||||
@ -668,6 +712,7 @@ void load(const std::filesystem::path& path) {
|
||||
}
|
||||
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
|
||||
isAutoUpdate = toml::find_or<bool>(general, "autoUpdate", false);
|
||||
isAlwaysShowChangelog = toml::find_or<bool>(general, "alwaysShowChangelog", false);
|
||||
separateupdatefolder = toml::find_or<bool>(general, "separateUpdateEnabled", false);
|
||||
compatibilityData = toml::find_or<bool>(general, "compatibilityEnabled", false);
|
||||
checkCompatibilityOnStartup =
|
||||
@ -717,6 +762,7 @@ void load(const std::filesystem::path& path) {
|
||||
|
||||
isDebugDump = toml::find_or<bool>(debug, "DebugDump", false);
|
||||
isShaderDebug = toml::find_or<bool>(debug, "CollectShader", false);
|
||||
isFpsColor = toml::find_or<bool>(debug, "FPSColor", true);
|
||||
}
|
||||
|
||||
if (data.contains("GUI")) {
|
||||
@ -748,7 +794,7 @@ void load(const std::filesystem::path& path) {
|
||||
m_elf_viewer = toml::find_or<std::vector<std::string>>(gui, "elfDirs", {});
|
||||
m_recent_files = toml::find_or<std::vector<std::string>>(gui, "recentFiles", {});
|
||||
m_table_mode = toml::find_or<int>(gui, "gameTableMode", 0);
|
||||
emulator_language = toml::find_or<std::string>(gui, "emulatorLanguage", "en");
|
||||
emulator_language = toml::find_or<std::string>(gui, "emulatorLanguage", "en_US");
|
||||
backgroundImageOpacity = toml::find_or<int>(gui, "backgroundImageOpacity", 50);
|
||||
showBackgroundImage = toml::find_or<bool>(gui, "showBackgroundImage", true);
|
||||
}
|
||||
@ -763,6 +809,18 @@ void load(const std::filesystem::path& path) {
|
||||
const toml::value& keys = data.at("Keys");
|
||||
trophyKey = toml::find_or<std::string>(keys, "TrophyKey", "");
|
||||
}
|
||||
|
||||
// Check if the loaded language is in the allowed list
|
||||
const std::vector<std::string> allowed_languages = {
|
||||
"ar_SA", "da_DK", "de_DE", "el_GR", "en_US", "es_ES", "fa_IR", "fi_FI", "fr_FR", "hu_HU",
|
||||
"id_ID", "it_IT", "ja_JP", "ko_KR", "lt_LT", "nb_NO", "nl_NL", "pl_PL", "pt_BR", "pt_PT",
|
||||
"ro_RO", "ru_RU", "sq_AL", "sv_SE", "tr_TR", "uk_UA", "vi_VN", "zh_CN", "zh_TW"};
|
||||
|
||||
if (std::find(allowed_languages.begin(), allowed_languages.end(), emulator_language) ==
|
||||
allowed_languages.end()) {
|
||||
emulator_language = "en_US"; // Default to en_US if not in the list
|
||||
save(path);
|
||||
}
|
||||
}
|
||||
|
||||
void save(const std::filesystem::path& path) {
|
||||
@ -786,6 +844,7 @@ void save(const std::filesystem::path& path) {
|
||||
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
|
||||
}
|
||||
|
||||
data["General"]["allowHDR"] = isHDRAllowed;
|
||||
data["General"]["isPS4Pro"] = isNeo;
|
||||
data["General"]["Fullscreen"] = isFullscreen;
|
||||
data["General"]["FullscreenMode"] = fullscreenMode;
|
||||
@ -800,6 +859,7 @@ void save(const std::filesystem::path& path) {
|
||||
data["General"]["chooseHomeTab"] = chooseHomeTab;
|
||||
data["General"]["showSplash"] = isShowSplash;
|
||||
data["General"]["autoUpdate"] = isAutoUpdate;
|
||||
data["General"]["alwaysShowChangelog"] = isAlwaysShowChangelog;
|
||||
data["General"]["separateUpdateEnabled"] = separateupdatefolder;
|
||||
data["General"]["compatibilityEnabled"] = compatibilityData;
|
||||
data["General"]["checkCompatibilityOnStartup"] = checkCompatibilityOnStartup;
|
||||
@ -827,6 +887,7 @@ void save(const std::filesystem::path& path) {
|
||||
data["Vulkan"]["rdocEnable"] = rdocEnable;
|
||||
data["Debug"]["DebugDump"] = isDebugDump;
|
||||
data["Debug"]["CollectShader"] = isShaderDebug;
|
||||
data["Debug"]["FPSColor"] = isFpsColor;
|
||||
|
||||
data["Keys"]["TrophyKey"] = trophyKey;
|
||||
|
||||
@ -894,6 +955,7 @@ void saveMainWindow(const std::filesystem::path& path) {
|
||||
}
|
||||
|
||||
void setDefaultValues() {
|
||||
isHDRAllowed = false;
|
||||
isNeo = false;
|
||||
isFullscreen = false;
|
||||
isTrophyPopupDisabled = false;
|
||||
@ -920,6 +982,7 @@ void setDefaultValues() {
|
||||
isShaderDebug = false;
|
||||
isShowSplash = false;
|
||||
isAutoUpdate = false;
|
||||
isAlwaysShowChangelog = false;
|
||||
isNullGpu = false;
|
||||
shouldDumpShaders = false;
|
||||
vblankDivider = 1;
|
||||
@ -930,7 +993,7 @@ void setDefaultValues() {
|
||||
vkHostMarkers = false;
|
||||
vkGuestMarkers = false;
|
||||
rdocEnable = false;
|
||||
emulator_language = "en";
|
||||
emulator_language = "en_US";
|
||||
m_language = 1;
|
||||
gpuId = -1;
|
||||
separateupdatefolder = false;
|
||||
@ -1010,6 +1073,8 @@ axis_right_y = axis_right_y
|
||||
# Range of deadzones: 1 (almost none) to 127 (max)
|
||||
analog_deadzone = leftjoystick, 2, 127
|
||||
analog_deadzone = rightjoystick, 2, 127
|
||||
|
||||
override_controller_color = false, 0, 0, 255
|
||||
)";
|
||||
}
|
||||
std::filesystem::path GetFoolproofKbmConfigFile(const std::string& game_id) {
|
||||
|
@ -47,27 +47,36 @@ int getSpecialPadClass();
|
||||
bool getIsMotionControlsEnabled();
|
||||
bool GetUseUnifiedInputConfig();
|
||||
void SetUseUnifiedInputConfig(bool use);
|
||||
bool GetOverrideControllerColor();
|
||||
void SetOverrideControllerColor(bool enable);
|
||||
int* GetControllerCustomColor();
|
||||
void SetControllerCustomColor(int r, int b, int g);
|
||||
|
||||
u32 getScreenWidth();
|
||||
u32 getScreenHeight();
|
||||
s32 getGpuId();
|
||||
bool allowHDR();
|
||||
|
||||
bool debugDump();
|
||||
bool collectShadersForDebug();
|
||||
bool showSplash();
|
||||
bool autoUpdate();
|
||||
bool alwaysShowChangelog();
|
||||
bool nullGpu();
|
||||
bool copyGPUCmdBuffers();
|
||||
bool dumpShaders();
|
||||
bool patchShaders();
|
||||
bool isRdocEnabled();
|
||||
bool fpsColor();
|
||||
u32 vblankDiv();
|
||||
|
||||
void setDebugDump(bool enable);
|
||||
void setCollectShaderForDebug(bool enable);
|
||||
void setShowSplash(bool enable);
|
||||
void setAutoUpdate(bool enable);
|
||||
void setAlwaysShowChangelog(bool enable);
|
||||
void setNullGpu(bool enable);
|
||||
void setAllowHDR(bool enable);
|
||||
void setCopyGPUCmdBuffers(bool enable);
|
||||
void setDumpShaders(bool enable);
|
||||
void setVblankDiv(u32 value);
|
||||
|
@ -80,6 +80,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
||||
SUB(Kernel, Sce) \
|
||||
CLS(Lib) \
|
||||
SUB(Lib, LibC) \
|
||||
SUB(Lib, LibcInternal) \
|
||||
SUB(Lib, Kernel) \
|
||||
SUB(Lib, Pad) \
|
||||
SUB(Lib, GnmDriver) \
|
||||
|
@ -47,6 +47,7 @@ enum class Class : u8 {
|
||||
Lib, ///< HLE implementation of system library. Each major library
|
||||
///< should have its own subclass.
|
||||
Lib_LibC, ///< The LibC implementation.
|
||||
Lib_LibcInternal, ///< The LibcInternal implementation.
|
||||
Lib_Kernel, ///< The LibKernel implementation.
|
||||
Lib_Pad, ///< The LibScePad implementation.
|
||||
Lib_GnmDriver, ///< The LibSceGnmDriver implementation.
|
||||
|
@ -21,7 +21,8 @@
|
||||
|
||||
#if defined(__APPLE__) && defined(ARCH_X86_64)
|
||||
// Reserve space for the system address space using a zerofill section.
|
||||
asm(".zerofill GUEST_SYSTEM,GUEST_SYSTEM,__guest_system,0xFBFC00000");
|
||||
asm(".zerofill SYSTEM_MANAGED,SYSTEM_MANAGED,__SYSTEM_MANAGED,0x7FFBFC000");
|
||||
asm(".zerofill SYSTEM_RESERVED,SYSTEM_RESERVED,__SYSTEM_RESERVED,0x7C0004000");
|
||||
#endif
|
||||
|
||||
namespace Core {
|
||||
|
@ -1041,10 +1041,10 @@ static bool TryExecuteIllegalInstruction(void* ctx, void* code_address) {
|
||||
if (length + index > 64) {
|
||||
// Undefined behavior if length + index is bigger than 64 according to the spec,
|
||||
// we'll warn and continue execution.
|
||||
LOG_WARNING(Core,
|
||||
"extrq at {} with length {} and index {} is bigger than 64, "
|
||||
"undefined behavior",
|
||||
fmt::ptr(code_address), length, index);
|
||||
LOG_TRACE(Core,
|
||||
"extrq at {} with length {} and index {} is bigger than 64, "
|
||||
"undefined behavior",
|
||||
fmt::ptr(code_address), length, index);
|
||||
}
|
||||
|
||||
lowQWordDst >>= index;
|
||||
@ -1101,10 +1101,10 @@ static bool TryExecuteIllegalInstruction(void* ctx, void* code_address) {
|
||||
if (length + index > 64) {
|
||||
// Undefined behavior if length + index is bigger than 64 according to the spec,
|
||||
// we'll warn and continue execution.
|
||||
LOG_WARNING(Core,
|
||||
"insertq at {} with length {} and index {} is bigger than 64, "
|
||||
"undefined behavior",
|
||||
fmt::ptr(code_address), length, index);
|
||||
LOG_TRACE(Core,
|
||||
"insertq at {} with length {} and index {} is bigger than 64, "
|
||||
"undefined behavior",
|
||||
fmt::ptr(code_address), length, index);
|
||||
}
|
||||
|
||||
lowQWordSrc &= mask;
|
||||
|
@ -259,7 +259,19 @@ void L::DrawAdvanced() {
|
||||
|
||||
void L::DrawSimple() {
|
||||
const float frameRate = DebugState.Framerate;
|
||||
if (Config::fpsColor()) {
|
||||
if (frameRate < 10) {
|
||||
PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.0f, 0.0f, 1.0f)); // Red
|
||||
} else if (frameRate >= 10 && frameRate < 20) {
|
||||
PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f)); // Orange
|
||||
} else {
|
||||
PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 1.0f, 1.0f)); // White
|
||||
}
|
||||
} else {
|
||||
PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 1.0f, 1.0f)); // White
|
||||
}
|
||||
Text("%d FPS (%.1f ms)", static_cast<int>(std::round(frameRate)), 1000.0f / frameRate);
|
||||
PopStyleColor();
|
||||
}
|
||||
|
||||
static void LoadSettings(const char* line) {
|
||||
|
@ -141,7 +141,12 @@ int AjmContext::BatchStartBuffer(u8* p_batch, u32 batch_size, const int priority
|
||||
*out_batch_id = batch_id.value();
|
||||
batch_info->id = *out_batch_id;
|
||||
|
||||
batch_queue.EmplaceWait(batch_info);
|
||||
if (!batch_info->jobs.empty()) {
|
||||
batch_queue.EmplaceWait(batch_info);
|
||||
} else {
|
||||
// Empty batches are not submitted to the processor and are marked as finished
|
||||
batch_info->finished.release();
|
||||
}
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -67,15 +67,15 @@ u32 PS4_SYSV_ABI sceGnmDrawInitToDefaultContextState(u32* cmdbuf, u32 size);
|
||||
u32 PS4_SYSV_ABI sceGnmDrawInitToDefaultContextState400(u32* cmdbuf, u32 size);
|
||||
int PS4_SYSV_ABI sceGnmDrawOpaqueAuto();
|
||||
bool PS4_SYSV_ABI sceGnmDriverCaptureInProgress();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterface();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuDebugger();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuException();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForHDRScopes();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForReplay();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForResourceRegistration();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation();
|
||||
u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterface();
|
||||
u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuDebugger();
|
||||
u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuException();
|
||||
u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForHDRScopes();
|
||||
u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForReplay();
|
||||
u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForResourceRegistration();
|
||||
u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation();
|
||||
int PS4_SYSV_ABI sceGnmDriverInternalVirtualQuery();
|
||||
int PS4_SYSV_ABI sceGnmDriverTraceInProgress();
|
||||
bool PS4_SYSV_ABI sceGnmDriverTraceInProgress();
|
||||
int PS4_SYSV_ABI sceGnmDriverTriggerCapture();
|
||||
int PS4_SYSV_ABI sceGnmEndWorkload(u64 workload);
|
||||
s32 PS4_SYSV_ABI sceGnmFindResourcesPublic();
|
||||
@ -95,7 +95,7 @@ int PS4_SYSV_ABI sceGnmGetNumTcaUnits();
|
||||
int PS4_SYSV_ABI sceGnmGetOffChipTessellationBufferSize();
|
||||
int PS4_SYSV_ABI sceGnmGetOwnerName();
|
||||
int PS4_SYSV_ABI sceGnmGetPhysicalCounterFromVirtualized();
|
||||
int PS4_SYSV_ABI sceGnmGetProtectionFaultTimeStamp();
|
||||
u32 PS4_SYSV_ABI sceGnmGetProtectionFaultTimeStamp();
|
||||
int PS4_SYSV_ABI sceGnmGetResourceBaseAddressAndSizeInBytes();
|
||||
int PS4_SYSV_ABI sceGnmGetResourceName();
|
||||
int PS4_SYSV_ABI sceGnmGetResourceShaderGuid();
|
||||
@ -104,8 +104,8 @@ int PS4_SYSV_ABI sceGnmGetResourceUserData();
|
||||
int PS4_SYSV_ABI sceGnmGetShaderProgramBaseAddress();
|
||||
int PS4_SYSV_ABI sceGnmGetShaderStatus();
|
||||
VAddr PS4_SYSV_ABI sceGnmGetTheTessellationFactorRingBufferBaseAddress();
|
||||
int PS4_SYSV_ABI sceGnmGpuPaDebugEnter();
|
||||
int PS4_SYSV_ABI sceGnmGpuPaDebugLeave();
|
||||
void PS4_SYSV_ABI sceGnmGpuPaDebugEnter();
|
||||
void PS4_SYSV_ABI sceGnmGpuPaDebugLeave();
|
||||
int PS4_SYSV_ABI sceGnmInsertDingDongMarker();
|
||||
s32 PS4_SYSV_ABI sceGnmInsertPopMarker(u32* cmdbuf, u32 size);
|
||||
s32 PS4_SYSV_ABI sceGnmInsertPushColorMarker(u32* cmdbuf, u32 size, const char* marker, u32 color);
|
||||
@ -115,7 +115,7 @@ s32 PS4_SYSV_ABI sceGnmInsertSetMarker(u32* cmdbuf, u32 size, const char* marker
|
||||
int PS4_SYSV_ABI sceGnmInsertThreadTraceMarker();
|
||||
s32 PS4_SYSV_ABI sceGnmInsertWaitFlipDone(u32* cmdbuf, u32 size, s32 vo_handle, u32 buf_idx);
|
||||
int PS4_SYSV_ABI sceGnmIsCoredumpValid();
|
||||
int PS4_SYSV_ABI sceGnmIsUserPaEnabled();
|
||||
bool PS4_SYSV_ABI sceGnmIsUserPaEnabled();
|
||||
int PS4_SYSV_ABI sceGnmLogicalCuIndexToPhysicalCuIndex();
|
||||
int PS4_SYSV_ABI sceGnmLogicalCuMaskToPhysicalCuMask();
|
||||
int PS4_SYSV_ABI sceGnmLogicalTcaUnitToPhysical();
|
||||
@ -130,7 +130,7 @@ int PS4_SYSV_ABI sceGnmPaHeartbeat();
|
||||
int PS4_SYSV_ABI sceGnmQueryResourceRegistrationUserMemoryRequirements();
|
||||
int PS4_SYSV_ABI sceGnmRaiseUserExceptionEvent();
|
||||
int PS4_SYSV_ABI sceGnmRegisterGdsResource();
|
||||
int PS4_SYSV_ABI sceGnmRegisterGnmLiveCallbackConfig();
|
||||
void PS4_SYSV_ABI sceGnmRegisterGnmLiveCallbackConfig();
|
||||
s32 PS4_SYSV_ABI sceGnmRegisterOwner(void* handle, const char* name);
|
||||
s32 PS4_SYSV_ABI sceGnmRegisterResource(void* res_handle, void* owner_handle, const void* addr,
|
||||
size_t size, const char* name, int res_type, u64 user_data);
|
||||
@ -227,7 +227,7 @@ int PS4_SYSV_ABI sceGnmUnregisterAllResourcesForOwner();
|
||||
int PS4_SYSV_ABI sceGnmUnregisterOwnerAndResources();
|
||||
int PS4_SYSV_ABI sceGnmUnregisterResource();
|
||||
s32 PS4_SYSV_ABI sceGnmUpdateGsShader(u32* cmdbuf, u32 size, const u32* gs_regs);
|
||||
int PS4_SYSV_ABI sceGnmUpdateHsShader();
|
||||
int PS4_SYSV_ABI sceGnmUpdateHsShader(u32* cmdbuf, u32 size, const u32* ps_regs, u32 ls_hs_config);
|
||||
s32 PS4_SYSV_ABI sceGnmUpdatePsShader(u32* cmdbuf, u32 size, const u32* ps_regs);
|
||||
s32 PS4_SYSV_ABI sceGnmUpdatePsShader350(u32* cmdbuf, u32 size, const u32* ps_regs);
|
||||
s32 PS4_SYSV_ABI sceGnmUpdateVsShader(u32* cmdbuf, u32 size, const u32* vs_regs,
|
||||
@ -240,14 +240,14 @@ int PS4_SYSV_ABI sceGnmValidateDrawCommandBuffers();
|
||||
int PS4_SYSV_ABI sceGnmValidateGetDiagnosticInfo();
|
||||
int PS4_SYSV_ABI sceGnmValidateGetDiagnostics();
|
||||
int PS4_SYSV_ABI sceGnmValidateGetVersion();
|
||||
int PS4_SYSV_ABI sceGnmValidateOnSubmitEnabled();
|
||||
bool PS4_SYSV_ABI sceGnmValidateOnSubmitEnabled();
|
||||
int PS4_SYSV_ABI sceGnmValidateResetState();
|
||||
int PS4_SYSV_ABI sceGnmValidationRegisterMemoryCheckCallback();
|
||||
int PS4_SYSV_ABI sceRazorCaptureCommandBuffersOnlyImmediate();
|
||||
int PS4_SYSV_ABI sceRazorCaptureCommandBuffersOnlySinceLastFlip();
|
||||
int PS4_SYSV_ABI sceRazorCaptureImmediate();
|
||||
int PS4_SYSV_ABI sceRazorCaptureSinceLastFlip();
|
||||
int PS4_SYSV_ABI sceRazorIsLoaded();
|
||||
bool PS4_SYSV_ABI sceRazorIsLoaded();
|
||||
int PS4_SYSV_ABI Func_063D065A2D6359C3();
|
||||
int PS4_SYSV_ABI Func_0CABACAFB258429D();
|
||||
int PS4_SYSV_ABI Func_150CF336FC2E99A3();
|
||||
|
@ -163,6 +163,11 @@ s32 PS4_SYSV_ABI sceKernelReserveVirtualRange(void** addr, u64 len, int flags, u
|
||||
int PS4_SYSV_ABI sceKernelMapNamedDirectMemory(void** addr, u64 len, int prot, int flags,
|
||||
s64 directMemoryStart, u64 alignment,
|
||||
const char* name) {
|
||||
LOG_INFO(Kernel_Vmm,
|
||||
"in_addr = {}, len = {:#x}, prot = {:#x}, flags = {:#x}, "
|
||||
"directMemoryStart = {:#x}, alignment = {:#x}, name = '{}'",
|
||||
fmt::ptr(*addr), len, prot, flags, directMemoryStart, alignment, name);
|
||||
|
||||
if (len == 0 || !Common::Is16KBAligned(len)) {
|
||||
LOG_ERROR(Kernel_Vmm, "Map size is either zero or not 16KB aligned!");
|
||||
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||
@ -181,17 +186,14 @@ int PS4_SYSV_ABI sceKernelMapNamedDirectMemory(void** addr, u64 len, int prot, i
|
||||
const VAddr in_addr = reinterpret_cast<VAddr>(*addr);
|
||||
const auto mem_prot = static_cast<Core::MemoryProt>(prot);
|
||||
const auto map_flags = static_cast<Core::MemoryMapFlags>(flags);
|
||||
SCOPE_EXIT {
|
||||
LOG_INFO(Kernel_Vmm,
|
||||
"in_addr = {:#x}, out_addr = {}, len = {:#x}, prot = {:#x}, flags = {:#x}, "
|
||||
"directMemoryStart = {:#x}, "
|
||||
"alignment = {:#x}",
|
||||
in_addr, fmt::ptr(*addr), len, prot, flags, directMemoryStart, alignment);
|
||||
};
|
||||
|
||||
auto* memory = Core::Memory::Instance();
|
||||
return memory->MapMemory(addr, in_addr, len, mem_prot, map_flags, Core::VMAType::Direct, "",
|
||||
false, directMemoryStart, alignment);
|
||||
const auto ret =
|
||||
memory->MapMemory(addr, in_addr, len, mem_prot, map_flags, Core::VMAType::Direct, "", false,
|
||||
directMemoryStart, alignment);
|
||||
|
||||
LOG_INFO(Kernel_Vmm, "out_addr = {}", fmt::ptr(*addr));
|
||||
return ret;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceKernelMapDirectMemory(void** addr, u64 len, int prot, int flags,
|
||||
|
@ -75,6 +75,9 @@ s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, size_t arg
|
||||
s32 PS4_SYSV_ABI sceKernelDlsym(s32 handle, const char* symbol, void** addrp) {
|
||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
auto* module = linker->GetModule(handle);
|
||||
if (module == nullptr) {
|
||||
return ORBIS_KERNEL_ERROR_ESRCH;
|
||||
}
|
||||
*addrp = module->FindByName(symbol);
|
||||
if (*addrp == nullptr) {
|
||||
return ORBIS_KERNEL_ERROR_ESRCH;
|
||||
|
@ -389,6 +389,9 @@ int PS4_SYSV_ABI posix_pthread_rename_np(PthreadT thread, const char* name) {
|
||||
if (thread == nullptr) {
|
||||
return POSIX_EINVAL;
|
||||
}
|
||||
if (name == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
LOG_INFO(Kernel_Pthread, "name = {}", name);
|
||||
Common::SetThreadName(reinterpret_cast<void*>(thread->native_thr.GetHandle()), name);
|
||||
thread->name = name;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -10,12 +10,9 @@ class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
void* PS4_SYSV_ABI internal_memset(void* s, int c, size_t n);
|
||||
void* PS4_SYSV_ABI internal_memcpy(void* dest, const void* src, size_t n);
|
||||
int PS4_SYSV_ABI internal_memcpy_s(void* dest, size_t destsz, const void* src, size_t count);
|
||||
int PS4_SYSV_ABI internal_strcpy_s(char* dest, size_t dest_size, const char* src);
|
||||
int PS4_SYSV_ABI internal_memcmp(const void* s1, const void* s2, size_t n);
|
||||
float PS4_SYSV_ABI internal_expf(float x);
|
||||
|
||||
// I won't manage definitons of 3000+ functions, and they don't need to be accessed externally,
|
||||
// so everything is just in the .cpp file
|
||||
|
||||
void RegisterlibSceLibcInternal(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
472
src/core/libraries/libc_internal/libc_internal_io.cpp
Normal file
472
src/core/libraries/libc_internal/libc_internal_io.cpp
Normal file
@ -0,0 +1,472 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "libc_internal_io.h"
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
|
||||
s32 PS4_SYSV_ABI internal___vfprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Printf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__WPrintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_asprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fwprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fwprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_printf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_printf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_snprintf(char* s, size_t n, const char* format, ...) {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_snprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_snwprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_sprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_sprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_swprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_swprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_swscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_swscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vasprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfwprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfwprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfwscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vfwscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vprintf(const char* format, va_list args) {
|
||||
// Copy the va_list because vsnprintf consumes it
|
||||
va_list args_copy;
|
||||
va_copy(args_copy, args);
|
||||
|
||||
// Calculate the required buffer size
|
||||
int size = std::vsnprintf(nullptr, 0, format, args_copy);
|
||||
va_end(args_copy);
|
||||
|
||||
if (size < 0) {
|
||||
// Handle vsnprintf error
|
||||
LOG_ERROR(Lib_LibcInternal, "vsnprintf failed to calculate size");
|
||||
return size;
|
||||
}
|
||||
|
||||
// Create a string with the required size
|
||||
std::string buffer(size, '\0');
|
||||
|
||||
// Format the string into the buffer
|
||||
int result =
|
||||
std::vsnprintf(buffer.data(), buffer.size() + 1, format, args); // +1 for null terminator
|
||||
if (result >= 0) {
|
||||
// Log the formatted result
|
||||
LOG_INFO(Lib_LibcInternal, "{}", buffer);
|
||||
} else {
|
||||
LOG_ERROR(Lib_LibcInternal, "vsnprintf failed during formatting");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vsnprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vsnprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vsnwprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vsprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vsprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vsscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vsscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vswprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vswprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vswscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vswscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vwprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vwprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vwscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_vwscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wprintf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wprintf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Scanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__WScanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fwscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fwscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_scanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_scanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_sscanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_sscanf_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void RegisterlibSceLibcInternalIo(Core::Loader::SymbolsResolver* sym) {
|
||||
|
||||
LIB_FUNCTION("yAZ5vOpmBus", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal___vfprintf);
|
||||
LIB_FUNCTION("FModQzwn1-4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Printf);
|
||||
LIB_FUNCTION("kvEP5-KOG1U", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__WPrintf);
|
||||
LIB_FUNCTION("cOYia2dE0Ik", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_asprintf);
|
||||
LIB_FUNCTION("fffwELXNVFA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fprintf);
|
||||
LIB_FUNCTION("-e-F9HjUFp8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fprintf_s);
|
||||
LIB_FUNCTION("ZRAcn3dPVmA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fwprintf);
|
||||
LIB_FUNCTION("9kOFELic7Pk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fwprintf_s);
|
||||
LIB_FUNCTION("a6CYO8YOzfw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fwscanf);
|
||||
LIB_FUNCTION("Bo5wtXSj4kc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fwscanf_s);
|
||||
LIB_FUNCTION("hcuQgD53UxM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_printf);
|
||||
LIB_FUNCTION("w1NxRBQqfmQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_printf_s);
|
||||
LIB_FUNCTION("eLdDw6l0-bU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_snprintf);
|
||||
LIB_FUNCTION("3BytPOQgVKc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_snprintf_s);
|
||||
LIB_FUNCTION("jbj2wBoiCyg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_snwprintf_s);
|
||||
LIB_FUNCTION("tcVi5SivF7Q", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sprintf);
|
||||
LIB_FUNCTION("xEszJVGpybs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sprintf_s);
|
||||
LIB_FUNCTION("1Pk0qZQGeWo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sscanf);
|
||||
LIB_FUNCTION("24m4Z4bUaoY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sscanf_s);
|
||||
LIB_FUNCTION("nJz16JE1txM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_swprintf);
|
||||
LIB_FUNCTION("Im55VJ-Bekc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_swprintf_s);
|
||||
LIB_FUNCTION("HNnWdT43ues", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_swscanf);
|
||||
LIB_FUNCTION("tQNolUV1q5A", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_swscanf_s);
|
||||
LIB_FUNCTION("qjBlw2cVMAM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vasprintf);
|
||||
LIB_FUNCTION("pDBDcY6uLSA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfprintf);
|
||||
LIB_FUNCTION("GhTZtaodo7o", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfprintf_s);
|
||||
LIB_FUNCTION("lckWSkHDBrY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfscanf);
|
||||
LIB_FUNCTION("JjPXy-HX5dY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfscanf_s);
|
||||
LIB_FUNCTION("M2bGWSqt764", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfwprintf);
|
||||
LIB_FUNCTION("XX9KWzJvRf0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfwprintf_s);
|
||||
LIB_FUNCTION("WF4fBmip+38", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfwscanf);
|
||||
LIB_FUNCTION("Wvm90I-TGl0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vfwscanf_s);
|
||||
LIB_FUNCTION("GMpvxPFW924", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vprintf);
|
||||
LIB_FUNCTION("YfJUGNPkbK4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vprintf_s);
|
||||
LIB_FUNCTION("j7Jk3yd3yC8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vscanf);
|
||||
LIB_FUNCTION("fQYpcUzy3zo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vscanf_s);
|
||||
LIB_FUNCTION("Q2V+iqvjgC0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vsnprintf);
|
||||
LIB_FUNCTION("rWSuTWY2JN0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vsnprintf_s);
|
||||
LIB_FUNCTION("8SKVXgeK1wY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vsnwprintf_s);
|
||||
LIB_FUNCTION("jbz9I9vkqkk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vsprintf);
|
||||
LIB_FUNCTION("+qitMEbkSWk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vsprintf_s);
|
||||
LIB_FUNCTION("UTrpOVLcoOA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vsscanf);
|
||||
LIB_FUNCTION("tfNbpqL3D0M", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vsscanf_s);
|
||||
LIB_FUNCTION("u0XOsuOmOzc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vswprintf);
|
||||
LIB_FUNCTION("oDoV9tyHTbA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vswprintf_s);
|
||||
LIB_FUNCTION("KGotca3AjYw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vswscanf);
|
||||
LIB_FUNCTION("39HHkIWrWNo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vswscanf_s);
|
||||
LIB_FUNCTION("QuF2rZGE-v8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vwprintf);
|
||||
LIB_FUNCTION("XPrliF5n-ww", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vwprintf_s);
|
||||
LIB_FUNCTION("QNwdOK7HfJU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vwscanf);
|
||||
LIB_FUNCTION("YgZ6qvFH3QI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_vwscanf_s);
|
||||
LIB_FUNCTION("OGVdXU3E-xg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wprintf);
|
||||
LIB_FUNCTION("FEtOJURNey0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wprintf_s);
|
||||
LIB_FUNCTION("D8JBAR3RiZQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wscanf);
|
||||
LIB_FUNCTION("RV7X3FrWfTI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wscanf_s);
|
||||
LIB_FUNCTION("s+MeMHbB1Ro", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Scanf);
|
||||
LIB_FUNCTION("fzgkSILqRHE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__WScanf);
|
||||
LIB_FUNCTION("npLpPTaSuHg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fscanf);
|
||||
LIB_FUNCTION("vj2WUi2LrfE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fscanf_s);
|
||||
LIB_FUNCTION("7XEv6NnznWw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_scanf);
|
||||
LIB_FUNCTION("-B76wP6IeVA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_scanf_s);
|
||||
}
|
||||
|
||||
} // namespace Libraries::LibcInternal
|
14
src/core/libraries/libc_internal/libc_internal_io.h
Normal file
14
src/core/libraries/libc_internal/libc_internal_io.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
void RegisterlibSceLibcInternalIo(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
773
src/core/libraries/libc_internal/libc_internal_math.cpp
Normal file
773
src/core/libraries/libc_internal/libc_internal_math.cpp
Normal file
@ -0,0 +1,773 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "libc_internal_mspace.h"
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
|
||||
s32 PS4_SYSV_ABI internal_abs() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_acos(double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::acos(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_acosf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::acosf(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_acosh(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::acosh(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_acoshf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::acoshf(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_acoshl(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::acoshl(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_acosl(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::acosl(x);
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_asin(double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::asin(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_asinf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::asinf(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_asinh(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::asinh(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_asinhf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::asinhf(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_asinhl(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::asinhl(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_asinl(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::asinl(x);
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_atan(double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::atan(x);
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_atan2(double y, double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::atan2(y, x);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_atan2f() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_atan2l() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_atanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_atanh() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_atanhf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_atanhl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_atanl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_ceil() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_ceilf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_ceill() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_cos(double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::cos(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_cosf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::cosf(x);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_cosh() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_coshf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_coshl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_cosl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_exp(double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::exp(x);
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_exp2(double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::exp2(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_exp2f(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::exp2f(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_exp2l(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::exp2l(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_expf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::expf(x);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_expl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_expm1() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_expm1f() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_expm1l() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fabs() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fabsf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fabsl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_floor() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_floorf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_floorl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fmax() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fmaxf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fmaxl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fmin() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fminf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fminl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fmod() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fmodf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_fmodl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_frexp() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_frexpf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_frexpl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_ilogb() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_ilogbf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_ilogbl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_imaxabs() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_imaxdiv() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_isinf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_islower() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_isnan() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_isnanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_isupper() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log10() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_log10f(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::log10f(x);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log10l() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log1p() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log1pf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log1pl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log2() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log2f() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_log2l() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_logb() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_logbf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_logbl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_logf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_logl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_lround() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_lroundf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_lroundl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_nan() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_nanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_nanl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_pow(double x, double y) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::pow(x, y);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_powf(float x, float y) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::powf(x, y);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_powl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_remainder() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_sin(double x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::sin(x);
|
||||
}
|
||||
|
||||
void PS4_SYSV_ABI internal_sincos(double x, double* sinp, double* cosp) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
*sinp = std::sin(x);
|
||||
*cosp = std::cos(x);
|
||||
}
|
||||
|
||||
void PS4_SYSV_ABI internal_sincosf(double x, double* sinp, double* cosp) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
*sinp = std::sinf(x);
|
||||
*cosp = std::cosf(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_sinf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::sinf(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_sinh(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::sinh(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_sinhf(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::sinhf(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_sinhl(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::sinhl(x);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_sinl(float x) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::sinl(x);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_sqrt() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_sqrtf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_sqrtl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_srand() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_tan() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_tanf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_tanh() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_tanhf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_tanhl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_tanl() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal__FSin(float arg, unsigned int m, int n) {
|
||||
ASSERT(n == 0);
|
||||
if (m != 0) {
|
||||
return cosf(arg);
|
||||
} else {
|
||||
return sinf(arg);
|
||||
}
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal__Sin(double x) {
|
||||
return sin(x);
|
||||
}
|
||||
|
||||
void RegisterlibSceLibcInternalMath(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("Ye20uNnlglA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_abs);
|
||||
LIB_FUNCTION("JBcgYuW8lPU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_acos);
|
||||
LIB_FUNCTION("QI-x0SL8jhw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_acosf);
|
||||
LIB_FUNCTION("Fk7-KFKZi-8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_acosh);
|
||||
LIB_FUNCTION("XJp2C-b0tRU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_acoshf);
|
||||
LIB_FUNCTION("u14Y1HFh0uY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_acoshl);
|
||||
LIB_FUNCTION("iH4YAIRcecA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_acosl);
|
||||
LIB_FUNCTION("7Ly52zaL44Q", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_asin);
|
||||
LIB_FUNCTION("GZWjF-YIFFk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_asinf);
|
||||
LIB_FUNCTION("2eQpqTjJ5Y4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_asinh);
|
||||
LIB_FUNCTION("yPPtp1RMihw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_asinhf);
|
||||
LIB_FUNCTION("iCl-Z-g-uuA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_asinhl);
|
||||
LIB_FUNCTION("Nx-F5v0-qU8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_asinl);
|
||||
LIB_FUNCTION("OXmauLdQ8kY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_atan);
|
||||
LIB_FUNCTION("HUbZmOnT-Dg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atan2);
|
||||
LIB_FUNCTION("EH-x713A99c", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atan2f);
|
||||
LIB_FUNCTION("9VeY8wiqf8M", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atan2l);
|
||||
LIB_FUNCTION("weDug8QD-lE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atanf);
|
||||
LIB_FUNCTION("YjbpxXpi6Zk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atanh);
|
||||
LIB_FUNCTION("cPGyc5FGjy0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atanhf);
|
||||
LIB_FUNCTION("a3BNqojL4LM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atanhl);
|
||||
LIB_FUNCTION("KvOHPTz595Y", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_atanl);
|
||||
LIB_FUNCTION("gacfOmO8hNs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_ceil);
|
||||
LIB_FUNCTION("GAUuLKGhsCw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_ceilf);
|
||||
LIB_FUNCTION("aJKn6X+40Z8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_ceill);
|
||||
LIB_FUNCTION("2WE3BTYVwKM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cos);
|
||||
LIB_FUNCTION("-P6FNMzk2Kc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cosf);
|
||||
LIB_FUNCTION("m7iLTaO9RMs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cosh);
|
||||
LIB_FUNCTION("RCQAffkEh9A", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_coshf);
|
||||
LIB_FUNCTION("XK2R46yx0jc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_coshl);
|
||||
LIB_FUNCTION("x8dc5Y8zFgc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cosl);
|
||||
LIB_FUNCTION("NVadfnzQhHQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_exp);
|
||||
LIB_FUNCTION("dnaeGXbjP6E", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_exp2);
|
||||
LIB_FUNCTION("wuAQt-j+p4o", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_exp2f);
|
||||
LIB_FUNCTION("9O1Xdko-wSo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_exp2l);
|
||||
LIB_FUNCTION("8zsu04XNsZ4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_expf);
|
||||
LIB_FUNCTION("qMp2fTDCyMo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_expl);
|
||||
LIB_FUNCTION("gqKfOiJaCOo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_expm1);
|
||||
LIB_FUNCTION("3EgxfDRefdw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_expm1f);
|
||||
LIB_FUNCTION("jVS263HH1b0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_expm1l);
|
||||
LIB_FUNCTION("388LcMWHRCA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_fabs);
|
||||
LIB_FUNCTION("fmT2cjPoWBs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fabsf);
|
||||
LIB_FUNCTION("w-AryX51ObA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fabsl);
|
||||
LIB_FUNCTION("mpcTgMzhUY8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_floor);
|
||||
LIB_FUNCTION("mKhVDmYciWA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_floorf);
|
||||
LIB_FUNCTION("06QaR1Cpn-k", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_floorl);
|
||||
LIB_FUNCTION("fiOgmWkP+Xc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_fmax);
|
||||
LIB_FUNCTION("Lyx2DzUL7Lc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fmaxf);
|
||||
LIB_FUNCTION("0H5TVprQSkA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fmaxl);
|
||||
LIB_FUNCTION("iU0z6SdUNbI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_fmin);
|
||||
LIB_FUNCTION("uVRcM2yFdP4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fminf);
|
||||
LIB_FUNCTION("DQ7K6s8euWY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fminl);
|
||||
LIB_FUNCTION("pKwslsMUmSk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_fmod);
|
||||
LIB_FUNCTION("88Vv-AzHVj8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fmodf);
|
||||
LIB_FUNCTION("A1R5T0xOyn8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_fmodl);
|
||||
LIB_FUNCTION("kA-TdiOCsaY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_frexp);
|
||||
LIB_FUNCTION("aaDMGGkXFxo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_frexpf);
|
||||
LIB_FUNCTION("YZk9sHO0yNg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_frexpl);
|
||||
LIB_FUNCTION("h6pVBKjcLiU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_ilogb);
|
||||
LIB_FUNCTION("0dQrYWd7g94", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_ilogbf);
|
||||
LIB_FUNCTION("wXs12eD3uvA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_ilogbl);
|
||||
LIB_FUNCTION("UgZ7Rhk60cQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_imaxabs);
|
||||
LIB_FUNCTION("V0X-mrfdM9E", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_imaxdiv);
|
||||
LIB_FUNCTION("2q5PPh7HsKE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_isinf);
|
||||
LIB_FUNCTION("KqYTqtSfGos", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_islower);
|
||||
LIB_FUNCTION("20qj+7O69XY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_isnan);
|
||||
LIB_FUNCTION("3pF7bUSIH8o", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_isnanf);
|
||||
LIB_FUNCTION("GcFKlTJEMkI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_isupper);
|
||||
LIB_FUNCTION("rtV7-jWC6Yg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_log);
|
||||
LIB_FUNCTION("WuMbPBKN1TU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log10);
|
||||
LIB_FUNCTION("lhpd6Wk6ccs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log10f);
|
||||
LIB_FUNCTION("CT4aR0tBgkQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log10l);
|
||||
LIB_FUNCTION("VfsML+n9cDM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log1p);
|
||||
LIB_FUNCTION("MFe91s8apQk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log1pf);
|
||||
LIB_FUNCTION("77qd0ksTwdI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log1pl);
|
||||
LIB_FUNCTION("Y5DhuDKGlnQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_log2);
|
||||
LIB_FUNCTION("hsi9drzHR2k", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log2f);
|
||||
LIB_FUNCTION("CfOrGjBj-RY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_log2l);
|
||||
LIB_FUNCTION("owKuegZU4ew", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_logb);
|
||||
LIB_FUNCTION("RWqyr1OKuw4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_logbf);
|
||||
LIB_FUNCTION("txJTOe0Db6M", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_logbl);
|
||||
LIB_FUNCTION("RQXLbdT2lc4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_logf);
|
||||
LIB_FUNCTION("EiHf-aLDImI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_logl);
|
||||
LIB_FUNCTION("J3XuGS-cC0Q", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_lround);
|
||||
LIB_FUNCTION("C6gWCWJKM+U", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_lroundf);
|
||||
LIB_FUNCTION("4ITASgL50uc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_lroundl);
|
||||
LIB_FUNCTION("zck+6bVj5pA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_nan);
|
||||
LIB_FUNCTION("DZU+K1wozGI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_nanf);
|
||||
LIB_FUNCTION("ZUvemFIkkhQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_nanl);
|
||||
LIB_FUNCTION("9LCjpWyQ5Zc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_pow);
|
||||
LIB_FUNCTION("1D0H2KNjshE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_powf);
|
||||
LIB_FUNCTION("95V3PF0kUEA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_powl);
|
||||
LIB_FUNCTION("pv2etu4pocs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_remainder);
|
||||
LIB_FUNCTION("H8ya2H00jbI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sin);
|
||||
LIB_FUNCTION("jMB7EFyu30Y", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sincos);
|
||||
LIB_FUNCTION("pztV4AF18iI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sincosf);
|
||||
LIB_FUNCTION("Q4rRL34CEeE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sinf);
|
||||
LIB_FUNCTION("ZjtRqSMJwdw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sinh);
|
||||
LIB_FUNCTION("1t1-JoZ0sZQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sinhf);
|
||||
LIB_FUNCTION("lYdqBvDgeHU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sinhl);
|
||||
LIB_FUNCTION("vxgqrJxDPHo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sinl);
|
||||
LIB_FUNCTION("MXRNWnosNlM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sqrt);
|
||||
LIB_FUNCTION("Q+xU11-h0xQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sqrtf);
|
||||
LIB_FUNCTION("RIkUZRadZgc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_sqrtl);
|
||||
LIB_FUNCTION("VPbJwTCgME0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_srand);
|
||||
LIB_FUNCTION("T7uyNqP7vQA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tan);
|
||||
LIB_FUNCTION("ZE6RNL+eLbk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tanf);
|
||||
LIB_FUNCTION("JM4EBvWT9rc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tanh);
|
||||
LIB_FUNCTION("SAd0Z3wKwLA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_tanhf);
|
||||
LIB_FUNCTION("JCmHsYVc2eo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_tanhl);
|
||||
LIB_FUNCTION("QL+3q43NfEA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tanl);
|
||||
LIB_FUNCTION("ZtjspkJQ+vw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__FSin);
|
||||
LIB_FUNCTION("cCXjU72Z0Ow", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal__Sin);
|
||||
}
|
||||
|
||||
} // namespace Libraries::LibcInternal
|
14
src/core/libraries/libc_internal/libc_internal_math.h
Normal file
14
src/core/libraries/libc_internal/libc_internal_math.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
void RegisterlibSceLibcInternalMath(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
314
src/core/libraries/libc_internal/libc_internal_memory.cpp
Normal file
314
src/core/libraries/libc_internal/libc_internal_memory.cpp
Normal file
@ -0,0 +1,314 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "libc_internal_memory.h"
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
|
||||
s32 PS4_SYSV_ABI internal__malloc_finalize_lv2() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__malloc_fini() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__malloc_init() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__malloc_init_lv2() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__malloc_postfork() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__malloc_prefork() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__malloc_thread_cleanup() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__sceLibcGetMallocParam() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_operator_new(size_t size) {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc(size_t size) {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_check_memory_bounds() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_finalize() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_get_footer_value() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_get_malloc_state() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_initialize() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_report_memory_blocks() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_stats() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_stats_fast() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_malloc_usable_size() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memchr() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memcmp(const void* s1, const void* s2, size_t n) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::memcmp(s1, s2, n);
|
||||
}
|
||||
|
||||
void* PS4_SYSV_ABI internal_memcpy(void* dest, const void* src, size_t n) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::memcpy(dest, src, n);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memcpy_s(void* dest, size_t destsz, const void* src, size_t count) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
#ifdef _WIN64
|
||||
return memcpy_s(dest, destsz, src, count);
|
||||
#else
|
||||
std::memcpy(dest, src, count);
|
||||
return 0; // ALL OK
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memmove(void* d, void* s, size_t n) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
std::memmove(d, s, n);
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memmove_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memrchr() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void* PS4_SYSV_ABI internal_memset(void* s, int c, size_t n) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::memset(s, c, n);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_memset_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_posix_memalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_realloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_reallocalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_reallocf() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wmemchr() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wmemcmp() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wmemcpy() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wmemcpy_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wmemmove() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wmemmove_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wmemset() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void PS4_SYSV_ABI internal_operator_delete(void* ptr) {
|
||||
if (ptr) {
|
||||
std::free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
void PS4_SYSV_ABI internal_free(void* ptr) {
|
||||
std::free(ptr);
|
||||
}
|
||||
|
||||
void RegisterlibSceLibcInternalMemory(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("RnqlvEmvkdw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__malloc_finalize_lv2);
|
||||
LIB_FUNCTION("21KFhEQDJ3s", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__malloc_fini);
|
||||
LIB_FUNCTION("z8GPiQwaAEY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__malloc_init);
|
||||
LIB_FUNCTION("20cUk0qX9zo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__malloc_init_lv2);
|
||||
LIB_FUNCTION("V94pLruduLg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__malloc_postfork);
|
||||
LIB_FUNCTION("aLYyS4Kx6rQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__malloc_prefork);
|
||||
LIB_FUNCTION("Sopthb9ztZI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__malloc_thread_cleanup);
|
||||
LIB_FUNCTION("1nZ4Xfnyp38", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__sceLibcGetMallocParam);
|
||||
LIB_FUNCTION("fJnpuVVBbKk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_operator_new);
|
||||
LIB_FUNCTION("cVSk9y8URbc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_posix_memalign);
|
||||
LIB_FUNCTION("Ujf3KzMvRmI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memalign);
|
||||
LIB_FUNCTION("8u8lPzUEq+U", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memchr);
|
||||
LIB_FUNCTION("DfivPArhucg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memcmp);
|
||||
LIB_FUNCTION("Q3VBxCXhUHs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memcpy);
|
||||
LIB_FUNCTION("NFLs+dRJGNg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memcpy_s);
|
||||
LIB_FUNCTION("+P6FRGH4LfA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memmove);
|
||||
LIB_FUNCTION("B59+zQQCcbU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memmove_s);
|
||||
LIB_FUNCTION("5G2ONUzRgjY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memrchr);
|
||||
LIB_FUNCTION("8zTFvBIAIN8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memset);
|
||||
LIB_FUNCTION("h8GwqPFbu6I", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_memset_s);
|
||||
LIB_FUNCTION("Y7aJ1uydPMo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_realloc);
|
||||
LIB_FUNCTION("OGybVuPAhAY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_reallocalign);
|
||||
LIB_FUNCTION("YMZO9ChZb0E", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_reallocf);
|
||||
LIB_FUNCTION("fnUEjBCNRVU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wmemchr);
|
||||
LIB_FUNCTION("QJ5xVfKkni0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wmemcmp);
|
||||
LIB_FUNCTION("fL3O02ypZFE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wmemcpy);
|
||||
LIB_FUNCTION("BTsuaJ6FxKM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wmemcpy_s);
|
||||
LIB_FUNCTION("Noj9PsJrsa8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wmemmove);
|
||||
LIB_FUNCTION("F8b+Wb-YQVs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wmemmove_s);
|
||||
LIB_FUNCTION("Al8MZJh-4hM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wmemset);
|
||||
LIB_FUNCTION("gQX+4GDQjpM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc);
|
||||
LIB_FUNCTION("ECOPpUQEch0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_check_memory_bounds);
|
||||
LIB_FUNCTION("J6FoFNydpFI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_finalize);
|
||||
LIB_FUNCTION("SlG1FN-y0N0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_get_footer_value);
|
||||
LIB_FUNCTION("Nmezc1Lh7TQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_get_malloc_state);
|
||||
LIB_FUNCTION("owT6zLJxrTs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_initialize);
|
||||
LIB_FUNCTION("0F08WOP8G3s", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_report_memory_blocks);
|
||||
LIB_FUNCTION("CC-BLMBu9-I", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_stats);
|
||||
LIB_FUNCTION("KuOuD58hqn4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_stats_fast);
|
||||
LIB_FUNCTION("NDcSfcYZRC8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_malloc_usable_size);
|
||||
LIB_FUNCTION("MLWl90SFWNE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_operator_delete);
|
||||
LIB_FUNCTION("tIhsqj0qsFE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_free);
|
||||
}
|
||||
|
||||
} // namespace Libraries::LibcInternal
|
14
src/core/libraries/libc_internal/libc_internal_memory.h
Normal file
14
src/core/libraries/libc_internal/libc_internal_memory.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
void RegisterlibSceLibcInternalMemory(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
247
src/core/libraries/libc_internal/libc_internal_mspace.cpp
Normal file
247
src/core/libraries/libc_internal/libc_internal_mspace.cpp
Normal file
@ -0,0 +1,247 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "libc_internal_mspace.h"
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceAlignedAlloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceCalloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void* PS4_SYSV_ABI sceLibcMspaceCreate(char* name, u64 param_2, u64 param_3, u32 param_4,
|
||||
s8* param_5) {
|
||||
UNREACHABLE_MSG("Missing sceLibcMspace impementation!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceDestroy() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceFree() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceGetAddressRanges() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceIsHeapEmpty() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceMalloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceMallocStats() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceMallocStatsFast() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceMallocUsableSize() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceMemalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspacePosixMemalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceRealloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceReallocalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcMspaceSetMallocCallback() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceCalloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceCheckMemoryBounds() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceCreate() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceDestroy() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceFree() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceGetFooterValue() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceIsHeapEmpty() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceMalloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceMallocStats() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceMallocStatsFast() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceMallocUsableSize() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceMemalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspacePosixMemalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceRealloc() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceReallocalign() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceReportMemoryBlocks() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceLibcPafMspaceTrim() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void RegisterlibSceLibcInternalMspace(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("ljkqMcC4-mk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceAlignedAlloc);
|
||||
LIB_FUNCTION("LYo3GhIlB38", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceCalloc);
|
||||
LIB_FUNCTION("-hn1tcVHq5Q", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceCreate);
|
||||
LIB_FUNCTION("W6SiVSiCDtI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceDestroy);
|
||||
LIB_FUNCTION("Vla-Z+eXlxo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceFree);
|
||||
LIB_FUNCTION("raRgiuQfvWk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceGetAddressRanges);
|
||||
LIB_FUNCTION("pzUa7KEoydw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceIsHeapEmpty);
|
||||
LIB_FUNCTION("OJjm-QOIHlI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceMalloc);
|
||||
LIB_FUNCTION("mfHdJTIvhuo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceMallocStats);
|
||||
LIB_FUNCTION("k04jLXu3+Ic", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceMallocStatsFast);
|
||||
LIB_FUNCTION("fEoW6BJsPt4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceMallocUsableSize);
|
||||
LIB_FUNCTION("iF1iQHzxBJU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceMemalign);
|
||||
LIB_FUNCTION("qWESlyXMI3E", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspacePosixMemalign);
|
||||
LIB_FUNCTION("gigoVHZvVPE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceRealloc);
|
||||
LIB_FUNCTION("p6lrRW8-MLY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceReallocalign);
|
||||
LIB_FUNCTION("+CbwGRMnlfU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcMspaceSetMallocCallback);
|
||||
LIB_FUNCTION("-lZdT34nAAE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceCalloc);
|
||||
LIB_FUNCTION("Pcq7UoYAcFE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceCheckMemoryBounds);
|
||||
LIB_FUNCTION("6hdfGRKHefs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceCreate);
|
||||
LIB_FUNCTION("qB5nGjWa-bk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceDestroy);
|
||||
LIB_FUNCTION("9mMuuhXMwqQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceFree);
|
||||
LIB_FUNCTION("kv4kgdjswN0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceGetFooterValue);
|
||||
LIB_FUNCTION("htdTOnMxDbQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceIsHeapEmpty);
|
||||
LIB_FUNCTION("QuZzFJD5Hrw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceMalloc);
|
||||
LIB_FUNCTION("mO8NB8whKy8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceMallocStats);
|
||||
LIB_FUNCTION("OmG3YPCBLJs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceMallocStatsFast);
|
||||
LIB_FUNCTION("6JcY5RDA4jY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceMallocUsableSize);
|
||||
LIB_FUNCTION("PKJcFUfhKtw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceMemalign);
|
||||
LIB_FUNCTION("7hOUKGcT6jM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspacePosixMemalign);
|
||||
LIB_FUNCTION("u32UXVridxQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceRealloc);
|
||||
LIB_FUNCTION("4SvlEtd0j40", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceReallocalign);
|
||||
LIB_FUNCTION("0FnzR6qum90", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceReportMemoryBlocks);
|
||||
LIB_FUNCTION("AUYdq63RG3U", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
sceLibcPafMspaceTrim);
|
||||
}
|
||||
|
||||
} // namespace Libraries::LibcInternal
|
14
src/core/libraries/libc_internal/libc_internal_mspace.h
Normal file
14
src/core/libraries/libc_internal/libc_internal_mspace.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
void RegisterlibSceLibcInternalMspace(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
532
src/core/libraries/libc_internal/libc_internal_str.cpp
Normal file
532
src/core/libraries/libc_internal/libc_internal_str.cpp
Normal file
@ -0,0 +1,532 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "libc_internal_str.h"
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
|
||||
s32 PS4_SYSV_ABI internal__CStrftime() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__CStrxfrm() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Getstr() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stod() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stodx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stof() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoflt() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stofx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stold() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoldx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoll() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stollx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stolx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stopfx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoul() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoull() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoullx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoulx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Stoxflt() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Strcollx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Strerror() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal__Strxfrmx() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strcasecmp(const char* str1, const char* str2) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
#ifdef _WIN32
|
||||
return _stricmp(str1, str2);
|
||||
#else
|
||||
return strcasecmp(str1, str2);
|
||||
#endif
|
||||
}
|
||||
|
||||
char* PS4_SYSV_ABI internal_strcat(char* dest, const char* src) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strcat(dest, src);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strcat_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
const char* PS4_SYSV_ABI internal_strchr(const char* str, int c) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strchr(str, c);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strcmp(const char* str1, const char* str2) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strcmp(str1, str2);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strcoll() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
char* PS4_SYSV_ABI internal_strcpy(char* dest, const char* src) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strcpy(dest, src);
|
||||
}
|
||||
|
||||
char* PS4_SYSV_ABI internal_strcpy_s(char* dest, u64 len, const char* src) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strncpy(dest, src, len);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strcspn(const char* str1, const char* str2) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strcspn(str1, str2);
|
||||
}
|
||||
|
||||
char* PS4_SYSV_ABI internal_strdup(const char* str1) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
char* dup = (char*)std::malloc(std::strlen(str1) + 1);
|
||||
if (dup != NULL)
|
||||
strcpy(dup, str1);
|
||||
return dup;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strerror() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strerror_r() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strerror_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strerrorlen_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strftime() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strlcat() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strlcpy() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
size_t PS4_SYSV_ABI internal_strlen(const char* str) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strlen(str);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strncasecmp(const char* str1, const char* str2, size_t num) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
#ifdef _WIN32
|
||||
return _strnicmp(str1, str2, num);
|
||||
#else
|
||||
return strncasecmp(str1, str2, num);
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strncat() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strncat_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strncmp(const char* str1, const char* str2, size_t num) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strncmp(str1, str2, num);
|
||||
}
|
||||
|
||||
char* PS4_SYSV_ABI internal_strncpy(char* dest, const char* src, std::size_t count) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strncpy(dest, src, count);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strncpy_s(char* dest, size_t destsz, const char* src, size_t count) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
#ifdef _WIN64
|
||||
return strncpy_s(dest, destsz, src, count);
|
||||
#else
|
||||
std::strcpy(dest, src);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strndup() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strnlen(const char* str, size_t maxlen) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::min(std::strlen(str), maxlen);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strnlen_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strnstr() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
const char* PS4_SYSV_ABI internal_strpbrk(const char* str1, const char* str2) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strpbrk(str1, str2);
|
||||
}
|
||||
|
||||
const char* PS4_SYSV_ABI internal_strrchr(const char* str, int c) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strrchr(str, c);
|
||||
}
|
||||
|
||||
char* PS4_SYSV_ABI internal_strsep(char** strp, const char* delim) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
#ifdef _GNU_SOURCE
|
||||
return strsep(strp, delim);
|
||||
#else
|
||||
if (!*strp)
|
||||
return nullptr;
|
||||
char* token = *strp;
|
||||
*strp = std::strpbrk(token, delim);
|
||||
if (*strp)
|
||||
*(*strp)++ = '\0';
|
||||
return token;
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strspn(const char* str1, const char* str2) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strspn(str1, str2);
|
||||
}
|
||||
|
||||
char* PS4_SYSV_ABI internal_strstr(char* h, char* n) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strstr(h, n);
|
||||
}
|
||||
|
||||
double PS4_SYSV_ABI internal_strtod(const char* str, char** endptr) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strtod(str, endptr);
|
||||
}
|
||||
|
||||
float PS4_SYSV_ABI internal_strtof(const char* str, char** endptr) {
|
||||
LOG_DEBUG(Lib_LibcInternal, "called");
|
||||
return std::strtof(str, endptr);
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtoimax() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtok() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtok_r() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtok_s() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtol() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtold() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtoll() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtoul() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtoull() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtoumax() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strtouq() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_strxfrm() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI internal_wcsstr() {
|
||||
LOG_ERROR(Lib_LibcInternal, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void RegisterlibSceLibcInternalStr(Core::Loader::SymbolsResolver* sym) {
|
||||
|
||||
LIB_FUNCTION("ykNF6P3ZsdA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__CStrftime);
|
||||
LIB_FUNCTION("we-vQBAugV8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__CStrxfrm);
|
||||
LIB_FUNCTION("i2yN6xBwooo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Getstr);
|
||||
LIB_FUNCTION("c41UEHVtiEA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stod);
|
||||
LIB_FUNCTION("QlcJbyd6jxM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stodx);
|
||||
LIB_FUNCTION("CpWcnrEZbLA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stof);
|
||||
LIB_FUNCTION("wO1-omboFjo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoflt);
|
||||
LIB_FUNCTION("7dlAxeH-htg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stofx);
|
||||
LIB_FUNCTION("iNbtyJKM0iQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stold);
|
||||
LIB_FUNCTION("BKidCxmLC5w", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoldx);
|
||||
LIB_FUNCTION("7pNKcscKrf8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoll);
|
||||
LIB_FUNCTION("mOnfZ5aNDQE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stollx);
|
||||
LIB_FUNCTION("Ecwid6wJMhY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stolx);
|
||||
LIB_FUNCTION("yhbF6MbVuYc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stopfx);
|
||||
LIB_FUNCTION("zlfEH8FmyUA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoul);
|
||||
LIB_FUNCTION("q+9E0X3aWpU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoull);
|
||||
LIB_FUNCTION("pSpDCDyxkaY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoullx);
|
||||
LIB_FUNCTION("YDnLaav6W6Q", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoulx);
|
||||
LIB_FUNCTION("Ouz5Q8+SUq4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Stoxflt);
|
||||
LIB_FUNCTION("v6rXYSx-WGA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Strcollx);
|
||||
LIB_FUNCTION("4F11tHMpJa0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Strerror);
|
||||
LIB_FUNCTION("CpiD2ZXrhNo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal__Strxfrmx);
|
||||
LIB_FUNCTION("AV6ipCNa4Rw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcasecmp);
|
||||
LIB_FUNCTION("Ls4tzzhimqQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcat);
|
||||
LIB_FUNCTION("K+gcnFFJKVc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcat_s);
|
||||
LIB_FUNCTION("ob5xAW4ln-0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strchr);
|
||||
LIB_FUNCTION("Ovb2dSJOAuE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcmp);
|
||||
LIB_FUNCTION("gjbmYpP-XJQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcoll);
|
||||
LIB_FUNCTION("kiZSXIWd9vg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcpy);
|
||||
LIB_FUNCTION("5Xa2ACNECdo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcpy_s);
|
||||
LIB_FUNCTION("q0F6yS-rCms", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strcspn);
|
||||
LIB_FUNCTION("g7zzzLDYGw0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strdup);
|
||||
LIB_FUNCTION("RIa6GnWp+iU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strerror);
|
||||
LIB_FUNCTION("RBcs3uut1TA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strerror_r);
|
||||
LIB_FUNCTION("o+ok6Y+DtgY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strerror_s);
|
||||
LIB_FUNCTION("-g26XITGVgE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strerrorlen_s);
|
||||
LIB_FUNCTION("Av3zjWi64Kw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strftime);
|
||||
LIB_FUNCTION("ByfjUZsWiyg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strlcat);
|
||||
LIB_FUNCTION("SfQIZcqvvms", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strlcpy);
|
||||
LIB_FUNCTION("j4ViWNHEgww", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strlen);
|
||||
LIB_FUNCTION("pXvbDfchu6k", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strncasecmp);
|
||||
LIB_FUNCTION("kHg45qPC6f0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strncat);
|
||||
LIB_FUNCTION("NC4MSB+BRQg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strncat_s);
|
||||
LIB_FUNCTION("aesyjrHVWy4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strncmp);
|
||||
LIB_FUNCTION("6sJWiWSRuqk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strncpy);
|
||||
LIB_FUNCTION("YNzNkJzYqEg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strncpy_s);
|
||||
LIB_FUNCTION("XGnuIBmEmyk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strndup);
|
||||
LIB_FUNCTION("5jNubw4vlAA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strnlen);
|
||||
LIB_FUNCTION("DQbtGaBKlaw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strnlen_s);
|
||||
LIB_FUNCTION("Xnrfb2-WhVw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strnstr);
|
||||
LIB_FUNCTION("kDZvoVssCgQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strpbrk);
|
||||
LIB_FUNCTION("9yDWMxEFdJU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strrchr);
|
||||
LIB_FUNCTION("cJWGxiQPmDQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strsep);
|
||||
LIB_FUNCTION("-kU6bB4M-+k", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strspn);
|
||||
LIB_FUNCTION("viiwFMaNamA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strstr);
|
||||
LIB_FUNCTION("2vDqwBlpF-o", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtod);
|
||||
LIB_FUNCTION("xENtRue8dpI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtof);
|
||||
LIB_FUNCTION("q5MWYCDfu3c", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtoimax);
|
||||
LIB_FUNCTION("oVkZ8W8-Q8A", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtok);
|
||||
LIB_FUNCTION("enqPGLfmVNU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtok_r);
|
||||
LIB_FUNCTION("-vXEQdRADLI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtok_s);
|
||||
LIB_FUNCTION("mXlxhmLNMPg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtol);
|
||||
LIB_FUNCTION("nW9JRkciRk4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtold);
|
||||
LIB_FUNCTION("VOBg+iNwB-4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtoll);
|
||||
LIB_FUNCTION("QxmSHBCuKTk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtoul);
|
||||
LIB_FUNCTION("5OqszGpy7Mg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtoull);
|
||||
LIB_FUNCTION("QNyUWGXmXNc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtoumax);
|
||||
LIB_FUNCTION("g-McpZfseZo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strtouq);
|
||||
LIB_FUNCTION("zogPrkd46DY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_strxfrm);
|
||||
LIB_FUNCTION("WDpobjImAb4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1,
|
||||
internal_wcsstr);
|
||||
}
|
||||
|
||||
} // namespace Libraries::LibcInternal
|
14
src/core/libraries/libc_internal/libc_internal_str.h
Normal file
14
src/core/libraries/libc_internal/libc_internal_str.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
void RegisterlibSceLibcInternalStr(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
3139
src/core/libraries/libc_internal/libc_internal_stream.cpp
Normal file
3139
src/core/libraries/libc_internal/libc_internal_stream.cpp
Normal file
File diff suppressed because it is too large
Load Diff
14
src/core/libraries/libc_internal/libc_internal_stream.h
Normal file
14
src/core/libraries/libc_internal/libc_internal_stream.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::LibcInternal {
|
||||
void RegisterlibSceLibcInternalStream(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::LibcInternal
|
@ -261,6 +261,7 @@ int PS4_SYSV_ABI scePadOpen(s32 userId, s32 type, s32 index, const OrbisPadOpenP
|
||||
if (type != ORBIS_PAD_PORT_TYPE_STANDARD && type != ORBIS_PAD_PORT_TYPE_REMOTE_CONTROL)
|
||||
return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED;
|
||||
}
|
||||
scePadResetLightBar(1);
|
||||
return 1; // dummy
|
||||
}
|
||||
|
||||
@ -412,7 +413,13 @@ int PS4_SYSV_ABI scePadReadStateExt() {
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI scePadResetLightBar(s32 handle) {
|
||||
LOG_ERROR(Lib_Pad, "(STUBBED) called");
|
||||
LOG_INFO(Lib_Pad, "(DUMMY) called");
|
||||
if (handle != 1) {
|
||||
return ORBIS_PAD_ERROR_INVALID_HANDLE;
|
||||
}
|
||||
auto* controller = Common::Singleton<GameController>::Instance();
|
||||
int* rgb = Config::GetControllerCustomColor();
|
||||
controller->SetLightBarRGB(rgb[0], rgb[1], rgb[2]);
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
@ -472,6 +479,9 @@ int PS4_SYSV_ABI scePadSetForceIntercepted() {
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI scePadSetLightBar(s32 handle, const OrbisPadLightBarParam* pParam) {
|
||||
if (Config::GetOverrideControllerColor()) {
|
||||
return ORBIS_OK;
|
||||
}
|
||||
if (pParam != nullptr) {
|
||||
LOG_DEBUG(Lib_Pad, "called handle = {} rgb = {} {} {}", handle, pParam->r, pParam->g,
|
||||
pParam->b);
|
||||
|
@ -24,17 +24,17 @@ namespace fs = std::filesystem;
|
||||
// clang-format off
|
||||
static const std::unordered_map<std::string, std::string> default_title = {
|
||||
{"ja_JP", "セーブデータ"},
|
||||
{"en", "Saved Data"},
|
||||
{"fr", "Données sauvegardées"},
|
||||
{"en_US", "Saved Data"},
|
||||
{"fr_FR", "Données sauvegardées"},
|
||||
{"es_ES", "Datos guardados"},
|
||||
{"de", "Gespeicherte Daten"},
|
||||
{"it", "Dati salvati"},
|
||||
{"nl", "Opgeslagen data"},
|
||||
{"de_DE", "Gespeicherte Daten"},
|
||||
{"it_IT", "Dati salvati"},
|
||||
{"nl_NL", "Opgeslagen data"},
|
||||
{"pt_PT", "Dados guardados"},
|
||||
{"ru", "Сохраненные данные"},
|
||||
{"ru_RU", "Сохраненные данные"},
|
||||
{"ko_KR", "저장 데이터"},
|
||||
{"zh_CN", "保存数据"},
|
||||
{"fi", "Tallennetut tiedot"},
|
||||
{"fi_FI", "Tallennetut tiedot"},
|
||||
{"sv_SE", "Sparade data"},
|
||||
{"da_DK", "Gemte data"},
|
||||
{"no_NO", "Lagrede data"},
|
||||
@ -73,7 +73,7 @@ void SaveInstance::SetupDefaultParamSFO(PSF& param_sfo, std::string dir_name,
|
||||
std::string game_serial) {
|
||||
std::string locale = Config::getEmulatorLanguage();
|
||||
if (!default_title.contains(locale)) {
|
||||
locale = "en";
|
||||
locale = "en_US";
|
||||
}
|
||||
|
||||
#define P(type, key, ...) param_sfo.Add##type(std::string{key}, __VA_ARGS__)
|
||||
@ -222,4 +222,4 @@ void SaveInstance::CreateFiles() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Libraries::SaveData
|
||||
} // namespace Libraries::SaveData
|
||||
|
@ -18,7 +18,6 @@ struct Frame;
|
||||
namespace Libraries::VideoOut {
|
||||
|
||||
struct VideoOutPort {
|
||||
bool is_open = false;
|
||||
SceVideoOutResolutionStatus resolution;
|
||||
std::array<VideoOutBuffer, MaxDisplayBuffers> buffer_slots;
|
||||
std::array<u64, MaxDisplayBuffers> buffer_labels; // should be contiguous in memory
|
||||
@ -33,6 +32,8 @@ struct VideoOutPort {
|
||||
std::condition_variable vo_cv;
|
||||
std::condition_variable vblank_cv;
|
||||
int flip_rate = 0;
|
||||
bool is_open = false;
|
||||
bool is_mode_changing = false; // Used to prevent flip during mode change
|
||||
|
||||
s32 FindFreeGroup() const {
|
||||
s32 index = 0;
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/config.h"
|
||||
#include "common/elf_info.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "core/libraries/system/userservice.h"
|
||||
@ -198,10 +199,15 @@ int PS4_SYSV_ABI sceVideoOutGetEventData(const Kernel::SceKernelEvent* ev, int64
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_ADDRESS;
|
||||
}
|
||||
if (ev->filter != Kernel::SceKernelEvent::Filter::VideoOut) {
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE;
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT;
|
||||
}
|
||||
|
||||
*data = ev->data;
|
||||
auto event_data = ev->data >> 0x10;
|
||||
if (ev->ident != static_cast<s32>(OrbisVideoOutInternalEventId::Flip) || ev->data == 0) {
|
||||
*data = event_data;
|
||||
} else {
|
||||
*data = event_data | 0xFFFF000000000000;
|
||||
}
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
@ -315,6 +321,12 @@ s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** u
|
||||
s32 PS4_SYSV_ABI sceVideoOutGetDeviceCapabilityInfo(
|
||||
s32 handle, SceVideoOutDeviceCapabilityInfo* pDeviceCapabilityInfo) {
|
||||
pDeviceCapabilityInfo->capability = 0;
|
||||
if (presenter->IsHDRSupported()) {
|
||||
auto& game_info = Common::ElfInfo::Instance();
|
||||
if (game_info.GetPSFAttributes().support_hdr) {
|
||||
pDeviceCapabilityInfo->capability |= ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_BT2020_PQ;
|
||||
}
|
||||
}
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
@ -352,6 +364,49 @@ s32 PS4_SYSV_ABI sceVideoOutAdjustColor(s32 handle, const SceVideoOutColorSettin
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
struct Mode {
|
||||
u32 size;
|
||||
u8 encoding;
|
||||
u8 range;
|
||||
u8 colorimetry;
|
||||
u8 depth;
|
||||
u64 refresh_rate;
|
||||
u64 resolution;
|
||||
u8 reserved[8];
|
||||
};
|
||||
|
||||
void PS4_SYSV_ABI sceVideoOutModeSetAny_(Mode* mode, u32 size) {
|
||||
std::memset(mode, 0xff, size);
|
||||
mode->size = size;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceVideoOutConfigureOutputMode_(s32 handle, u32 reserved, const Mode* mode,
|
||||
const void* options, u32 size_mode,
|
||||
u32 size_options) {
|
||||
auto* port = driver->GetPort(handle);
|
||||
if (!port) {
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (reserved != 0) {
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_VALUE;
|
||||
}
|
||||
|
||||
if (mode->colorimetry != OrbisVideoOutColorimetry::Any) {
|
||||
auto& game_info = Common::ElfInfo::Instance();
|
||||
if (mode->colorimetry == OrbisVideoOutColorimetry::Bt2020PQ &&
|
||||
game_info.GetPSFAttributes().support_hdr) {
|
||||
port->is_mode_changing = true;
|
||||
presenter->SetHDR(true);
|
||||
port->is_mode_changing = false;
|
||||
} else {
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
void RegisterLib(Core::Loader::SymbolsResolver* sym) {
|
||||
driver = std::make_unique<VideoOutDriver>(Config::getScreenWidth(), Config::getScreenHeight());
|
||||
|
||||
@ -390,6 +445,10 @@ void RegisterLib(Core::Loader::SymbolsResolver* sym) {
|
||||
sceVideoOutAdjustColor);
|
||||
LIB_FUNCTION("-Ozn0F1AFRg", "libSceVideoOut", 1, "libSceVideoOut", 0, 0,
|
||||
sceVideoOutDeleteFlipEvent);
|
||||
LIB_FUNCTION("pjkDsgxli6c", "libSceVideoOut", 1, "libSceVideoOut", 0, 0,
|
||||
sceVideoOutModeSetAny_);
|
||||
LIB_FUNCTION("N1bEoJ4SRw4", "libSceVideoOut", 1, "libSceVideoOut", 0, 0,
|
||||
sceVideoOutConfigureOutputMode_);
|
||||
|
||||
// openOrbis appears to have libSceVideoOut_v1 module libSceVideoOut_v1.1
|
||||
LIB_FUNCTION("Up36PTk687E", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutOpen);
|
||||
|
@ -40,6 +40,13 @@ constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_NONE = 0;
|
||||
constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_VR = 7;
|
||||
constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_STRICT_COLORIMETRY = 8;
|
||||
|
||||
constexpr int ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_BT2020_PQ = 0x80;
|
||||
|
||||
enum OrbisVideoOutColorimetry : u8 {
|
||||
Bt2020PQ = 12,
|
||||
Any = 0xFF,
|
||||
};
|
||||
|
||||
enum class OrbisVideoOutEventId : s16 {
|
||||
Flip = 0,
|
||||
Vblank = 1,
|
||||
|
@ -83,7 +83,10 @@ public:
|
||||
}
|
||||
|
||||
Module* GetModule(s32 index) const {
|
||||
return m_modules.at(index).get();
|
||||
if (index >= 0 || index < m_modules.size()) {
|
||||
return m_modules.at(index).get();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
u32 FindByName(const std::filesystem::path& name) const {
|
||||
|
BIN
src/images/keyboard_icon.png
Normal file
BIN
src/images/keyboard_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
@ -118,6 +118,10 @@ void OnResize() {
|
||||
Sdl::OnResize();
|
||||
}
|
||||
|
||||
void OnSurfaceFormatChange(vk::Format surface_format) {
|
||||
Vulkan::OnSurfaceFormatChange(surface_format);
|
||||
}
|
||||
|
||||
void Shutdown(const vk::Device& device) {
|
||||
auto result = device.waitIdle();
|
||||
if (result != vk::Result::eSuccess) {
|
||||
|
@ -22,6 +22,8 @@ void Initialize(const Vulkan::Instance& instance, const Frontend::WindowSDL& win
|
||||
|
||||
void OnResize();
|
||||
|
||||
void OnSurfaceFormatChange(vk::Format surface_format);
|
||||
|
||||
void Shutdown(const vk::Device& device);
|
||||
|
||||
bool ProcessEvent(SDL_Event* event);
|
||||
|
@ -1265,4 +1265,20 @@ void Shutdown() {
|
||||
IM_DELETE(bd);
|
||||
}
|
||||
|
||||
void OnSurfaceFormatChange(vk::Format surface_format) {
|
||||
VkData* bd = GetBackendData();
|
||||
const InitInfo& v = bd->init_info;
|
||||
auto& pl_format = const_cast<vk::Format&>(
|
||||
bd->init_info.pipeline_rendering_create_info.pColorAttachmentFormats[0]);
|
||||
if (pl_format != surface_format) {
|
||||
pl_format = surface_format;
|
||||
if (bd->pipeline) {
|
||||
v.device.destroyPipeline(bd->pipeline, v.allocator);
|
||||
bd->pipeline = VK_NULL_HANDLE;
|
||||
CreatePipeline(v.device, v.allocator, v.pipeline_cache, nullptr, &bd->pipeline,
|
||||
v.subpass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ImGui::Vulkan
|
||||
|
@ -67,5 +67,6 @@ void RenderDrawData(ImDrawData& draw_data, vk::CommandBuffer command_buffer,
|
||||
vk::Pipeline pipeline = VK_NULL_HANDLE);
|
||||
|
||||
void SetBlendEnabled(bool enabled);
|
||||
void OnSurfaceFormatChange(vk::Format surface_format);
|
||||
|
||||
} // namespace ImGui::Vulkan
|
||||
} // namespace ImGui::Vulkan
|
||||
|
@ -214,6 +214,9 @@ void ParseInputConfig(const std::string game_id = "") {
|
||||
lefttrigger_deadzone = {1, 127};
|
||||
righttrigger_deadzone = {1, 127};
|
||||
|
||||
Config::SetOverrideControllerColor(false);
|
||||
Config::SetControllerCustomColor(0, 0, 255);
|
||||
|
||||
int lineCount = 0;
|
||||
|
||||
std::ifstream file(config_file);
|
||||
@ -254,6 +257,14 @@ void ParseInputConfig(const std::string game_id = "") {
|
||||
std::string input_string = line.substr(equal_pos + 1);
|
||||
std::size_t comma_pos = input_string.find(',');
|
||||
|
||||
auto parseInt = [](const std::string& s) -> std::optional<int> {
|
||||
try {
|
||||
return std::stoi(s);
|
||||
} catch (...) {
|
||||
return std::nullopt;
|
||||
}
|
||||
};
|
||||
|
||||
if (output_string == "mouse_to_joystick") {
|
||||
if (input_string == "left") {
|
||||
SetMouseToJoystick(1);
|
||||
@ -307,14 +318,6 @@ void ParseInputConfig(const std::string game_id = "") {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto parseInt = [](const std::string& s) -> std::optional<int> {
|
||||
try {
|
||||
return std::stoi(s);
|
||||
} catch (...) {
|
||||
return std::nullopt;
|
||||
}
|
||||
};
|
||||
|
||||
auto inner_deadzone = parseInt(inner_deadzone_str);
|
||||
auto outer_deadzone = parseInt(outer_deadzone_str);
|
||||
|
||||
@ -341,6 +344,29 @@ void ParseInputConfig(const std::string game_id = "") {
|
||||
lineCount, line);
|
||||
}
|
||||
continue;
|
||||
} else if (output_string == "override_controller_color") {
|
||||
std::stringstream ss(input_string);
|
||||
std::string enable, r_s, g_s, b_s;
|
||||
std::optional<int> r, g, b;
|
||||
if (!std::getline(ss, enable, ',') || !std::getline(ss, r_s, ',') ||
|
||||
!std::getline(ss, g_s, ',') || !std::getline(ss, b_s)) {
|
||||
LOG_WARNING(Input, "Malformed controller color config at line {}: \"{}\"",
|
||||
lineCount, line);
|
||||
continue;
|
||||
}
|
||||
r = parseInt(r_s);
|
||||
g = parseInt(g_s);
|
||||
b = parseInt(b_s);
|
||||
if (!r || !g || !b) {
|
||||
LOG_WARNING(Input, "Invalid RGB values at line {}: \"{}\", skipping line.",
|
||||
lineCount, line);
|
||||
continue;
|
||||
}
|
||||
Config::SetOverrideControllerColor(enable == "true");
|
||||
Config::SetControllerCustomColor(*r, *g, *b);
|
||||
LOG_DEBUG(Input, "Parsed color settings: {} {} {} {}",
|
||||
enable == "true" ? "override" : "no override", *r, *b, *g);
|
||||
continue;
|
||||
}
|
||||
|
||||
// normal cases
|
||||
|
@ -45,8 +45,13 @@ CheatsPatches::CheatsPatches(const QString& gameName, const QString& gameSerial,
|
||||
CheatsPatches::~CheatsPatches() {}
|
||||
|
||||
void CheatsPatches::setupUI() {
|
||||
defaultTextEdit = tr("defaultTextEdit_MSG");
|
||||
defaultTextEdit.replace("\\n", "\n");
|
||||
|
||||
// clang-format off
|
||||
defaultTextEdit_MSG = tr("Cheats/Patches are experimental.\\nUse with caution.\\n\\nDownload cheats individually by selecting the repository and clicking the download button.\\nIn the Patches tab, you can download all patches at once, choose which ones you want to use, and save your selection.\\n\\nSince we do not develop the Cheats/Patches,\\nplease report issues to the cheat author.\\n\\nCreated a new cheat? Visit:\\n").replace("\\n", "\n")+"https://github.com/shadps4-emu/ps4_cheats";
|
||||
CheatsNotFound_MSG = tr("No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game.");
|
||||
CheatsDownloadedSuccessfully_MSG = tr("You have successfully downloaded the cheats for this version of the game from the selected repository. You can try downloading from another repository, if it is available it will also be possible to use it by selecting the file from the list.");
|
||||
DownloadComplete_MSG = tr("Patches Downloaded Successfully! All Patches available for all games have been downloaded, there is no need to download them individually for each game as happens in Cheats. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game.");
|
||||
// clang-format on
|
||||
|
||||
QString CHEATS_DIR_QString;
|
||||
Common::FS::PathToQString(CHEATS_DIR_QString,
|
||||
@ -86,13 +91,15 @@ void CheatsPatches::setupUI() {
|
||||
gameVersionLabel->setAlignment(Qt::AlignLeft);
|
||||
gameInfoLayout->addWidget(gameVersionLabel);
|
||||
|
||||
QLabel* gameSizeLabel = new QLabel(tr("Size: ") + m_gameSize);
|
||||
gameSizeLabel->setAlignment(Qt::AlignLeft);
|
||||
gameInfoLayout->addWidget(gameSizeLabel);
|
||||
if (m_gameSize.left(4) != "0.00") {
|
||||
QLabel* gameSizeLabel = new QLabel(tr("Size: ") + m_gameSize);
|
||||
gameSizeLabel->setAlignment(Qt::AlignLeft);
|
||||
gameInfoLayout->addWidget(gameSizeLabel);
|
||||
}
|
||||
|
||||
// Add a text area for instructions and 'Patch' descriptions
|
||||
instructionsTextEdit = new QTextEdit();
|
||||
instructionsTextEdit->setText(defaultTextEdit);
|
||||
instructionsTextEdit->setText(defaultTextEdit_MSG);
|
||||
instructionsTextEdit->setReadOnly(true);
|
||||
instructionsTextEdit->setFixedHeight(290);
|
||||
gameInfoLayout->addWidget(instructionsTextEdit);
|
||||
@ -568,7 +575,7 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer
|
||||
} else {
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("Failed to download file:") +
|
||||
"%1\n\n" + tr("Error:") + "%2")
|
||||
"%1\n\n" + tr("Error") + ":%2")
|
||||
.arg(fileUrl)
|
||||
.arg(fileReply->errorString()));
|
||||
}
|
||||
@ -579,7 +586,7 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer
|
||||
}
|
||||
}
|
||||
if (!foundFiles && showMessageBox) {
|
||||
QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG"));
|
||||
QMessageBox::warning(this, tr("Cheats Not Found"), CheatsNotFound_MSG);
|
||||
}
|
||||
} else if (source == "GoldHEN" || source == "shadPS4") {
|
||||
QString textContent(jsonData);
|
||||
@ -644,7 +651,7 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer
|
||||
} else {
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("Failed to download file:") +
|
||||
"%1\n\n" + tr("Error:") + "%2")
|
||||
"%1\n\n" + tr("Error") + ":%2")
|
||||
.arg(fileUrl)
|
||||
.arg(fileReply->errorString()));
|
||||
}
|
||||
@ -655,18 +662,18 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer
|
||||
}
|
||||
}
|
||||
if (!foundFiles && showMessageBox) {
|
||||
QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG"));
|
||||
QMessageBox::warning(this, tr("Cheats Not Found"), CheatsNotFound_MSG);
|
||||
}
|
||||
}
|
||||
if (foundFiles && showMessageBox) {
|
||||
QMessageBox::information(this, tr("Cheats Downloaded Successfully"),
|
||||
tr("CheatsDownloadedSuccessfully_MSG"));
|
||||
CheatsDownloadedSuccessfully_MSG);
|
||||
populateFileListCheats();
|
||||
}
|
||||
|
||||
} else {
|
||||
if (showMessageBox) {
|
||||
QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG"));
|
||||
QMessageBox::warning(this, tr("Cheats Not Found"), CheatsNotFound_MSG);
|
||||
}
|
||||
}
|
||||
reply->deleteLater();
|
||||
@ -816,7 +823,7 @@ void CheatsPatches::downloadPatches(const QString repository, const bool showMes
|
||||
}
|
||||
if (showMessageBox) {
|
||||
QMessageBox::information(this, tr("Download Complete"),
|
||||
QString(tr("DownloadComplete_MSG")));
|
||||
QString(DownloadComplete_MSG));
|
||||
}
|
||||
// Create the files.json file with the identification of which file to open
|
||||
createFilesJson(repository);
|
||||
@ -843,7 +850,7 @@ void CheatsPatches::compatibleVersionNotice(const QString repository) {
|
||||
foreach (const QString& xmlFile, xmlFiles) {
|
||||
QFile file(dir.filePath(xmlFile));
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QMessageBox::warning(this, tr("ERROR"),
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("Failed to open file:") + "\n%1").arg(xmlFile));
|
||||
continue;
|
||||
}
|
||||
@ -871,7 +878,7 @@ void CheatsPatches::compatibleVersionNotice(const QString repository) {
|
||||
}
|
||||
|
||||
if (xmlReader.hasError()) {
|
||||
QMessageBox::warning(this, tr("ERROR"),
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("XML ERROR:") + "\n%1").arg(xmlReader.errorString()));
|
||||
}
|
||||
|
||||
@ -926,7 +933,7 @@ void CheatsPatches::createFilesJson(const QString& repository) {
|
||||
foreach (const QString& xmlFile, xmlFiles) {
|
||||
QFile file(dir.filePath(xmlFile));
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QMessageBox::warning(this, tr("ERROR"),
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("Failed to open file:") + "\n%1").arg(xmlFile));
|
||||
continue;
|
||||
}
|
||||
@ -944,7 +951,7 @@ void CheatsPatches::createFilesJson(const QString& repository) {
|
||||
}
|
||||
|
||||
if (xmlReader.hasError()) {
|
||||
QMessageBox::warning(this, tr("ERROR"),
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("XML ERROR:") + "\n%1").arg(xmlReader.errorString()));
|
||||
}
|
||||
filesObject[xmlFile] = titleIdsArray;
|
||||
@ -952,7 +959,7 @@ void CheatsPatches::createFilesJson(const QString& repository) {
|
||||
|
||||
QFile jsonFile(dir.absolutePath() + "/files.json");
|
||||
if (!jsonFile.open(QIODevice::WriteOnly)) {
|
||||
QMessageBox::warning(this, tr("ERROR"), tr("Failed to open files.json for writing"));
|
||||
QMessageBox::warning(this, tr("Error"), tr("Failed to open files.json for writing"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1155,7 +1162,7 @@ void CheatsPatches::addPatchesToLayout(const QString& filePath) {
|
||||
QString fullPath = dir.filePath(folderPath);
|
||||
|
||||
if (!dir.exists(fullPath)) {
|
||||
QMessageBox::warning(this, tr("ERROR"),
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
QString(tr("Directory does not exist:") + "\n%1").arg(fullPath));
|
||||
return;
|
||||
}
|
||||
@ -1165,7 +1172,7 @@ void CheatsPatches::addPatchesToLayout(const QString& filePath) {
|
||||
|
||||
QFile jsonFile(filesJsonPath);
|
||||
if (!jsonFile.open(QIODevice::ReadOnly)) {
|
||||
QMessageBox::warning(this, tr("ERROR"), tr("Failed to open files.json for reading."));
|
||||
QMessageBox::warning(this, tr("Error"), tr("Failed to open files.json for reading."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1189,7 +1196,7 @@ void CheatsPatches::addPatchesToLayout(const QString& filePath) {
|
||||
|
||||
if (!xmlFile.open(QIODevice::ReadOnly)) {
|
||||
QMessageBox::warning(
|
||||
this, tr("ERROR"),
|
||||
this, tr("Error"),
|
||||
QString(tr("Failed to open file:") + "\n%1").arg(xmlFile.fileName()));
|
||||
continue;
|
||||
}
|
||||
@ -1422,6 +1429,6 @@ void CheatsPatches::onPatchCheckBoxHovered(QCheckBox* checkBox, bool hovered) {
|
||||
updateNoteTextEdit(patchName.toString());
|
||||
}
|
||||
} else {
|
||||
instructionsTextEdit->setText(defaultTextEdit);
|
||||
instructionsTextEdit->setText(defaultTextEdit_MSG);
|
||||
}
|
||||
}
|
@ -110,7 +110,11 @@ private:
|
||||
QComboBox* patchesComboBox;
|
||||
QListView* patchesListView;
|
||||
|
||||
QString defaultTextEdit;
|
||||
// Strings
|
||||
QString defaultTextEdit_MSG;
|
||||
QString CheatsNotFound_MSG;
|
||||
QString CheatsDownloadedSuccessfully_MSG;
|
||||
QString DownloadComplete_MSG;
|
||||
};
|
||||
|
||||
#endif // CHEATS_PATCHES_H
|
@ -70,8 +70,11 @@ void CheckUpdate::CheckForUpdates(const bool showMessage) {
|
||||
if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 403) {
|
||||
QString response = reply->readAll();
|
||||
if (response.startsWith("{\"message\":\"API rate limit exceeded for")) {
|
||||
QMessageBox::warning(this, tr("Auto Updater"),
|
||||
tr("Error_Github_limit_MSG").replace("\\n", "\n"));
|
||||
QMessageBox::warning(
|
||||
this, tr("Auto Updater"),
|
||||
// clang-format off
|
||||
tr("The Auto Updater allows up to 60 update checks per hour.\\nYou have reached this limit. Please try again later.").replace("\\n", "\n"));
|
||||
// clang-format on
|
||||
} else {
|
||||
QMessageBox::warning(
|
||||
this, tr("Error"),
|
||||
@ -198,29 +201,45 @@ void CheckUpdate::setupUI(const QString& downloadUrl, const QString& latestDate,
|
||||
|
||||
QString updateChannel = QString::fromStdString(Config::getUpdateChannel());
|
||||
|
||||
QString updateText =
|
||||
QString("<p><b><br>" + tr("Update Channel") + ": </b>" + updateChannel + "<br><b>" +
|
||||
tr("Current Version") + ":</b> %1 (%2)<br><b>" + tr("Latest Version") +
|
||||
":</b> %3 (%4)</p><p>" + tr("Do you want to update?") + "</p>")
|
||||
.arg(currentRev.left(7), currentDate, latestRev, latestDate);
|
||||
QString updateText = QString("<p><b>" + tr("Update Channel") + ": </b>" + updateChannel +
|
||||
"<br>"
|
||||
"<table><tr>"
|
||||
"<td><b>" +
|
||||
tr("Current Version") +
|
||||
":</b></td>"
|
||||
"<td>%1</td>"
|
||||
"<td>(%2)</td>"
|
||||
"</tr><tr>"
|
||||
"<td><b>" +
|
||||
tr("Latest Version") +
|
||||
":</b></td>"
|
||||
"<td>%3</td>"
|
||||
"<td>(%4)</td>"
|
||||
"</tr></table></p>")
|
||||
.arg(currentRev.left(7), currentDate, latestRev, latestDate);
|
||||
|
||||
QLabel* updateLabel = new QLabel(updateText, this);
|
||||
layout->addWidget(updateLabel);
|
||||
|
||||
// Setup bottom layout with action buttons
|
||||
QHBoxLayout* bottomLayout = new QHBoxLayout();
|
||||
autoUpdateCheckBox = new QCheckBox(tr("Check for Updates at Startup"), this);
|
||||
layout->addWidget(autoUpdateCheckBox);
|
||||
|
||||
QHBoxLayout* updatePromptLayout = new QHBoxLayout();
|
||||
QLabel* updatePromptLabel = new QLabel(tr("Do you want to update?"), this);
|
||||
updatePromptLayout->addWidget(updatePromptLabel);
|
||||
|
||||
yesButton = new QPushButton(tr("Update"), this);
|
||||
noButton = new QPushButton(tr("No"), this);
|
||||
yesButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
|
||||
noButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
|
||||
bottomLayout->addWidget(autoUpdateCheckBox);
|
||||
|
||||
QSpacerItem* spacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
bottomLayout->addItem(spacer);
|
||||
updatePromptLayout->addItem(spacer);
|
||||
updatePromptLayout->addWidget(yesButton);
|
||||
updatePromptLayout->addWidget(noButton);
|
||||
|
||||
bottomLayout->addWidget(yesButton);
|
||||
bottomLayout->addWidget(noButton);
|
||||
layout->addLayout(bottomLayout);
|
||||
layout->addLayout(updatePromptLayout);
|
||||
|
||||
// Don't show changelog button if:
|
||||
// The current version is a pre-release and the version to be downloaded is a release.
|
||||
@ -241,19 +260,27 @@ void CheckUpdate::setupUI(const QString& downloadUrl, const QString& latestDate,
|
||||
connect(toggleButton, &QPushButton::clicked,
|
||||
[this, textField, toggleButton, currentRev, latestRev, downloadUrl, latestDate,
|
||||
currentDate]() {
|
||||
QString updateChannel = QString::fromStdString(Config::getUpdateChannel());
|
||||
if (!textField->isVisible()) {
|
||||
requestChangelog(currentRev, latestRev, downloadUrl, latestDate,
|
||||
currentDate);
|
||||
textField->setVisible(true);
|
||||
toggleButton->setText(tr("Hide Changelog"));
|
||||
adjustSize();
|
||||
textField->setFixedWidth(textField->width() + 20);
|
||||
} else {
|
||||
textField->setVisible(false);
|
||||
toggleButton->setText(tr("Show Changelog"));
|
||||
adjustSize();
|
||||
}
|
||||
});
|
||||
|
||||
if (Config::alwaysShowChangelog()) {
|
||||
requestChangelog(currentRev, latestRev, downloadUrl, latestDate, currentDate);
|
||||
textField->setVisible(true);
|
||||
toggleButton->setText(tr("Hide Changelog"));
|
||||
adjustSize();
|
||||
textField->setFixedWidth(textField->width() + 20);
|
||||
}
|
||||
}
|
||||
|
||||
connect(yesButton, &QPushButton::clicked, this, [this, downloadUrl]() {
|
||||
|
@ -19,27 +19,34 @@ CompatibilityInfoClass::CompatibilityInfoClass()
|
||||
CompatibilityInfoClass::~CompatibilityInfoClass() = default;
|
||||
|
||||
void CompatibilityInfoClass::UpdateCompatibilityDatabase(QWidget* parent, bool forced) {
|
||||
if (!forced)
|
||||
if (LoadCompatibilityFile())
|
||||
return;
|
||||
|
||||
QNetworkReply* reply = FetchPage(1);
|
||||
if (!WaitForReply(reply))
|
||||
if (!forced && LoadCompatibilityFile())
|
||||
return;
|
||||
|
||||
QProgressDialog dialog(tr("Fetching compatibility data, please wait"), tr("Cancel"), 0, 0,
|
||||
QUrl url("https://github.com/shadps4-emu/shadps4-game-compatibility/releases/latest/download/"
|
||||
"compatibility_data.json");
|
||||
QNetworkRequest request(url);
|
||||
QNetworkReply* reply = m_network_manager->get(request);
|
||||
|
||||
QProgressDialog dialog(tr("Fetching compatibility data, please wait"), tr("Cancel"), 0, 100,
|
||||
parent);
|
||||
dialog.setWindowTitle(tr("Loading..."));
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setMinimumDuration(0);
|
||||
dialog.setValue(0);
|
||||
|
||||
int remaining_pages = 0;
|
||||
if (reply->hasRawHeader("link")) {
|
||||
QRegularExpression last_page_re("(\\d+)(?=>; rel=\"last\")");
|
||||
QRegularExpressionMatch last_page_match =
|
||||
last_page_re.match(QString(reply->rawHeader("link")));
|
||||
if (last_page_match.hasMatch()) {
|
||||
remaining_pages = last_page_match.captured(0).toInt() - 1;
|
||||
}
|
||||
}
|
||||
connect(reply, &QNetworkReply::downloadProgress,
|
||||
[&dialog](qint64 bytesReceived, qint64 bytesTotal) {
|
||||
if (bytesTotal > 0) {
|
||||
dialog.setMaximum(bytesTotal);
|
||||
dialog.setValue(bytesReceived);
|
||||
}
|
||||
});
|
||||
|
||||
connect(&dialog, &QProgressDialog::canceled, reply, &QNetworkReply::abort);
|
||||
|
||||
QEventLoop loop;
|
||||
connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
|
||||
loop.exec();
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
reply->deleteLater();
|
||||
@ -51,100 +58,23 @@ void CompatibilityInfoClass::UpdateCompatibilityDatabase(QWidget* parent, bool f
|
||||
return;
|
||||
}
|
||||
|
||||
ExtractCompatibilityInfo(reply->readAll());
|
||||
|
||||
QVector<QNetworkReply*> replies(remaining_pages);
|
||||
QFutureWatcher<void> future_watcher;
|
||||
|
||||
for (int i = 0; i < remaining_pages; i++) {
|
||||
replies[i] = FetchPage(i + 2);
|
||||
QFile compatibility_file(m_compatibility_filename);
|
||||
if (!compatibility_file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||
QMessageBox::critical(parent, tr("Error"),
|
||||
tr("Unable to open compatibility_data.json for writing."));
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
future_watcher.setFuture(QtConcurrent::map(replies, WaitForReply));
|
||||
connect(&future_watcher, &QFutureWatcher<void>::finished, [&]() {
|
||||
for (int i = 0; i < remaining_pages; i++) {
|
||||
if (replies[i]->bytesAvailable()) {
|
||||
if (replies[i]->error() == QNetworkReply::NoError) {
|
||||
ExtractCompatibilityInfo(replies[i]->readAll());
|
||||
}
|
||||
replies[i]->deleteLater();
|
||||
} else {
|
||||
// This means the request timed out
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Writes the received data to the file.
|
||||
QByteArray json_data = reply->readAll();
|
||||
compatibility_file.write(json_data);
|
||||
compatibility_file.close();
|
||||
reply->deleteLater();
|
||||
|
||||
QFile compatibility_file(m_compatibility_filename);
|
||||
|
||||
if (!compatibility_file.open(QIODevice::WriteOnly | QIODevice::Truncate |
|
||||
QIODevice::Text)) {
|
||||
QMessageBox::critical(parent, tr("Error"),
|
||||
tr("Unable to open compatibility.json for writing."));
|
||||
return;
|
||||
}
|
||||
|
||||
QJsonDocument json_doc;
|
||||
m_compatibility_database["version"] = COMPAT_DB_VERSION;
|
||||
|
||||
json_doc.setObject(m_compatibility_database);
|
||||
compatibility_file.write(json_doc.toJson());
|
||||
compatibility_file.close();
|
||||
|
||||
dialog.reset();
|
||||
});
|
||||
connect(&future_watcher, &QFutureWatcher<void>::canceled, [&]() {
|
||||
// Cleanup if user cancels pulling data
|
||||
for (int i = 0; i < remaining_pages; i++) {
|
||||
if (!replies[i]->bytesAvailable()) {
|
||||
replies[i]->deleteLater();
|
||||
} else if (!replies[i]->isFinished()) {
|
||||
replies[i]->abort();
|
||||
}
|
||||
}
|
||||
});
|
||||
connect(&dialog, &QProgressDialog::canceled, &future_watcher, &QFutureWatcher<void>::cancel);
|
||||
dialog.setRange(0, remaining_pages);
|
||||
connect(&future_watcher, &QFutureWatcher<void>::progressValueChanged, &dialog,
|
||||
&QProgressDialog::setValue);
|
||||
dialog.exec();
|
||||
LoadCompatibilityFile();
|
||||
}
|
||||
|
||||
QNetworkReply* CompatibilityInfoClass::FetchPage(int page_num) {
|
||||
QUrl url = QUrl("https://api.github.com/repos/shadps4-emu/shadps4-game-compatibility/issues");
|
||||
QUrlQuery query;
|
||||
query.addQueryItem("per_page", QString("100"));
|
||||
query.addQueryItem(
|
||||
"tags", QString("status-ingame status-playable status-nothing status-boots status-menus"));
|
||||
query.addQueryItem("page", QString::number(page_num));
|
||||
url.setQuery(query);
|
||||
|
||||
QNetworkRequest request(url);
|
||||
QNetworkReply* reply = m_network_manager->get(request);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
bool CompatibilityInfoClass::WaitForReply(QNetworkReply* reply) {
|
||||
// Returns true if reply succeeded, false if reply timed out
|
||||
QTimer timer;
|
||||
timer.setSingleShot(true);
|
||||
|
||||
QEventLoop loop;
|
||||
connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
|
||||
connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
|
||||
timer.start(5000);
|
||||
loop.exec();
|
||||
|
||||
if (timer.isActive()) {
|
||||
timer.stop();
|
||||
return true;
|
||||
} else {
|
||||
disconnect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
|
||||
reply->abort();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
CompatibilityEntry CompatibilityInfoClass::GetCompatibilityInfo(const std::string& serial) {
|
||||
QString title_id = QString::fromStdString(serial);
|
||||
if (m_compatibility_database.contains(title_id)) {
|
||||
@ -160,7 +90,7 @@ CompatibilityEntry CompatibilityInfoClass::GetCompatibilityInfo(const std::strin
|
||||
QDateTime::fromString(compatibility_entry_obj["last_tested"].toString(),
|
||||
Qt::ISODate),
|
||||
compatibility_entry_obj["url"].toString(),
|
||||
compatibility_entry_obj["issue_number"].toInt()};
|
||||
compatibility_entry_obj["issue_number"].toString()};
|
||||
return compatibility_entry;
|
||||
}
|
||||
}
|
||||
@ -193,14 +123,6 @@ bool CompatibilityInfoClass::LoadCompatibilityFile() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check database version
|
||||
int version_number;
|
||||
if (json_doc.object()["version"].isDouble()) {
|
||||
if (json_doc.object()["version"].toInt() < COMPAT_DB_VERSION)
|
||||
return false;
|
||||
} else
|
||||
return false;
|
||||
|
||||
m_compatibility_database = json_doc.object();
|
||||
return true;
|
||||
}
|
||||
|
@ -11,8 +11,6 @@
|
||||
#include "common/config.h"
|
||||
#include "core/file_format/psf.h"
|
||||
|
||||
static constexpr int COMPAT_DB_VERSION = 1;
|
||||
|
||||
enum class CompatibilityStatus {
|
||||
Unknown,
|
||||
Nothing,
|
||||
@ -49,7 +47,7 @@ struct CompatibilityEntry {
|
||||
QString version;
|
||||
QDateTime last_tested;
|
||||
QString url;
|
||||
int issue_number;
|
||||
QString issue_number;
|
||||
};
|
||||
|
||||
class CompatibilityInfoClass : public QObject {
|
||||
@ -82,8 +80,6 @@ public:
|
||||
CompatibilityEntry GetCompatibilityInfo(const std::string& serial);
|
||||
const QString GetCompatStatusString(const CompatibilityStatus status);
|
||||
void ExtractCompatibilityInfo(QByteArray response);
|
||||
static bool WaitForReply(QNetworkReply* reply);
|
||||
QNetworkReply* FetchPage(int page_num);
|
||||
|
||||
private:
|
||||
QNetworkAccessManager* m_network_manager;
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include "common/path_util.h"
|
||||
#include "control_settings.h"
|
||||
#include "kbm_config_dialog.h"
|
||||
#include "ui_control_settings.h"
|
||||
|
||||
ControlSettings::ControlSettings(std::shared_ptr<GameInfoClass> game_info_get, QWidget* parent)
|
||||
@ -16,7 +16,7 @@ ControlSettings::ControlSettings(std::shared_ptr<GameInfoClass> game_info_get, Q
|
||||
|
||||
AddBoxItems();
|
||||
SetUIValuestoMappings();
|
||||
ui->KBMButton->setFocus();
|
||||
UpdateLightbarColor();
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::clicked, this, [this](QAbstractButton* button) {
|
||||
if (button == ui->buttonBox->button(QDialogButtonBox::Save)) {
|
||||
@ -29,11 +29,7 @@ ControlSettings::ControlSettings(std::shared_ptr<GameInfoClass> game_info_get, Q
|
||||
});
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close);
|
||||
connect(ui->KBMButton, &QPushButton::clicked, this, [this] {
|
||||
auto KBMWindow = new EditorDialog(this);
|
||||
KBMWindow->exec();
|
||||
SetUIValuestoMappings();
|
||||
});
|
||||
|
||||
connect(ui->ProfileComboBox, &QComboBox::currentTextChanged, this, [this] {
|
||||
GetGameTitle();
|
||||
SetUIValuestoMappings();
|
||||
@ -61,6 +57,27 @@ ControlSettings::ControlSettings(std::shared_ptr<GameInfoClass> game_info_get, Q
|
||||
[this](int value) { ui->RStickLeftBox->setCurrentIndex(value); });
|
||||
connect(ui->RStickLeftBox, &QComboBox::currentIndexChanged, this,
|
||||
[this](int value) { ui->RStickRightBox->setCurrentIndex(value); });
|
||||
|
||||
connect(ui->RSlider, &QSlider::valueChanged, this, [this](int value) {
|
||||
QString RedValue = QString("%1").arg(value, 3, 10, QChar('0'));
|
||||
QString RValue = "R: " + RedValue;
|
||||
ui->RLabel->setText(RValue);
|
||||
UpdateLightbarColor();
|
||||
});
|
||||
|
||||
connect(ui->GSlider, &QSlider::valueChanged, this, [this](int value) {
|
||||
QString GreenValue = QString("%1").arg(value, 3, 10, QChar('0'));
|
||||
QString GValue = "G: " + GreenValue;
|
||||
ui->GLabel->setText(GValue);
|
||||
UpdateLightbarColor();
|
||||
});
|
||||
|
||||
connect(ui->BSlider, &QSlider::valueChanged, this, [this](int value) {
|
||||
QString BlueValue = QString("%1").arg(value, 3, 10, QChar('0'));
|
||||
QString BValue = "B: " + BlueValue;
|
||||
ui->BLabel->setText(BValue);
|
||||
UpdateLightbarColor();
|
||||
});
|
||||
}
|
||||
|
||||
void ControlSettings::SaveControllerConfig(bool CloseOnSave) {
|
||||
@ -121,7 +138,7 @@ void ControlSettings::SaveControllerConfig(bool CloseOnSave) {
|
||||
|
||||
if (std::find(ControllerInputs.begin(), ControllerInputs.end(), input_string) !=
|
||||
ControllerInputs.end() ||
|
||||
output_string == "analog_deadzone") {
|
||||
output_string == "analog_deadzone" || output_string == "override_controller_color") {
|
||||
line.erase();
|
||||
continue;
|
||||
}
|
||||
@ -227,6 +244,14 @@ void ControlSettings::SaveControllerConfig(bool CloseOnSave) {
|
||||
deadzonevalue = std::to_string(ui->RightDeadzoneSlider->value());
|
||||
lines.push_back("analog_deadzone = rightjoystick, " + deadzonevalue + ", 127");
|
||||
|
||||
lines.push_back("");
|
||||
std::string OverrideLB = ui->LightbarCheckBox->isChecked() ? "true" : "false";
|
||||
std::string LightBarR = std::to_string(ui->RSlider->value());
|
||||
std::string LightBarG = std::to_string(ui->GSlider->value());
|
||||
std::string LightBarB = std::to_string(ui->BSlider->value());
|
||||
lines.push_back("override_controller_color = " + OverrideLB + ", " + LightBarR + ", " +
|
||||
LightBarG + ", " + LightBarB);
|
||||
|
||||
std::vector<std::string> save;
|
||||
bool CurrentLineEmpty = false, LastLineEmpty = false;
|
||||
for (auto const& line : lines) {
|
||||
@ -243,6 +268,9 @@ void ControlSettings::SaveControllerConfig(bool CloseOnSave) {
|
||||
output_file.close();
|
||||
|
||||
Config::SetUseUnifiedInputConfig(!ui->PerGameCheckBox->isChecked());
|
||||
Config::SetOverrideControllerColor(ui->LightbarCheckBox->isChecked());
|
||||
Config::SetControllerCustomColor(ui->RSlider->value(), ui->GSlider->value(),
|
||||
ui->BSlider->value());
|
||||
Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml");
|
||||
|
||||
if (CloseOnSave)
|
||||
@ -351,7 +379,7 @@ void ControlSettings::SetUIValuestoMappings() {
|
||||
|
||||
if (std::find(ControllerInputs.begin(), ControllerInputs.end(), input_string) !=
|
||||
ControllerInputs.end() ||
|
||||
output_string == "analog_deadzone") {
|
||||
output_string == "analog_deadzone" || output_string == "override_controller_color") {
|
||||
if (input_string == "cross") {
|
||||
ui->ABox->setCurrentText(QString::fromStdString(output_string));
|
||||
CrossExists = true;
|
||||
@ -436,9 +464,45 @@ void ControlSettings::SetUIValuestoMappings() {
|
||||
ui->RightDeadzoneSlider->setValue(2);
|
||||
ui->RightDeadzoneValue->setText("2");
|
||||
}
|
||||
} else if (output_string == "override_controller_color") {
|
||||
std::size_t comma_pos = line.find(',');
|
||||
if (comma_pos != std::string::npos) {
|
||||
std::string overridestring = line.substr(equal_pos + 1, comma_pos);
|
||||
bool override = overridestring.contains("true") ? true : false;
|
||||
ui->LightbarCheckBox->setChecked(override);
|
||||
|
||||
std::string lightbarstring = line.substr(comma_pos + 1);
|
||||
std::size_t comma_pos2 = lightbarstring.find(',');
|
||||
if (comma_pos2 != std::string::npos) {
|
||||
std::string Rstring = lightbarstring.substr(0, comma_pos2);
|
||||
ui->RSlider->setValue(std::stoi(Rstring));
|
||||
QString RedValue = QString("%1").arg(std::stoi(Rstring), 3, 10, QChar('0'));
|
||||
QString RValue = "R: " + RedValue;
|
||||
ui->RLabel->setText(RValue);
|
||||
}
|
||||
|
||||
std::string GBstring = lightbarstring.substr(comma_pos2 + 1);
|
||||
std::size_t comma_pos3 = GBstring.find(',');
|
||||
if (comma_pos3 != std::string::npos) {
|
||||
std::string Gstring = GBstring.substr(0, comma_pos3);
|
||||
ui->GSlider->setValue(std::stoi(Gstring));
|
||||
QString GreenValue =
|
||||
QString("%1").arg(std::stoi(Gstring), 3, 10, QChar('0'));
|
||||
QString GValue = "G: " + GreenValue;
|
||||
ui->GLabel->setText(GValue);
|
||||
|
||||
std::string Bstring = GBstring.substr(comma_pos3 + 1);
|
||||
ui->BSlider->setValue(std::stoi(Bstring));
|
||||
QString BlueValue =
|
||||
QString("%1").arg(std::stoi(Bstring), 3, 10, QChar('0'));
|
||||
QString BValue = "B: " + BlueValue;
|
||||
ui->BLabel->setText(BValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
|
||||
// If an entry does not exist in the config file, we assume the user wants it unmapped
|
||||
if (!CrossExists)
|
||||
@ -490,8 +554,6 @@ void ControlSettings::SetUIValuestoMappings() {
|
||||
ui->RStickUpBox->setCurrentText("unmapped");
|
||||
ui->RStickDownBox->setCurrentText("unmapped");
|
||||
}
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
void ControlSettings::GetGameTitle() {
|
||||
@ -507,4 +569,13 @@ void ControlSettings::GetGameTitle() {
|
||||
}
|
||||
}
|
||||
|
||||
void ControlSettings::UpdateLightbarColor() {
|
||||
ui->LightbarColorFrame->setStyleSheet("");
|
||||
QString RValue = QString::number(ui->RSlider->value());
|
||||
QString GValue = QString::number(ui->GSlider->value());
|
||||
QString BValue = QString::number(ui->BSlider->value());
|
||||
QString colorstring = "background-color: rgb(" + RValue + "," + GValue + "," + BValue + ")";
|
||||
ui->LightbarColorFrame->setStyleSheet(colorstring);
|
||||
}
|
||||
|
||||
ControlSettings::~ControlSettings() {}
|
||||
|
@ -18,6 +18,7 @@ public:
|
||||
private Q_SLOTS:
|
||||
void SaveControllerConfig(bool CloseOnSave);
|
||||
void SetDefault();
|
||||
void UpdateLightbarColor();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::ControlSettings> ui;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -117,7 +117,12 @@ void GameGridFrame::PopulateGameGrid(QVector<GameInfo> m_games_search, bool from
|
||||
layout->addWidget(image_label);
|
||||
layout->addWidget(name_label);
|
||||
|
||||
name_label->setStyleSheet("color: white; font-size: 12px; font-weight: bold;");
|
||||
// Resizing of font-size.
|
||||
float fontSize = (Config::getIconSizeGrid() / 5.5f);
|
||||
QString styleSheet =
|
||||
QString("color: white; font-weight: bold; font-size: %1px;").arg(fontSize);
|
||||
name_label->setStyleSheet(styleSheet);
|
||||
|
||||
QGraphicsDropShadowEffect* shadowEffect = new QGraphicsDropShadowEffect();
|
||||
shadowEffect->setBlurRadius(5); // Set the blur radius of the shadow
|
||||
shadowEffect->setColor(QColor(0, 0, 0, 160)); // Set the color and opacity of the shadow
|
||||
@ -191,14 +196,28 @@ void GameGridFrame::SetGridBackgroundImage(int row, int column) {
|
||||
void GameGridFrame::RefreshGridBackgroundImage() {
|
||||
QPalette palette;
|
||||
if (!backgroundImage.isNull() && Config::getShowBackgroundImage()) {
|
||||
palette.setBrush(QPalette::Base,
|
||||
QBrush(backgroundImage.scaled(size(), Qt::IgnoreAspectRatio)));
|
||||
QSize widgetSize = size();
|
||||
QPixmap scaledPixmap =
|
||||
QPixmap::fromImage(backgroundImage)
|
||||
.scaled(widgetSize, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
int x = (widgetSize.width() - scaledPixmap.width()) / 2;
|
||||
int y = (widgetSize.height() - scaledPixmap.height()) / 2;
|
||||
QPixmap finalPixmap(widgetSize);
|
||||
finalPixmap.fill(Qt::transparent);
|
||||
QPainter painter(&finalPixmap);
|
||||
painter.drawPixmap(x, y, scaledPixmap);
|
||||
palette.setBrush(QPalette::Base, QBrush(finalPixmap));
|
||||
}
|
||||
QColor transparentColor = QColor(135, 206, 235, 40);
|
||||
palette.setColor(QPalette::Highlight, transparentColor);
|
||||
this->setPalette(palette);
|
||||
}
|
||||
|
||||
void GameGridFrame::resizeEvent(QResizeEvent* event) {
|
||||
QTableWidget::resizeEvent(event);
|
||||
RefreshGridBackgroundImage();
|
||||
}
|
||||
|
||||
bool GameGridFrame::IsValidCellSelected() {
|
||||
return validCellSelected;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QPainter>
|
||||
#include <QScrollBar>
|
||||
|
||||
#include "background_music_player.h"
|
||||
@ -21,6 +22,7 @@ Q_SIGNALS:
|
||||
public Q_SLOTS:
|
||||
void SetGridBackgroundImage(int row, int column);
|
||||
void RefreshGridBackgroundImage();
|
||||
void resizeEvent(QResizeEvent* event);
|
||||
void PlayBackgroundMusic(QString path);
|
||||
void onCurrentCellChanged(int currentRow, int currentColumn, int previousRow,
|
||||
int previousColumn);
|
||||
|
@ -11,6 +11,7 @@
|
||||
class QLineEdit;
|
||||
|
||||
class GameInstallDialog final : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
GameInstallDialog();
|
||||
~GameInstallDialog();
|
||||
|
@ -77,8 +77,10 @@ GameListFrame::GameListFrame(std::shared_ptr<GameInfoClass> game_info_get,
|
||||
});
|
||||
|
||||
connect(this, &QTableWidget::cellClicked, this, [=, this](int row, int column) {
|
||||
if (column == 2 && !m_game_info->m_games[row].compatibility.url.isEmpty()) {
|
||||
QDesktopServices::openUrl(QUrl(m_game_info->m_games[row].compatibility.url));
|
||||
if (column == 2 && m_game_info->m_games[row].compatibility.issue_number != "") {
|
||||
auto url_issues = "https://github.com/shadps4-emu/shadps4-game-compatibility/issues/";
|
||||
QDesktopServices::openUrl(
|
||||
QUrl(url_issues + m_game_info->m_games[row].compatibility.issue_number));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -198,14 +200,28 @@ void GameListFrame::SetListBackgroundImage(QTableWidgetItem* item) {
|
||||
void GameListFrame::RefreshListBackgroundImage() {
|
||||
QPalette palette;
|
||||
if (!backgroundImage.isNull() && Config::getShowBackgroundImage()) {
|
||||
palette.setBrush(QPalette::Base,
|
||||
QBrush(backgroundImage.scaled(size(), Qt::IgnoreAspectRatio)));
|
||||
QSize widgetSize = size();
|
||||
QPixmap scaledPixmap =
|
||||
QPixmap::fromImage(backgroundImage)
|
||||
.scaled(widgetSize, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
int x = (widgetSize.width() - scaledPixmap.width()) / 2;
|
||||
int y = (widgetSize.height() - scaledPixmap.height()) / 2;
|
||||
QPixmap finalPixmap(widgetSize);
|
||||
finalPixmap.fill(Qt::transparent);
|
||||
QPainter painter(&finalPixmap);
|
||||
painter.drawPixmap(x, y, scaledPixmap);
|
||||
palette.setBrush(QPalette::Base, QBrush(finalPixmap));
|
||||
}
|
||||
QColor transparentColor = QColor(135, 206, 235, 40);
|
||||
palette.setColor(QPalette::Highlight, transparentColor);
|
||||
this->setPalette(palette);
|
||||
}
|
||||
|
||||
void GameListFrame::resizeEvent(QResizeEvent* event) {
|
||||
QTableWidget::resizeEvent(event);
|
||||
RefreshListBackgroundImage();
|
||||
}
|
||||
|
||||
void GameListFrame::SortNameAscending(int columnIndex) {
|
||||
std::sort(m_game_info->m_games.begin(), m_game_info->m_games.end(),
|
||||
[columnIndex](const GameInfo& a, const GameInfo& b) {
|
||||
@ -278,7 +294,8 @@ void GameListFrame::SetCompatibilityItem(int row, int column, CompatibilityEntry
|
||||
tooltip_string = status_explanation;
|
||||
} else {
|
||||
tooltip_string =
|
||||
"<p> <i>" + tr("Click to go to issue") + "</i>" + "<br>" + tr("Last updated") +
|
||||
"<p> <i>" + tr("Click to see details on github") + "</i>" + "<br>" +
|
||||
tr("Last updated") +
|
||||
QString(": %1 (%2)").arg(entry.last_tested.toString("yyyy-MM-dd"), entry.version) +
|
||||
"<br>" + status_explanation + "</p>";
|
||||
}
|
||||
@ -295,6 +312,7 @@ void GameListFrame::SetCompatibilityItem(int row, int column, CompatibilityEntry
|
||||
dotLabel->setPixmap(circle_pixmap);
|
||||
|
||||
QLabel* label = new QLabel(m_compat_info->GetCompatStatusString(entry.status), widget);
|
||||
this->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents);
|
||||
|
||||
label->setStyleSheet("color: white; font-size: 16px; font-weight: bold;");
|
||||
|
||||
|
@ -30,6 +30,7 @@ Q_SIGNALS:
|
||||
public Q_SLOTS:
|
||||
void SetListBackgroundImage(QTableWidgetItem* item);
|
||||
void RefreshListBackgroundImage();
|
||||
void resizeEvent(QResizeEvent* event);
|
||||
void SortNameAscending(int columnIndex);
|
||||
void SortNameDescending(int columnIndex);
|
||||
void PlayBackgroundMusic(QTableWidgetItem* item);
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "common/config.h"
|
||||
#include "common/path_util.h"
|
||||
#include "game_info.h"
|
||||
#include "src/sdl_window.h"
|
||||
#include "sdl_window.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QCloseEvent>
|
||||
@ -39,15 +39,6 @@ EditorDialog::EditorDialog(QWidget* parent) : QDialog(parent) {
|
||||
// Create the game selection combo box
|
||||
gameComboBox = new QComboBox(this);
|
||||
gameComboBox->addItem("default"); // Add default option
|
||||
/*
|
||||
gameComboBox = new QComboBox(this);
|
||||
layout->addWidget(gameComboBox); // Add the combobox for selecting game configurations
|
||||
|
||||
// Populate the combo box with game configurations
|
||||
QStringList gameConfigs = GameInfoClass::GetGameInfo(this);
|
||||
gameComboBox->addItems(gameConfigs);
|
||||
gameComboBox->setCurrentText("default.ini"); // Set the default selection
|
||||
*/
|
||||
// Load all installed games
|
||||
loadInstalledGames();
|
||||
|
||||
@ -60,7 +51,6 @@ EditorDialog::EditorDialog(QWidget* parent) : QDialog(parent) {
|
||||
Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml");
|
||||
});
|
||||
// Create Save, Cancel, and Help buttons
|
||||
Config::SetUseUnifiedInputConfig(!Config::GetUseUnifiedInputConfig());
|
||||
QPushButton* saveButton = new QPushButton("Save", this);
|
||||
QPushButton* cancelButton = new QPushButton("Cancel", this);
|
||||
QPushButton* helpButton = new QPushButton("Help", this);
|
||||
|
@ -142,6 +142,7 @@ void MainWindow::AddUiWidgets() {
|
||||
ui->toolBar->addWidget(ui->refreshButton);
|
||||
ui->toolBar->addWidget(ui->settingsButton);
|
||||
ui->toolBar->addWidget(ui->controllerButton);
|
||||
ui->toolBar->addWidget(ui->keyboardButton);
|
||||
QFrame* line = new QFrame(this);
|
||||
line->setFrameShape(QFrame::StyledPanel);
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
@ -202,10 +203,14 @@ void MainWindow::CreateDockWindows() {
|
||||
}
|
||||
|
||||
void MainWindow::LoadGameLists() {
|
||||
// Load compatibility database
|
||||
if (Config::getCompatibilityEnabled())
|
||||
m_compat_info->LoadCompatibilityFile();
|
||||
|
||||
// Update compatibility database
|
||||
if (Config::getCheckCompatibilityOnStartup()) {
|
||||
if (Config::getCheckCompatibilityOnStartup())
|
||||
m_compat_info->UpdateCompatibilityDatabase(this);
|
||||
}
|
||||
|
||||
// Get game info from game folders.
|
||||
m_game_info->GetGameInfo(this);
|
||||
if (isTableList) {
|
||||
@ -323,6 +328,11 @@ void MainWindow::CreateConnects() {
|
||||
configWindow->exec();
|
||||
});
|
||||
|
||||
connect(ui->keyboardButton, &QPushButton::clicked, this, [this]() {
|
||||
auto kbmWindow = new EditorDialog(this);
|
||||
kbmWindow->exec();
|
||||
});
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
connect(ui->updaterAct, &QAction::triggered, this, [this]() {
|
||||
auto checkUpdate = new CheckUpdate(true);
|
||||
@ -1102,6 +1112,7 @@ void MainWindow::SetUiIcons(bool isWhite) {
|
||||
ui->refreshButton->setIcon(RecolorIcon(ui->refreshButton->icon(), isWhite));
|
||||
ui->settingsButton->setIcon(RecolorIcon(ui->settingsButton->icon(), isWhite));
|
||||
ui->controllerButton->setIcon(RecolorIcon(ui->controllerButton->icon(), isWhite));
|
||||
ui->keyboardButton->setIcon(RecolorIcon(ui->keyboardButton->icon(), isWhite));
|
||||
ui->refreshGameListAct->setIcon(RecolorIcon(ui->refreshGameListAct->icon(), isWhite));
|
||||
ui->menuGame_List_Mode->setIcon(RecolorIcon(ui->menuGame_List_Mode->icon(), isWhite));
|
||||
ui->pkgViewerAct->setIcon(RecolorIcon(ui->pkgViewerAct->icon(), isWhite));
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
QPushButton* refreshButton;
|
||||
QPushButton* settingsButton;
|
||||
QPushButton* controllerButton;
|
||||
QPushButton* keyboardButton;
|
||||
|
||||
QWidget* sizeSliderContainer;
|
||||
QHBoxLayout* sizeSliderContainer_layout;
|
||||
@ -210,6 +211,10 @@ public:
|
||||
controllerButton->setFlat(true);
|
||||
controllerButton->setIcon(QIcon(":images/controller_icon.png"));
|
||||
controllerButton->setIconSize(QSize(40, 40));
|
||||
keyboardButton = new QPushButton(centralWidget);
|
||||
keyboardButton->setFlat(true);
|
||||
keyboardButton->setIcon(QIcon(":images/keyboard_icon.png"));
|
||||
keyboardButton->setIconSize(QSize(48, 44));
|
||||
|
||||
sizeSliderContainer = new QWidget(centralWidget);
|
||||
sizeSliderContainer->setObjectName("sizeSliderContainer");
|
||||
|
@ -18,17 +18,8 @@ PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* pare
|
||||
treeWidget = new QTreeWidget(this);
|
||||
treeWidget->setColumnCount(9);
|
||||
QStringList headers;
|
||||
headers << "Name"
|
||||
<< "Serial"
|
||||
<< "Installed"
|
||||
<< "Size"
|
||||
<< "Category"
|
||||
<< "Type"
|
||||
<< "App Ver"
|
||||
<< "FW"
|
||||
<< "Region"
|
||||
<< "Flags"
|
||||
<< "Path";
|
||||
headers << tr("Name") << tr("Serial") << tr("Installed") << tr("Size") << tr("Category")
|
||||
<< tr("Type") << tr("App Ver") << tr("FW") << tr("Region") << tr("Flags") << tr("Path");
|
||||
treeWidget->setHeaderLabels(headers);
|
||||
treeWidget->header()->setDefaultAlignment(Qt::AlignCenter);
|
||||
treeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
@ -36,7 +27,7 @@ PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* pare
|
||||
this->setCentralWidget(treeWidget);
|
||||
QMenuBar* menuBar = new QMenuBar(this);
|
||||
menuBar->setContextMenuPolicy(Qt::PreventContextMenu);
|
||||
QMenu* fileMenu = menuBar->addMenu(tr("&File"));
|
||||
QMenu* fileMenu = menuBar->addMenu(tr("File"));
|
||||
QAction* openFolderAct = new QAction(tr("Open Folder"), this);
|
||||
fileMenu->addAction(openFolderAct);
|
||||
this->setMenuBar(menuBar);
|
||||
@ -114,15 +105,15 @@ void PKGViewer::ProcessPKGInfo() {
|
||||
return;
|
||||
}
|
||||
psf.Open(package.sfo);
|
||||
QString title_name =
|
||||
QString::fromStdString(std::string{psf.GetString("TITLE").value_or("Unknown")});
|
||||
QString title_id =
|
||||
QString::fromStdString(std::string{psf.GetString("TITLE_ID").value_or("Unknown")});
|
||||
QString title_name = QString::fromStdString(
|
||||
std::string{psf.GetString("TITLE").value_or(std::string{tr("Unknown").toStdString()})});
|
||||
QString title_id = QString::fromStdString(std::string{
|
||||
psf.GetString("TITLE_ID").value_or(std::string{tr("Unknown").toStdString()})});
|
||||
QString app_type = GameListUtils::GetAppType(psf.GetInteger("APP_TYPE").value_or(0));
|
||||
QString app_version =
|
||||
QString::fromStdString(std::string{psf.GetString("APP_VER").value_or("Unknown")});
|
||||
QString title_category =
|
||||
QString::fromStdString(std::string{psf.GetString("CATEGORY").value_or("Unknown")});
|
||||
QString app_version = QString::fromStdString(std::string{
|
||||
psf.GetString("APP_VER").value_or(std::string{tr("Unknown").toStdString()})});
|
||||
QString title_category = QString::fromStdString(std::string{
|
||||
psf.GetString("CATEGORY").value_or(std::string{tr("Unknown").toStdString()})});
|
||||
QString pkg_size = GameListUtils::FormatSize(package.GetPkgHeader().pkg_size);
|
||||
pkg_content_flag = package.GetPkgHeader().pkg_content_flags;
|
||||
QString flagss = "";
|
||||
@ -134,7 +125,7 @@ void PKGViewer::ProcessPKGInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
QString fw_ = "Unknown";
|
||||
QString fw_ = tr("Unknown");
|
||||
if (const auto fw_int_opt = psf.GetInteger("SYSTEM_VER"); fw_int_opt.has_value()) {
|
||||
const u32 fw_int = *fw_int_opt;
|
||||
if (fw_int == 0) {
|
||||
@ -221,6 +212,6 @@ void PKGViewer::ProcessPKGInfo() {
|
||||
// Update status bar.
|
||||
statusBar->clearMessage();
|
||||
int numPkgs = m_pkg_list.size();
|
||||
QString statusMessage = QString::number(numPkgs) + " Package.";
|
||||
QString statusMessage = QString::number(numPkgs) + " " + tr("Package");
|
||||
statusBar->showMessage(statusMessage);
|
||||
}
|
@ -58,6 +58,10 @@ QStringList languageNames = {"Arabic",
|
||||
|
||||
const QVector<int> languageIndexes = {21, 23, 14, 6, 18, 1, 12, 22, 2, 4, 25, 24, 29, 5, 0, 9,
|
||||
15, 16, 17, 7, 26, 8, 11, 20, 3, 13, 27, 10, 19, 30, 28};
|
||||
QMap<QString, QString> channelMap;
|
||||
QMap<QString, QString> logTypeMap;
|
||||
QMap<QString, QString> fullscreenModeMap;
|
||||
QMap<QString, QString> chooseHomeTabMap;
|
||||
|
||||
SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
||||
std::shared_ptr<CompatibilityInfoClass> m_compat_info,
|
||||
@ -71,6 +75,14 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
||||
|
||||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Close)->setFocus();
|
||||
|
||||
channelMap = {{tr("Release"), "Release"}, {tr("Nightly"), "Nightly"}};
|
||||
logTypeMap = {{tr("async"), "async"}, {tr("sync"), "sync"}};
|
||||
fullscreenModeMap = {{tr("Borderless"), "Borderless"}, {tr("True"), "True"}};
|
||||
chooseHomeTabMap = {{tr("General"), "General"}, {tr("GUI"), "GUI"},
|
||||
{tr("Graphics"), "Graphics"}, {tr("User"), "User"},
|
||||
{tr("Input"), "Input"}, {tr("Paths"), "Paths"},
|
||||
{tr("Debug"), "Debug"}};
|
||||
|
||||
// Add list of available GPUs
|
||||
ui->graphicsAdapterBox->addItem(tr("Auto Select")); // -1, auto selection
|
||||
for (const auto& device : physical_devices) {
|
||||
@ -137,13 +149,23 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0))
|
||||
connect(ui->updateCheckBox, &QCheckBox::stateChanged, this,
|
||||
[](int state) { Config::setAutoUpdate(state == Qt::Checked); });
|
||||
|
||||
connect(ui->changelogCheckBox, &QCheckBox::stateChanged, this,
|
||||
[](int state) { Config::setAlwaysShowChangelog(state == Qt::Checked); });
|
||||
#else
|
||||
connect(ui->updateCheckBox, &QCheckBox::checkStateChanged, this,
|
||||
[](Qt::CheckState state) { Config::setAutoUpdate(state == Qt::Checked); });
|
||||
|
||||
connect(ui->changelogCheckBox, &QCheckBox::checkStateChanged, this,
|
||||
[](Qt::CheckState state) { Config::setAlwaysShowChangelog(state == Qt::Checked); });
|
||||
#endif
|
||||
|
||||
connect(ui->updateComboBox, &QComboBox::currentTextChanged, this,
|
||||
[](const QString& channel) { Config::setUpdateChannel(channel.toStdString()); });
|
||||
[this](const QString& channel) {
|
||||
if (channelMap.contains(channel)) {
|
||||
Config::setUpdateChannel(channelMap.value(channel).toStdString());
|
||||
}
|
||||
});
|
||||
|
||||
connect(ui->checkUpdateButton, &QPushButton::clicked, this, []() {
|
||||
auto checkUpdate = new CheckUpdate(true);
|
||||
@ -159,14 +181,18 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
||||
});
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0))
|
||||
connect(ui->enableCompatibilityCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
||||
connect(ui->enableCompatibilityCheckBox, &QCheckBox::stateChanged, this,
|
||||
[this, m_compat_info](int state) {
|
||||
#else
|
||||
connect(ui->enableCompatibilityCheckBox, &QCheckBox::checkStateChanged, this,
|
||||
[this](Qt::CheckState state) {
|
||||
[this, m_compat_info](Qt::CheckState state) {
|
||||
#endif
|
||||
Config::setCompatibilityEnabled(state);
|
||||
emit CompatibilityChanged();
|
||||
});
|
||||
Config::setCompatibilityEnabled(state);
|
||||
if (state) {
|
||||
m_compat_info->LoadCompatibilityFile();
|
||||
}
|
||||
emit CompatibilityChanged();
|
||||
});
|
||||
}
|
||||
|
||||
// Gui TAB
|
||||
@ -174,8 +200,14 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
||||
connect(ui->chooseHomeTabComboBox, &QComboBox::currentTextChanged, this,
|
||||
[](const QString& hometab) { Config::setChooseHomeTab(hometab.toStdString()); });
|
||||
|
||||
connect(ui->showBackgroundImageCheckBox, &QCheckBox::stateChanged, this,
|
||||
[](int state) { Config::setShowBackgroundImage(state == Qt::Checked); });
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0))
|
||||
connect(ui->showBackgroundImageCheckBox, &QCheckBox::stateChanged, this, [](int state) {
|
||||
#else
|
||||
connect(ui->showBackgroundImageCheckBox, &QCheckBox::checkStateChanged, this,
|
||||
[](Qt::CheckState state) {
|
||||
#endif
|
||||
Config::setShowBackgroundImage(state == Qt::Checked);
|
||||
});
|
||||
}
|
||||
// Input TAB
|
||||
{
|
||||
@ -273,6 +305,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
||||
ui->heightDivider->installEventFilter(this);
|
||||
ui->dumpShadersCheckBox->installEventFilter(this);
|
||||
ui->nullGpuCheckBox->installEventFilter(this);
|
||||
ui->enableHDRCheckBox->installEventFilter(this);
|
||||
|
||||
// Paths
|
||||
ui->gameFoldersGroupBox->installEventFilter(this);
|
||||
@ -330,7 +363,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
||||
toml::find_or<int>(data, "Settings", "consoleLanguage", 6))) %
|
||||
languageIndexes.size());
|
||||
ui->emulatorLanguageComboBox->setCurrentIndex(
|
||||
languages[toml::find_or<std::string>(data, "GUI", "emulatorLanguage", "en")]);
|
||||
languages[toml::find_or<std::string>(data, "GUI", "emulatorLanguage", "en_US")]);
|
||||
ui->hideCursorComboBox->setCurrentIndex(toml::find_or<int>(data, "Input", "cursorState", 1));
|
||||
OnCursorStateChanged(toml::find_or<int>(data, "Input", "cursorState", 1));
|
||||
ui->idleTimeoutSpinBox->setValue(toml::find_or<int>(data, "Input", "cursorHideTimeout", 5));
|
||||
@ -342,6 +375,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
||||
ui->vblankSpinBox->setValue(toml::find_or<int>(data, "GPU", "vblankDivider", 1));
|
||||
ui->dumpShadersCheckBox->setChecked(toml::find_or<bool>(data, "GPU", "dumpShaders", false));
|
||||
ui->nullGpuCheckBox->setChecked(toml::find_or<bool>(data, "GPU", "nullGpu", false));
|
||||
ui->enableHDRCheckBox->setChecked(toml::find_or<bool>(data, "General", "allowHDR", false));
|
||||
ui->playBGMCheckBox->setChecked(toml::find_or<bool>(data, "General", "playBGM", false));
|
||||
ui->disableTrophycheckBox->setChecked(
|
||||
toml::find_or<bool>(data, "General", "isTrophyPopupDisabled", false));
|
||||
@ -349,14 +383,19 @@ void SettingsDialog::LoadValuesFromConfig() {
|
||||
ui->discordRPCCheckbox->setChecked(
|
||||
toml::find_or<bool>(data, "General", "enableDiscordRPC", true));
|
||||
ui->fullscreenCheckBox->setChecked(toml::find_or<bool>(data, "General", "Fullscreen", false));
|
||||
ui->fullscreenModeComboBox->setCurrentText(QString::fromStdString(
|
||||
toml::find_or<std::string>(data, "General", "FullscreenMode", "Borderless")));
|
||||
QString translatedText_FullscreenMode =
|
||||
fullscreenModeMap.key(QString::fromStdString(Config::getFullscreenMode()));
|
||||
if (!translatedText_FullscreenMode.isEmpty()) {
|
||||
ui->fullscreenModeComboBox->setCurrentText(translatedText_FullscreenMode);
|
||||
}
|
||||
ui->separateUpdatesCheckBox->setChecked(
|
||||
toml::find_or<bool>(data, "General", "separateUpdateEnabled", false));
|
||||
ui->gameSizeCheckBox->setChecked(toml::find_or<bool>(data, "GUI", "loadGameSizeEnabled", true));
|
||||
ui->showSplashCheckBox->setChecked(toml::find_or<bool>(data, "General", "showSplash", false));
|
||||
ui->logTypeComboBox->setCurrentText(
|
||||
QString::fromStdString(toml::find_or<std::string>(data, "General", "logType", "async")));
|
||||
QString translatedText_logType = logTypeMap.key(QString::fromStdString(Config::getLogType()));
|
||||
if (!translatedText_logType.isEmpty()) {
|
||||
ui->logTypeComboBox->setCurrentText(translatedText_logType);
|
||||
}
|
||||
ui->logFilterLineEdit->setText(
|
||||
QString::fromStdString(toml::find_or<std::string>(data, "General", "logFilter", "")));
|
||||
ui->userNameLineEdit->setText(
|
||||
@ -385,24 +424,29 @@ void SettingsDialog::LoadValuesFromConfig() {
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
ui->updateCheckBox->setChecked(toml::find_or<bool>(data, "General", "autoUpdate", false));
|
||||
std::string updateChannel = toml::find_or<std::string>(data, "General", "updateChannel", "");
|
||||
if (updateChannel != "Release" && updateChannel != "Nightly") {
|
||||
if (Common::isRelease) {
|
||||
updateChannel = "Release";
|
||||
} else {
|
||||
updateChannel = "Nightly";
|
||||
}
|
||||
}
|
||||
ui->updateComboBox->setCurrentText(QString::fromStdString(updateChannel));
|
||||
ui->changelogCheckBox->setChecked(
|
||||
toml::find_or<bool>(data, "General", "alwaysShowChangelog", false));
|
||||
|
||||
QString updateChannel = QString::fromStdString(Config::getUpdateChannel());
|
||||
ui->updateComboBox->setCurrentText(
|
||||
channelMap.key(updateChannel != "Release" && updateChannel != "Nightly"
|
||||
? (Common::isRelease ? "Release" : "Nightly")
|
||||
: updateChannel));
|
||||
#endif
|
||||
|
||||
std::string chooseHomeTab = toml::find_or<std::string>(data, "General", "chooseHomeTab", "");
|
||||
ui->chooseHomeTabComboBox->setCurrentText(QString::fromStdString(chooseHomeTab));
|
||||
std::string chooseHomeTab =
|
||||
toml::find_or<std::string>(data, "General", "chooseHomeTab", "General");
|
||||
QString translatedText = chooseHomeTabMap.key(QString::fromStdString(chooseHomeTab));
|
||||
if (translatedText.isEmpty()) {
|
||||
translatedText = tr("General");
|
||||
}
|
||||
ui->chooseHomeTabComboBox->setCurrentText(translatedText);
|
||||
|
||||
QStringList tabNames = {tr("General"), tr("GUI"), tr("Graphics"), tr("User"),
|
||||
tr("Input"), tr("Paths"), tr("Debug")};
|
||||
QString chooseHomeTabQString = QString::fromStdString(chooseHomeTab);
|
||||
int indexTab = tabNames.indexOf(chooseHomeTabQString);
|
||||
indexTab = (indexTab == -1) ? 0 : indexTab;
|
||||
int indexTab = tabNames.indexOf(translatedText);
|
||||
if (indexTab == -1)
|
||||
indexTab = 0;
|
||||
ui->tabWidgetSettings->setCurrentIndex(indexTab);
|
||||
|
||||
QString backButtonBehavior = QString::fromStdString(
|
||||
@ -481,110 +525,109 @@ int SettingsDialog::exec() {
|
||||
SettingsDialog::~SettingsDialog() {}
|
||||
|
||||
void SettingsDialog::updateNoteTextEdit(const QString& elementName) {
|
||||
QString text; // texts are only in .ts translation files for better formatting
|
||||
QString text;
|
||||
|
||||
// clang-format off
|
||||
// General
|
||||
if (elementName == "consoleLanguageGroupBox") {
|
||||
text = tr("consoleLanguageGroupBox");
|
||||
text = tr("Console Language:\\nSets the language that the PS4 game uses.\\nIt's recommended to set this to a language the game supports, which will vary by region.");
|
||||
} else if (elementName == "emulatorLanguageGroupBox") {
|
||||
text = tr("emulatorLanguageGroupBox");
|
||||
text = tr("Emulator Language:\\nSets the language of the emulator's user interface.");
|
||||
} else if (elementName == "fullscreenCheckBox") {
|
||||
text = tr("fullscreenCheckBox");
|
||||
text = tr("Enable Full Screen:\\nAutomatically puts the game window into full-screen mode.\\nThis can be toggled by pressing the F11 key.");
|
||||
} else if (elementName == "separateUpdatesCheckBox") {
|
||||
text = tr("separateUpdatesCheckBox");
|
||||
text = tr("Enable Separate Update Folder:\\nEnables installing game updates into a separate folder for easy management.\\nThis can be manually created by adding the extracted update to the game folder with the name \"CUSA00000-UPDATE\" where the CUSA ID matches the game's ID.");
|
||||
} else if (elementName == "showSplashCheckBox") {
|
||||
text = tr("showSplashCheckBox");
|
||||
text = tr("Show Splash Screen:\\nShows the game's splash screen (a special image) while the game is starting.");
|
||||
} else if (elementName == "discordRPCCheckbox") {
|
||||
text = tr("discordRPCCheckbox");
|
||||
text = tr("Enable Discord Rich Presence:\\nDisplays the emulator icon and relevant information on your Discord profile.");
|
||||
} else if (elementName == "userName") {
|
||||
text = tr("userName");
|
||||
} else if (elementName == "label_Trophy") {
|
||||
text = tr("TrophyKey");
|
||||
} else if (elementName == "trophyKeyLineEdit") {
|
||||
text = tr("TrophyKey");
|
||||
text = tr("Username:\\nSets the PS4's account username, which may be displayed by some games.");
|
||||
} else if (elementName == "label_Trophy" || elementName == "trophyKeyLineEdit") {
|
||||
text = tr("Trophy Key:\\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\\nMust contain only hex characters.");
|
||||
} else if (elementName == "logTypeGroupBox") {
|
||||
text = tr("logTypeGroupBox");
|
||||
text = tr("Log Type:\\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation.");
|
||||
} else if (elementName == "logFilter") {
|
||||
text = tr("logFilter");
|
||||
#ifdef ENABLE_UPDATER
|
||||
text = tr("Log Filter:\\nFilters the log to only print specific information.\\nExamples: \"Core:Trace\" \"Lib.Pad:Debug Common.Filesystem:Error\" \"*:Critical\"\\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it.");
|
||||
#ifdef ENABLE_UPDATER
|
||||
} else if (elementName == "updaterGroupBox") {
|
||||
text = tr("updaterGroupBox");
|
||||
text = tr("Update:\\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable.");
|
||||
#endif
|
||||
} else if (elementName == "GUIBackgroundImageGroupBox") {
|
||||
text = tr("GUIBackgroundImageGroupBox");
|
||||
text = tr("Background Image:\\nControl the opacity of the game background image.");
|
||||
} else if (elementName == "GUIMusicGroupBox") {
|
||||
text = tr("GUIMusicGroupBox");
|
||||
text = tr("Play Title Music:\\nIf a game supports it, enable playing special music when selecting the game in the GUI.");
|
||||
} else if (elementName == "enableHDRCheckBox") {
|
||||
text = tr("Enable HDR:\\nEnables HDR in games that support it.\\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format.");
|
||||
} else if (elementName == "disableTrophycheckBox") {
|
||||
text = tr("disableTrophycheckBox");
|
||||
text = tr("Disable Trophy Pop-ups:\\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window).");
|
||||
} else if (elementName == "enableCompatibilityCheckBox") {
|
||||
text = tr("enableCompatibilityCheckBox");
|
||||
text = tr("Display Compatibility Data:\\nDisplays game compatibility information in table view. Enable \"Update Compatibility On Startup\" to get up-to-date information.");
|
||||
} else if (elementName == "checkCompatibilityOnStartupCheckBox") {
|
||||
text = tr("checkCompatibilityOnStartupCheckBox");
|
||||
text = tr("Update Compatibility On Startup:\\nAutomatically update the compatibility database when shadPS4 starts.");
|
||||
} else if (elementName == "updateCompatibilityButton") {
|
||||
text = tr("updateCompatibilityButton");
|
||||
text = tr("Update Compatibility Database:\\nImmediately update the compatibility database.");
|
||||
}
|
||||
|
||||
// Input
|
||||
if (elementName == "hideCursorGroupBox") {
|
||||
text = tr("hideCursorGroupBox");
|
||||
text = tr("Hide Cursor:\\nChoose when the cursor will disappear:\\nNever: You will always see the mouse.\\nidle: Set a time for it to disappear after being idle.\\nAlways: you will never see the mouse.");
|
||||
} else if (elementName == "idleTimeoutGroupBox") {
|
||||
text = tr("idleTimeoutGroupBox");
|
||||
text = tr("Hide Idle Cursor Timeout:\\nThe duration (seconds) after which the cursor that has been idle hides itself.");
|
||||
} else if (elementName == "backButtonBehaviorGroupBox") {
|
||||
text = tr("backButtonBehaviorGroupBox");
|
||||
text = tr("Back Button Behavior:\\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad.");
|
||||
}
|
||||
|
||||
// Graphics
|
||||
if (elementName == "graphicsAdapterGroupBox") {
|
||||
text = tr("graphicsAdapterGroupBox");
|
||||
} else if (elementName == "widthGroupBox") {
|
||||
text = tr("resolutionLayout");
|
||||
} else if (elementName == "heightGroupBox") {
|
||||
text = tr("resolutionLayout");
|
||||
text = tr("Graphics Device:\\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\\nor select \"Auto Select\" to automatically determine it.");
|
||||
} else if (elementName == "widthGroupBox" || elementName == "heightGroupBox") {
|
||||
text = tr("Width/Height:\\nSets the size of the emulator window at launch, which can be resized during gameplay.\\nThis is different from the in-game resolution.");
|
||||
} else if (elementName == "heightDivider") {
|
||||
text = tr("heightDivider");
|
||||
text = tr("Vblank Divider:\\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change!");
|
||||
} else if (elementName == "dumpShadersCheckBox") {
|
||||
text = tr("dumpShadersCheckBox");
|
||||
text = tr("Enable Shaders Dumping:\\nFor the sake of technical debugging, saves the games shaders to a folder as they render.");
|
||||
} else if (elementName == "nullGpuCheckBox") {
|
||||
text = tr("nullGpuCheckBox");
|
||||
text = tr("Enable Null GPU:\\nFor the sake of technical debugging, disables game rendering as if there were no graphics card.");
|
||||
}
|
||||
|
||||
// Path
|
||||
if (elementName == "gameFoldersGroupBox" || elementName == "gameFoldersListWidget") {
|
||||
text = tr("gameFoldersBox");
|
||||
text = tr("Game Folders:\\nThe list of folders to check for installed games.");
|
||||
} else if (elementName == "addFolderButton") {
|
||||
text = tr("addFolderButton");
|
||||
text = tr("Add:\\nAdd a folder to the list.");
|
||||
} else if (elementName == "removeFolderButton") {
|
||||
text = tr("removeFolderButton");
|
||||
text = tr("Remove:\\nRemove a folder from the list.");
|
||||
}
|
||||
|
||||
// Save Data
|
||||
if (elementName == "saveDataGroupBox" || elementName == "currentSaveDataPath") {
|
||||
text = tr("saveDataBox");
|
||||
text = tr("Save Data Path:\\nThe folder where game save data will be saved.");
|
||||
} else if (elementName == "browseButton") {
|
||||
text = tr("browseButton");
|
||||
text = tr("Browse:\\nBrowse for a folder to set as the save data path.");
|
||||
}
|
||||
|
||||
// Debug
|
||||
if (elementName == "debugDump") {
|
||||
text = tr("debugDump");
|
||||
text = tr("Enable Debug Dumping:\\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory.");
|
||||
} else if (elementName == "vkValidationCheckBox") {
|
||||
text = tr("vkValidationCheckBox");
|
||||
text = tr("Enable Vulkan Validation Layers:\\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\\nThis will reduce performance and likely change the behavior of emulation.");
|
||||
} else if (elementName == "vkSyncValidationCheckBox") {
|
||||
text = tr("vkSyncValidationCheckBox");
|
||||
text = tr("Enable Vulkan Synchronization Validation:\\nEnables a system that validates the timing of Vulkan rendering tasks.\\nThis will reduce performance and likely change the behavior of emulation.");
|
||||
} else if (elementName == "rdocCheckBox") {
|
||||
text = tr("rdocCheckBox");
|
||||
text = tr("Enable RenderDoc Debugging:\\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame.");
|
||||
} else if (elementName == "crashDiagnosticsCheckBox") {
|
||||
text = tr("crashDiagnosticsCheckBox");
|
||||
text = tr("Crash Diagnostics:\\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\\nDoes not work on Intel GPUs.\\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work.");
|
||||
} else if (elementName == "guestMarkersCheckBox") {
|
||||
text = tr("guestMarkersCheckBox");
|
||||
text = tr("Guest Debug Markers:\\nInserts any debug markers the game itself has added to the command buffer.\\nIf you have this enabled, you should enable Crash Diagnostics.\\nUseful for programs like RenderDoc.");
|
||||
} else if (elementName == "hostMarkersCheckBox") {
|
||||
text = tr("hostMarkersCheckBox");
|
||||
text = tr("Host Debug Markers:\\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\\nIf you have this enabled, you should enable Crash Diagnostics.\\nUseful for programs like RenderDoc.");
|
||||
} else if (elementName == "copyGPUBuffersCheckBox") {
|
||||
text = tr("copyGPUBuffersCheckBox");
|
||||
text = tr("Copy GPU Buffers:\\nGets around race conditions involving GPU submits.\\nMay or may not help with PM4 type 0 crashes.");
|
||||
} else if (elementName == "collectShaderCheckBox") {
|
||||
text = tr("collectShaderCheckBox");
|
||||
text = tr("Collect Shaders:\\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10).");
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
ui->descriptionText->setText(text.replace("\\n", "\n"));
|
||||
}
|
||||
|
||||
@ -610,11 +653,13 @@ void SettingsDialog::UpdateSettings() {
|
||||
const QVector<std::string> TouchPadIndex = {"left", "center", "right", "none"};
|
||||
Config::setBackButtonBehavior(TouchPadIndex[ui->backButtonBehaviorComboBox->currentIndex()]);
|
||||
Config::setIsFullscreen(ui->fullscreenCheckBox->isChecked());
|
||||
Config::setFullscreenMode(ui->fullscreenModeComboBox->currentText().toStdString());
|
||||
Config::setFullscreenMode(
|
||||
fullscreenModeMap.value(ui->fullscreenModeComboBox->currentText()).toStdString());
|
||||
Config::setIsMotionControlsEnabled(ui->motionControlsCheckBox->isChecked());
|
||||
Config::setisTrophyPopupDisabled(ui->disableTrophycheckBox->isChecked());
|
||||
Config::setPlayBGM(ui->playBGMCheckBox->isChecked());
|
||||
Config::setLogType(ui->logTypeComboBox->currentText().toStdString());
|
||||
Config::setAllowHDR(ui->enableHDRCheckBox->isChecked());
|
||||
Config::setLogType(logTypeMap.value(ui->logTypeComboBox->currentText()).toStdString());
|
||||
Config::setLogFilter(ui->logFilterLineEdit->text().toStdString());
|
||||
Config::setUserName(ui->userNameLineEdit->text().toStdString());
|
||||
Config::setTrophyKey(ui->trophyKeyLineEdit->text().toStdString());
|
||||
@ -642,8 +687,10 @@ void SettingsDialog::UpdateSettings() {
|
||||
Config::setCollectShaderForDebug(ui->collectShaderCheckBox->isChecked());
|
||||
Config::setCopyGPUCmdBuffers(ui->copyGPUBuffersCheckBox->isChecked());
|
||||
Config::setAutoUpdate(ui->updateCheckBox->isChecked());
|
||||
Config::setUpdateChannel(ui->updateComboBox->currentText().toStdString());
|
||||
Config::setChooseHomeTab(ui->chooseHomeTabComboBox->currentText().toStdString());
|
||||
Config::setAlwaysShowChangelog(ui->changelogCheckBox->isChecked());
|
||||
Config::setUpdateChannel(channelMap.value(ui->updateComboBox->currentText()).toStdString());
|
||||
Config::setChooseHomeTab(
|
||||
chooseHomeTabMap.value(ui->chooseHomeTabComboBox->currentText()).toStdString());
|
||||
Config::setCompatibilityEnabled(ui->enableCompatibilityCheckBox->isChecked());
|
||||
Config::setCheckCompatibilityOnStartup(ui->checkCompatibilityOnStartupCheckBox->isChecked());
|
||||
Config::setBackgroundImageOpacity(ui->backgroundImageOpacitySlider->value());
|
||||
@ -689,4 +736,4 @@ void SettingsDialog::ResetInstallFolders() {
|
||||
}
|
||||
Config::setGameInstallDirs(settings_install_dirs_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,6 +171,13 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableHDRCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable HDR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="separateUpdatesCheckBox">
|
||||
<property name="text">
|
||||
@ -339,7 +346,7 @@
|
||||
<property name="title">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="UpdateLayout" stretch="0,0,0">
|
||||
<layout class="QVBoxLayout" name="UpdateLayout" stretch="0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
@ -417,7 +424,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="checkUpdateButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -458,6 +465,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="changelogCheckBox">
|
||||
<property name="text">
|
||||
<string>Always Show Changelog</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -585,15 +599,15 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="GUIBackgroundImageGroupBox">
|
||||
<property name="title">
|
||||
<string>Background Image</string>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Background Image</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="backgroundImageVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showBackgroundImageCheckBox">
|
||||
|
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/ar_SA.ts
Normal file
1790
src/qt_gui/translations/ar_SA.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/de_DE.ts
Normal file
1790
src/qt_gui/translations/de_DE.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/el_GR.ts
Normal file
1790
src/qt_gui/translations/el_GR.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/en_US.ts
Normal file
1790
src/qt_gui/translations/en_US.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/fi_FI.ts
Normal file
1790
src/qt_gui/translations/fi_FI.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/fr_FR.ts
Normal file
1790
src/qt_gui/translations/fr_FR.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/id_ID.ts
Normal file
1790
src/qt_gui/translations/id_ID.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/it_IT.ts
Normal file
1790
src/qt_gui/translations/it_IT.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/nb_NO.ts
Normal file
1790
src/qt_gui/translations/nb_NO.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/nl_NL.ts
Normal file
1790
src/qt_gui/translations/nl_NL.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1790
src/qt_gui/translations/pt_PT.ts
Normal file
1790
src/qt_gui/translations/pt_PT.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user