mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 17:02:40 +00:00
Merge branch 'main' into qt-style
This commit is contained in:
commit
6196d05755
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -390,7 +390,7 @@ jobs:
|
|||||||
- name: Cache CMake Configuration
|
- name: Cache CMake Configuration
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration
|
cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-configuration
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{github.workspace}}/build
|
${{github.workspace}}/build
|
||||||
@ -401,7 +401,7 @@ jobs:
|
|||||||
- name: Cache CMake Build
|
- name: Cache CMake Build
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
env:
|
env:
|
||||||
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
|
cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-build
|
||||||
with:
|
with:
|
||||||
append-timestamp: false
|
append-timestamp: false
|
||||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
@ -426,7 +426,7 @@ jobs:
|
|||||||
- name: Cache CMake Configuration
|
- name: Cache CMake Configuration
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
cache-name: ${{ runner.os }}-qt-cache-cmake-configuration
|
cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-configuration
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{github.workspace}}/build
|
${{github.workspace}}/build
|
||||||
@ -437,7 +437,7 @@ jobs:
|
|||||||
- name: Cache CMake Build
|
- name: Cache CMake Build
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
env:
|
env:
|
||||||
cache-name: ${{ runner.os }}-qt-cache-cmake-build
|
cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-build
|
||||||
with:
|
with:
|
||||||
append-timestamp: false
|
append-timestamp: false
|
||||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
@ -250,10 +250,14 @@ set(KERNEL_LIB src/core/libraries/kernel/sync/mutex.cpp
|
|||||||
src/core/libraries/kernel/time.h
|
src/core/libraries/kernel/time.h
|
||||||
src/core/libraries/kernel/orbis_error.h
|
src/core/libraries/kernel/orbis_error.h
|
||||||
src/core/libraries/kernel/posix_error.h
|
src/core/libraries/kernel/posix_error.h
|
||||||
|
src/core/libraries/kernel/aio.cpp
|
||||||
|
src/core/libraries/kernel/aio.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(NETWORK_LIBS src/core/libraries/network/http.cpp
|
set(NETWORK_LIBS src/core/libraries/network/http.cpp
|
||||||
src/core/libraries/network/http.h
|
src/core/libraries/network/http.h
|
||||||
|
src/core/libraries/network/http2.cpp
|
||||||
|
src/core/libraries/network/http2.h
|
||||||
src/core/libraries/network/net.cpp
|
src/core/libraries/network/net.cpp
|
||||||
src/core/libraries/network/netctl.cpp
|
src/core/libraries/network/netctl.cpp
|
||||||
src/core/libraries/network/netctl.h
|
src/core/libraries/network/netctl.h
|
||||||
@ -263,6 +267,8 @@ set(NETWORK_LIBS src/core/libraries/network/http.cpp
|
|||||||
src/core/libraries/network/net.h
|
src/core/libraries/network/net.h
|
||||||
src/core/libraries/network/ssl.cpp
|
src/core/libraries/network/ssl.cpp
|
||||||
src/core/libraries/network/ssl.h
|
src/core/libraries/network/ssl.h
|
||||||
|
src/core/libraries/network/ssl2.cpp
|
||||||
|
src/core/libraries/network/ssl2.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(AVPLAYER_LIB src/core/libraries/avplayer/avplayer_common.cpp
|
set(AVPLAYER_LIB src/core/libraries/avplayer/avplayer_common.cpp
|
||||||
@ -415,7 +421,9 @@ set(VDEC_LIB src/core/libraries/videodec/videodec2_impl.cpp
|
|||||||
src/core/libraries/videodec/videodec_impl.h
|
src/core/libraries/videodec/videodec_impl.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
|
set(NP_LIBS src/core/libraries/np_common/np_common.cpp
|
||||||
|
src/core/libraries/np_common/np_common.h
|
||||||
|
src/core/libraries/np_manager/np_manager.cpp
|
||||||
src/core/libraries/np_manager/np_manager.h
|
src/core/libraries/np_manager/np_manager.h
|
||||||
src/core/libraries/np_score/np_score.cpp
|
src/core/libraries/np_score/np_score.cpp
|
||||||
src/core/libraries/np_score/np_score.h
|
src/core/libraries/np_score/np_score.h
|
||||||
@ -424,6 +432,8 @@ set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
|
|||||||
src/core/libraries/np_trophy/trophy_ui.cpp
|
src/core/libraries/np_trophy/trophy_ui.cpp
|
||||||
src/core/libraries/np_trophy/trophy_ui.h
|
src/core/libraries/np_trophy/trophy_ui.h
|
||||||
src/core/libraries/np_trophy/np_trophy_error.h
|
src/core/libraries/np_trophy/np_trophy_error.h
|
||||||
|
src/core/libraries/np_web_api/np_web_api.cpp
|
||||||
|
src/core/libraries/np_web_api/np_web_api.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp
|
set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp
|
||||||
|
2
dist/net.shadps4.shadPS4.metainfo.xml
vendored
2
dist/net.shadps4.shadPS4.metainfo.xml
vendored
@ -26,7 +26,7 @@
|
|||||||
</screenshot>
|
</screenshot>
|
||||||
<screenshot>
|
<screenshot>
|
||||||
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/3.png</image>
|
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/3.png</image>
|
||||||
<caption>Yakuza Kiwami</caption>
|
<caption>Yakuza 0</caption>
|
||||||
</screenshot>
|
</screenshot>
|
||||||
<screenshot>
|
<screenshot>
|
||||||
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/4.png</image>
|
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/4.png</image>
|
||||||
|
2
externals/sdl3
vendored
2
externals/sdl3
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 3a1d76d298db023f6cf37fb08ee766f20a4e12ab
|
Subproject commit 22422f7748d5128135995ed34c8f8012861c7332
|
2
externals/sirit
vendored
2
externals/sirit
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 1e74f4ef8d2a0e3221a4de51977663f342b53c35
|
Subproject commit 26ad5a9d0fe13260b0d7d6c64419d01a196b2e32
|
27
src/common/adaptive_mutex.h
Normal file
27
src/common/adaptive_mutex.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <pthread.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
|
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
|
||||||
|
class AdaptiveMutex {
|
||||||
|
public:
|
||||||
|
void lock() {
|
||||||
|
pthread_mutex_lock(&mutex);
|
||||||
|
}
|
||||||
|
void unlock() {
|
||||||
|
pthread_mutex_unlock(&mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
pthread_mutex_t mutex = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
|
||||||
|
};
|
||||||
|
#endif // PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
|
||||||
|
|
||||||
|
} // namespace Common
|
@ -45,6 +45,8 @@ static std::string logFilter;
|
|||||||
static std::string logType = "async";
|
static std::string logType = "async";
|
||||||
static std::string userName = "shadPS4";
|
static std::string userName = "shadPS4";
|
||||||
static std::string updateChannel;
|
static std::string updateChannel;
|
||||||
|
static u16 deadZoneLeft = 2.0;
|
||||||
|
static u16 deadZoneRight = 2.0;
|
||||||
static std::string backButtonBehavior = "left";
|
static std::string backButtonBehavior = "left";
|
||||||
static std::string widgetStyle = "Fusion";
|
static std::string widgetStyle = "Fusion";
|
||||||
static bool useSpecialPad = false;
|
static bool useSpecialPad = false;
|
||||||
@ -62,9 +64,10 @@ static u32 vblankDivider = 1;
|
|||||||
static bool vkValidation = false;
|
static bool vkValidation = false;
|
||||||
static bool vkValidationSync = false;
|
static bool vkValidationSync = false;
|
||||||
static bool vkValidationGpu = false;
|
static bool vkValidationGpu = false;
|
||||||
static bool rdocEnable = false;
|
|
||||||
static bool vkMarkers = false;
|
|
||||||
static bool vkCrashDiagnostic = false;
|
static bool vkCrashDiagnostic = false;
|
||||||
|
static bool vkHostMarkers = false;
|
||||||
|
static bool vkGuestMarkers = false;
|
||||||
|
static bool rdocEnable = false;
|
||||||
static s16 cursorState = HideCursorState::Idle;
|
static s16 cursorState = HideCursorState::Idle;
|
||||||
static int cursorHideTimeout = 5; // 5 seconds (default)
|
static int cursorHideTimeout = 5; // 5 seconds (default)
|
||||||
static bool separateupdatefolder = false;
|
static bool separateupdatefolder = false;
|
||||||
@ -73,6 +76,7 @@ static bool checkCompatibilityOnStartup = false;
|
|||||||
static std::string trophyKey;
|
static std::string trophyKey;
|
||||||
|
|
||||||
// Gui
|
// Gui
|
||||||
|
static bool load_game_size = true;
|
||||||
std::vector<std::filesystem::path> settings_install_dirs = {};
|
std::vector<std::filesystem::path> settings_install_dirs = {};
|
||||||
std::filesystem::path settings_addon_install_dir = {};
|
std::filesystem::path settings_addon_install_dir = {};
|
||||||
u32 main_window_geometry_x = 400;
|
u32 main_window_geometry_x = 400;
|
||||||
@ -103,6 +107,14 @@ void setTrophyKey(std::string key) {
|
|||||||
trophyKey = key;
|
trophyKey = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetLoadGameSizeEnabled() {
|
||||||
|
return load_game_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setLoadGameSizeEnabled(bool enable) {
|
||||||
|
load_game_size = enable;
|
||||||
|
}
|
||||||
|
|
||||||
bool isNeoModeConsole() {
|
bool isNeoModeConsole() {
|
||||||
return isNeo;
|
return isNeo;
|
||||||
}
|
}
|
||||||
@ -131,6 +143,14 @@ bool getEnableDiscordRPC() {
|
|||||||
return enableDiscordRPC;
|
return enableDiscordRPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u16 leftDeadZone() {
|
||||||
|
return deadZoneLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 rightDeadZone() {
|
||||||
|
return deadZoneRight;
|
||||||
|
}
|
||||||
|
|
||||||
s16 getCursorState() {
|
s16 getCursorState() {
|
||||||
return cursorState;
|
return cursorState;
|
||||||
}
|
}
|
||||||
@ -223,10 +243,6 @@ bool isRdocEnabled() {
|
|||||||
return rdocEnable;
|
return rdocEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isMarkersEnabled() {
|
|
||||||
return vkMarkers;
|
|
||||||
}
|
|
||||||
|
|
||||||
u32 vblankDiv() {
|
u32 vblankDiv() {
|
||||||
return vblankDivider;
|
return vblankDivider;
|
||||||
}
|
}
|
||||||
@ -243,14 +259,20 @@ bool vkValidationGpuEnabled() {
|
|||||||
return vkValidationGpu;
|
return vkValidationGpu;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool vkMarkersEnabled() {
|
|
||||||
return vkMarkers || vkCrashDiagnostic; // Crash diagnostic forces markers on
|
|
||||||
}
|
|
||||||
|
|
||||||
bool vkCrashDiagnosticEnabled() {
|
bool vkCrashDiagnosticEnabled() {
|
||||||
return vkCrashDiagnostic;
|
return vkCrashDiagnostic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool vkHostMarkersEnabled() {
|
||||||
|
// Forced on when crash diagnostic enabled.
|
||||||
|
return vkHostMarkers || vkCrashDiagnostic;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool vkGuestMarkersEnabled() {
|
||||||
|
// Forced on when crash diagnostic enabled.
|
||||||
|
return vkGuestMarkers || vkCrashDiagnostic;
|
||||||
|
}
|
||||||
|
|
||||||
bool getSeparateUpdateEnabled() {
|
bool getSeparateUpdateEnabled() {
|
||||||
return separateupdatefolder;
|
return separateupdatefolder;
|
||||||
}
|
}
|
||||||
@ -617,6 +639,8 @@ void load(const std::filesystem::path& path) {
|
|||||||
if (data.contains("Input")) {
|
if (data.contains("Input")) {
|
||||||
const toml::value& input = data.at("Input");
|
const toml::value& input = data.at("Input");
|
||||||
|
|
||||||
|
deadZoneLeft = toml::find_or<float>(input, "deadZoneLeft", 2.0);
|
||||||
|
deadZoneRight = toml::find_or<float>(input, "deadZoneRight", 2.0);
|
||||||
cursorState = toml::find_or<int>(input, "cursorState", HideCursorState::Idle);
|
cursorState = toml::find_or<int>(input, "cursorState", HideCursorState::Idle);
|
||||||
cursorHideTimeout = toml::find_or<int>(input, "cursorHideTimeout", 5);
|
cursorHideTimeout = toml::find_or<int>(input, "cursorHideTimeout", 5);
|
||||||
backButtonBehavior = toml::find_or<std::string>(input, "backButtonBehavior", "left");
|
backButtonBehavior = toml::find_or<std::string>(input, "backButtonBehavior", "left");
|
||||||
@ -644,9 +668,10 @@ void load(const std::filesystem::path& path) {
|
|||||||
vkValidation = toml::find_or<bool>(vk, "validation", false);
|
vkValidation = toml::find_or<bool>(vk, "validation", false);
|
||||||
vkValidationSync = toml::find_or<bool>(vk, "validation_sync", false);
|
vkValidationSync = toml::find_or<bool>(vk, "validation_sync", false);
|
||||||
vkValidationGpu = toml::find_or<bool>(vk, "validation_gpu", true);
|
vkValidationGpu = toml::find_or<bool>(vk, "validation_gpu", true);
|
||||||
rdocEnable = toml::find_or<bool>(vk, "rdocEnable", false);
|
|
||||||
vkMarkers = toml::find_or<bool>(vk, "rdocMarkersEnable", false);
|
|
||||||
vkCrashDiagnostic = toml::find_or<bool>(vk, "crashDiagnostic", false);
|
vkCrashDiagnostic = toml::find_or<bool>(vk, "crashDiagnostic", false);
|
||||||
|
vkHostMarkers = toml::find_or<bool>(vk, "hostMarkers", false);
|
||||||
|
vkGuestMarkers = toml::find_or<bool>(vk, "guestMarkers", false);
|
||||||
|
rdocEnable = toml::find_or<bool>(vk, "rdocEnable", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.contains("Debug")) {
|
if (data.contains("Debug")) {
|
||||||
@ -659,6 +684,7 @@ void load(const std::filesystem::path& path) {
|
|||||||
if (data.contains("GUI")) {
|
if (data.contains("GUI")) {
|
||||||
const toml::value& gui = data.at("GUI");
|
const toml::value& gui = data.at("GUI");
|
||||||
|
|
||||||
|
load_game_size = toml::find_or<bool>(gui, "loadGameSizeEnabled", true);
|
||||||
m_icon_size = toml::find_or<int>(gui, "iconSize", 0);
|
m_icon_size = toml::find_or<int>(gui, "iconSize", 0);
|
||||||
m_icon_size_grid = toml::find_or<int>(gui, "iconSizeGrid", 0);
|
m_icon_size_grid = toml::find_or<int>(gui, "iconSizeGrid", 0);
|
||||||
m_slider_pos = toml::find_or<int>(gui, "sliderPos", 0);
|
m_slider_pos = toml::find_or<int>(gui, "sliderPos", 0);
|
||||||
@ -735,6 +761,8 @@ void save(const std::filesystem::path& path) {
|
|||||||
data["General"]["separateUpdateEnabled"] = separateupdatefolder;
|
data["General"]["separateUpdateEnabled"] = separateupdatefolder;
|
||||||
data["General"]["compatibilityEnabled"] = compatibilityData;
|
data["General"]["compatibilityEnabled"] = compatibilityData;
|
||||||
data["General"]["checkCompatibilityOnStartup"] = checkCompatibilityOnStartup;
|
data["General"]["checkCompatibilityOnStartup"] = checkCompatibilityOnStartup;
|
||||||
|
data["Input"]["deadZoneLeft"] = deadZoneLeft;
|
||||||
|
data["Input"]["deadZoneRight"] = deadZoneRight;
|
||||||
data["Input"]["cursorState"] = cursorState;
|
data["Input"]["cursorState"] = cursorState;
|
||||||
data["Input"]["cursorHideTimeout"] = cursorHideTimeout;
|
data["Input"]["cursorHideTimeout"] = cursorHideTimeout;
|
||||||
data["Input"]["backButtonBehavior"] = backButtonBehavior;
|
data["Input"]["backButtonBehavior"] = backButtonBehavior;
|
||||||
@ -752,9 +780,10 @@ void save(const std::filesystem::path& path) {
|
|||||||
data["Vulkan"]["validation"] = vkValidation;
|
data["Vulkan"]["validation"] = vkValidation;
|
||||||
data["Vulkan"]["validation_sync"] = vkValidationSync;
|
data["Vulkan"]["validation_sync"] = vkValidationSync;
|
||||||
data["Vulkan"]["validation_gpu"] = vkValidationGpu;
|
data["Vulkan"]["validation_gpu"] = vkValidationGpu;
|
||||||
data["Vulkan"]["rdocEnable"] = rdocEnable;
|
|
||||||
data["Vulkan"]["rdocMarkersEnable"] = vkMarkers;
|
|
||||||
data["Vulkan"]["crashDiagnostic"] = vkCrashDiagnostic;
|
data["Vulkan"]["crashDiagnostic"] = vkCrashDiagnostic;
|
||||||
|
data["Vulkan"]["hostMarkers"] = vkHostMarkers;
|
||||||
|
data["Vulkan"]["guestMarkers"] = vkGuestMarkers;
|
||||||
|
data["Vulkan"]["rdocEnable"] = rdocEnable;
|
||||||
data["Debug"]["DebugDump"] = isDebugDump;
|
data["Debug"]["DebugDump"] = isDebugDump;
|
||||||
data["Debug"]["CollectShader"] = isShaderDebug;
|
data["Debug"]["CollectShader"] = isShaderDebug;
|
||||||
|
|
||||||
@ -765,6 +794,7 @@ void save(const std::filesystem::path& path) {
|
|||||||
install_dirs.emplace_back(std::string{fmt::UTF(dirString.u8string()).data});
|
install_dirs.emplace_back(std::string{fmt::UTF(dirString.u8string()).data});
|
||||||
}
|
}
|
||||||
data["GUI"]["installDirs"] = install_dirs;
|
data["GUI"]["installDirs"] = install_dirs;
|
||||||
|
data["GUI"]["loadGameSizeEnabled"] = load_game_size;
|
||||||
|
|
||||||
data["GUI"]["addonInstallDir"] =
|
data["GUI"]["addonInstallDir"] =
|
||||||
std::string{fmt::UTF(settings_addon_install_dir.u8string()).data};
|
std::string{fmt::UTF(settings_addon_install_dir.u8string()).data};
|
||||||
@ -853,9 +883,10 @@ void setDefaultValues() {
|
|||||||
vkValidation = false;
|
vkValidation = false;
|
||||||
vkValidationSync = false;
|
vkValidationSync = false;
|
||||||
vkValidationGpu = false;
|
vkValidationGpu = false;
|
||||||
rdocEnable = false;
|
|
||||||
vkMarkers = false;
|
|
||||||
vkCrashDiagnostic = false;
|
vkCrashDiagnostic = false;
|
||||||
|
vkHostMarkers = false;
|
||||||
|
vkGuestMarkers = false;
|
||||||
|
rdocEnable = false;
|
||||||
emulator_language = "en";
|
emulator_language = "en";
|
||||||
m_language = 1;
|
m_language = 1;
|
||||||
gpuId = -1;
|
gpuId = -1;
|
||||||
|
@ -17,6 +17,8 @@ void saveMainWindow(const std::filesystem::path& path);
|
|||||||
|
|
||||||
std::string getTrophyKey();
|
std::string getTrophyKey();
|
||||||
void setTrophyKey(std::string key);
|
void setTrophyKey(std::string key);
|
||||||
|
bool GetLoadGameSizeEnabled();
|
||||||
|
void setLoadGameSizeEnabled(bool enable);
|
||||||
bool getIsFullscreen();
|
bool getIsFullscreen();
|
||||||
std::string getFullscreenMode();
|
std::string getFullscreenMode();
|
||||||
bool isNeoModeConsole();
|
bool isNeoModeConsole();
|
||||||
@ -34,6 +36,8 @@ std::string getWidgetStyle();
|
|||||||
std::string getUserName();
|
std::string getUserName();
|
||||||
std::string getUpdateChannel();
|
std::string getUpdateChannel();
|
||||||
|
|
||||||
|
u16 leftDeadZone();
|
||||||
|
u16 rightDeadZone();
|
||||||
s16 getCursorState();
|
s16 getCursorState();
|
||||||
int getCursorHideTimeout();
|
int getCursorHideTimeout();
|
||||||
std::string getBackButtonBehavior();
|
std::string getBackButtonBehavior();
|
||||||
@ -100,8 +104,9 @@ void setRdocEnabled(bool enable);
|
|||||||
bool vkValidationEnabled();
|
bool vkValidationEnabled();
|
||||||
bool vkValidationSyncEnabled();
|
bool vkValidationSyncEnabled();
|
||||||
bool vkValidationGpuEnabled();
|
bool vkValidationGpuEnabled();
|
||||||
bool vkMarkersEnabled();
|
|
||||||
bool vkCrashDiagnosticEnabled();
|
bool vkCrashDiagnosticEnabled();
|
||||||
|
bool vkHostMarkersEnabled();
|
||||||
|
bool vkGuestMarkersEnabled();
|
||||||
|
|
||||||
// Gui
|
// Gui
|
||||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
||||||
|
@ -95,12 +95,16 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
|
|||||||
SUB(Lib, SaveData) \
|
SUB(Lib, SaveData) \
|
||||||
SUB(Lib, SaveDataDialog) \
|
SUB(Lib, SaveDataDialog) \
|
||||||
SUB(Lib, Http) \
|
SUB(Lib, Http) \
|
||||||
|
SUB(Lib, Http2) \
|
||||||
SUB(Lib, Ssl) \
|
SUB(Lib, Ssl) \
|
||||||
|
SUB(Lib, Ssl2) \
|
||||||
SUB(Lib, SysModule) \
|
SUB(Lib, SysModule) \
|
||||||
SUB(Lib, Move) \
|
SUB(Lib, Move) \
|
||||||
|
SUB(Lib, NpCommon) \
|
||||||
SUB(Lib, NpManager) \
|
SUB(Lib, NpManager) \
|
||||||
SUB(Lib, NpScore) \
|
SUB(Lib, NpScore) \
|
||||||
SUB(Lib, NpTrophy) \
|
SUB(Lib, NpTrophy) \
|
||||||
|
SUB(Lib, NpWebApi) \
|
||||||
SUB(Lib, Screenshot) \
|
SUB(Lib, Screenshot) \
|
||||||
SUB(Lib, LibCInternal) \
|
SUB(Lib, LibCInternal) \
|
||||||
SUB(Lib, AppContent) \
|
SUB(Lib, AppContent) \
|
||||||
|
@ -63,11 +63,15 @@ enum class Class : u8 {
|
|||||||
Lib_SaveData, ///< The LibSceSaveData implementation.
|
Lib_SaveData, ///< The LibSceSaveData implementation.
|
||||||
Lib_SaveDataDialog, ///< The LibSceSaveDataDialog implementation.
|
Lib_SaveDataDialog, ///< The LibSceSaveDataDialog implementation.
|
||||||
Lib_Ssl, ///< The LibSceSsl implementation.
|
Lib_Ssl, ///< The LibSceSsl implementation.
|
||||||
|
Lib_Ssl2, ///< The LibSceSsl2 implementation.
|
||||||
Lib_Http, ///< The LibSceHttp implementation.
|
Lib_Http, ///< The LibSceHttp implementation.
|
||||||
|
Lib_Http2, ///< The LibSceHttp2 implementation.
|
||||||
Lib_SysModule, ///< The LibSceSysModule implementation
|
Lib_SysModule, ///< The LibSceSysModule implementation
|
||||||
|
Lib_NpCommon, ///< The LibSceNpCommon implementation
|
||||||
Lib_NpManager, ///< The LibSceNpManager implementation
|
Lib_NpManager, ///< The LibSceNpManager implementation
|
||||||
Lib_NpScore, ///< The LibSceNpScore implementation
|
Lib_NpScore, ///< The LibSceNpScore implementation
|
||||||
Lib_NpTrophy, ///< The LibSceNpTrophy implementation
|
Lib_NpTrophy, ///< The LibSceNpTrophy implementation
|
||||||
|
Lib_NpWebApi, ///< The LibSceWebApi implementation
|
||||||
Lib_Screenshot, ///< The LibSceScreenshot implementation
|
Lib_Screenshot, ///< The LibSceScreenshot implementation
|
||||||
Lib_LibCInternal, ///< The LibCInternal implementation.
|
Lib_LibCInternal, ///< The LibCInternal implementation.
|
||||||
Lib_AppContent, ///< The LibSceAppContent implementation.
|
Lib_AppContent, ///< The LibSceAppContent implementation.
|
||||||
|
@ -37,6 +37,10 @@ public:
|
|||||||
void Start();
|
void Start();
|
||||||
|
|
||||||
void End();
|
void End();
|
||||||
|
|
||||||
|
std::chrono::nanoseconds GetTotalWait() const {
|
||||||
|
return total_wait;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
@ -131,6 +131,8 @@ class DebugStateImpl {
|
|||||||
friend class Core::Devtools::Widget::FrameGraph;
|
friend class Core::Devtools::Widget::FrameGraph;
|
||||||
friend class Core::Devtools::Widget::ShaderList;
|
friend class Core::Devtools::Widget::ShaderList;
|
||||||
|
|
||||||
|
bool showing_debug_menu_bar = false;
|
||||||
|
|
||||||
std::queue<std::string> debug_message_popup;
|
std::queue<std::string> debug_message_popup;
|
||||||
|
|
||||||
std::mutex guest_threads_mutex{};
|
std::mutex guest_threads_mutex{};
|
||||||
@ -153,6 +155,9 @@ class DebugStateImpl {
|
|||||||
std::vector<ShaderDump> shader_dump_list{};
|
std::vector<ShaderDump> shader_dump_list{};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
float Framerate = 1.0f / 60.0f;
|
||||||
|
float FrameDeltaTime;
|
||||||
|
|
||||||
void ShowDebugMessage(std::string message) {
|
void ShowDebugMessage(std::string message) {
|
||||||
if (message.empty()) {
|
if (message.empty()) {
|
||||||
return;
|
return;
|
||||||
@ -160,6 +165,10 @@ public:
|
|||||||
debug_message_popup.push(std::move(message));
|
debug_message_popup.push(std::move(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool& IsShowingDebugMenuBar() {
|
||||||
|
return showing_debug_menu_bar;
|
||||||
|
}
|
||||||
|
|
||||||
void AddCurrentThreadToGuestList();
|
void AddCurrentThreadToGuestList();
|
||||||
|
|
||||||
void RemoveCurrentThreadFromGuestList();
|
void RemoveCurrentThreadFromGuestList();
|
||||||
|
@ -28,7 +28,6 @@ static bool show_simple_fps = false;
|
|||||||
static bool visibility_toggled = false;
|
static bool visibility_toggled = false;
|
||||||
|
|
||||||
static float fps_scale = 1.0f;
|
static float fps_scale = 1.0f;
|
||||||
static bool show_advanced_debug = false;
|
|
||||||
static int dump_frame_count = 1;
|
static int dump_frame_count = 1;
|
||||||
|
|
||||||
static Widget::FrameGraph frame_graph;
|
static Widget::FrameGraph frame_graph;
|
||||||
@ -253,8 +252,8 @@ void L::DrawAdvanced() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void L::DrawSimple() {
|
void L::DrawSimple() {
|
||||||
const auto io = GetIO();
|
const float frameRate = DebugState.Framerate;
|
||||||
Text("%.1f FPS (%.2f ms)", io.Framerate, 1000.0f / io.Framerate);
|
Text("%d FPS (%.1f ms)", static_cast<int>(std::round(frameRate)), 1000.0f / frameRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LoadSettings(const char* line) {
|
static void LoadSettings(const char* line) {
|
||||||
@ -265,7 +264,7 @@ static void LoadSettings(const char* line) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sscanf(line, "show_advanced_debug=%d", &i) == 1) {
|
if (sscanf(line, "show_advanced_debug=%d", &i) == 1) {
|
||||||
show_advanced_debug = i != 0;
|
DebugState.IsShowingDebugMenuBar() = i != 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sscanf(line, "show_frame_graph=%d", &i) == 1) {
|
if (sscanf(line, "show_frame_graph=%d", &i) == 1) {
|
||||||
@ -310,7 +309,7 @@ void L::SetupSettings() {
|
|||||||
handler.WriteAllFn = [](ImGuiContext*, ImGuiSettingsHandler* handler, ImGuiTextBuffer* buf) {
|
handler.WriteAllFn = [](ImGuiContext*, ImGuiSettingsHandler* handler, ImGuiTextBuffer* buf) {
|
||||||
buf->appendf("[%s][Data]\n", handler->TypeName);
|
buf->appendf("[%s][Data]\n", handler->TypeName);
|
||||||
buf->appendf("fps_scale=%f\n", fps_scale);
|
buf->appendf("fps_scale=%f\n", fps_scale);
|
||||||
buf->appendf("show_advanced_debug=%d\n", show_advanced_debug);
|
buf->appendf("show_advanced_debug=%d\n", DebugState.IsShowingDebugMenuBar());
|
||||||
buf->appendf("show_frame_graph=%d\n", frame_graph.is_open);
|
buf->appendf("show_frame_graph=%d\n", frame_graph.is_open);
|
||||||
buf->appendf("dump_frame_count=%d\n", dump_frame_count);
|
buf->appendf("dump_frame_count=%d\n", dump_frame_count);
|
||||||
buf->append("\n");
|
buf->append("\n");
|
||||||
@ -336,12 +335,12 @@ void L::Draw() {
|
|||||||
|
|
||||||
if (!DebugState.IsGuestThreadsPaused()) {
|
if (!DebugState.IsGuestThreadsPaused()) {
|
||||||
const auto fn = DebugState.flip_frame_count.load();
|
const auto fn = DebugState.flip_frame_count.load();
|
||||||
frame_graph.AddFrame(fn, io.DeltaTime);
|
frame_graph.AddFrame(fn, DebugState.FrameDeltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsKeyPressed(ImGuiKey_F10, false)) {
|
if (IsKeyPressed(ImGuiKey_F10, false)) {
|
||||||
if (io.KeyCtrl) {
|
if (io.KeyCtrl) {
|
||||||
show_advanced_debug = !show_advanced_debug;
|
DebugState.IsShowingDebugMenuBar() ^= true;
|
||||||
} else {
|
} else {
|
||||||
show_simple_fps = !show_simple_fps;
|
show_simple_fps = !show_simple_fps;
|
||||||
}
|
}
|
||||||
@ -376,7 +375,7 @@ void L::Draw() {
|
|||||||
End();
|
End();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show_advanced_debug) {
|
if (DebugState.IsShowingDebugMenuBar()) {
|
||||||
PushFont(io.Fonts->Fonts[IMGUI_FONT_MONO]);
|
PushFont(io.Fonts->Fonts[IMGUI_FONT_MONO]);
|
||||||
PushID("DevtoolsLayer");
|
PushID("DevtoolsLayer");
|
||||||
DrawAdvanced();
|
DrawAdvanced();
|
||||||
|
@ -83,15 +83,13 @@ void FrameGraph::Draw() {
|
|||||||
|
|
||||||
auto isSystemPaused = DebugState.IsGuestThreadsPaused();
|
auto isSystemPaused = DebugState.IsGuestThreadsPaused();
|
||||||
|
|
||||||
static float deltaTime;
|
|
||||||
static float frameRate;
|
|
||||||
|
|
||||||
if (!isSystemPaused) {
|
if (!isSystemPaused) {
|
||||||
deltaTime = io.DeltaTime * 1000.0f;
|
deltaTime = DebugState.FrameDeltaTime * 1000.0f;
|
||||||
frameRate = 1000.0f / deltaTime;
|
frameRate = 1000.0f / deltaTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
Text("Frame time: %.3f ms (%.1f FPS)", deltaTime, frameRate);
|
Text("Frame time: %.3f ms (%.1f FPS)", deltaTime, frameRate);
|
||||||
|
Text("Presenter time: %.3f ms (%.1f FPS)", io.DeltaTime * 1000.0f, 1.0f / io.DeltaTime);
|
||||||
Text("Flip frame: %d Gnm submit frame: %d", DebugState.flip_frame_count.load(),
|
Text("Flip frame: %d Gnm submit frame: %d", DebugState.flip_frame_count.load(),
|
||||||
DebugState.gnm_frame_count.load());
|
DebugState.gnm_frame_count.load());
|
||||||
|
|
||||||
|
@ -16,6 +16,9 @@ class FrameGraph {
|
|||||||
|
|
||||||
std::array<FrameInfo, FRAME_BUFFER_SIZE> frame_list{};
|
std::array<FrameInfo, FRAME_BUFFER_SIZE> frame_list{};
|
||||||
|
|
||||||
|
float deltaTime{};
|
||||||
|
float frameRate{};
|
||||||
|
|
||||||
void DrawFrameGraph();
|
void DrawFrameGraph();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -105,7 +105,8 @@ void RegPopup::DrawDepthBuffer(const DepthBuffer& depth_data) {
|
|||||||
"DEPTH_SLICE.TILE_MAX", depth_buffer.depth_slice.tile_max,
|
"DEPTH_SLICE.TILE_MAX", depth_buffer.depth_slice.tile_max,
|
||||||
"Pitch()", depth_buffer.Pitch(),
|
"Pitch()", depth_buffer.Pitch(),
|
||||||
"Height()", depth_buffer.Height(),
|
"Height()", depth_buffer.Height(),
|
||||||
"Address()", depth_buffer.Address(),
|
"DepthAddress()", depth_buffer.DepthAddress(),
|
||||||
|
"StencilAddress()", depth_buffer.StencilAddress(),
|
||||||
"NumSamples()", depth_buffer.NumSamples(),
|
"NumSamples()", depth_buffer.NumSamples(),
|
||||||
"NumBits()", depth_buffer.NumBits(),
|
"NumBits()", depth_buffer.NumBits(),
|
||||||
"GetDepthSliceSize()", depth_buffer.GetDepthSliceSize()
|
"GetDepthSliceSize()", depth_buffer.GetDepthSliceSize()
|
||||||
|
@ -155,7 +155,7 @@ void RegView::DrawGraphicsRegs() {
|
|||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
TextUnformatted("Depth buffer");
|
TextUnformatted("Depth buffer");
|
||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
if (regs.depth_buffer.Address() == 0 || !regs.depth_control.depth_enable) {
|
if (regs.depth_buffer.DepthAddress() == 0 || !regs.depth_control.depth_enable) {
|
||||||
TextUnformatted("N/A");
|
TextUnformatted("N/A");
|
||||||
} else {
|
} else {
|
||||||
const char* text = last_selected_cb == depth_id && default_reg_popup.open ? "x" : "->";
|
const char* text = last_selected_cb == depth_id && default_reg_popup.open ? "x" : "->";
|
||||||
@ -241,7 +241,7 @@ void RegView::SetData(DebugStateType::RegDump _data, const std::string& base_tit
|
|||||||
default_reg_popup.open = false;
|
default_reg_popup.open = false;
|
||||||
if (last_selected_cb == depth_id) {
|
if (last_selected_cb == depth_id) {
|
||||||
const auto& has_depth =
|
const auto& has_depth =
|
||||||
regs.depth_buffer.Address() != 0 && regs.depth_control.depth_enable;
|
regs.depth_buffer.DepthAddress() != 0 && regs.depth_control.depth_enable;
|
||||||
if (has_depth) {
|
if (has_depth) {
|
||||||
default_reg_popup.SetData(title, regs.depth_buffer, regs.depth_control);
|
default_reg_popup.SetData(title, regs.depth_buffer, regs.depth_control);
|
||||||
default_reg_popup.open = true;
|
default_reg_popup.open = true;
|
||||||
|
339
src/core/libraries/kernel/aio.cpp
Normal file
339
src/core/libraries/kernel/aio.cpp
Normal file
@ -0,0 +1,339 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
#include "aio.h"
|
||||||
|
#include "common/assert.h"
|
||||||
|
#include "common/debug.h"
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/libraries/kernel/equeue.h"
|
||||||
|
#include "core/libraries/kernel/orbis_error.h"
|
||||||
|
#include "core/libraries/libs.h"
|
||||||
|
#include "file_system.h"
|
||||||
|
|
||||||
|
namespace Libraries::Kernel {
|
||||||
|
|
||||||
|
#define MAX_QUEUE 512
|
||||||
|
|
||||||
|
static s32* id_state;
|
||||||
|
static s32 id_index;
|
||||||
|
|
||||||
|
s32 sceKernelAioInitializeImpl(void* p, s32 size) {
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioDeleteRequest(OrbisKernelAioSubmitId id, s32* ret) {
|
||||||
|
if (ret == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
id_state[id] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
*ret = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioDeleteRequests(OrbisKernelAioSubmitId id[], s32 num, s32 ret[]) {
|
||||||
|
if (ret == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
for (s32 i = 0; i < num; i++) {
|
||||||
|
id_state[id[i]] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
ret[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioPollRequest(OrbisKernelAioSubmitId id, s32* state) {
|
||||||
|
if (state == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
*state = id_state[id];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioPollRequests(OrbisKernelAioSubmitId id[], s32 num, s32 state[]) {
|
||||||
|
if (state == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
for (s32 i = 0; i < num; i++) {
|
||||||
|
state[i] = id_state[id[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioCancelRequest(OrbisKernelAioSubmitId id, s32* state) {
|
||||||
|
if (state == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
if (id) {
|
||||||
|
id_state[id] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
*state = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
} else {
|
||||||
|
*state = ORBIS_KERNEL_AIO_STATE_PROCESSING;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioCancelRequests(OrbisKernelAioSubmitId id[], s32 num, s32 state[]) {
|
||||||
|
if (state == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
for (s32 i = 0; i < num; i++) {
|
||||||
|
if (id[i]) {
|
||||||
|
id_state[id[i]] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
state[i] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
} else {
|
||||||
|
state[i] = ORBIS_KERNEL_AIO_STATE_PROCESSING;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioWaitRequest(OrbisKernelAioSubmitId id, s32* state, u32* usec) {
|
||||||
|
if (state == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
u32 timer = 0;
|
||||||
|
|
||||||
|
s32 timeout = 0;
|
||||||
|
|
||||||
|
while (id_state[id] == ORBIS_KERNEL_AIO_STATE_PROCESSING) {
|
||||||
|
sceKernelUsleep(10);
|
||||||
|
|
||||||
|
timer += 10;
|
||||||
|
if (*usec) {
|
||||||
|
if (timer > *usec) {
|
||||||
|
timeout = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*state = id_state[id];
|
||||||
|
|
||||||
|
if (timeout)
|
||||||
|
return ORBIS_KERNEL_ERROR_ETIMEDOUT;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioWaitRequests(OrbisKernelAioSubmitId id[], s32 num, s32 state[],
|
||||||
|
u32 mode, u32* usec) {
|
||||||
|
if (state == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
u32 timer = 0;
|
||||||
|
s32 timeout = 0;
|
||||||
|
s32 completion = 0;
|
||||||
|
|
||||||
|
for (s32 i = 0; i < num; i++) {
|
||||||
|
if (!completion && !timeout) {
|
||||||
|
while (id_state[id[i]] == ORBIS_KERNEL_AIO_STATE_PROCESSING) {
|
||||||
|
sceKernelUsleep(10);
|
||||||
|
timer += 10;
|
||||||
|
|
||||||
|
if (*usec) {
|
||||||
|
if (timer > *usec) {
|
||||||
|
timeout = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode == 0x02) {
|
||||||
|
if (id_state[id[i]] == ORBIS_KERNEL_AIO_STATE_COMPLETED)
|
||||||
|
completion = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
state[i] = id_state[id[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (timeout)
|
||||||
|
return ORBIS_KERNEL_ERROR_ETIMEDOUT;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioSubmitReadCommands(OrbisKernelAioRWRequest req[], s32 size, s32 prio,
|
||||||
|
OrbisKernelAioSubmitId* id) {
|
||||||
|
if (req == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
if (id == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING;
|
||||||
|
|
||||||
|
for (s32 i = 0; i < size; i++) {
|
||||||
|
|
||||||
|
s64 ret = sceKernelPread(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset);
|
||||||
|
|
||||||
|
if (ret < 0) {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
|
||||||
|
*id = id_index;
|
||||||
|
|
||||||
|
id_index = (id_index + 1) % MAX_QUEUE;
|
||||||
|
|
||||||
|
if (!id_index)
|
||||||
|
id_index++;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioSubmitReadCommandsMultiple(OrbisKernelAioRWRequest req[], s32 size,
|
||||||
|
s32 prio, OrbisKernelAioSubmitId id[]) {
|
||||||
|
if (req == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
if (id == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
for (s32 i = 0; i < size; i++) {
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING;
|
||||||
|
|
||||||
|
s64 ret = sceKernelPread(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset);
|
||||||
|
|
||||||
|
if (ret < 0) {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
}
|
||||||
|
|
||||||
|
id[i] = id_index;
|
||||||
|
|
||||||
|
id_index = (id_index + 1) % MAX_QUEUE;
|
||||||
|
|
||||||
|
if (!id_index)
|
||||||
|
id_index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioSubmitWriteCommands(OrbisKernelAioRWRequest req[], s32 size, s32 prio,
|
||||||
|
OrbisKernelAioSubmitId* id) {
|
||||||
|
if (req == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
if (id == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
for (s32 i = 0; i < size; i++) {
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING;
|
||||||
|
|
||||||
|
s64 ret = sceKernelPwrite(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset);
|
||||||
|
|
||||||
|
if (ret < 0) {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*id = id_index;
|
||||||
|
|
||||||
|
id_index = (id_index + 1) % MAX_QUEUE;
|
||||||
|
|
||||||
|
// skip id_index equals 0 , because sceKernelAioCancelRequest will submit id
|
||||||
|
// equal to 0
|
||||||
|
if (!id_index)
|
||||||
|
id_index++;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioSubmitWriteCommandsMultiple(OrbisKernelAioRWRequest req[], s32 size,
|
||||||
|
s32 prio, OrbisKernelAioSubmitId id[]) {
|
||||||
|
if (req == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
if (id == nullptr) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EFAULT;
|
||||||
|
}
|
||||||
|
for (s32 i = 0; i < size; i++) {
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING;
|
||||||
|
s64 ret = sceKernelPwrite(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset);
|
||||||
|
|
||||||
|
if (ret < 0) {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_ABORTED;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
req[i].result->returnValue = ret;
|
||||||
|
id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED;
|
||||||
|
}
|
||||||
|
|
||||||
|
id[i] = id_index;
|
||||||
|
id_index = (id_index + 1) % MAX_QUEUE;
|
||||||
|
|
||||||
|
if (!id_index)
|
||||||
|
id_index++;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioSetParam() {
|
||||||
|
LOG_ERROR(Kernel, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceKernelAioInitializeParam() {
|
||||||
|
LOG_ERROR(Kernel, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterAio(Core::Loader::SymbolsResolver* sym) {
|
||||||
|
id_index = 1;
|
||||||
|
id_state = (int*)malloc(sizeof(int) * MAX_QUEUE);
|
||||||
|
memset(id_state, 0, sizeof(sizeof(int) * MAX_QUEUE));
|
||||||
|
|
||||||
|
LIB_FUNCTION("fR521KIGgb8", "libkernel", 1, "libkernel", 1, 1, sceKernelAioCancelRequest);
|
||||||
|
LIB_FUNCTION("3Lca1XBrQdY", "libkernel", 1, "libkernel", 1, 1, sceKernelAioCancelRequests);
|
||||||
|
LIB_FUNCTION("5TgME6AYty4", "libkernel", 1, "libkernel", 1, 1, sceKernelAioDeleteRequest);
|
||||||
|
LIB_FUNCTION("Ft3EtsZzAoY", "libkernel", 1, "libkernel", 1, 1, sceKernelAioDeleteRequests);
|
||||||
|
LIB_FUNCTION("vYU8P9Td2Zo", "libkernel", 1, "libkernel", 1, 1, sceKernelAioInitializeImpl);
|
||||||
|
LIB_FUNCTION("nu4a0-arQis", "libkernel", 1, "libkernel", 1, 1, sceKernelAioInitializeParam);
|
||||||
|
LIB_FUNCTION("2pOuoWoCxdk", "libkernel", 1, "libkernel", 1, 1, sceKernelAioPollRequest);
|
||||||
|
LIB_FUNCTION("o7O4z3jwKzo", "libkernel", 1, "libkernel", 1, 1, sceKernelAioPollRequests);
|
||||||
|
LIB_FUNCTION("9WK-vhNXimw", "libkernel", 1, "libkernel", 1, 1, sceKernelAioSetParam);
|
||||||
|
LIB_FUNCTION("HgX7+AORI58", "libkernel", 1, "libkernel", 1, 1, sceKernelAioSubmitReadCommands);
|
||||||
|
LIB_FUNCTION("lXT0m3P-vs4", "libkernel", 1, "libkernel", 1, 1,
|
||||||
|
sceKernelAioSubmitReadCommandsMultiple);
|
||||||
|
LIB_FUNCTION("XQ8C8y+de+E", "libkernel", 1, "libkernel", 1, 1, sceKernelAioSubmitWriteCommands);
|
||||||
|
LIB_FUNCTION("xT3Cpz0yh6Y", "libkernel", 1, "libkernel", 1, 1,
|
||||||
|
sceKernelAioSubmitWriteCommandsMultiple);
|
||||||
|
LIB_FUNCTION("KOF-oJbQVvc", "libkernel", 1, "libkernel", 1, 1, sceKernelAioWaitRequest);
|
||||||
|
LIB_FUNCTION("lgK+oIWkJyA", "libkernel", 1, "libkernel", 1, 1, sceKernelAioWaitRequests);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Libraries::Kernel
|
43
src/core/libraries/kernel/aio.h
Normal file
43
src/core/libraries/kernel/aio.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <condition_variable>
|
||||||
|
#include <mutex>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <boost/asio/steady_timer.hpp>
|
||||||
|
|
||||||
|
#include "common/types.h"
|
||||||
|
|
||||||
|
namespace Core::Loader {
|
||||||
|
class SymbolsResolver;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Libraries::Kernel {
|
||||||
|
|
||||||
|
enum AioState {
|
||||||
|
ORBIS_KERNEL_AIO_STATE_SUBMITTED = 1,
|
||||||
|
ORBIS_KERNEL_AIO_STATE_PROCESSING = 2,
|
||||||
|
ORBIS_KERNEL_AIO_STATE_COMPLETED = 3,
|
||||||
|
ORBIS_KERNEL_AIO_STATE_ABORTED = 4
|
||||||
|
};
|
||||||
|
|
||||||
|
struct OrbisKernelAioResult {
|
||||||
|
s64 returnValue;
|
||||||
|
u32 state;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef s32 OrbisKernelAioSubmitId;
|
||||||
|
|
||||||
|
struct OrbisKernelAioRWRequest {
|
||||||
|
s64 offset;
|
||||||
|
s64 nbyte;
|
||||||
|
void* buf;
|
||||||
|
OrbisKernelAioResult* result;
|
||||||
|
s32 fd;
|
||||||
|
};
|
||||||
|
|
||||||
|
void RegisterAio(Core::Loader::SymbolsResolver* sym);
|
||||||
|
} // namespace Libraries::Kernel
|
@ -67,7 +67,8 @@ constexpr int ORBIS_KERNEL_O_DIRECTORY = 0x00020000;
|
|||||||
|
|
||||||
s64 PS4_SYSV_ABI sceKernelWrite(int d, const void* buf, size_t nbytes);
|
s64 PS4_SYSV_ABI sceKernelWrite(int d, const void* buf, size_t nbytes);
|
||||||
s64 PS4_SYSV_ABI sceKernelRead(int d, void* buf, size_t nbytes);
|
s64 PS4_SYSV_ABI sceKernelRead(int d, void* buf, size_t nbytes);
|
||||||
|
s64 PS4_SYSV_ABI sceKernelPread(int d, void* buf, size_t nbytes, s64 offset);
|
||||||
|
s64 PS4_SYSV_ABI sceKernelPwrite(int d, void* buf, size_t nbytes, s64 offset);
|
||||||
void RegisterFileSystem(Core::Loader::SymbolsResolver* sym);
|
void RegisterFileSystem(Core::Loader::SymbolsResolver* sym);
|
||||||
|
|
||||||
} // namespace Libraries::Kernel
|
} // namespace Libraries::Kernel
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <Rpc.h>
|
#include <Rpc.h>
|
||||||
#endif
|
#endif
|
||||||
#include <common/singleton.h>
|
#include <common/singleton.h>
|
||||||
|
#include "aio.h"
|
||||||
|
|
||||||
namespace Libraries::Kernel {
|
namespace Libraries::Kernel {
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ static void KernelServiceThread(std::stop_token stoken) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
io_context.run();
|
io_context.run();
|
||||||
io_context.reset();
|
io_context.restart();
|
||||||
|
|
||||||
asio_requests = 0;
|
asio_requests = 0;
|
||||||
}
|
}
|
||||||
@ -218,6 +219,7 @@ void RegisterKernel(Core::Loader::SymbolsResolver* sym) {
|
|||||||
Libraries::Kernel::RegisterEventQueue(sym);
|
Libraries::Kernel::RegisterEventQueue(sym);
|
||||||
Libraries::Kernel::RegisterProcess(sym);
|
Libraries::Kernel::RegisterProcess(sym);
|
||||||
Libraries::Kernel::RegisterException(sym);
|
Libraries::Kernel::RegisterException(sym);
|
||||||
|
Libraries::Kernel::RegisterAio(sym);
|
||||||
|
|
||||||
LIB_OBJ("f7uOxY9mM1U", "libkernel", 1, "libkernel", 1, 1, &g_stack_chk_guard);
|
LIB_OBJ("f7uOxY9mM1U", "libkernel", 1, "libkernel", 1, 1, &g_stack_chk_guard);
|
||||||
LIB_FUNCTION("PfccT7qURYE", "libkernel", 1, "libkernel", 1, 1, kernel_ioctl);
|
LIB_FUNCTION("PfccT7qURYE", "libkernel", 1, "libkernel", 1, 1, kernel_ioctl);
|
||||||
|
@ -339,6 +339,8 @@ int PS4_SYSV_ABI posix_pthread_condattr_setpshared(PthreadCondAttrT* attr, int p
|
|||||||
void RegisterCond(Core::Loader::SymbolsResolver* sym) {
|
void RegisterCond(Core::Loader::SymbolsResolver* sym) {
|
||||||
// Posix
|
// Posix
|
||||||
LIB_FUNCTION("mKoTx03HRWA", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_condattr_init);
|
LIB_FUNCTION("mKoTx03HRWA", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_condattr_init);
|
||||||
|
LIB_FUNCTION("dJcuQVn6-Iw", "libScePosix", 1, "libkernel", 1, 1,
|
||||||
|
posix_pthread_condattr_destroy);
|
||||||
LIB_FUNCTION("0TyVk4MSLt0", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_init);
|
LIB_FUNCTION("0TyVk4MSLt0", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_init);
|
||||||
LIB_FUNCTION("2MOy+rUfuhQ", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_signal);
|
LIB_FUNCTION("2MOy+rUfuhQ", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_signal);
|
||||||
LIB_FUNCTION("RXXqi4CtF8w", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_destroy);
|
LIB_FUNCTION("RXXqi4CtF8w", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_destroy);
|
||||||
@ -347,8 +349,11 @@ void RegisterCond(Core::Loader::SymbolsResolver* sym) {
|
|||||||
LIB_FUNCTION("mkx2fVhNMsg", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_broadcast);
|
LIB_FUNCTION("mkx2fVhNMsg", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_broadcast);
|
||||||
|
|
||||||
// Posix-Kernel
|
// Posix-Kernel
|
||||||
|
LIB_FUNCTION("0TyVk4MSLt0", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_init);
|
||||||
LIB_FUNCTION("Op8TBGY5KHg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_wait);
|
LIB_FUNCTION("Op8TBGY5KHg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_wait);
|
||||||
LIB_FUNCTION("mkx2fVhNMsg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_broadcast);
|
LIB_FUNCTION("mkx2fVhNMsg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_broadcast);
|
||||||
|
LIB_FUNCTION("mKoTx03HRWA", "libkernel", 1, "libkernel", 1, 1, posix_pthread_condattr_init);
|
||||||
|
LIB_FUNCTION("dJcuQVn6-Iw", "libkernel", 1, "libkernel", 1, 1, posix_pthread_condattr_destroy);
|
||||||
|
|
||||||
// Orbis
|
// Orbis
|
||||||
LIB_FUNCTION("2Tb92quprl0", "libkernel", 1, "libkernel", 1, 1, ORBIS(scePthreadCondInit));
|
LIB_FUNCTION("2Tb92quprl0", "libkernel", 1, "libkernel", 1, 1, ORBIS(scePthreadCondInit));
|
||||||
|
@ -153,6 +153,11 @@ int PS4_SYSV_ABI sceKernelDebugRaiseException() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceKernelDebugRaiseExceptionOnReleaseMode() {
|
||||||
|
UNREACHABLE();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void RegisterException(Core::Loader::SymbolsResolver* sym) {
|
void RegisterException(Core::Loader::SymbolsResolver* sym) {
|
||||||
LIB_FUNCTION("il03nluKfMk", "libkernel_unity", 1, "libkernel", 1, 1, sceKernelRaiseException);
|
LIB_FUNCTION("il03nluKfMk", "libkernel_unity", 1, "libkernel", 1, 1, sceKernelRaiseException);
|
||||||
LIB_FUNCTION("WkwEd3N7w0Y", "libkernel_unity", 1, "libkernel", 1, 1,
|
LIB_FUNCTION("WkwEd3N7w0Y", "libkernel_unity", 1, "libkernel", 1, 1,
|
||||||
@ -160,6 +165,8 @@ void RegisterException(Core::Loader::SymbolsResolver* sym) {
|
|||||||
LIB_FUNCTION("Qhv5ARAoOEc", "libkernel_unity", 1, "libkernel", 1, 1,
|
LIB_FUNCTION("Qhv5ARAoOEc", "libkernel_unity", 1, "libkernel", 1, 1,
|
||||||
sceKernelRemoveExceptionHandler)
|
sceKernelRemoveExceptionHandler)
|
||||||
LIB_FUNCTION("OMDRKKAZ8I4", "libkernel", 1, "libkernel", 1, 1, sceKernelDebugRaiseException);
|
LIB_FUNCTION("OMDRKKAZ8I4", "libkernel", 1, "libkernel", 1, 1, sceKernelDebugRaiseException);
|
||||||
|
LIB_FUNCTION("zE-wXIZjLoM", "libkernel", 1, "libkernel", 1, 1,
|
||||||
|
sceKernelDebugRaiseExceptionOnReleaseMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Libraries::Kernel
|
} // namespace Libraries::Kernel
|
||||||
|
@ -438,8 +438,11 @@ void RegisterMutex(Core::Loader::SymbolsResolver* sym) {
|
|||||||
LIB_FUNCTION("K-jXhbt2gn4", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_mutex_trylock);
|
LIB_FUNCTION("K-jXhbt2gn4", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_mutex_trylock);
|
||||||
|
|
||||||
// Posix-Kernel
|
// Posix-Kernel
|
||||||
|
LIB_FUNCTION("ttHNfU+qDBU", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_init);
|
||||||
LIB_FUNCTION("7H0iTOciTLo", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_lock);
|
LIB_FUNCTION("7H0iTOciTLo", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_lock);
|
||||||
LIB_FUNCTION("2Z+PpY6CaJg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_unlock);
|
LIB_FUNCTION("2Z+PpY6CaJg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_unlock);
|
||||||
|
LIB_FUNCTION("dQHWEsJtoE4", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutexattr_init);
|
||||||
|
LIB_FUNCTION("mDmgMOGVUqg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutexattr_settype);
|
||||||
|
|
||||||
// Orbis
|
// Orbis
|
||||||
LIB_FUNCTION("cmo1RIYva9o", "libkernel", 1, "libkernel", 1, 1, ORBIS(scePthreadMutexInit));
|
LIB_FUNCTION("cmo1RIYva9o", "libkernel", 1, "libkernel", 1, 1, ORBIS(scePthreadMutexInit));
|
||||||
|
@ -386,6 +386,9 @@ int PS4_SYSV_ABI posix_sched_get_priority_min() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI posix_pthread_rename_np(PthreadT thread, const char* name) {
|
int PS4_SYSV_ABI posix_pthread_rename_np(PthreadT thread, const char* name) {
|
||||||
|
if (thread == nullptr) {
|
||||||
|
return POSIX_EINVAL;
|
||||||
|
}
|
||||||
LOG_INFO(Kernel_Pthread, "name = {}", name);
|
LOG_INFO(Kernel_Pthread, "name = {}", name);
|
||||||
Common::SetThreadName(reinterpret_cast<void*>(thread->native_thr.GetHandle()), name);
|
Common::SetThreadName(reinterpret_cast<void*>(thread->native_thr.GetHandle()), name);
|
||||||
thread->name = name;
|
thread->name = name;
|
||||||
@ -535,6 +538,7 @@ void RegisterThread(Core::Loader::SymbolsResolver* sym) {
|
|||||||
LIB_FUNCTION("6XG4B33N09g", "libScePosix", 1, "libkernel", 1, 1, sched_yield);
|
LIB_FUNCTION("6XG4B33N09g", "libScePosix", 1, "libkernel", 1, 1, sched_yield);
|
||||||
|
|
||||||
// Posix-Kernel
|
// Posix-Kernel
|
||||||
|
LIB_FUNCTION("Z4QosVuAsA0", "libkernel", 1, "libkernel", 1, 1, posix_pthread_once);
|
||||||
LIB_FUNCTION("EotR8a3ASf4", "libkernel", 1, "libkernel", 1, 1, posix_pthread_self);
|
LIB_FUNCTION("EotR8a3ASf4", "libkernel", 1, "libkernel", 1, 1, posix_pthread_self);
|
||||||
LIB_FUNCTION("OxhIB8LB-PQ", "libkernel", 1, "libkernel", 1, 1, posix_pthread_create);
|
LIB_FUNCTION("OxhIB8LB-PQ", "libkernel", 1, "libkernel", 1, 1, posix_pthread_create);
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ int PS4_SYSV_ABI sceKernelConvertLocaltimeToUtc(time_t param_1, int64_t param_2,
|
|||||||
|
|
||||||
int PS4_SYSV_ABI sceKernelConvertUtcToLocaltime(time_t time, time_t* local_time, OrbisTimesec* st,
|
int PS4_SYSV_ABI sceKernelConvertUtcToLocaltime(time_t time, time_t* local_time, OrbisTimesec* st,
|
||||||
u64* dst_sec);
|
u64* dst_sec);
|
||||||
|
int PS4_SYSV_ABI sceKernelUsleep(u32 microseconds);
|
||||||
|
|
||||||
void RegisterTime(Core::Loader::SymbolsResolver* sym);
|
void RegisterTime(Core::Loader::SymbolsResolver* sym);
|
||||||
|
|
||||||
|
@ -21,12 +21,16 @@
|
|||||||
#include "core/libraries/mouse/mouse.h"
|
#include "core/libraries/mouse/mouse.h"
|
||||||
#include "core/libraries/move/move.h"
|
#include "core/libraries/move/move.h"
|
||||||
#include "core/libraries/network/http.h"
|
#include "core/libraries/network/http.h"
|
||||||
|
#include "core/libraries/network/http2.h"
|
||||||
#include "core/libraries/network/net.h"
|
#include "core/libraries/network/net.h"
|
||||||
#include "core/libraries/network/netctl.h"
|
#include "core/libraries/network/netctl.h"
|
||||||
#include "core/libraries/network/ssl.h"
|
#include "core/libraries/network/ssl.h"
|
||||||
|
#include "core/libraries/network/ssl2.h"
|
||||||
|
#include "core/libraries/np_common/np_common.h"
|
||||||
#include "core/libraries/np_manager/np_manager.h"
|
#include "core/libraries/np_manager/np_manager.h"
|
||||||
#include "core/libraries/np_score/np_score.h"
|
#include "core/libraries/np_score/np_score.h"
|
||||||
#include "core/libraries/np_trophy/np_trophy.h"
|
#include "core/libraries/np_trophy/np_trophy.h"
|
||||||
|
#include "core/libraries/np_web_api/np_web_api.h"
|
||||||
#include "core/libraries/pad/pad.h"
|
#include "core/libraries/pad/pad.h"
|
||||||
#include "core/libraries/playgo/playgo.h"
|
#include "core/libraries/playgo/playgo.h"
|
||||||
#include "core/libraries/playgo/playgo_dialog.h"
|
#include "core/libraries/playgo/playgo_dialog.h"
|
||||||
@ -64,17 +68,21 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
|
|||||||
Libraries::MsgDialog::RegisterlibSceMsgDialog(sym);
|
Libraries::MsgDialog::RegisterlibSceMsgDialog(sym);
|
||||||
Libraries::AudioOut::RegisterlibSceAudioOut(sym);
|
Libraries::AudioOut::RegisterlibSceAudioOut(sym);
|
||||||
Libraries::Http::RegisterlibSceHttp(sym);
|
Libraries::Http::RegisterlibSceHttp(sym);
|
||||||
|
Libraries::Http2::RegisterlibSceHttp2(sym);
|
||||||
Libraries::Net::RegisterlibSceNet(sym);
|
Libraries::Net::RegisterlibSceNet(sym);
|
||||||
Libraries::NetCtl::RegisterlibSceNetCtl(sym);
|
Libraries::NetCtl::RegisterlibSceNetCtl(sym);
|
||||||
Libraries::SaveData::RegisterlibSceSaveData(sym);
|
Libraries::SaveData::RegisterlibSceSaveData(sym);
|
||||||
Libraries::SaveData::Dialog::RegisterlibSceSaveDataDialog(sym);
|
Libraries::SaveData::Dialog::RegisterlibSceSaveDataDialog(sym);
|
||||||
Libraries::Ssl::RegisterlibSceSsl(sym);
|
Libraries::Ssl::RegisterlibSceSsl(sym);
|
||||||
|
Libraries::Ssl2::RegisterlibSceSsl2(sym);
|
||||||
Libraries::SysModule::RegisterlibSceSysmodule(sym);
|
Libraries::SysModule::RegisterlibSceSysmodule(sym);
|
||||||
Libraries::Posix::Registerlibsceposix(sym);
|
Libraries::Posix::Registerlibsceposix(sym);
|
||||||
Libraries::AudioIn::RegisterlibSceAudioIn(sym);
|
Libraries::AudioIn::RegisterlibSceAudioIn(sym);
|
||||||
|
Libraries::NpCommon::RegisterlibSceNpCommon(sym);
|
||||||
Libraries::NpManager::RegisterlibSceNpManager(sym);
|
Libraries::NpManager::RegisterlibSceNpManager(sym);
|
||||||
Libraries::NpScore::RegisterlibSceNpScore(sym);
|
Libraries::NpScore::RegisterlibSceNpScore(sym);
|
||||||
Libraries::NpTrophy::RegisterlibSceNpTrophy(sym);
|
Libraries::NpTrophy::RegisterlibSceNpTrophy(sym);
|
||||||
|
Libraries::NpWebApi::RegisterlibSceNpWebApi(sym);
|
||||||
Libraries::ScreenShot::RegisterlibSceScreenShot(sym);
|
Libraries::ScreenShot::RegisterlibSceScreenShot(sym);
|
||||||
Libraries::AppContent::RegisterlibSceAppContent(sym);
|
Libraries::AppContent::RegisterlibSceAppContent(sym);
|
||||||
Libraries::PngDec::RegisterlibScePngDec(sym);
|
Libraries::PngDec::RegisterlibScePngDec(sym);
|
||||||
|
360
src/core/libraries/network/http2.cpp
Normal file
360
src/core/libraries/network/http2.cpp
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/libraries/error_codes.h"
|
||||||
|
#include "core/libraries/libs.h"
|
||||||
|
#include "core/libraries/network/http2.h"
|
||||||
|
|
||||||
|
namespace Libraries::Http2 {
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI _Z5dummyv() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2AbortRequest() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2AddCookie() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2AddRequestHeader() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2AuthCacheFlush() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2CookieExport() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2CookieFlush() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2CookieImport() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2CreateCookieBox() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2CreateRequestWithURL() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2CreateTemplate() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2DeleteCookieBox() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2DeleteRequest() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2DeleteTemplate() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetAllResponseHeaders() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetAuthEnabled() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetAutoRedirect() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetCookie() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetCookieBox() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetCookieStats() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetMemoryPoolStats() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetResponseContentLength() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetStatusCode() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2Init(int net_id, int ssl_id, size_t pool_size, int max_requests) {
|
||||||
|
LOG_ERROR(Lib_Http2, "(DUMMY) called");
|
||||||
|
static int id = 0;
|
||||||
|
return ++id;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2ReadData() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2ReadDataAsync() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2RedirectCacheFlush() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2RemoveRequestHeader() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SendRequest() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SendRequestAsync() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetAuthEnabled() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetAuthInfoCallback() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetAutoRedirect() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetConnectionWaitTimeOut() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetConnectTimeOut() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieBox() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieMaxNum() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieMaxNumPerDomain() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieMaxSize() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieRecvCallback() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieSendCallback() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetInflateGZIPEnabled() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetMinSslVersion() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetPreSendCallback() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetRecvTimeOut() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetRedirectCallback() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetRequestContentLength() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetResolveRetry() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetResolveTimeOut() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetSendTimeOut() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetSslCallback() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetTimeOut() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SslDisableOption() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2SslEnableOption() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2Term() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceHttp2WaitAsync() {
|
||||||
|
LOG_ERROR(Lib_Http2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterlibSceHttp2(Core::Loader::SymbolsResolver* sym) {
|
||||||
|
LIB_FUNCTION("AS45QoYHjc4", "libSceHttp2", 1, "libSceHttp2", 1, 1, _Z5dummyv);
|
||||||
|
LIB_FUNCTION("IZ-qjhRqvjk", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AbortRequest);
|
||||||
|
LIB_FUNCTION("flPxnowtvWY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AddCookie);
|
||||||
|
LIB_FUNCTION("nrPfOE8TQu0", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AddRequestHeader);
|
||||||
|
LIB_FUNCTION("WeuDjj5m4YU", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AuthCacheFlush);
|
||||||
|
LIB_FUNCTION("JlFGR4v50Kw", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CookieExport);
|
||||||
|
LIB_FUNCTION("5VlQSzXW-SQ", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CookieFlush);
|
||||||
|
LIB_FUNCTION("B5ibZI5UlzU", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CookieImport);
|
||||||
|
LIB_FUNCTION("N4UfjvWJsMw", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CreateCookieBox);
|
||||||
|
LIB_FUNCTION("mmyOCxQMVYQ", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2CreateRequestWithURL);
|
||||||
|
LIB_FUNCTION("+wCt7fCijgk", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CreateTemplate);
|
||||||
|
LIB_FUNCTION("O9ync3F-JVI", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2DeleteCookieBox);
|
||||||
|
LIB_FUNCTION("c8D9qIjo8EY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2DeleteRequest);
|
||||||
|
LIB_FUNCTION("pDom5-078DA", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2DeleteTemplate);
|
||||||
|
LIB_FUNCTION("-rdXUi2XW90", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2GetAllResponseHeaders);
|
||||||
|
LIB_FUNCTION("m-OL13q8AI8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetAuthEnabled);
|
||||||
|
LIB_FUNCTION("od5QCZhZSfw", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetAutoRedirect);
|
||||||
|
LIB_FUNCTION("GQFGj0rYX+A", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetCookie);
|
||||||
|
LIB_FUNCTION("IX23slKvtQI", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetCookieBox);
|
||||||
|
LIB_FUNCTION("eij7UzkUqK8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetCookieStats);
|
||||||
|
LIB_FUNCTION("otUQuZa-mv0", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetMemoryPoolStats);
|
||||||
|
LIB_FUNCTION("o0DBQpFE13o", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2GetResponseContentLength);
|
||||||
|
LIB_FUNCTION("9XYJwCf3lEA", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetStatusCode);
|
||||||
|
LIB_FUNCTION("3JCe3lCbQ8A", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2Init);
|
||||||
|
LIB_FUNCTION("QygCNNmbGss", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2ReadData);
|
||||||
|
LIB_FUNCTION("bGN-6zbo7ms", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2ReadDataAsync);
|
||||||
|
LIB_FUNCTION("klwUy2Wg+q8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2RedirectCacheFlush);
|
||||||
|
LIB_FUNCTION("jHdP0CS4ZlA", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2RemoveRequestHeader);
|
||||||
|
LIB_FUNCTION("rbqZig38AT8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SendRequest);
|
||||||
|
LIB_FUNCTION("A+NVAFu4eCg", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SendRequestAsync);
|
||||||
|
LIB_FUNCTION("jjFahkBPCYs", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetAuthEnabled);
|
||||||
|
LIB_FUNCTION("Wwj6HbB2mOo", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetAuthInfoCallback);
|
||||||
|
LIB_FUNCTION("b9AvoIaOuHI", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetAutoRedirect);
|
||||||
|
LIB_FUNCTION("n8hMLe31OPA", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2SetConnectionWaitTimeOut);
|
||||||
|
LIB_FUNCTION("-HIO4VT87v8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetConnectTimeOut);
|
||||||
|
LIB_FUNCTION("jrVHsKCXA0g", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetCookieBox);
|
||||||
|
LIB_FUNCTION("mPKVhQqh2Es", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetCookieMaxNum);
|
||||||
|
LIB_FUNCTION("o7+WXe4WadE", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2SetCookieMaxNumPerDomain);
|
||||||
|
LIB_FUNCTION("6a0N6GPD7RM", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetCookieMaxSize);
|
||||||
|
LIB_FUNCTION("zdtXKn9X7no", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2SetCookieRecvCallback);
|
||||||
|
LIB_FUNCTION("McYmUpQ3-DY", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2SetCookieSendCallback);
|
||||||
|
LIB_FUNCTION("uRosf8GQbHQ", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2SetInflateGZIPEnabled);
|
||||||
|
LIB_FUNCTION("09tk+kIA1Ns", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetMinSslVersion);
|
||||||
|
LIB_FUNCTION("UL4Fviw+IAM", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetPreSendCallback);
|
||||||
|
LIB_FUNCTION("izvHhqgDt44", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetRecvTimeOut);
|
||||||
|
LIB_FUNCTION("BJgi0CH7al4", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetRedirectCallback);
|
||||||
|
LIB_FUNCTION("FSAFOzi0FpM", "libSceHttp2", 1, "libSceHttp2", 1, 1,
|
||||||
|
sceHttp2SetRequestContentLength);
|
||||||
|
LIB_FUNCTION("Gcjh+CisAZM", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetResolveRetry);
|
||||||
|
LIB_FUNCTION("ACjtE27aErY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetResolveTimeOut);
|
||||||
|
LIB_FUNCTION("XPtW45xiLHk", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetSendTimeOut);
|
||||||
|
LIB_FUNCTION("YrWX+DhPHQY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetSslCallback);
|
||||||
|
LIB_FUNCTION("VYMxTcBqSE0", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetTimeOut);
|
||||||
|
LIB_FUNCTION("B37SruheQ5Y", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SslDisableOption);
|
||||||
|
LIB_FUNCTION("EWcwMpbr5F8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SslEnableOption);
|
||||||
|
LIB_FUNCTION("YiBUtz-pGkc", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2Term);
|
||||||
|
LIB_FUNCTION("MOp-AUhdfi8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2WaitAsync);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Libraries::Http2
|
72
src/core/libraries/network/http2.h
Normal file
72
src/core/libraries/network/http2.h
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
// 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::Http2 {
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI _Z5dummyv();
|
||||||
|
int PS4_SYSV_ABI sceHttp2AbortRequest();
|
||||||
|
int PS4_SYSV_ABI sceHttp2AddCookie();
|
||||||
|
int PS4_SYSV_ABI sceHttp2AddRequestHeader();
|
||||||
|
int PS4_SYSV_ABI sceHttp2AuthCacheFlush();
|
||||||
|
int PS4_SYSV_ABI sceHttp2CookieExport();
|
||||||
|
int PS4_SYSV_ABI sceHttp2CookieFlush();
|
||||||
|
int PS4_SYSV_ABI sceHttp2CookieImport();
|
||||||
|
int PS4_SYSV_ABI sceHttp2CreateCookieBox();
|
||||||
|
int PS4_SYSV_ABI sceHttp2CreateRequestWithURL();
|
||||||
|
int PS4_SYSV_ABI sceHttp2CreateTemplate();
|
||||||
|
int PS4_SYSV_ABI sceHttp2DeleteCookieBox();
|
||||||
|
int PS4_SYSV_ABI sceHttp2DeleteRequest();
|
||||||
|
int PS4_SYSV_ABI sceHttp2DeleteTemplate();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetAllResponseHeaders();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetAuthEnabled();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetAutoRedirect();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetCookie();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetCookieBox();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetCookieStats();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetMemoryPoolStats();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetResponseContentLength();
|
||||||
|
int PS4_SYSV_ABI sceHttp2GetStatusCode();
|
||||||
|
int PS4_SYSV_ABI sceHttp2Init(int net_id, int ssl_id, size_t pool_size, int max_requests);
|
||||||
|
int PS4_SYSV_ABI sceHttp2ReadData();
|
||||||
|
int PS4_SYSV_ABI sceHttp2ReadDataAsync();
|
||||||
|
int PS4_SYSV_ABI sceHttp2RedirectCacheFlush();
|
||||||
|
int PS4_SYSV_ABI sceHttp2RemoveRequestHeader();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SendRequest();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SendRequestAsync();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetAuthEnabled();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetAuthInfoCallback();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetAutoRedirect();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetConnectionWaitTimeOut();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetConnectTimeOut();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieBox();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieMaxNum();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieMaxNumPerDomain();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieMaxSize();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieRecvCallback();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetCookieSendCallback();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetInflateGZIPEnabled();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetMinSslVersion();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetPreSendCallback();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetRecvTimeOut();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetRedirectCallback();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetRequestContentLength();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetResolveRetry();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetResolveTimeOut();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetSendTimeOut();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetSslCallback();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SetTimeOut();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SslDisableOption();
|
||||||
|
int PS4_SYSV_ABI sceHttp2SslEnableOption();
|
||||||
|
int PS4_SYSV_ABI sceHttp2Term();
|
||||||
|
int PS4_SYSV_ABI sceHttp2WaitAsync();
|
||||||
|
|
||||||
|
void RegisterlibSceHttp2(Core::Loader::SymbolsResolver* sym);
|
||||||
|
} // namespace Libraries::Http2
|
@ -93,7 +93,7 @@ int PS4_SYSV_ABI sceNetCtlUnregisterCallbackV6() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceNetCtlCheckCallback() {
|
int PS4_SYSV_ABI sceNetCtlCheckCallback() {
|
||||||
netctl.CheckCallback();
|
LOG_DEBUG(Lib_NetCtl, "(STUBBED) called");
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ int PS4_SYSV_ABI Func_D8DCB6973537A3DC() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceNetCtlCheckCallbackForNpToolkit() {
|
int PS4_SYSV_ABI sceNetCtlCheckCallbackForNpToolkit() {
|
||||||
netctl.CheckNpToolkitCallback();
|
LOG_DEBUG(Lib_NetCtl, "(STUBBED) called");
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
353
src/core/libraries/network/ssl2.cpp
Normal file
353
src/core/libraries/network/ssl2.cpp
Normal file
@ -0,0 +1,353 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/libraries/error_codes.h"
|
||||||
|
#include "core/libraries/libs.h"
|
||||||
|
#include "core/libraries/network/ssl2.h"
|
||||||
|
|
||||||
|
namespace Libraries::Ssl2 {
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI CA_MGMT_extractKeyBlobEx() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI CA_MGMT_extractPublicKeyInfo() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI CA_MGMT_freeKeyBlob() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI CRYPTO_initAsymmetricKey() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI CRYPTO_uninitAsymmetricKey() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI RSA_verifySignature() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslCheckRecvPending() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslClose() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslConnect() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslCreateConnection() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslCreateSslConnection() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslDeleteConnection() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslDeleteSslConnection() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslDisableOption() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslDisableOptionInternal() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslDisableOptionInternalInsecure() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslDisableVerifyOption() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslEnableOption() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslEnableOptionInternal() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslEnableVerifyOption() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslFreeCaCerts() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslFreeCaList() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslFreeSslCertName() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetAlpnSelected() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetCaCerts() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetCaList() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetFingerprint() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetIssuerName() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetMemoryPoolStats() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetNameEntryCount() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetNameEntryInfo() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetNanoSSLModuleId() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetNotAfter() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetNotBefore() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetPeerCert() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetPem() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetSerialNumber() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetSslError() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslGetSubjectName() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslInit(std::size_t poolSize) {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(DUMMY) called poolSize = {}", poolSize);
|
||||||
|
// return a value >1
|
||||||
|
static int id = 0;
|
||||||
|
return ++id;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslLoadCert() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslLoadRootCACert() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslRead() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslRecv() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslReuseConnection() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslSend() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslSetAlpn() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslSetMinSslVersion() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslSetSslVersion() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslSetVerifyCallback() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslTerm() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslUnloadCert() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI sceSslWrite() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI VLONG_freeVlongQueue() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI Func_22E76E60BC0587D7() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI Func_28F8791A771D39C7() {
|
||||||
|
LOG_ERROR(Lib_Ssl2, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterlibSceSsl2(Core::Loader::SymbolsResolver* sym) {
|
||||||
|
LIB_FUNCTION("Md+HYkCBZB4", "libSceSsl", 1, "libSceSsl", 2, 1, CA_MGMT_extractKeyBlobEx);
|
||||||
|
LIB_FUNCTION("9bKYzKP6kYU", "libSceSsl", 1, "libSceSsl", 2, 1, CA_MGMT_extractPublicKeyInfo);
|
||||||
|
LIB_FUNCTION("ipLIammTj2Q", "libSceSsl", 1, "libSceSsl", 2, 1, CA_MGMT_freeKeyBlob);
|
||||||
|
LIB_FUNCTION("PRWr3-ytpdg", "libSceSsl", 1, "libSceSsl", 2, 1, CRYPTO_initAsymmetricKey);
|
||||||
|
LIB_FUNCTION("cW7VCIMCh9A", "libSceSsl", 1, "libSceSsl", 2, 1, CRYPTO_uninitAsymmetricKey);
|
||||||
|
LIB_FUNCTION("pBwtarKd7eg", "libSceSsl", 1, "libSceSsl", 2, 1, RSA_verifySignature);
|
||||||
|
LIB_FUNCTION("1VM0h1JrUfA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslCheckRecvPending);
|
||||||
|
LIB_FUNCTION("viRXSHZYd0c", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslClose);
|
||||||
|
LIB_FUNCTION("zXvd6iNyfgc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslConnect);
|
||||||
|
LIB_FUNCTION("tuscfitnhEo", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslCreateConnection);
|
||||||
|
LIB_FUNCTION("P14ATpXc4J8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslCreateSslConnection);
|
||||||
|
LIB_FUNCTION("HJ1n138CQ2g", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDeleteConnection);
|
||||||
|
LIB_FUNCTION("hwrHV6Pprk4", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDeleteSslConnection);
|
||||||
|
LIB_FUNCTION("iLKz4+ukLqk", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDisableOption);
|
||||||
|
LIB_FUNCTION("-WqxBRAUVM4", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDisableOptionInternal);
|
||||||
|
LIB_FUNCTION("w1+L-27nYas", "libSceSsl", 1, "libSceSsl", 2, 1,
|
||||||
|
sceSslDisableOptionInternalInsecure);
|
||||||
|
LIB_FUNCTION("PwsHbErG+e8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDisableVerifyOption);
|
||||||
|
LIB_FUNCTION("m-zPyAsIpco", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslEnableOption);
|
||||||
|
LIB_FUNCTION("g-zCwUKstEQ", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslEnableOptionInternal);
|
||||||
|
LIB_FUNCTION("po1X86mgHDU", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslEnableVerifyOption);
|
||||||
|
LIB_FUNCTION("qIvLs0gYxi0", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslFreeCaCerts);
|
||||||
|
LIB_FUNCTION("+DzXseDVkeI", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslFreeCaList);
|
||||||
|
LIB_FUNCTION("RwXD8grHZHM", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslFreeSslCertName);
|
||||||
|
LIB_FUNCTION("4O7+bRkRUe8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetAlpnSelected);
|
||||||
|
LIB_FUNCTION("TDfQqO-gMbY", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetCaCerts);
|
||||||
|
LIB_FUNCTION("qOn+wm28wmA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetCaList);
|
||||||
|
LIB_FUNCTION("brRtwGBu4A8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetFingerprint);
|
||||||
|
LIB_FUNCTION("7whYpYfHP74", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetIssuerName);
|
||||||
|
LIB_FUNCTION("-PoIzr3PEk0", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetMemoryPoolStats);
|
||||||
|
LIB_FUNCTION("R1ePzopYPYM", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNameEntryCount);
|
||||||
|
LIB_FUNCTION("7RBSTKGrmDA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNameEntryInfo);
|
||||||
|
LIB_FUNCTION("AzUipl-DpIw", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNanoSSLModuleId);
|
||||||
|
LIB_FUNCTION("xHpt6+2pGYk", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNotAfter);
|
||||||
|
LIB_FUNCTION("Eo0S65Jy28Q", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNotBefore);
|
||||||
|
LIB_FUNCTION("-TbZc8pwPNc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetPeerCert);
|
||||||
|
LIB_FUNCTION("kLB5aGoUJXg", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetPem);
|
||||||
|
LIB_FUNCTION("DOwXL+FQMEY", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetSerialNumber);
|
||||||
|
LIB_FUNCTION("0XcZknp7-Wc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetSslError);
|
||||||
|
LIB_FUNCTION("dQReuBX9sD8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetSubjectName);
|
||||||
|
LIB_FUNCTION("hdpVEUDFW3s", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslInit);
|
||||||
|
LIB_FUNCTION("Ab7+DH+gYyM", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslLoadCert);
|
||||||
|
LIB_FUNCTION("3-643mGVFJo", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslLoadRootCACert);
|
||||||
|
LIB_FUNCTION("jltWpVKtetg", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslRead);
|
||||||
|
LIB_FUNCTION("hi0veU3L2pU", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslRecv);
|
||||||
|
LIB_FUNCTION("50R2xYaYZwE", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslReuseConnection);
|
||||||
|
LIB_FUNCTION("p5bM5PPufFY", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSend);
|
||||||
|
LIB_FUNCTION("TL86glUrmUw", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetAlpn);
|
||||||
|
LIB_FUNCTION("QWSxBzf6lAg", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetMinSslVersion);
|
||||||
|
LIB_FUNCTION("bKaEtQnoUuQ", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetSslVersion);
|
||||||
|
LIB_FUNCTION("E4a-ahM57QQ", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetVerifyCallback);
|
||||||
|
LIB_FUNCTION("0K1yQ6Lv-Yc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslTerm);
|
||||||
|
LIB_FUNCTION("UQ+3Qu7v3cA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslUnloadCert);
|
||||||
|
LIB_FUNCTION("iNjkt9Poblw", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslWrite);
|
||||||
|
LIB_FUNCTION("wcVuyTUr5ys", "libSceSsl", 1, "libSceSsl", 2, 1, VLONG_freeVlongQueue);
|
||||||
|
LIB_FUNCTION("IuduYLwFh9c", "libSceSsl", 1, "libSceSsl", 2, 1, Func_22E76E60BC0587D7);
|
||||||
|
LIB_FUNCTION("KPh5GncdOcc", "libSceSsl", 1, "libSceSsl", 2, 1, Func_28F8791A771D39C7);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Libraries::Ssl2
|
14
src/core/libraries/network/ssl2.h
Normal file
14
src/core/libraries/network/ssl2.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::Ssl2 {
|
||||||
|
void RegisterlibSceSsl2(Core::Loader::SymbolsResolver* sym);
|
||||||
|
} // namespace Libraries::Ssl2
|
7915
src/core/libraries/np_common/np_common.cpp
Normal file
7915
src/core/libraries/np_common/np_common.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1245
src/core/libraries/np_common/np_common.h
Normal file
1245
src/core/libraries/np_common/np_common.h
Normal file
File diff suppressed because it is too large
Load Diff
9
src/core/libraries/np_common/np_common_error.h
Normal file
9
src/core/libraries/np_common/np_common_error.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/libraries/error_codes.h"
|
||||||
|
|
||||||
|
constexpr int ORBIS_NP_ERROR_INVALID_ARGUMENT = 0x80550003;
|
||||||
|
constexpr int ORBIS_NP_UTIL_ERROR_NOT_MATCH = 0x80550609;
|
@ -1,7 +1,6 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/config.h"
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/libraries/error_codes.h"
|
#include "core/libraries/error_codes.h"
|
||||||
#include "core/libraries/libs.h"
|
#include "core/libraries/libs.h"
|
||||||
@ -2510,7 +2509,7 @@ struct NpStateCallbackForNpToolkit {
|
|||||||
NpStateCallbackForNpToolkit NpStateCbForNp;
|
NpStateCallbackForNpToolkit NpStateCbForNp;
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceNpCheckCallbackForLib() {
|
int PS4_SYSV_ABI sceNpCheckCallbackForLib() {
|
||||||
Core::ExecuteGuest(NpStateCbForNp.func, 1, OrbisNpState::SignedOut, NpStateCbForNp.userdata);
|
LOG_DEBUG(Lib_NpManager, "(STUBBED) called");
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
692
src/core/libraries/np_web_api/np_web_api.cpp
Normal file
692
src/core/libraries/np_web_api/np_web_api.cpp
Normal file
@ -0,0 +1,692 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/logging/log.h"
|
||||||
|
#include "core/libraries/error_codes.h"
|
||||||
|
#include "core/libraries/libs.h"
|
||||||
|
#include "core/libraries/np_web_api/np_web_api.h"
|
||||||
|
|
||||||
|
namespace Libraries::NpWebApi {
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateContext() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreatePushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateServicePushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeletePushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteServicePushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterNotificationCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterPushEventCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterServicePushEventCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterNotificationCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterPushEventCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterServicePushEventCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAbortHandle() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAbortRequest() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAddHttpRequestHeader() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAddMultipartPart() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCheckTimeout() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiClearAllUnusedConnection() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiClearUnusedConnection() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateContextA() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateExtdPushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateHandle() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateMultipartRequest() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateRequest() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteContext() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteExtdPushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteHandle() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteRequest() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetConnectionStats() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetErrorCode() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValue() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValueLength() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetHttpStatusCode() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetMemoryPoolStats() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiInitialize() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(DUMMY) called");
|
||||||
|
static s32 id = 0;
|
||||||
|
return ++id;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiInitializeForPresence() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntCreateCtxIndExtdPushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntCreateRequest() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntCreateServicePushEventFilter() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntInitialize() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallbackA() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiReadData() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallbackA() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest2() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendRequest() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendRequest2() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetHandleTimeout() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetMaxConnection() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetMultipartContentType() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetRequestTimeout() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiTerminate() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterExtdPushEventCallback() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUtilityParseNpId() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiVshInitialize() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_064C4ED1EDBEB9E8() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_0783955D4E9563DA() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_1A6D77F3FD8323A8() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_1E0693A26FE0F954() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_24A9B5F1D77000CF() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_24AAA6F50E4C2361() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_24D8853D6B47FC79() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_279B3E9C7C4A9DC5() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_28461E29E9F8D697() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_3C29624704FAB9E0() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_3F027804ED2EC11E() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_4066C94E782997CD() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_47C85356815DBE90() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_4FCE8065437E3B87() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_536280BE3DABB521() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_57A0E1BC724219F3() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_5819749C040B6637() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_6198D0C825E86319() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_61F2B9E8AB093743() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_6BC388E6113F0D44() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_7500F0C4F8DC2D16() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_75A03814C7E9039F() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_789D6026C521416E() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_7DED63D06399EFFF() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_7E55A2DCC03D395A() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_7E6C8F9FB86967F4() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_7F04B7D4A7D41E80() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_8E167252DFA5C957() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_95D0046E504E3B09() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_97284BFDA4F18FDF() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_99E32C1F4737EAB4() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_9CFF661EA0BCBF83() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_9EB0E1F467AC3B29() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_A2318FE6FBABFAA3() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_BA07A2E1BF7B3971() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_BD0803EEE0CC29A0() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_BE6F4E5524BB135F() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_C0D490EB481EA4D0() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_C175D392CA6D084A() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_CD0136AF165D2F2F() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_D1C0ADB7B52FEAB5() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_E324765D18EE4D12() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_E789F980D907B653() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI Func_F9A32E8685627436() {
|
||||||
|
LOG_ERROR(Lib_NpWebApi, "(STUBBED) called");
|
||||||
|
return ORBIS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterlibSceNpWebApi(Core::Loader::SymbolsResolver* sym) {
|
||||||
|
LIB_FUNCTION("x1Y7yiYSk7c", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateContext);
|
||||||
|
LIB_FUNCTION("y5Ta5JCzQHY", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreatePushEventFilter);
|
||||||
|
LIB_FUNCTION("sIFx734+xys", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateServicePushEventFilter);
|
||||||
|
LIB_FUNCTION("zE+R6Rcx3W0", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeletePushEventFilter);
|
||||||
|
LIB_FUNCTION("PfQ+f6ws764", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeleteServicePushEventFilter);
|
||||||
|
LIB_FUNCTION("vrM02A5Gy1M", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterExtdPushEventCallback);
|
||||||
|
LIB_FUNCTION("HVgWmGIOKdk", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterNotificationCallback);
|
||||||
|
LIB_FUNCTION("PfSTDCgNMgc", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterPushEventCallback);
|
||||||
|
LIB_FUNCTION("kJQJE0uKm5w", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterServicePushEventCallback);
|
||||||
|
LIB_FUNCTION("wjYEvo4xbcA", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUnregisterNotificationCallback);
|
||||||
|
LIB_FUNCTION("qK4o2656W4w", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUnregisterPushEventCallback);
|
||||||
|
LIB_FUNCTION("2edrkr0c-wg", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUnregisterServicePushEventCallback);
|
||||||
|
LIB_FUNCTION("WKcm4PeyJww", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiAbortHandle);
|
||||||
|
LIB_FUNCTION("JzhYTP2fG18", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiAbortRequest);
|
||||||
|
LIB_FUNCTION("joRjtRXTFoc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiAddHttpRequestHeader);
|
||||||
|
LIB_FUNCTION("19KgfJXgM+U", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiAddMultipartPart);
|
||||||
|
LIB_FUNCTION("gVNNyxf-1Sg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCheckTimeout);
|
||||||
|
LIB_FUNCTION("KQIkDGf80PQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiClearAllUnusedConnection);
|
||||||
|
LIB_FUNCTION("f-pgaNSd1zc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiClearUnusedConnection);
|
||||||
|
LIB_FUNCTION("x1Y7yiYSk7c", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateContext);
|
||||||
|
LIB_FUNCTION("zk6c65xoyO0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateContextA);
|
||||||
|
LIB_FUNCTION("M2BUB+DNEGE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateExtdPushEventFilter);
|
||||||
|
LIB_FUNCTION("79M-JqvvGo0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateHandle);
|
||||||
|
LIB_FUNCTION("KBxgeNpoRIQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateMultipartRequest);
|
||||||
|
LIB_FUNCTION("y5Ta5JCzQHY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreatePushEventFilter);
|
||||||
|
LIB_FUNCTION("rdgs5Z1MyFw", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateRequest);
|
||||||
|
LIB_FUNCTION("sIFx734+xys", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiCreateServicePushEventFilter);
|
||||||
|
LIB_FUNCTION("XUjdsSTTZ3U", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeleteContext);
|
||||||
|
LIB_FUNCTION("pfaJtb7SQ80", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeleteExtdPushEventFilter);
|
||||||
|
LIB_FUNCTION("5Mn7TYwpl30", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeleteHandle);
|
||||||
|
LIB_FUNCTION("zE+R6Rcx3W0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeletePushEventFilter);
|
||||||
|
LIB_FUNCTION("noQgleu+KLE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeleteRequest);
|
||||||
|
LIB_FUNCTION("PfQ+f6ws764", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiDeleteServicePushEventFilter);
|
||||||
|
LIB_FUNCTION("UJ8H+7kVQUE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiGetConnectionStats);
|
||||||
|
LIB_FUNCTION("2qSZ0DgwTsc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiGetErrorCode);
|
||||||
|
LIB_FUNCTION("VwJ5L0Higg0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiGetHttpResponseHeaderValue);
|
||||||
|
LIB_FUNCTION("743ZzEBzlV8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiGetHttpResponseHeaderValueLength);
|
||||||
|
LIB_FUNCTION("k210oKgP80Y", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiGetHttpStatusCode);
|
||||||
|
LIB_FUNCTION("3OnubUs02UM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiGetMemoryPoolStats);
|
||||||
|
LIB_FUNCTION("G3AnLNdRBjE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, sceNpWebApiInitialize);
|
||||||
|
LIB_FUNCTION("FkuwsD64zoQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiInitializeForPresence);
|
||||||
|
LIB_FUNCTION("c1pKoztonB8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiIntCreateCtxIndExtdPushEventFilter);
|
||||||
|
LIB_FUNCTION("N2Jbx4tIaQ4", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiIntCreateRequest);
|
||||||
|
LIB_FUNCTION("TZSep4xB4EY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiIntCreateServicePushEventFilter);
|
||||||
|
LIB_FUNCTION("8Vjplhyyc44", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiIntInitialize);
|
||||||
|
LIB_FUNCTION("VjVukb2EWPc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiIntRegisterServicePushEventCallback);
|
||||||
|
LIB_FUNCTION("sfq23ZVHVEw", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiIntRegisterServicePushEventCallbackA);
|
||||||
|
LIB_FUNCTION("CQtPRSF6Ds8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, sceNpWebApiReadData);
|
||||||
|
LIB_FUNCTION("vrM02A5Gy1M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterExtdPushEventCallback);
|
||||||
|
LIB_FUNCTION("jhXKGQJ4egI", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterExtdPushEventCallbackA);
|
||||||
|
LIB_FUNCTION("HVgWmGIOKdk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterNotificationCallback);
|
||||||
|
LIB_FUNCTION("PfSTDCgNMgc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterPushEventCallback);
|
||||||
|
LIB_FUNCTION("kJQJE0uKm5w", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiRegisterServicePushEventCallback);
|
||||||
|
LIB_FUNCTION("KCItz6QkeGs", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSendMultipartRequest);
|
||||||
|
LIB_FUNCTION("DsPOTEvSe7M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSendMultipartRequest2);
|
||||||
|
LIB_FUNCTION("kVbL4hL3K7w", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSendRequest);
|
||||||
|
LIB_FUNCTION("KjNeZ-29ysQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSendRequest2);
|
||||||
|
LIB_FUNCTION("6g6q-g1i4XU", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSetHandleTimeout);
|
||||||
|
LIB_FUNCTION("gRiilVCvfAI", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSetMaxConnection);
|
||||||
|
LIB_FUNCTION("i0dr6grIZyc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSetMultipartContentType);
|
||||||
|
LIB_FUNCTION("qWcbJkBj1Lg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiSetRequestTimeout);
|
||||||
|
LIB_FUNCTION("asz3TtIqGF8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, sceNpWebApiTerminate);
|
||||||
|
LIB_FUNCTION("PqCY25FMzPs", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUnregisterExtdPushEventCallback);
|
||||||
|
LIB_FUNCTION("wjYEvo4xbcA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUnregisterNotificationCallback);
|
||||||
|
LIB_FUNCTION("qK4o2656W4w", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUnregisterPushEventCallback);
|
||||||
|
LIB_FUNCTION("2edrkr0c-wg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUnregisterServicePushEventCallback);
|
||||||
|
LIB_FUNCTION("or0e885BlXo", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiUtilityParseNpId);
|
||||||
|
LIB_FUNCTION("uRsskUhAfnM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1,
|
||||||
|
sceNpWebApiVshInitialize);
|
||||||
|
LIB_FUNCTION("BkxO0e2+ueg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_064C4ED1EDBEB9E8);
|
||||||
|
LIB_FUNCTION("B4OVXU6VY9o", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_0783955D4E9563DA);
|
||||||
|
LIB_FUNCTION("Gm138-2DI6g", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_1A6D77F3FD8323A8);
|
||||||
|
LIB_FUNCTION("HgaTom-g+VQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_1E0693A26FE0F954);
|
||||||
|
LIB_FUNCTION("JKm18ddwAM8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_24A9B5F1D77000CF);
|
||||||
|
LIB_FUNCTION("JKqm9Q5MI2E", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_24AAA6F50E4C2361);
|
||||||
|
LIB_FUNCTION("JNiFPWtH-Hk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_24D8853D6B47FC79);
|
||||||
|
LIB_FUNCTION("J5s+nHxKncU", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_279B3E9C7C4A9DC5);
|
||||||
|
LIB_FUNCTION("KEYeKen41pc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_28461E29E9F8D697);
|
||||||
|
LIB_FUNCTION("PCliRwT6ueA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_3C29624704FAB9E0);
|
||||||
|
LIB_FUNCTION("PwJ4BO0uwR4", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_3F027804ED2EC11E);
|
||||||
|
LIB_FUNCTION("QGbJTngpl80", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_4066C94E782997CD);
|
||||||
|
LIB_FUNCTION("R8hTVoFdvpA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_47C85356815DBE90);
|
||||||
|
LIB_FUNCTION("T86AZUN+O4c", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_4FCE8065437E3B87);
|
||||||
|
LIB_FUNCTION("U2KAvj2rtSE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_536280BE3DABB521);
|
||||||
|
LIB_FUNCTION("V6DhvHJCGfM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_57A0E1BC724219F3);
|
||||||
|
LIB_FUNCTION("WBl0nAQLZjc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_5819749C040B6637);
|
||||||
|
LIB_FUNCTION("YZjQyCXoYxk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_6198D0C825E86319);
|
||||||
|
LIB_FUNCTION("YfK56KsJN0M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_61F2B9E8AB093743);
|
||||||
|
LIB_FUNCTION("a8OI5hE-DUQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_6BC388E6113F0D44);
|
||||||
|
LIB_FUNCTION("dQDwxPjcLRY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7500F0C4F8DC2D16);
|
||||||
|
LIB_FUNCTION("daA4FMfpA58", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_75A03814C7E9039F);
|
||||||
|
LIB_FUNCTION("eJ1gJsUhQW4", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_789D6026C521416E);
|
||||||
|
LIB_FUNCTION("fe1j0GOZ7-8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7DED63D06399EFFF);
|
||||||
|
LIB_FUNCTION("flWi3MA9OVo", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7E55A2DCC03D395A);
|
||||||
|
LIB_FUNCTION("fmyPn7hpZ-Q", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7E6C8F9FB86967F4);
|
||||||
|
LIB_FUNCTION("fwS31KfUHoA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7F04B7D4A7D41E80);
|
||||||
|
LIB_FUNCTION("jhZyUt+lyVc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_8E167252DFA5C957);
|
||||||
|
LIB_FUNCTION("ldAEblBOOwk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_95D0046E504E3B09);
|
||||||
|
LIB_FUNCTION("lyhL-aTxj98", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_97284BFDA4F18FDF);
|
||||||
|
LIB_FUNCTION("meMsH0c36rQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_99E32C1F4737EAB4);
|
||||||
|
LIB_FUNCTION("nP9mHqC8v4M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_9CFF661EA0BCBF83);
|
||||||
|
LIB_FUNCTION("nrDh9GesOyk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_9EB0E1F467AC3B29);
|
||||||
|
LIB_FUNCTION("ojGP5vur+qM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_A2318FE6FBABFAA3);
|
||||||
|
LIB_FUNCTION("ugei4b97OXE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_BA07A2E1BF7B3971);
|
||||||
|
LIB_FUNCTION("vQgD7uDMKaA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_BD0803EEE0CC29A0);
|
||||||
|
LIB_FUNCTION("vm9OVSS7E18", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_BE6F4E5524BB135F);
|
||||||
|
LIB_FUNCTION("wNSQ60gepNA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_C0D490EB481EA4D0);
|
||||||
|
LIB_FUNCTION("wXXTksptCEo", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_C175D392CA6D084A);
|
||||||
|
LIB_FUNCTION("zQE2rxZdLy8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_CD0136AF165D2F2F);
|
||||||
|
LIB_FUNCTION("0cCtt7Uv6rU", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_D1C0ADB7B52FEAB5);
|
||||||
|
LIB_FUNCTION("4yR2XRjuTRI", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_E324765D18EE4D12);
|
||||||
|
LIB_FUNCTION("54n5gNkHtlM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_E789F980D907B653);
|
||||||
|
LIB_FUNCTION("+aMuhoVidDY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_F9A32E8685627436);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Libraries::NpWebApi
|
116
src/core/libraries/np_web_api/np_web_api.h
Normal file
116
src/core/libraries/np_web_api/np_web_api.h
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
// 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::NpWebApi {
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateContext();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreatePushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateServicePushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeletePushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteServicePushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterNotificationCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterPushEventCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterServicePushEventCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterNotificationCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterPushEventCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterServicePushEventCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAbortHandle();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAbortRequest();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAddHttpRequestHeader();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiAddMultipartPart();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCheckTimeout();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiClearAllUnusedConnection();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiClearUnusedConnection();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateContextA();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateExtdPushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateHandle();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateMultipartRequest();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiCreateRequest();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteContext();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteExtdPushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteHandle();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiDeleteRequest();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetConnectionStats();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetErrorCode();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValue();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValueLength();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetHttpStatusCode();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiGetMemoryPoolStats();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiInitialize();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiInitializeForPresence();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntCreateCtxIndExtdPushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntCreateRequest();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntCreateServicePushEventFilter();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntInitialize();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallbackA();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiReadData();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallbackA();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest2();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendRequest();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSendRequest2();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetHandleTimeout();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetMaxConnection();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetMultipartContentType();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiSetRequestTimeout();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiTerminate();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUnregisterExtdPushEventCallback();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiUtilityParseNpId();
|
||||||
|
s32 PS4_SYSV_ABI sceNpWebApiVshInitialize();
|
||||||
|
s32 PS4_SYSV_ABI Func_064C4ED1EDBEB9E8();
|
||||||
|
s32 PS4_SYSV_ABI Func_0783955D4E9563DA();
|
||||||
|
s32 PS4_SYSV_ABI Func_1A6D77F3FD8323A8();
|
||||||
|
s32 PS4_SYSV_ABI Func_1E0693A26FE0F954();
|
||||||
|
s32 PS4_SYSV_ABI Func_24A9B5F1D77000CF();
|
||||||
|
s32 PS4_SYSV_ABI Func_24AAA6F50E4C2361();
|
||||||
|
s32 PS4_SYSV_ABI Func_24D8853D6B47FC79();
|
||||||
|
s32 PS4_SYSV_ABI Func_279B3E9C7C4A9DC5();
|
||||||
|
s32 PS4_SYSV_ABI Func_28461E29E9F8D697();
|
||||||
|
s32 PS4_SYSV_ABI Func_3C29624704FAB9E0();
|
||||||
|
s32 PS4_SYSV_ABI Func_3F027804ED2EC11E();
|
||||||
|
s32 PS4_SYSV_ABI Func_4066C94E782997CD();
|
||||||
|
s32 PS4_SYSV_ABI Func_47C85356815DBE90();
|
||||||
|
s32 PS4_SYSV_ABI Func_4FCE8065437E3B87();
|
||||||
|
s32 PS4_SYSV_ABI Func_536280BE3DABB521();
|
||||||
|
s32 PS4_SYSV_ABI Func_57A0E1BC724219F3();
|
||||||
|
s32 PS4_SYSV_ABI Func_5819749C040B6637();
|
||||||
|
s32 PS4_SYSV_ABI Func_6198D0C825E86319();
|
||||||
|
s32 PS4_SYSV_ABI Func_61F2B9E8AB093743();
|
||||||
|
s32 PS4_SYSV_ABI Func_6BC388E6113F0D44();
|
||||||
|
s32 PS4_SYSV_ABI Func_7500F0C4F8DC2D16();
|
||||||
|
s32 PS4_SYSV_ABI Func_75A03814C7E9039F();
|
||||||
|
s32 PS4_SYSV_ABI Func_789D6026C521416E();
|
||||||
|
s32 PS4_SYSV_ABI Func_7DED63D06399EFFF();
|
||||||
|
s32 PS4_SYSV_ABI Func_7E55A2DCC03D395A();
|
||||||
|
s32 PS4_SYSV_ABI Func_7E6C8F9FB86967F4();
|
||||||
|
s32 PS4_SYSV_ABI Func_7F04B7D4A7D41E80();
|
||||||
|
s32 PS4_SYSV_ABI Func_8E167252DFA5C957();
|
||||||
|
s32 PS4_SYSV_ABI Func_95D0046E504E3B09();
|
||||||
|
s32 PS4_SYSV_ABI Func_97284BFDA4F18FDF();
|
||||||
|
s32 PS4_SYSV_ABI Func_99E32C1F4737EAB4();
|
||||||
|
s32 PS4_SYSV_ABI Func_9CFF661EA0BCBF83();
|
||||||
|
s32 PS4_SYSV_ABI Func_9EB0E1F467AC3B29();
|
||||||
|
s32 PS4_SYSV_ABI Func_A2318FE6FBABFAA3();
|
||||||
|
s32 PS4_SYSV_ABI Func_BA07A2E1BF7B3971();
|
||||||
|
s32 PS4_SYSV_ABI Func_BD0803EEE0CC29A0();
|
||||||
|
s32 PS4_SYSV_ABI Func_BE6F4E5524BB135F();
|
||||||
|
s32 PS4_SYSV_ABI Func_C0D490EB481EA4D0();
|
||||||
|
s32 PS4_SYSV_ABI Func_C175D392CA6D084A();
|
||||||
|
s32 PS4_SYSV_ABI Func_CD0136AF165D2F2F();
|
||||||
|
s32 PS4_SYSV_ABI Func_D1C0ADB7B52FEAB5();
|
||||||
|
s32 PS4_SYSV_ABI Func_E324765D18EE4D12();
|
||||||
|
s32 PS4_SYSV_ABI Func_E789F980D907B653();
|
||||||
|
s32 PS4_SYSV_ABI Func_F9A32E8685627436();
|
||||||
|
|
||||||
|
void RegisterlibSceNpWebApi(Core::Loader::SymbolsResolver* sym);
|
||||||
|
} // namespace Libraries::NpWebApi
|
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
namespace Libraries::Pad {
|
namespace Libraries::Pad {
|
||||||
|
|
||||||
|
using Input::GameController;
|
||||||
|
|
||||||
int PS4_SYSV_ABI scePadClose(s32 handle) {
|
int PS4_SYSV_ABI scePadClose(s32 handle) {
|
||||||
LOG_ERROR(Lib_Pad, "(STUBBED) called");
|
LOG_ERROR(Lib_Pad, "(STUBBED) called");
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
@ -93,8 +95,8 @@ int PS4_SYSV_ABI scePadGetControllerInformation(s32 handle, OrbisPadControllerIn
|
|||||||
pInfo->touchPadInfo.pixelDensity = 1;
|
pInfo->touchPadInfo.pixelDensity = 1;
|
||||||
pInfo->touchPadInfo.resolution.x = 1920;
|
pInfo->touchPadInfo.resolution.x = 1920;
|
||||||
pInfo->touchPadInfo.resolution.y = 950;
|
pInfo->touchPadInfo.resolution.y = 950;
|
||||||
pInfo->stickInfo.deadZoneLeft = 2;
|
pInfo->stickInfo.deadZoneLeft = Config::leftDeadZone();
|
||||||
pInfo->stickInfo.deadZoneRight = 2;
|
pInfo->stickInfo.deadZoneRight = Config::rightDeadZone();
|
||||||
pInfo->connectionType = ORBIS_PAD_PORT_TYPE_STANDARD;
|
pInfo->connectionType = ORBIS_PAD_PORT_TYPE_STANDARD;
|
||||||
pInfo->connectedCount = 1;
|
pInfo->connectedCount = 1;
|
||||||
pInfo->connected = false;
|
pInfo->connected = false;
|
||||||
@ -104,8 +106,8 @@ int PS4_SYSV_ABI scePadGetControllerInformation(s32 handle, OrbisPadControllerIn
|
|||||||
pInfo->touchPadInfo.pixelDensity = 1;
|
pInfo->touchPadInfo.pixelDensity = 1;
|
||||||
pInfo->touchPadInfo.resolution.x = 1920;
|
pInfo->touchPadInfo.resolution.x = 1920;
|
||||||
pInfo->touchPadInfo.resolution.y = 950;
|
pInfo->touchPadInfo.resolution.y = 950;
|
||||||
pInfo->stickInfo.deadZoneLeft = 2;
|
pInfo->stickInfo.deadZoneLeft = Config::leftDeadZone();
|
||||||
pInfo->stickInfo.deadZoneRight = 2;
|
pInfo->stickInfo.deadZoneRight = Config::rightDeadZone();
|
||||||
pInfo->connectionType = ORBIS_PAD_PORT_TYPE_STANDARD;
|
pInfo->connectionType = ORBIS_PAD_PORT_TYPE_STANDARD;
|
||||||
pInfo->connectedCount = 1;
|
pInfo->connectedCount = 1;
|
||||||
pInfo->connected = true;
|
pInfo->connected = true;
|
||||||
@ -290,7 +292,8 @@ int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) {
|
|||||||
int connected_count = 0;
|
int connected_count = 0;
|
||||||
bool connected = false;
|
bool connected = false;
|
||||||
Input::State states[64];
|
Input::State states[64];
|
||||||
auto* controller = Common::Singleton<Input::GameController>::Instance();
|
auto* controller = Common::Singleton<GameController>::Instance();
|
||||||
|
const auto* engine = controller->GetEngine();
|
||||||
int ret_num = controller->ReadStates(states, num, &connected, &connected_count);
|
int ret_num = controller->ReadStates(states, num, &connected, &connected_count);
|
||||||
|
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
@ -311,9 +314,14 @@ int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) {
|
|||||||
pData[i].angularVelocity.x = states[i].angularVelocity.x;
|
pData[i].angularVelocity.x = states[i].angularVelocity.x;
|
||||||
pData[i].angularVelocity.y = states[i].angularVelocity.y;
|
pData[i].angularVelocity.y = states[i].angularVelocity.y;
|
||||||
pData[i].angularVelocity.z = states[i].angularVelocity.z;
|
pData[i].angularVelocity.z = states[i].angularVelocity.z;
|
||||||
Input::GameController::CalculateOrientation(pData[i].acceleration, pData[i].angularVelocity,
|
if (engine) {
|
||||||
1.0f / controller->accel_poll_rate,
|
const auto accel_poll_rate = engine->GetAccelPollRate();
|
||||||
pData[i].orientation);
|
if (accel_poll_rate != 0.0f) {
|
||||||
|
GameController::CalculateOrientation(pData[i].acceleration,
|
||||||
|
pData[i].angularVelocity,
|
||||||
|
1.0f / accel_poll_rate, pData[i].orientation);
|
||||||
|
}
|
||||||
|
}
|
||||||
pData[i].touchData.touchNum =
|
pData[i].touchData.touchNum =
|
||||||
(states[i].touchpad[0].state ? 1 : 0) + (states[i].touchpad[1].state ? 1 : 0);
|
(states[i].touchpad[0].state ? 1 : 0) + (states[i].touchpad[1].state ? 1 : 0);
|
||||||
pData[i].touchData.touch[0].x = states[i].touchpad[0].x;
|
pData[i].touchData.touch[0].x = states[i].touchpad[0].x;
|
||||||
@ -356,7 +364,8 @@ int PS4_SYSV_ABI scePadReadState(s32 handle, OrbisPadData* pData) {
|
|||||||
if (handle == ORBIS_PAD_ERROR_DEVICE_NO_HANDLE) {
|
if (handle == ORBIS_PAD_ERROR_DEVICE_NO_HANDLE) {
|
||||||
return ORBIS_PAD_ERROR_INVALID_HANDLE;
|
return ORBIS_PAD_ERROR_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
auto* controller = Common::Singleton<Input::GameController>::Instance();
|
auto* controller = Common::Singleton<GameController>::Instance();
|
||||||
|
const auto* engine = controller->GetEngine();
|
||||||
int connectedCount = 0;
|
int connectedCount = 0;
|
||||||
bool isConnected = false;
|
bool isConnected = false;
|
||||||
Input::State state;
|
Input::State state;
|
||||||
@ -374,9 +383,13 @@ int PS4_SYSV_ABI scePadReadState(s32 handle, OrbisPadData* pData) {
|
|||||||
pData->angularVelocity.x = state.angularVelocity.x;
|
pData->angularVelocity.x = state.angularVelocity.x;
|
||||||
pData->angularVelocity.y = state.angularVelocity.y;
|
pData->angularVelocity.y = state.angularVelocity.y;
|
||||||
pData->angularVelocity.z = state.angularVelocity.z;
|
pData->angularVelocity.z = state.angularVelocity.z;
|
||||||
Input::GameController::CalculateOrientation(pData->acceleration, pData->angularVelocity,
|
if (engine) {
|
||||||
1.0f / controller->accel_poll_rate,
|
const auto accel_poll_rate = engine->GetAccelPollRate();
|
||||||
pData->orientation);
|
if (accel_poll_rate != 0.0f) {
|
||||||
|
GameController::CalculateOrientation(pData->acceleration, pData->angularVelocity,
|
||||||
|
1.0f / accel_poll_rate, pData->orientation);
|
||||||
|
}
|
||||||
|
}
|
||||||
pData->touchData.touchNum =
|
pData->touchData.touchNum =
|
||||||
(state.touchpad[0].state ? 1 : 0) + (state.touchpad[1].state ? 1 : 0);
|
(state.touchpad[0].state ? 1 : 0) + (state.touchpad[1].state ? 1 : 0);
|
||||||
pData->touchData.touch[0].x = state.touchpad[0].x;
|
pData->touchData.touch[0].x = state.touchpad[0].x;
|
||||||
@ -468,7 +481,7 @@ int PS4_SYSV_ABI scePadSetLightBar(s32 handle, const OrbisPadLightBarParam* pPar
|
|||||||
return ORBIS_PAD_ERROR_INVALID_LIGHTBAR_SETTING;
|
return ORBIS_PAD_ERROR_INVALID_LIGHTBAR_SETTING;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto* controller = Common::Singleton<Input::GameController>::Instance();
|
auto* controller = Common::Singleton<GameController>::Instance();
|
||||||
controller->SetLightBarRGB(pParam->r, pParam->g, pParam->b);
|
controller->SetLightBarRGB(pParam->r, pParam->g, pParam->b);
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
@ -536,7 +549,7 @@ int PS4_SYSV_ABI scePadSetVibration(s32 handle, const OrbisPadVibrationParam* pP
|
|||||||
if (pParam != nullptr) {
|
if (pParam != nullptr) {
|
||||||
LOG_DEBUG(Lib_Pad, "scePadSetVibration called handle = {} data = {} , {}", handle,
|
LOG_DEBUG(Lib_Pad, "scePadSetVibration called handle = {} data = {} , {}", handle,
|
||||||
pParam->smallMotor, pParam->largeMotor);
|
pParam->smallMotor, pParam->largeMotor);
|
||||||
auto* controller = Common::Singleton<Input::GameController>::Instance();
|
auto* controller = Common::Singleton<GameController>::Instance();
|
||||||
controller->SetVibration(pParam->smallMotor, pParam->largeMotor);
|
controller->SetVibration(pParam->smallMotor, pParam->largeMotor);
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <imgui.h>
|
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "common/debug.h"
|
#include "common/debug.h"
|
||||||
@ -11,6 +9,7 @@
|
|||||||
#include "core/libraries/kernel/time.h"
|
#include "core/libraries/kernel/time.h"
|
||||||
#include "core/libraries/videoout/driver.h"
|
#include "core/libraries/videoout/driver.h"
|
||||||
#include "core/libraries/videoout/videoout_error.h"
|
#include "core/libraries/videoout/videoout_error.h"
|
||||||
|
#include "imgui/renderer/imgui_core.h"
|
||||||
#include "video_core/renderer_vulkan/vk_presenter.h"
|
#include "video_core/renderer_vulkan/vk_presenter.h"
|
||||||
|
|
||||||
extern std::unique_ptr<Vulkan::Presenter> presenter;
|
extern std::unique_ptr<Vulkan::Presenter> presenter;
|
||||||
@ -207,6 +206,13 @@ void VideoOutDriver::DrawBlankFrame() {
|
|||||||
presenter->Present(empty_frame);
|
presenter->Present(empty_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VideoOutDriver::DrawLastFrame() {
|
||||||
|
const auto frame = presenter->PrepareLastFrame();
|
||||||
|
if (frame != nullptr) {
|
||||||
|
presenter->Present(frame, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool VideoOutDriver::SubmitFlip(VideoOutPort* port, s32 index, s64 flip_arg,
|
bool VideoOutDriver::SubmitFlip(VideoOutPort* port, s32 index, s64 flip_arg,
|
||||||
bool is_eop /*= false*/) {
|
bool is_eop /*= false*/) {
|
||||||
{
|
{
|
||||||
@ -278,17 +284,26 @@ void VideoOutDriver::PresentThread(std::stop_token token) {
|
|||||||
return {};
|
return {};
|
||||||
};
|
};
|
||||||
|
|
||||||
auto delay = std::chrono::microseconds{0};
|
|
||||||
while (!token.stop_requested()) {
|
while (!token.stop_requested()) {
|
||||||
timer.Start();
|
timer.Start();
|
||||||
|
|
||||||
|
if (DebugState.IsGuestThreadsPaused()) {
|
||||||
|
DrawLastFrame();
|
||||||
|
timer.End();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if it's time to take a request.
|
// Check if it's time to take a request.
|
||||||
auto& vblank_status = main_port.vblank_status;
|
auto& vblank_status = main_port.vblank_status;
|
||||||
if (vblank_status.count % (main_port.flip_rate + 1) == 0) {
|
if (vblank_status.count % (main_port.flip_rate + 1) == 0) {
|
||||||
const auto request = receive_request();
|
const auto request = receive_request();
|
||||||
if (!request) {
|
if (!request) {
|
||||||
if (!main_port.is_open || DebugState.IsGuestThreadsPaused()) {
|
if (timer.GetTotalWait().count() < 0) { // Dont draw too fast
|
||||||
|
if (!main_port.is_open) {
|
||||||
DrawBlankFrame();
|
DrawBlankFrame();
|
||||||
|
} else if (ImGui::Core::MustKeepDrawing()) {
|
||||||
|
DrawLastFrame();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Flip(request);
|
Flip(request);
|
||||||
|
@ -102,7 +102,8 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
void Flip(const Request& req);
|
void Flip(const Request& req);
|
||||||
void DrawBlankFrame(); // Used when there is no flip request to keep ImGui up to date
|
void DrawBlankFrame(); // Video port out not open
|
||||||
|
void DrawLastFrame(); // Used when there is no flip request
|
||||||
void SubmitFlipInternal(VideoOutPort* port, s32 index, s64 flip_arg, bool is_eop = false);
|
void SubmitFlipInternal(VideoOutPort* port, s32 index, s64 flip_arg, bool is_eop = false);
|
||||||
void PresentThread(std::stop_token token);
|
void PresentThread(std::stop_token token);
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ Linker::Linker() : memory{Memory::Instance()} {}
|
|||||||
|
|
||||||
Linker::~Linker() = default;
|
Linker::~Linker() = default;
|
||||||
|
|
||||||
void Linker::Execute() {
|
void Linker::Execute(const std::vector<std::string> args) {
|
||||||
if (Config::debugDump()) {
|
if (Config::debugDump()) {
|
||||||
DebugDump();
|
DebugDump();
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ void Linker::Execute() {
|
|||||||
|
|
||||||
memory->SetupMemoryRegions(fmem_size, use_extended_mem1, use_extended_mem2);
|
memory->SetupMemoryRegions(fmem_size, use_extended_mem1, use_extended_mem2);
|
||||||
|
|
||||||
main_thread.Run([this, module](std::stop_token) {
|
main_thread.Run([this, module, args](std::stop_token) {
|
||||||
Common::SetCurrentThreadName("GAME_MainThread");
|
Common::SetCurrentThreadName("GAME_MainThread");
|
||||||
LoadSharedLibraries();
|
LoadSharedLibraries();
|
||||||
|
|
||||||
@ -109,6 +109,12 @@ void Linker::Execute() {
|
|||||||
EntryParams params{};
|
EntryParams params{};
|
||||||
params.argc = 1;
|
params.argc = 1;
|
||||||
params.argv[0] = "eboot.bin";
|
params.argv[0] = "eboot.bin";
|
||||||
|
if (!args.empty()) {
|
||||||
|
params.argc = args.size() + 1;
|
||||||
|
for (int i = 0; i < args.size() && i < 32; i++) {
|
||||||
|
params.argv[i + 1] = args[i].c_str();
|
||||||
|
}
|
||||||
|
}
|
||||||
params.entry_addr = module->GetEntryAddress();
|
params.entry_addr = module->GetEntryAddress();
|
||||||
RunMainEntry(¶ms);
|
RunMainEntry(¶ms);
|
||||||
});
|
});
|
||||||
|
@ -49,7 +49,7 @@ class Linker;
|
|||||||
struct EntryParams {
|
struct EntryParams {
|
||||||
int argc;
|
int argc;
|
||||||
u32 padding;
|
u32 padding;
|
||||||
const char* argv[3];
|
const char* argv[33];
|
||||||
VAddr entry_addr;
|
VAddr entry_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ public:
|
|||||||
void Relocate(Module* module);
|
void Relocate(Module* module);
|
||||||
bool Resolve(const std::string& name, Loader::SymbolType type, Module* module,
|
bool Resolve(const std::string& name, Loader::SymbolType type, Module* module,
|
||||||
Loader::SymbolRecord* return_info);
|
Loader::SymbolRecord* return_info);
|
||||||
void Execute();
|
void Execute(const std::vector<std::string> args = {});
|
||||||
void DebugDump();
|
void DebugDump();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -66,9 +66,10 @@ Emulator::Emulator() {
|
|||||||
LOG_INFO(Config, "Vulkan vkValidation: {}", Config::vkValidationEnabled());
|
LOG_INFO(Config, "Vulkan vkValidation: {}", Config::vkValidationEnabled());
|
||||||
LOG_INFO(Config, "Vulkan vkValidationSync: {}", Config::vkValidationSyncEnabled());
|
LOG_INFO(Config, "Vulkan vkValidationSync: {}", Config::vkValidationSyncEnabled());
|
||||||
LOG_INFO(Config, "Vulkan vkValidationGpu: {}", Config::vkValidationGpuEnabled());
|
LOG_INFO(Config, "Vulkan vkValidationGpu: {}", Config::vkValidationGpuEnabled());
|
||||||
LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled());
|
|
||||||
LOG_INFO(Config, "Vulkan rdocMarkersEnable: {}", Config::vkMarkersEnabled());
|
|
||||||
LOG_INFO(Config, "Vulkan crashDiagnostics: {}", Config::vkCrashDiagnosticEnabled());
|
LOG_INFO(Config, "Vulkan crashDiagnostics: {}", Config::vkCrashDiagnosticEnabled());
|
||||||
|
LOG_INFO(Config, "Vulkan hostMarkers: {}", Config::vkHostMarkersEnabled());
|
||||||
|
LOG_INFO(Config, "Vulkan guestMarkers: {}", Config::vkGuestMarkersEnabled());
|
||||||
|
LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled());
|
||||||
|
|
||||||
// Create stdin/stdout/stderr
|
// Create stdin/stdout/stderr
|
||||||
Common::Singleton<FileSys::HandleTable>::Instance()->CreateStdHandles();
|
Common::Singleton<FileSys::HandleTable>::Instance()->CreateStdHandles();
|
||||||
@ -98,7 +99,7 @@ Emulator::~Emulator() {
|
|||||||
Config::saveMainWindow(config_dir / "config.toml");
|
Config::saveMainWindow(config_dir / "config.toml");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Emulator::Run(const std::filesystem::path& file) {
|
void Emulator::Run(const std::filesystem::path& file, const std::vector<std::string> args) {
|
||||||
// Applications expect to be run from /app0 so mount the file's parent path as app0.
|
// Applications expect to be run from /app0 so mount the file's parent path as app0.
|
||||||
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||||
const auto game_folder = file.parent_path();
|
const auto game_folder = file.parent_path();
|
||||||
@ -151,6 +152,15 @@ void Emulator::Run(const std::filesystem::path& file) {
|
|||||||
if (const auto raw_attributes = param_sfo->GetInteger("ATTRIBUTE")) {
|
if (const auto raw_attributes = param_sfo->GetInteger("ATTRIBUTE")) {
|
||||||
psf_attributes.raw = *raw_attributes;
|
psf_attributes.raw = *raw_attributes;
|
||||||
}
|
}
|
||||||
|
if (!args.empty()) {
|
||||||
|
int argc = std::min<int>(args.size(), 32);
|
||||||
|
for (int i = 0; i < argc; i++) {
|
||||||
|
LOG_INFO(Loader, "Game argument {}: {}", i, args[i]);
|
||||||
|
}
|
||||||
|
if (args.size() > 32) {
|
||||||
|
LOG_ERROR(Loader, "Too many game arguments, only passing the first 32");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto pic1_path = mnt->GetHostPath("/app0/sce_sys/pic1.png");
|
const auto pic1_path = mnt->GetHostPath("/app0/sce_sys/pic1.png");
|
||||||
@ -238,7 +248,7 @@ void Emulator::Run(const std::filesystem::path& file) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
linker->Execute();
|
linker->Execute(args);
|
||||||
|
|
||||||
window->InitTimers();
|
window->InitTimers();
|
||||||
while (window->IsOpen()) {
|
while (window->IsOpen()) {
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
Emulator();
|
Emulator();
|
||||||
~Emulator();
|
~Emulator();
|
||||||
|
|
||||||
void Run(const std::filesystem::path& file);
|
void Run(const std::filesystem::path& file, const std::vector<std::string> args = {});
|
||||||
void UpdatePlayTime(const std::string& serial);
|
void UpdatePlayTime(const std::string& serial);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -30,6 +30,12 @@ extern void assert_fail_debug_msg(const char* msg);
|
|||||||
#define IM_VEC4_CLASS_EXTRA \
|
#define IM_VEC4_CLASS_EXTRA \
|
||||||
constexpr ImVec4(float _v) : x(_v), y(_v), z(_v), w(_v) {}
|
constexpr ImVec4(float _v) : x(_v), y(_v), z(_v), w(_v) {}
|
||||||
|
|
||||||
|
namespace ImGui {
|
||||||
|
struct Texture;
|
||||||
|
}
|
||||||
|
#define ImTextureID ImTextureID
|
||||||
|
using ImTextureID = ::ImGui::Texture*;
|
||||||
|
|
||||||
#ifdef IMGUI_USE_WCHAR32
|
#ifdef IMGUI_USE_WCHAR32
|
||||||
#error "This project uses 16 bits wchar standard like Orbis"
|
#error "This project uses 16 bits wchar standard like Orbis"
|
||||||
#endif
|
#endif
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "common/path_util.h"
|
#include "common/path_util.h"
|
||||||
|
#include "core/debug_state.h"
|
||||||
#include "core/devtools/layer.h"
|
#include "core/devtools/layer.h"
|
||||||
#include "imgui/imgui_layer.h"
|
#include "imgui/imgui_layer.h"
|
||||||
#include "imgui_core.h"
|
#include "imgui_core.h"
|
||||||
@ -167,7 +168,7 @@ bool ProcessEvent(SDL_Event* event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewFrame() {
|
ImGuiID NewFrame(bool is_reusing_frame) {
|
||||||
{
|
{
|
||||||
std::scoped_lock lock{change_layers_mutex};
|
std::scoped_lock lock{change_layers_mutex};
|
||||||
while (!change_layers.empty()) {
|
while (!change_layers.empty()) {
|
||||||
@ -182,24 +183,32 @@ void NewFrame() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Sdl::NewFrame();
|
Sdl::NewFrame(is_reusing_frame);
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
|
||||||
DockSpaceOverViewport(0, GetMainViewport(), ImGuiDockNodeFlags_PassthruCentralNode);
|
ImGuiWindowFlags flags =
|
||||||
|
ImGuiDockNodeFlags_PassthruCentralNode | ImGuiDockNodeFlags_AutoHideTabBar;
|
||||||
|
if (!DebugState.IsShowingDebugMenuBar()) {
|
||||||
|
flags |= ImGuiDockNodeFlags_NoTabBar;
|
||||||
|
}
|
||||||
|
ImGuiID dockId = DockSpaceOverViewport(0, GetMainViewport(), flags);
|
||||||
|
|
||||||
for (auto* layer : layers) {
|
for (auto* layer : layers) {
|
||||||
layer->Draw();
|
layer->Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return dockId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Render(const vk::CommandBuffer& cmdbuf, ::Vulkan::Frame* frame) {
|
void Render(const vk::CommandBuffer& cmdbuf, const vk::ImageView& image_view,
|
||||||
|
const vk::Extent2D& extent) {
|
||||||
ImGui::Render();
|
ImGui::Render();
|
||||||
ImDrawData* draw_data = GetDrawData();
|
ImDrawData* draw_data = GetDrawData();
|
||||||
if (draw_data->CmdListsCount == 0) {
|
if (draw_data->CmdListsCount == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config::vkMarkersEnabled()) {
|
if (Config::vkHostMarkersEnabled()) {
|
||||||
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
|
||||||
.pLabelName = "ImGui Render",
|
.pLabelName = "ImGui Render",
|
||||||
});
|
});
|
||||||
@ -207,16 +216,16 @@ void Render(const vk::CommandBuffer& cmdbuf, ::Vulkan::Frame* frame) {
|
|||||||
|
|
||||||
vk::RenderingAttachmentInfo color_attachments[1]{
|
vk::RenderingAttachmentInfo color_attachments[1]{
|
||||||
{
|
{
|
||||||
.imageView = frame->image_view,
|
.imageView = image_view,
|
||||||
.imageLayout = vk::ImageLayout::eColorAttachmentOptimal,
|
.imageLayout = vk::ImageLayout::eColorAttachmentOptimal,
|
||||||
.loadOp = vk::AttachmentLoadOp::eLoad,
|
.loadOp = vk::AttachmentLoadOp::eClear,
|
||||||
.storeOp = vk::AttachmentStoreOp::eStore,
|
.storeOp = vk::AttachmentStoreOp::eStore,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
vk::RenderingInfo render_info{};
|
vk::RenderingInfo render_info{};
|
||||||
render_info.renderArea = vk::Rect2D{
|
render_info.renderArea = vk::Rect2D{
|
||||||
.offset = {0, 0},
|
.offset = {0, 0},
|
||||||
.extent = {frame->width, frame->height},
|
.extent = extent,
|
||||||
};
|
};
|
||||||
render_info.layerCount = 1;
|
render_info.layerCount = 1;
|
||||||
render_info.colorAttachmentCount = 1;
|
render_info.colorAttachmentCount = 1;
|
||||||
@ -224,11 +233,15 @@ void Render(const vk::CommandBuffer& cmdbuf, ::Vulkan::Frame* frame) {
|
|||||||
cmdbuf.beginRendering(render_info);
|
cmdbuf.beginRendering(render_info);
|
||||||
Vulkan::RenderDrawData(*draw_data, cmdbuf);
|
Vulkan::RenderDrawData(*draw_data, cmdbuf);
|
||||||
cmdbuf.endRendering();
|
cmdbuf.endRendering();
|
||||||
if (Config::vkMarkersEnabled()) {
|
if (Config::vkHostMarkersEnabled()) {
|
||||||
cmdbuf.endDebugUtilsLabelEXT();
|
cmdbuf.endDebugUtilsLabelEXT();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MustKeepDrawing() {
|
||||||
|
return layers.size() > 1 || DebugState.IsShowingDebugMenuBar();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
void Layer::AddLayer(Layer* layer) {
|
void Layer::AddLayer(Layer* layer) {
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <imgui.h>
|
||||||
|
|
||||||
#include "video_core/renderer_vulkan/vk_instance.h"
|
#include "video_core/renderer_vulkan/vk_instance.h"
|
||||||
#include "vulkan/vulkan_handles.hpp"
|
#include "vulkan/vulkan_handles.hpp"
|
||||||
|
|
||||||
@ -24,8 +26,11 @@ void Shutdown(const vk::Device& device);
|
|||||||
|
|
||||||
bool ProcessEvent(SDL_Event* event);
|
bool ProcessEvent(SDL_Event* event);
|
||||||
|
|
||||||
void NewFrame();
|
ImGuiID NewFrame(bool is_reusing_frame = false);
|
||||||
|
|
||||||
void Render(const vk::CommandBuffer& cmdbuf, Vulkan::Frame* frame);
|
void Render(const vk::CommandBuffer& cmdbuf, const vk::ImageView& image_view,
|
||||||
|
const vk::Extent2D& extent);
|
||||||
|
|
||||||
|
bool MustKeepDrawing(); // Force the emulator redraw
|
||||||
|
|
||||||
} // namespace ImGui::Core
|
} // namespace ImGui::Core
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
|
#include "core/debug_state.h"
|
||||||
#include "imgui_impl_sdl3.h"
|
#include "imgui_impl_sdl3.h"
|
||||||
|
|
||||||
// SDL
|
// SDL
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
#include <dispatch/dispatch.h>
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
@ -27,6 +27,7 @@ struct SdlData {
|
|||||||
SDL_Window* window{};
|
SDL_Window* window{};
|
||||||
SDL_WindowID window_id{};
|
SDL_WindowID window_id{};
|
||||||
Uint64 time{};
|
Uint64 time{};
|
||||||
|
Uint64 nonReusedtime{};
|
||||||
const char* clipboard_text_data{};
|
const char* clipboard_text_data{};
|
||||||
|
|
||||||
// IME handling
|
// IME handling
|
||||||
@ -45,6 +46,11 @@ struct SdlData {
|
|||||||
ImVector<SDL_Gamepad*> gamepads{};
|
ImVector<SDL_Gamepad*> gamepads{};
|
||||||
GamepadMode gamepad_mode{};
|
GamepadMode gamepad_mode{};
|
||||||
bool want_update_gamepads_list{};
|
bool want_update_gamepads_list{};
|
||||||
|
|
||||||
|
// Framerate counting (based on ImGui impl)
|
||||||
|
std::array<float, 60> framerateSecPerFrame;
|
||||||
|
int framerateSecPerFrameIdx{};
|
||||||
|
float framerateSecPerFrameAcc{};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui
|
// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui
|
||||||
@ -72,33 +78,25 @@ static void PlatformSetImeData(ImGuiContext*, ImGuiViewport* viewport, ImGuiPlat
|
|||||||
auto window_id = (SDL_WindowID)(intptr_t)viewport->PlatformHandle;
|
auto window_id = (SDL_WindowID)(intptr_t)viewport->PlatformHandle;
|
||||||
SDL_Window* window = SDL_GetWindowFromID(window_id);
|
SDL_Window* window = SDL_GetWindowFromID(window_id);
|
||||||
if ((!data->WantVisible || bd->ime_window != window) && bd->ime_window != nullptr) {
|
if ((!data->WantVisible || bd->ime_window != window) && bd->ime_window != nullptr) {
|
||||||
auto stop_input = [&bd] { SDL_StopTextInput(bd->ime_window); };
|
SDL_RunOnMainThread(
|
||||||
#ifdef __APPLE__
|
[](void* userdata) { SDL_StopTextInput(static_cast<SDL_Window*>(userdata)); },
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
bd->ime_window, true);
|
||||||
stop_input();
|
|
||||||
});
|
|
||||||
#else
|
|
||||||
stop_input();
|
|
||||||
#endif
|
|
||||||
bd->ime_window = nullptr;
|
bd->ime_window = nullptr;
|
||||||
}
|
}
|
||||||
if (data->WantVisible) {
|
if (data->WantVisible) {
|
||||||
SDL_Rect r;
|
std::pair<SDL_Window*, SDL_Rect> usr_data;
|
||||||
r.x = (int)data->InputPos.x;
|
usr_data.first = window;
|
||||||
r.y = (int)data->InputPos.y;
|
usr_data.second.x = (int)data->InputPos.x;
|
||||||
r.w = 1;
|
usr_data.second.y = (int)data->InputPos.y;
|
||||||
r.h = (int)data->InputLineHeight;
|
usr_data.second.w = 1;
|
||||||
const auto start_input = [&window, &r] {
|
usr_data.second.h = (int)data->InputLineHeight;
|
||||||
SDL_SetTextInputArea(window, &r, 0);
|
SDL_RunOnMainThread(
|
||||||
SDL_StartTextInput(window);
|
[](void* userdata) {
|
||||||
};
|
auto* params = static_cast<std::pair<SDL_Window*, SDL_Rect>*>(userdata);
|
||||||
#ifdef __APPLE__
|
SDL_SetTextInputArea(params->first, ¶ms->second, 0);
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
SDL_StartTextInput(params->first);
|
||||||
start_input();
|
},
|
||||||
});
|
&usr_data, true);
|
||||||
#else
|
|
||||||
start_input();
|
|
||||||
#endif
|
|
||||||
bd->ime_window = window;
|
bd->ime_window = window;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -794,7 +792,7 @@ static void UpdateGamepads() {
|
|||||||
+thumb_dead_zone, +32767);
|
+thumb_dead_zone, +32767);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewFrame() {
|
void NewFrame(bool is_reusing_frame) {
|
||||||
SdlData* bd = GetBackendData();
|
SdlData* bd = GetBackendData();
|
||||||
IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
|
IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
@ -807,9 +805,29 @@ void NewFrame() {
|
|||||||
if (current_time <= bd->time)
|
if (current_time <= bd->time)
|
||||||
current_time = bd->time + 1;
|
current_time = bd->time + 1;
|
||||||
io.DeltaTime = bd->time > 0 ? (float)((double)(current_time - bd->time) / (double)frequency)
|
io.DeltaTime = bd->time > 0 ? (float)((double)(current_time - bd->time) / (double)frequency)
|
||||||
: (float)(1.0f / 60.0f);
|
: 1.0f / 60.0f;
|
||||||
bd->time = current_time;
|
bd->time = current_time;
|
||||||
|
|
||||||
|
if (!is_reusing_frame) {
|
||||||
|
if (current_time <= bd->nonReusedtime)
|
||||||
|
current_time = bd->nonReusedtime + 1;
|
||||||
|
float deltaTime =
|
||||||
|
bd->nonReusedtime > 0
|
||||||
|
? (float)((double)(current_time - bd->nonReusedtime) / (double)frequency)
|
||||||
|
: 1.0f / 60.0f;
|
||||||
|
bd->nonReusedtime = current_time;
|
||||||
|
DebugState.FrameDeltaTime = deltaTime;
|
||||||
|
|
||||||
|
int& frameIdx = bd->framerateSecPerFrameIdx;
|
||||||
|
float& framerateSec = bd->framerateSecPerFrame[frameIdx];
|
||||||
|
float& acc = bd->framerateSecPerFrameAcc;
|
||||||
|
int count = bd->framerateSecPerFrame.size();
|
||||||
|
acc += deltaTime - framerateSec;
|
||||||
|
framerateSec = deltaTime;
|
||||||
|
frameIdx = (frameIdx + 1) % count;
|
||||||
|
DebugState.Framerate = acc > 0.0f ? 1.0f / (acc / (float)count) : FLT_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
if (bd->mouse_pending_leave_frame && bd->mouse_pending_leave_frame >= ImGui::GetFrameCount() &&
|
if (bd->mouse_pending_leave_frame && bd->mouse_pending_leave_frame >= ImGui::GetFrameCount() &&
|
||||||
bd->mouse_buttons_down == 0) {
|
bd->mouse_buttons_down == 0) {
|
||||||
bd->mouse_window_id = 0;
|
bd->mouse_window_id = 0;
|
||||||
|
@ -14,7 +14,7 @@ namespace ImGui::Sdl {
|
|||||||
|
|
||||||
bool Init(SDL_Window* window);
|
bool Init(SDL_Window* window);
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
void NewFrame();
|
void NewFrame(bool is_reusing);
|
||||||
bool ProcessEvent(const SDL_Event* event);
|
bool ProcessEvent(const SDL_Event* event);
|
||||||
void OnResize();
|
void OnResize();
|
||||||
|
|
||||||
|
@ -57,11 +57,12 @@ struct VkData {
|
|||||||
vk::DeviceMemory font_memory{};
|
vk::DeviceMemory font_memory{};
|
||||||
vk::Image font_image{};
|
vk::Image font_image{};
|
||||||
vk::ImageView font_view{};
|
vk::ImageView font_view{};
|
||||||
vk::DescriptorSet font_descriptor_set{};
|
ImTextureID font_texture{};
|
||||||
vk::CommandBuffer font_command_buffer{};
|
vk::CommandBuffer font_command_buffer{};
|
||||||
|
|
||||||
// Render buffers
|
// Render buffers
|
||||||
WindowRenderBuffers render_buffers{};
|
WindowRenderBuffers render_buffers{};
|
||||||
|
bool enabled_blending{true};
|
||||||
|
|
||||||
VkData(const InitInfo init_info) : init_info(init_info) {
|
VkData(const InitInfo init_info) : init_info(init_info) {
|
||||||
render_buffers.count = init_info.image_count;
|
render_buffers.count = init_info.image_count;
|
||||||
@ -252,8 +253,8 @@ void UploadTextureData::Destroy() {
|
|||||||
const InitInfo& v = bd->init_info;
|
const InitInfo& v = bd->init_info;
|
||||||
|
|
||||||
CheckVkErr(v.device.waitIdle());
|
CheckVkErr(v.device.waitIdle());
|
||||||
RemoveTexture(descriptor_set);
|
RemoveTexture(im_texture);
|
||||||
descriptor_set = VK_NULL_HANDLE;
|
im_texture = nullptr;
|
||||||
|
|
||||||
v.device.destroyImageView(image_view, v.allocator);
|
v.device.destroyImageView(image_view, v.allocator);
|
||||||
image_view = VK_NULL_HANDLE;
|
image_view = VK_NULL_HANDLE;
|
||||||
@ -264,7 +265,7 @@ void UploadTextureData::Destroy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Register a texture
|
// Register a texture
|
||||||
vk::DescriptorSet AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout,
|
ImTextureID AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout,
|
||||||
vk::Sampler sampler) {
|
vk::Sampler sampler) {
|
||||||
VkData* bd = GetBackendData();
|
VkData* bd = GetBackendData();
|
||||||
const InitInfo& v = bd->init_info;
|
const InitInfo& v = bd->init_info;
|
||||||
@ -303,7 +304,9 @@ vk::DescriptorSet AddTexture(vk::ImageView image_view, vk::ImageLayout image_lay
|
|||||||
};
|
};
|
||||||
v.device.updateDescriptorSets({write_desc}, {});
|
v.device.updateDescriptorSets({write_desc}, {});
|
||||||
}
|
}
|
||||||
return descriptor_set;
|
return new Texture{
|
||||||
|
.descriptor_set = descriptor_set,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, u32 height,
|
UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, u32 height,
|
||||||
size_t size) {
|
size_t size) {
|
||||||
@ -370,7 +373,7 @@ UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create descriptor set (ImTextureID)
|
// Create descriptor set (ImTextureID)
|
||||||
info.descriptor_set = AddTexture(info.image_view, vk::ImageLayout::eShaderReadOnlyOptimal);
|
info.im_texture = AddTexture(info.image_view, vk::ImageLayout::eShaderReadOnlyOptimal);
|
||||||
|
|
||||||
// Create Upload Buffer
|
// Create Upload Buffer
|
||||||
{
|
{
|
||||||
@ -464,10 +467,12 @@ UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width,
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveTexture(vk::DescriptorSet descriptor_set) {
|
void RemoveTexture(ImTextureID texture) {
|
||||||
|
IM_ASSERT(texture != nullptr);
|
||||||
VkData* bd = GetBackendData();
|
VkData* bd = GetBackendData();
|
||||||
const InitInfo& v = bd->init_info;
|
const InitInfo& v = bd->init_info;
|
||||||
v.device.freeDescriptorSets(bd->descriptor_pool, {descriptor_set});
|
v.device.freeDescriptorSets(bd->descriptor_pool, {texture->descriptor_set});
|
||||||
|
delete texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CreateOrResizeBuffer(RenderBuffer& rb, size_t new_size, vk::BufferUsageFlagBits usage) {
|
static void CreateOrResizeBuffer(RenderBuffer& rb, size_t new_size, vk::BufferUsageFlagBits usage) {
|
||||||
@ -679,13 +684,7 @@ void RenderDrawData(ImDrawData& draw_data, vk::CommandBuffer command_buffer,
|
|||||||
command_buffer.setScissor(0, 1, &scissor);
|
command_buffer.setScissor(0, 1, &scissor);
|
||||||
|
|
||||||
// Bind DescriptorSet with font or user texture
|
// Bind DescriptorSet with font or user texture
|
||||||
vk::DescriptorSet desc_set[1]{(VkDescriptorSet)pcmd->TextureId};
|
vk::DescriptorSet desc_set[1]{pcmd->TextureId->descriptor_set};
|
||||||
if (sizeof(ImTextureID) < sizeof(ImU64)) {
|
|
||||||
// We don't support texture switches if ImTextureID hasn't been redefined to be
|
|
||||||
// 64-bit. Do a flaky check that other textures haven't been used.
|
|
||||||
IM_ASSERT(pcmd->TextureId == (ImTextureID)bd->font_descriptor_set);
|
|
||||||
desc_set[0] = bd->font_descriptor_set;
|
|
||||||
}
|
|
||||||
command_buffer.bindDescriptorSets(vk::PipelineBindPoint::eGraphics,
|
command_buffer.bindDescriptorSets(vk::PipelineBindPoint::eGraphics,
|
||||||
bd->pipeline_layout, 0, {desc_set}, {});
|
bd->pipeline_layout, 0, {desc_set}, {});
|
||||||
|
|
||||||
@ -709,7 +708,7 @@ static bool CreateFontsTexture() {
|
|||||||
const InitInfo& v = bd->init_info;
|
const InitInfo& v = bd->init_info;
|
||||||
|
|
||||||
// Destroy existing texture (if any)
|
// Destroy existing texture (if any)
|
||||||
if (bd->font_view || bd->font_image || bd->font_memory || bd->font_descriptor_set) {
|
if (bd->font_view || bd->font_image || bd->font_memory || bd->font_texture) {
|
||||||
CheckVkErr(v.queue.waitIdle());
|
CheckVkErr(v.queue.waitIdle());
|
||||||
DestroyFontsTexture();
|
DestroyFontsTexture();
|
||||||
}
|
}
|
||||||
@ -782,7 +781,7 @@ static bool CreateFontsTexture() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the Descriptor Set:
|
// Create the Descriptor Set:
|
||||||
bd->font_descriptor_set = AddTexture(bd->font_view, vk::ImageLayout::eShaderReadOnlyOptimal);
|
bd->font_texture = AddTexture(bd->font_view, vk::ImageLayout::eShaderReadOnlyOptimal);
|
||||||
|
|
||||||
// Create the Upload Buffer:
|
// Create the Upload Buffer:
|
||||||
vk::DeviceMemory upload_buffer_memory{};
|
vk::DeviceMemory upload_buffer_memory{};
|
||||||
@ -874,7 +873,7 @@ static bool CreateFontsTexture() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Store our identifier
|
// Store our identifier
|
||||||
io.Fonts->SetTexID(bd->font_descriptor_set);
|
io.Fonts->SetTexID(bd->font_texture);
|
||||||
|
|
||||||
// End command buffer
|
// End command buffer
|
||||||
vk::SubmitInfo end_info = {};
|
vk::SubmitInfo end_info = {};
|
||||||
@ -898,9 +897,9 @@ static void DestroyFontsTexture() {
|
|||||||
VkData* bd = GetBackendData();
|
VkData* bd = GetBackendData();
|
||||||
const InitInfo& v = bd->init_info;
|
const InitInfo& v = bd->init_info;
|
||||||
|
|
||||||
if (bd->font_descriptor_set) {
|
if (bd->font_texture) {
|
||||||
RemoveTexture(bd->font_descriptor_set);
|
RemoveTexture(bd->font_texture);
|
||||||
bd->font_descriptor_set = VK_NULL_HANDLE;
|
bd->font_texture = nullptr;
|
||||||
io.Fonts->SetTexID(nullptr);
|
io.Fonts->SetTexID(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,12 @@
|
|||||||
|
|
||||||
struct ImDrawData;
|
struct ImDrawData;
|
||||||
|
|
||||||
|
namespace ImGui {
|
||||||
|
struct Texture {
|
||||||
|
vk::DescriptorSet descriptor_set{nullptr};
|
||||||
|
};
|
||||||
|
} // namespace ImGui
|
||||||
|
|
||||||
namespace ImGui::Vulkan {
|
namespace ImGui::Vulkan {
|
||||||
|
|
||||||
struct InitInfo {
|
struct InitInfo {
|
||||||
@ -34,29 +40,32 @@ struct InitInfo {
|
|||||||
struct UploadTextureData {
|
struct UploadTextureData {
|
||||||
vk::Image image;
|
vk::Image image;
|
||||||
vk::ImageView image_view;
|
vk::ImageView image_view;
|
||||||
vk::DescriptorSet descriptor_set;
|
|
||||||
vk::DeviceMemory image_memory;
|
vk::DeviceMemory image_memory;
|
||||||
|
|
||||||
vk::CommandBuffer command_buffer; // Submit to the queue
|
vk::CommandBuffer command_buffer; // Submit to the queue
|
||||||
vk::Buffer upload_buffer;
|
vk::Buffer upload_buffer;
|
||||||
vk::DeviceMemory upload_buffer_memory;
|
vk::DeviceMemory upload_buffer_memory;
|
||||||
|
|
||||||
|
ImTextureID im_texture;
|
||||||
|
|
||||||
void Upload();
|
void Upload();
|
||||||
|
|
||||||
void Destroy();
|
void Destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
vk::DescriptorSet AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout,
|
ImTextureID AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout,
|
||||||
vk::Sampler sampler = VK_NULL_HANDLE);
|
vk::Sampler sampler = VK_NULL_HANDLE);
|
||||||
|
|
||||||
UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, u32 height,
|
UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, u32 height,
|
||||||
size_t size);
|
size_t size);
|
||||||
|
|
||||||
void RemoveTexture(vk::DescriptorSet descriptor_set);
|
void RemoveTexture(ImTextureID descriptor_set);
|
||||||
|
|
||||||
bool Init(InitInfo info);
|
bool Init(InitInfo info);
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
void RenderDrawData(ImDrawData& draw_data, vk::CommandBuffer command_buffer,
|
void RenderDrawData(ImDrawData& draw_data, vk::CommandBuffer command_buffer,
|
||||||
vk::Pipeline pipeline = VK_NULL_HANDLE);
|
vk::Pipeline pipeline = VK_NULL_HANDLE);
|
||||||
|
|
||||||
|
void SetBlendEnabled(bool enabled);
|
||||||
|
|
||||||
} // namespace ImGui::Vulkan
|
} // namespace ImGui::Vulkan
|
@ -4,6 +4,7 @@
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include <imgui.h>
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "common/io_file.h"
|
#include "common/io_file.h"
|
||||||
@ -123,7 +124,7 @@ static std::deque<UploadJob> g_upload_list;
|
|||||||
namespace Core::TextureManager {
|
namespace Core::TextureManager {
|
||||||
|
|
||||||
Inner::~Inner() {
|
Inner::~Inner() {
|
||||||
if (upload_data.descriptor_set != nullptr) {
|
if (upload_data.im_texture != nullptr) {
|
||||||
std::unique_lock lk{g_upload_mtx};
|
std::unique_lock lk{g_upload_mtx};
|
||||||
g_upload_list.emplace_back(UploadJob{
|
g_upload_list.emplace_back(UploadJob{
|
||||||
.data = this->upload_data,
|
.data = this->upload_data,
|
||||||
@ -239,7 +240,7 @@ void Submit() {
|
|||||||
}
|
}
|
||||||
if (upload.core != nullptr) {
|
if (upload.core != nullptr) {
|
||||||
upload.core->upload_data.Upload();
|
upload.core->upload_data.Upload();
|
||||||
upload.core->texture_id = upload.core->upload_data.descriptor_set;
|
upload.core->texture_id = upload.core->upload_data.im_texture;
|
||||||
if (upload.core->count.fetch_sub(1) == 1) {
|
if (upload.core->count.fetch_sub(1) == 1) {
|
||||||
delete upload.core;
|
delete upload.core;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,55 @@
|
|||||||
|
|
||||||
namespace Input {
|
namespace Input {
|
||||||
|
|
||||||
|
using Libraries::Pad::OrbisPadButtonDataOffset;
|
||||||
|
|
||||||
|
void State::OnButton(OrbisPadButtonDataOffset button, bool isPressed) {
|
||||||
|
if (isPressed) {
|
||||||
|
buttonsState |= button;
|
||||||
|
} else {
|
||||||
|
buttonsState &= ~button;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void State::OnAxis(Axis axis, int value) {
|
||||||
|
const auto toggle = [&](const auto button) {
|
||||||
|
if (value > 0) {
|
||||||
|
buttonsState |= button;
|
||||||
|
} else {
|
||||||
|
buttonsState &= ~button;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
switch (axis) {
|
||||||
|
case Axis::TriggerLeft:
|
||||||
|
toggle(OrbisPadButtonDataOffset::L2);
|
||||||
|
break;
|
||||||
|
case Axis::TriggerRight:
|
||||||
|
toggle(OrbisPadButtonDataOffset::R2);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
axes[static_cast<int>(axis)] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void State::OnTouchpad(int touchIndex, bool isDown, float x, float y) {
|
||||||
|
touchpad[touchIndex].state = isDown;
|
||||||
|
touchpad[touchIndex].x = static_cast<u16>(x * 1920);
|
||||||
|
touchpad[touchIndex].y = static_cast<u16>(y * 941);
|
||||||
|
}
|
||||||
|
|
||||||
|
void State::OnGyro(const float gyro[3]) {
|
||||||
|
angularVelocity.x = gyro[0];
|
||||||
|
angularVelocity.y = gyro[1];
|
||||||
|
angularVelocity.z = gyro[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
void State::OnAccel(const float accel[3]) {
|
||||||
|
acceleration.x = accel[0];
|
||||||
|
acceleration.y = accel[1];
|
||||||
|
acceleration.z = accel[2];
|
||||||
|
}
|
||||||
|
|
||||||
GameController::GameController() {
|
GameController::GameController() {
|
||||||
m_states_num = 0;
|
m_states_num = 0;
|
||||||
m_last_state = State();
|
m_last_state = State();
|
||||||
@ -75,45 +124,22 @@ void GameController::AddState(const State& state) {
|
|||||||
m_states_num++;
|
m_states_num++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::CheckButton(int id, Libraries::Pad::OrbisPadButtonDataOffset button,
|
void GameController::CheckButton(int id, OrbisPadButtonDataOffset button, bool is_pressed) {
|
||||||
bool is_pressed) {
|
|
||||||
std::scoped_lock lock{m_mutex};
|
std::scoped_lock lock{m_mutex};
|
||||||
auto state = GetLastState();
|
auto state = GetLastState();
|
||||||
|
|
||||||
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
||||||
if (is_pressed) {
|
state.OnButton(button, is_pressed);
|
||||||
state.buttonsState |= button;
|
|
||||||
} else {
|
|
||||||
state.buttonsState &= ~button;
|
|
||||||
}
|
|
||||||
|
|
||||||
AddState(state);
|
AddState(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::Axis(int id, Input::Axis axis, int value) {
|
void GameController::Axis(int id, Input::Axis axis, int value) {
|
||||||
using Libraries::Pad::OrbisPadButtonDataOffset;
|
|
||||||
|
|
||||||
std::scoped_lock lock{m_mutex};
|
std::scoped_lock lock{m_mutex};
|
||||||
auto state = GetLastState();
|
auto state = GetLastState();
|
||||||
|
|
||||||
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
||||||
int axis_id = static_cast<int>(axis);
|
state.OnAxis(axis, value);
|
||||||
state.axes[axis_id] = value;
|
|
||||||
|
|
||||||
if (axis == Input::Axis::TriggerLeft) {
|
|
||||||
if (value > 0) {
|
|
||||||
state.buttonsState |= OrbisPadButtonDataOffset::L2;
|
|
||||||
} else {
|
|
||||||
state.buttonsState &= ~OrbisPadButtonDataOffset::L2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (axis == Input::Axis::TriggerRight) {
|
|
||||||
if (value > 0) {
|
|
||||||
state.buttonsState |= OrbisPadButtonDataOffset::R2;
|
|
||||||
} else {
|
|
||||||
state.buttonsState &= ~OrbisPadButtonDataOffset::R2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AddState(state);
|
AddState(state);
|
||||||
}
|
}
|
||||||
@ -124,9 +150,7 @@ void GameController::Gyro(int id, const float gyro[3]) {
|
|||||||
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
||||||
|
|
||||||
// Update the angular velocity (gyro data)
|
// Update the angular velocity (gyro data)
|
||||||
state.angularVelocity.x = gyro[0]; // X-axis
|
state.OnGyro(gyro);
|
||||||
state.angularVelocity.y = gyro[1]; // Y-axis
|
|
||||||
state.angularVelocity.z = gyro[2]; // Z-axis
|
|
||||||
|
|
||||||
AddState(state);
|
AddState(state);
|
||||||
}
|
}
|
||||||
@ -136,9 +160,7 @@ void GameController::Acceleration(int id, const float acceleration[3]) {
|
|||||||
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
||||||
|
|
||||||
// Update the acceleration values
|
// Update the acceleration values
|
||||||
state.acceleration.x = acceleration[0]; // X-axis
|
state.OnAccel(acceleration);
|
||||||
state.acceleration.y = acceleration[1]; // Y-axis
|
|
||||||
state.acceleration.z = acceleration[2]; // Z-axis
|
|
||||||
|
|
||||||
AddState(state);
|
AddState(state);
|
||||||
}
|
}
|
||||||
@ -211,62 +233,48 @@ void GameController::CalculateOrientation(Libraries::Pad::OrbisFVector3& acceler
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GameController::SetLightBarRGB(u8 r, u8 g, u8 b) {
|
void GameController::SetLightBarRGB(u8 r, u8 g, u8 b) {
|
||||||
if (m_sdl_gamepad != nullptr) {
|
if (!m_engine) {
|
||||||
SDL_SetGamepadLED(m_sdl_gamepad, r, g, b);
|
return;
|
||||||
}
|
}
|
||||||
|
std::scoped_lock _{m_mutex};
|
||||||
|
m_engine->SetLightBarRGB(r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameController::SetVibration(u8 smallMotor, u8 largeMotor) {
|
void GameController::SetVibration(u8 smallMotor, u8 largeMotor) {
|
||||||
if (m_sdl_gamepad != nullptr) {
|
if (!m_engine) {
|
||||||
return SDL_RumbleGamepad(m_sdl_gamepad, (smallMotor / 255.0f) * 0xFFFF,
|
return;
|
||||||
(largeMotor / 255.0f) * 0xFFFF, -1);
|
|
||||||
}
|
}
|
||||||
return true;
|
std::scoped_lock _{m_mutex};
|
||||||
|
m_engine->SetVibration(smallMotor, largeMotor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, float y) {
|
void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, float y) {
|
||||||
if (touchIndex < 2) {
|
if (touchIndex < 2) {
|
||||||
std::scoped_lock lock{m_mutex};
|
std::scoped_lock lock{m_mutex};
|
||||||
auto state = GetLastState();
|
auto state = GetLastState();
|
||||||
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
|
||||||
|
|
||||||
state.touchpad[touchIndex].state = touchDown;
|
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
||||||
state.touchpad[touchIndex].x = static_cast<u16>(x * 1920);
|
state.OnTouchpad(touchIndex, touchDown, x, y);
|
||||||
state.touchpad[touchIndex].y = static_cast<u16>(y * 941);
|
|
||||||
|
|
||||||
AddState(state);
|
AddState(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::TryOpenSDLController() {
|
void GameController::SetEngine(std::unique_ptr<Engine> engine) {
|
||||||
if (m_sdl_gamepad == nullptr || !SDL_GamepadConnected(m_sdl_gamepad)) {
|
std::scoped_lock _{m_mutex};
|
||||||
int gamepad_count;
|
m_engine = std::move(engine);
|
||||||
SDL_JoystickID* gamepads = SDL_GetGamepads(&gamepad_count);
|
if (m_engine) {
|
||||||
m_sdl_gamepad = gamepad_count > 0 ? SDL_OpenGamepad(gamepads[0]) : nullptr;
|
m_engine->Init();
|
||||||
if (Config::getIsMotionControlsEnabled()) {
|
|
||||||
if (SDL_SetGamepadSensorEnabled(m_sdl_gamepad, SDL_SENSOR_GYRO, true)) {
|
|
||||||
gyro_poll_rate = SDL_GetGamepadSensorDataRate(m_sdl_gamepad, SDL_SENSOR_GYRO);
|
|
||||||
LOG_INFO(Input, "Gyro initialized, poll rate: {}", gyro_poll_rate);
|
|
||||||
} else {
|
|
||||||
LOG_ERROR(Input, "Failed to initialize gyro controls for gamepad");
|
|
||||||
}
|
|
||||||
if (SDL_SetGamepadSensorEnabled(m_sdl_gamepad, SDL_SENSOR_ACCEL, true)) {
|
|
||||||
accel_poll_rate = SDL_GetGamepadSensorDataRate(m_sdl_gamepad, SDL_SENSOR_ACCEL);
|
|
||||||
LOG_INFO(Input, "Accel initialized, poll rate: {}", accel_poll_rate);
|
|
||||||
} else {
|
|
||||||
LOG_ERROR(Input, "Failed to initialize accel controls for gamepad");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_free(gamepads);
|
|
||||||
|
|
||||||
SetLightBarRGB(0, 0, 255);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Engine* GameController::GetEngine() {
|
||||||
|
return m_engine.get();
|
||||||
|
}
|
||||||
|
|
||||||
u32 GameController::Poll() {
|
u32 GameController::Poll() {
|
||||||
std::scoped_lock lock{m_mutex};
|
|
||||||
if (m_connected) {
|
if (m_connected) {
|
||||||
|
std::scoped_lock lock{m_mutex};
|
||||||
auto time = Libraries::Kernel::sceKernelGetProcessTime();
|
auto time = Libraries::Kernel::sceKernelGetProcessTime();
|
||||||
if (m_states_num == 0) {
|
if (m_states_num == 0) {
|
||||||
auto diff = (time - m_last_state.time) / 1000;
|
auto diff = (time - m_last_state.time) / 1000;
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
#include "core/libraries/pad/pad.h"
|
#include "core/libraries/pad/pad.h"
|
||||||
|
|
||||||
struct SDL_Gamepad;
|
|
||||||
|
|
||||||
namespace Input {
|
namespace Input {
|
||||||
|
|
||||||
enum class Axis {
|
enum class Axis {
|
||||||
@ -28,7 +28,14 @@ struct TouchpadEntry {
|
|||||||
u16 y{};
|
u16 y{};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct State {
|
class State {
|
||||||
|
public:
|
||||||
|
void OnButton(Libraries::Pad::OrbisPadButtonDataOffset, bool);
|
||||||
|
void OnAxis(Axis, int);
|
||||||
|
void OnTouchpad(int touchIndex, bool isDown, float x, float y);
|
||||||
|
void OnGyro(const float[3]);
|
||||||
|
void OnAccel(const float[3]);
|
||||||
|
|
||||||
Libraries::Pad::OrbisPadButtonDataOffset buttonsState{};
|
Libraries::Pad::OrbisPadButtonDataOffset buttonsState{};
|
||||||
u64 time = 0;
|
u64 time = 0;
|
||||||
int axes[static_cast<int>(Axis::AxisMax)] = {128, 128, 128, 128, 0, 0};
|
int axes[static_cast<int>(Axis::AxisMax)] = {128, 128, 128, 128, 0, 0};
|
||||||
@ -38,9 +45,19 @@ struct State {
|
|||||||
Libraries::Pad::OrbisFQuaternion orientation = {0.0f, 0.0f, 0.0f, 1.0f};
|
Libraries::Pad::OrbisFQuaternion orientation = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Engine {
|
||||||
|
public:
|
||||||
|
virtual ~Engine() = default;
|
||||||
|
virtual void Init() = 0;
|
||||||
|
virtual void SetLightBarRGB(u8 r, u8 g, u8 b) = 0;
|
||||||
|
virtual void SetVibration(u8 smallMotor, u8 largeMotor) = 0;
|
||||||
|
virtual State ReadState() = 0;
|
||||||
|
virtual float GetAccelPollRate() const = 0;
|
||||||
|
virtual float GetGyroPollRate() const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
inline int GetAxis(int min, int max, int value) {
|
inline int GetAxis(int min, int max, int value) {
|
||||||
int v = (255 * (value - min)) / (max - min);
|
return std::clamp((255 * (value - min)) / (max - min), 0, 255);
|
||||||
return (v < 0 ? 0 : (v > 255 ? 255 : v));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr u32 MAX_STATES = 64;
|
constexpr u32 MAX_STATES = 64;
|
||||||
@ -59,13 +76,12 @@ public:
|
|||||||
void Gyro(int id, const float gyro[3]);
|
void Gyro(int id, const float gyro[3]);
|
||||||
void Acceleration(int id, const float acceleration[3]);
|
void Acceleration(int id, const float acceleration[3]);
|
||||||
void SetLightBarRGB(u8 r, u8 g, u8 b);
|
void SetLightBarRGB(u8 r, u8 g, u8 b);
|
||||||
bool SetVibration(u8 smallMotor, u8 largeMotor);
|
void SetVibration(u8 smallMotor, u8 largeMotor);
|
||||||
void SetTouchpadState(int touchIndex, bool touchDown, float x, float y);
|
void SetTouchpadState(int touchIndex, bool touchDown, float x, float y);
|
||||||
void TryOpenSDLController();
|
void SetEngine(std::unique_ptr<Engine>);
|
||||||
|
Engine* GetEngine();
|
||||||
u32 Poll();
|
u32 Poll();
|
||||||
|
|
||||||
float gyro_poll_rate;
|
|
||||||
float accel_poll_rate;
|
|
||||||
static void CalculateOrientation(Libraries::Pad::OrbisFVector3& acceleration,
|
static void CalculateOrientation(Libraries::Pad::OrbisFVector3& acceleration,
|
||||||
Libraries::Pad::OrbisFVector3& angularVelocity,
|
Libraries::Pad::OrbisFVector3& angularVelocity,
|
||||||
float deltaTime,
|
float deltaTime,
|
||||||
@ -85,7 +101,7 @@ private:
|
|||||||
std::array<State, MAX_STATES> m_states;
|
std::array<State, MAX_STATES> m_states;
|
||||||
std::array<StateInternal, MAX_STATES> m_private;
|
std::array<StateInternal, MAX_STATES> m_private;
|
||||||
|
|
||||||
SDL_Gamepad* m_sdl_gamepad = nullptr;
|
std::unique_ptr<Engine> m_engine = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Input
|
} // namespace Input
|
||||||
|
21
src/main.cpp
21
src/main.cpp
@ -29,6 +29,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
bool has_game_argument = false;
|
bool has_game_argument = false;
|
||||||
std::string game_path;
|
std::string game_path;
|
||||||
|
std::vector<std::string> game_args{};
|
||||||
|
|
||||||
// Map of argument strings to lambda functions
|
// Map of argument strings to lambda functions
|
||||||
std::unordered_map<std::string, std::function<void(int&)>> arg_map = {
|
std::unordered_map<std::string, std::function<void(int&)>> arg_map = {
|
||||||
@ -37,6 +38,9 @@ int main(int argc, char* argv[]) {
|
|||||||
std::cout << "Usage: shadps4 [options] <elf or eboot.bin path>\n"
|
std::cout << "Usage: shadps4 [options] <elf or eboot.bin path>\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -g, --game <path|ID> Specify game path to launch\n"
|
" -g, --game <path|ID> Specify game path to launch\n"
|
||||||
|
" -- ... Parameters passed to the game ELF. "
|
||||||
|
"Needs to be at the end of the line, and everything after \"--\" is a "
|
||||||
|
"game argument.\n"
|
||||||
" -p, --patch <patch_file> Apply specified patch file\n"
|
" -p, --patch <patch_file> Apply specified patch file\n"
|
||||||
" -f, --fullscreen <true|false> Specify window initial fullscreen "
|
" -f, --fullscreen <true|false> Specify window initial fullscreen "
|
||||||
"state. Does not overwrite the config file.\n"
|
"state. Does not overwrite the config file.\n"
|
||||||
@ -126,6 +130,21 @@ int main(int argc, char* argv[]) {
|
|||||||
// Assume the last argument is the game file if not specified via -g/--game
|
// Assume the last argument is the game file if not specified via -g/--game
|
||||||
game_path = argv[i];
|
game_path = argv[i];
|
||||||
has_game_argument = true;
|
has_game_argument = true;
|
||||||
|
} else if (std::string(argv[i]) == "--") {
|
||||||
|
if (i + 1 == argc) {
|
||||||
|
std::cerr << "Warning: -- is set, but no game arguments are added!\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (int j = i + 1; j < argc; j++) {
|
||||||
|
game_args.push_back(argv[j]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} else if (i + 1 < argc && std::string(argv[i + 1]) == "--") {
|
||||||
|
if (!has_game_argument) {
|
||||||
|
game_path = argv[i];
|
||||||
|
has_game_argument = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n";
|
std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n";
|
||||||
return 1;
|
return 1;
|
||||||
@ -166,7 +185,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
// Run the emulator with the resolved eboot path
|
// Run the emulator with the resolved eboot path
|
||||||
Core::Emulator emulator;
|
Core::Emulator emulator;
|
||||||
emulator.Run(eboot_path);
|
emulator.Run(eboot_path, game_args);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -188,8 +188,12 @@ void CheatsPatches::setupUI() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QPushButton* closeButton = new QPushButton(tr("Close"));
|
||||||
|
connect(closeButton, &QPushButton::clicked, [this]() { QWidget::close(); });
|
||||||
|
|
||||||
controlLayout->addWidget(downloadButton);
|
controlLayout->addWidget(downloadButton);
|
||||||
controlLayout->addWidget(deleteCheatButton);
|
controlLayout->addWidget(deleteCheatButton);
|
||||||
|
controlLayout->addWidget(closeButton);
|
||||||
|
|
||||||
cheatsLayout->addLayout(controlLayout);
|
cheatsLayout->addLayout(controlLayout);
|
||||||
cheatsTab->setLayout(cheatsLayout);
|
cheatsTab->setLayout(cheatsLayout);
|
||||||
@ -464,6 +468,8 @@ void CheatsPatches::onSaveButtonClicked() {
|
|||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, tr("Success"), tr("Options saved successfully."));
|
QMessageBox::information(this, tr("Success"), tr("Options saved successfully."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget::close();
|
||||||
}
|
}
|
||||||
|
|
||||||
QCheckBox* CheatsPatches::findCheckBoxByName(const QString& name) {
|
QCheckBox* CheatsPatches::findCheckBoxByName(const QString& name) {
|
||||||
|
@ -106,6 +106,8 @@ void GameListFrame::PlayBackgroundMusic(QTableWidgetItem* item) {
|
|||||||
void GameListFrame::PopulateGameList() {
|
void GameListFrame::PopulateGameList() {
|
||||||
// Do not show status column if it is not enabled
|
// Do not show status column if it is not enabled
|
||||||
this->setColumnHidden(2, !Config::getCompatibilityEnabled());
|
this->setColumnHidden(2, !Config::getCompatibilityEnabled());
|
||||||
|
this->setColumnHidden(6, !Config::GetLoadGameSizeEnabled());
|
||||||
|
|
||||||
this->setRowCount(m_game_info->m_games.size());
|
this->setRowCount(m_game_info->m_games.size());
|
||||||
ResizeIcons(icon_size);
|
ResizeIcons(icon_size);
|
||||||
|
|
||||||
|
@ -62,11 +62,46 @@ public:
|
|||||||
QDir dir(dirPath);
|
QDir dir(dirPath);
|
||||||
QDirIterator it(dir.absolutePath(), QDirIterator::Subdirectories);
|
QDirIterator it(dir.absolutePath(), QDirIterator::Subdirectories);
|
||||||
qint64 total = 0;
|
qint64 total = 0;
|
||||||
|
|
||||||
|
if (!Config::GetLoadGameSizeEnabled()) {
|
||||||
|
game.size = FormatSize(0).toStdString();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cache path
|
||||||
|
QFile size_cache_file(Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) /
|
||||||
|
game.serial / "size_cache.txt");
|
||||||
|
QFileInfo cacheInfo(size_cache_file);
|
||||||
|
QFileInfo dirInfo(dirPath);
|
||||||
|
|
||||||
|
// Check if cache file exists and is valid
|
||||||
|
if (size_cache_file.exists() && cacheInfo.lastModified() >= dirInfo.lastModified()) {
|
||||||
|
if (size_cache_file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
QTextStream in(&size_cache_file);
|
||||||
|
QString cachedSize = in.readLine();
|
||||||
|
size_cache_file.close();
|
||||||
|
|
||||||
|
if (!cachedSize.isEmpty()) {
|
||||||
|
game.size = cachedSize.toStdString();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cache is invalid or does not exist; calculate size
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
it.next();
|
it.next();
|
||||||
total += it.fileInfo().size();
|
total += it.fileInfo().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
game.size = FormatSize(total).toStdString();
|
game.size = FormatSize(total).toStdString();
|
||||||
|
|
||||||
|
// Save new cache
|
||||||
|
if (size_cache_file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
|
QTextStream out(&size_cache_file);
|
||||||
|
out << QString::fromStdString(game.size) << "\n";
|
||||||
|
size_cache_file.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString GetRegion(char region) {
|
static QString GetRegion(char region) {
|
||||||
|
@ -283,7 +283,7 @@ public:
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (createShortcutWin(linkPath, ebootPath, icoPath, exePath)) {
|
if (createShortcutWin(linkPath, ebootPath, icoPath, exePath)) {
|
||||||
#else
|
#else
|
||||||
if (createShortcutLinux(linkPath, ebootPath, iconPath)) {
|
if (createShortcutLinux(linkPath, m_games[itemID].name, ebootPath, iconPath)) {
|
||||||
#endif
|
#endif
|
||||||
QMessageBox::information(
|
QMessageBox::information(
|
||||||
nullptr, tr("Shortcut creation"),
|
nullptr, tr("Shortcut creation"),
|
||||||
@ -301,7 +301,7 @@ public:
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (createShortcutWin(linkPath, ebootPath, iconPath, exePath)) {
|
if (createShortcutWin(linkPath, ebootPath, iconPath, exePath)) {
|
||||||
#else
|
#else
|
||||||
if (createShortcutLinux(linkPath, ebootPath, iconPath)) {
|
if (createShortcutLinux(linkPath, m_games[itemID].name, ebootPath, iconPath)) {
|
||||||
#endif
|
#endif
|
||||||
QMessageBox::information(
|
QMessageBox::information(
|
||||||
nullptr, tr("Shortcut creation"),
|
nullptr, tr("Shortcut creation"),
|
||||||
@ -510,8 +510,8 @@ private:
|
|||||||
return SUCCEEDED(hres);
|
return SUCCEEDED(hres);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
bool createShortcutLinux(const QString& linkPath, const QString& targetPath,
|
bool createShortcutLinux(const QString& linkPath, const std::string& name,
|
||||||
const QString& iconPath) {
|
const QString& targetPath, const QString& iconPath) {
|
||||||
QFile shortcutFile(linkPath);
|
QFile shortcutFile(linkPath);
|
||||||
if (!shortcutFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
if (!shortcutFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
QMessageBox::critical(nullptr, "Error",
|
QMessageBox::critical(nullptr, "Error",
|
||||||
@ -522,7 +522,7 @@ private:
|
|||||||
QTextStream out(&shortcutFile);
|
QTextStream out(&shortcutFile);
|
||||||
out << "[Desktop Entry]\n";
|
out << "[Desktop Entry]\n";
|
||||||
out << "Version=1.0\n";
|
out << "Version=1.0\n";
|
||||||
out << "Name=" << QFileInfo(linkPath).baseName() << "\n";
|
out << "Name=" << QString::fromStdString(name) << "\n";
|
||||||
out << "Exec=" << QCoreApplication::applicationFilePath() << " \"" << targetPath << "\"\n";
|
out << "Exec=" << QCoreApplication::applicationFilePath() << " \"" << targetPath << "\"\n";
|
||||||
out << "Icon=" << iconPath << "\n";
|
out << "Icon=" << iconPath << "\n";
|
||||||
out << "Terminal=false\n";
|
out << "Terminal=false\n";
|
||||||
|
@ -33,6 +33,7 @@ int main(int argc, char* argv[]) {
|
|||||||
bool has_command_line_argument = argc > 1;
|
bool has_command_line_argument = argc > 1;
|
||||||
bool show_gui = false, has_game_argument = false;
|
bool show_gui = false, has_game_argument = false;
|
||||||
std::string game_path;
|
std::string game_path;
|
||||||
|
std::vector<std::string> game_args{};
|
||||||
|
|
||||||
// Map of argument strings to lambda functions
|
// Map of argument strings to lambda functions
|
||||||
std::unordered_map<std::string, std::function<void(int&)>> arg_map = {
|
std::unordered_map<std::string, std::function<void(int&)>> arg_map = {
|
||||||
@ -43,6 +44,9 @@ int main(int argc, char* argv[]) {
|
|||||||
" No arguments: Opens the GUI.\n"
|
" No arguments: Opens the GUI.\n"
|
||||||
" -g, --game <path|ID> Specify <eboot.bin or elf path> or "
|
" -g, --game <path|ID> Specify <eboot.bin or elf path> or "
|
||||||
"<game ID (CUSAXXXXX)> to launch\n"
|
"<game ID (CUSAXXXXX)> to launch\n"
|
||||||
|
" -- ... Parameters passed to the game ELF. "
|
||||||
|
"Needs to be at the end of the line, and everything after \"--\" is a "
|
||||||
|
"game argument.\n"
|
||||||
" -p, --patch <patch_file> Apply specified patch file\n"
|
" -p, --patch <patch_file> Apply specified patch file\n"
|
||||||
" -s, --show-gui Show the GUI\n"
|
" -s, --show-gui Show the GUI\n"
|
||||||
" -f, --fullscreen <true|false> Specify window initial fullscreen "
|
" -f, --fullscreen <true|false> Specify window initial fullscreen "
|
||||||
@ -131,6 +135,20 @@ int main(int argc, char* argv[]) {
|
|||||||
// Assume the last argument is the game file if not specified via -g/--game
|
// Assume the last argument is the game file if not specified via -g/--game
|
||||||
game_path = argv[i];
|
game_path = argv[i];
|
||||||
has_game_argument = true;
|
has_game_argument = true;
|
||||||
|
} else if (std::string(argv[i]) == "--") {
|
||||||
|
if (i + 1 == argc) {
|
||||||
|
std::cerr << "Warning: -- is set, but no game arguments are added!\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (int j = i + 1; j < argc; j++) {
|
||||||
|
game_args.push_back(argv[j]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} else if (i + 1 < argc && std::string(argv[i + 1]) == "--") {
|
||||||
|
if (!has_game_argument) {
|
||||||
|
game_path = argv[i];
|
||||||
|
has_game_argument = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n";
|
std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n";
|
||||||
return 1;
|
return 1;
|
||||||
@ -181,7 +199,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
// Run the emulator with the resolved game path
|
// Run the emulator with the resolved game path
|
||||||
Core::Emulator emulator;
|
Core::Emulator emulator;
|
||||||
emulator.Run(game_file_path.string());
|
emulator.Run(game_file_path.string(), game_args);
|
||||||
if (!show_gui) {
|
if (!show_gui) {
|
||||||
return 0; // Exit after running the emulator without showing the GUI
|
return 0; // Exit after running the emulator without showing the GUI
|
||||||
}
|
}
|
||||||
|
@ -260,6 +260,12 @@ void MainWindow::CreateConnects() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(ui->shadFolderAct, &QAction::triggered, this, [this]() {
|
||||||
|
QString userPath;
|
||||||
|
Common::FS::PathToQString(userPath, Common::FS::GetUserPath(Common::FS::PathType::UserDir));
|
||||||
|
QDesktopServices::openUrl(QUrl::fromLocalFile(userPath));
|
||||||
|
});
|
||||||
|
|
||||||
connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame);
|
connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame);
|
||||||
connect(m_game_grid_frame.get(), &QTableWidget::cellDoubleClicked, this,
|
connect(m_game_grid_frame.get(), &QTableWidget::cellDoubleClicked, this,
|
||||||
&MainWindow::StartGame);
|
&MainWindow::StartGame);
|
||||||
@ -1054,6 +1060,7 @@ QIcon MainWindow::RecolorIcon(const QIcon& icon, bool isWhite) {
|
|||||||
void MainWindow::SetUiIcons(bool isWhite) {
|
void MainWindow::SetUiIcons(bool isWhite) {
|
||||||
ui->bootInstallPkgAct->setIcon(RecolorIcon(ui->bootInstallPkgAct->icon(), isWhite));
|
ui->bootInstallPkgAct->setIcon(RecolorIcon(ui->bootInstallPkgAct->icon(), isWhite));
|
||||||
ui->bootGameAct->setIcon(RecolorIcon(ui->bootGameAct->icon(), isWhite));
|
ui->bootGameAct->setIcon(RecolorIcon(ui->bootGameAct->icon(), isWhite));
|
||||||
|
ui->shadFolderAct->setIcon(RecolorIcon(ui->shadFolderAct->icon(), isWhite));
|
||||||
ui->exitAct->setIcon(RecolorIcon(ui->exitAct->icon(), isWhite));
|
ui->exitAct->setIcon(RecolorIcon(ui->exitAct->icon(), isWhite));
|
||||||
#ifdef ENABLE_UPDATER
|
#ifdef ENABLE_UPDATER
|
||||||
ui->updaterAct->setIcon(RecolorIcon(ui->updaterAct->icon(), isWhite));
|
ui->updaterAct->setIcon(RecolorIcon(ui->updaterAct->icon(), isWhite));
|
||||||
|
@ -12,6 +12,7 @@ public:
|
|||||||
QAction* bootInstallPkgAct;
|
QAction* bootInstallPkgAct;
|
||||||
QAction* bootGameAct;
|
QAction* bootGameAct;
|
||||||
QAction* addElfFolderAct;
|
QAction* addElfFolderAct;
|
||||||
|
QAction* shadFolderAct;
|
||||||
QAction* exitAct;
|
QAction* exitAct;
|
||||||
QAction* showGameListAct;
|
QAction* showGameListAct;
|
||||||
QAction* refreshGameListAct;
|
QAction* refreshGameListAct;
|
||||||
@ -90,6 +91,9 @@ public:
|
|||||||
addElfFolderAct = new QAction(MainWindow);
|
addElfFolderAct = new QAction(MainWindow);
|
||||||
addElfFolderAct->setObjectName("addElfFolderAct");
|
addElfFolderAct->setObjectName("addElfFolderAct");
|
||||||
addElfFolderAct->setIcon(QIcon(":images/folder_icon.png"));
|
addElfFolderAct->setIcon(QIcon(":images/folder_icon.png"));
|
||||||
|
shadFolderAct = new QAction(MainWindow);
|
||||||
|
shadFolderAct->setObjectName("shadFolderAct");
|
||||||
|
shadFolderAct->setIcon(QIcon(":images/folder_icon.png"));
|
||||||
exitAct = new QAction(MainWindow);
|
exitAct = new QAction(MainWindow);
|
||||||
exitAct->setObjectName("exitAct");
|
exitAct->setObjectName("exitAct");
|
||||||
exitAct->setIcon(QIcon(":images/exit_icon.png"));
|
exitAct->setIcon(QIcon(":images/exit_icon.png"));
|
||||||
@ -278,7 +282,9 @@ public:
|
|||||||
menuBar->addAction(menuHelp->menuAction());
|
menuBar->addAction(menuHelp->menuAction());
|
||||||
menuFile->addAction(bootInstallPkgAct);
|
menuFile->addAction(bootInstallPkgAct);
|
||||||
menuFile->addAction(bootGameAct);
|
menuFile->addAction(bootGameAct);
|
||||||
|
menuFile->addSeparator();
|
||||||
menuFile->addAction(addElfFolderAct);
|
menuFile->addAction(addElfFolderAct);
|
||||||
|
menuFile->addAction(shadFolderAct);
|
||||||
menuFile->addSeparator();
|
menuFile->addSeparator();
|
||||||
menuFile->addAction(menuRecent->menuAction());
|
menuFile->addAction(menuRecent->menuAction());
|
||||||
menuFile->addSeparator();
|
menuFile->addSeparator();
|
||||||
@ -338,6 +344,8 @@ public:
|
|||||||
"MainWindow", "Install application from a .pkg file", nullptr));
|
"MainWindow", "Install application from a .pkg file", nullptr));
|
||||||
#endif // QT_CONFIG(tooltip)
|
#endif // QT_CONFIG(tooltip)
|
||||||
menuRecent->setTitle(QCoreApplication::translate("MainWindow", "Recent Games", nullptr));
|
menuRecent->setTitle(QCoreApplication::translate("MainWindow", "Recent Games", nullptr));
|
||||||
|
shadFolderAct->setText(
|
||||||
|
QCoreApplication::translate("MainWindow", "Open shadPS4 Folder", nullptr));
|
||||||
exitAct->setText(QCoreApplication::translate("MainWindow", "Exit", nullptr));
|
exitAct->setText(QCoreApplication::translate("MainWindow", "Exit", nullptr));
|
||||||
#if QT_CONFIG(tooltip)
|
#if QT_CONFIG(tooltip)
|
||||||
exitAct->setToolTip(QCoreApplication::translate("MainWindow", "Exit shadPS4", nullptr));
|
exitAct->setToolTip(QCoreApplication::translate("MainWindow", "Exit shadPS4", nullptr));
|
||||||
|
@ -47,6 +47,9 @@ PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* pare
|
|||||||
|
|
||||||
connect(treeWidget, &QTreeWidget::customContextMenuRequested, this,
|
connect(treeWidget, &QTreeWidget::customContextMenuRequested, this,
|
||||||
[=, this](const QPoint& pos) {
|
[=, this](const QPoint& pos) {
|
||||||
|
if (treeWidget->selectedItems().isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_gui_context_menus.RequestGameMenuPKGViewer(pos, m_full_pkg_list, treeWidget,
|
m_gui_context_menus.RequestGameMenuPKGViewer(pos, m_full_pkg_list, treeWidget,
|
||||||
InstallDragDropPkg);
|
InstallDragDropPkg);
|
||||||
});
|
});
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#ifdef ENABLE_UPDATER
|
#ifdef ENABLE_UPDATER
|
||||||
#include "check_update.h"
|
#include "check_update.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include <QDesktopServices>
|
||||||
#include <toml.hpp>
|
#include <toml.hpp>
|
||||||
#include "background_music_player.h"
|
#include "background_music_player.h"
|
||||||
#include "common/logging/backend.h"
|
#include "common/logging/backend.h"
|
||||||
@ -206,6 +207,16 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG TAB
|
||||||
|
{
|
||||||
|
connect(ui->OpenLogLocationButton, &QPushButton::clicked, this, []() {
|
||||||
|
QString userPath;
|
||||||
|
Common::FS::PathToQString(userPath,
|
||||||
|
Common::FS::GetUserPath(Common::FS::PathType::UserDir));
|
||||||
|
QDesktopServices::openUrl(QUrl::fromLocalFile(userPath + "/log"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Descriptions
|
// Descriptions
|
||||||
{
|
{
|
||||||
// General
|
// General
|
||||||
@ -312,6 +323,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||||||
toml::find_or<std::string>(data, "General", "FullscreenMode", "Borderless")));
|
toml::find_or<std::string>(data, "General", "FullscreenMode", "Borderless")));
|
||||||
ui->separateUpdatesCheckBox->setChecked(
|
ui->separateUpdatesCheckBox->setChecked(
|
||||||
toml::find_or<bool>(data, "General", "separateUpdateEnabled", false));
|
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->showSplashCheckBox->setChecked(toml::find_or<bool>(data, "General", "showSplash", false));
|
||||||
ui->logTypeComboBox->setCurrentText(
|
ui->logTypeComboBox->setCurrentText(
|
||||||
QString::fromStdString(toml::find_or<std::string>(data, "General", "logType", "async")));
|
QString::fromStdString(toml::find_or<std::string>(data, "General", "logType", "async")));
|
||||||
@ -520,22 +532,6 @@ bool SettingsDialog::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
} else {
|
} else {
|
||||||
ui->descriptionText->setText(defaultTextEdit);
|
ui->descriptionText->setText(defaultTextEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the text exceeds the size of the box, it will increase the size
|
|
||||||
QRect currentGeometry = this->geometry();
|
|
||||||
int newWidth = currentGeometry.width();
|
|
||||||
|
|
||||||
int documentHeight = ui->descriptionText->document()->size().height();
|
|
||||||
int visibleHeight = ui->descriptionText->viewport()->height();
|
|
||||||
if (documentHeight > visibleHeight) {
|
|
||||||
ui->descriptionText->setMaximumSize(16777215, 110);
|
|
||||||
this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth,
|
|
||||||
currentGeometry.height() + 40);
|
|
||||||
} else {
|
|
||||||
ui->descriptionText->setMaximumSize(16777215, 70);
|
|
||||||
this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth,
|
|
||||||
initialHeight);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -568,6 +564,7 @@ void SettingsDialog::UpdateSettings() {
|
|||||||
Config::setDumpShaders(ui->dumpShadersCheckBox->isChecked());
|
Config::setDumpShaders(ui->dumpShadersCheckBox->isChecked());
|
||||||
Config::setNullGpu(ui->nullGpuCheckBox->isChecked());
|
Config::setNullGpu(ui->nullGpuCheckBox->isChecked());
|
||||||
Config::setSeparateUpdateEnabled(ui->separateUpdatesCheckBox->isChecked());
|
Config::setSeparateUpdateEnabled(ui->separateUpdatesCheckBox->isChecked());
|
||||||
|
Config::setLoadGameSizeEnabled(ui->gameSizeCheckBox->isChecked());
|
||||||
Config::setShowSplash(ui->showSplashCheckBox->isChecked());
|
Config::setShowSplash(ui->showSplashCheckBox->isChecked());
|
||||||
Config::setDebugDump(ui->debugDump->isChecked());
|
Config::setDebugDump(ui->debugDump->isChecked());
|
||||||
Config::setVkValidation(ui->vkValidationCheckBox->isChecked());
|
Config::setVkValidation(ui->vkValidationCheckBox->isChecked());
|
||||||
|
@ -77,43 +77,6 @@
|
|||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="0">
|
|
||||||
<layout class="QVBoxLayout" name="systemTabLayoutLeft">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="SystemSettings">
|
|
||||||
<property name="title">
|
|
||||||
<string>System</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="emuSettingsLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="consoleLanguageGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Console Language</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="settingsLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="consoleLanguageComboBox"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="emulatorLanguageGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Emulator Language</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="langSettingsLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="emulatorLanguageComboBox"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="emulatorTabLayoutMiddle">
|
<layout class="QVBoxLayout" name="emulatorTabLayoutMiddle">
|
||||||
<item>
|
<item>
|
||||||
@ -217,7 +180,214 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="0" column="1">
|
||||||
|
<layout class="QVBoxLayout" name="GUITabLayoutMiddle" stretch="0">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="GUIgroupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>GUI Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="GUILayout">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="gameSizeCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Game Size In List</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="playBGMCheckBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Play title music</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="GUIMusicLayout">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Volume">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Volume</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="BGMVolumeSlider">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set the volume of the background music.</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="pageStep">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="invertedAppearance">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="invertedControls">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="tickPosition">
|
||||||
|
<enum>QSlider::TickPosition::NoTicks</enum>
|
||||||
|
</property>
|
||||||
|
<property name="tickInterval">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="vLayoutTrophy">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="hLayoutTrophy">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="trophyGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Trophy</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="userNameLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="disableTrophycheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Disable Trophy Pop-ups</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Trophy">
|
||||||
|
<property name="text">
|
||||||
|
<string>Trophy Key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="trophyKeyLineEdit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<layout class="QVBoxLayout" name="systemTabLayoutLeft">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="SystemSettings">
|
||||||
|
<property name="title">
|
||||||
|
<string>System</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="emuSettingsLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="consoleLanguageGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Console Language</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="settingsLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="consoleLanguageComboBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="emulatorLanguageGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Emulator Language</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="langSettingsLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="emulatorLanguageComboBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
<layout class="QVBoxLayout" name="updaterTabLayoutLeft">
|
<layout class="QVBoxLayout" name="updaterTabLayoutLeft">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@ -271,7 +441,7 @@
|
|||||||
<number>11</number>
|
<number>11</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>11</number>
|
<number>190</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="updaterComboBox">
|
<widget class="QGroupBox" name="updaterComboBox">
|
||||||
@ -384,7 +554,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1" colspan="2">
|
||||||
<layout class="QVBoxLayout" name="CompatTabLayoutRight" stretch="0">
|
<layout class="QVBoxLayout" name="CompatTabLayoutRight" stretch="0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="CompatgroupBox">
|
<widget class="QGroupBox" name="CompatgroupBox">
|
||||||
@ -525,169 +695,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QVBoxLayout" name="GUITabLayoutMiddle" stretch="0">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="GUIgroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>GUI Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="GUILayout">
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>11</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="playBGMCheckBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Play title music</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="GUIMusicLayout">
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_Volume">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Volume</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSlider" name="BGMVolumeSlider">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Set the volume of the background music.</string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="pageStep">
|
|
||||||
<number>20</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>50</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="invertedAppearance">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="invertedControls">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TickPosition::NoTicks</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickInterval">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="vLayoutTrophy">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>80</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="hLayoutTrophy">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="trophyGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Trophy</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="userNameLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="disableTrophycheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Disable Trophy Pop-ups</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_Trophy">
|
|
||||||
<property name="text">
|
|
||||||
<string>Trophy Key</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="trophyKeyLineEdit">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -711,7 +718,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="inputTabHLayoutTop" stretch="1,1,1">
|
<layout class="QHBoxLayout" name="inputTabHLayoutTop" stretch="1,1">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="cursorTabLayoutLeft">
|
<layout class="QVBoxLayout" name="cursorTabLayoutLeft">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -725,17 +732,14 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Cursor</string>
|
<string>Cursor</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="inputCursorLayout">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>11</number>
|
<number>11</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>11</number>
|
<number>11</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="hideCursorGroupBox">
|
<widget class="QGroupBox" name="hideCursorGroupBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -762,7 +766,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<widget class="QGroupBox" name="idleTimeoutGroupBox">
|
<widget class="QGroupBox" name="idleTimeoutGroupBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -933,6 +937,12 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
@ -946,23 +956,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="emptyTabLayoutRight">
|
|
||||||
<item>
|
|
||||||
<spacer name="emptyhorizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -1185,11 +1178,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="additionalSettingsGroupBox">
|
<widget class="QGroupBox" name="additionalSettingsGroupBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Advanced</string>
|
<string>Advanced</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
|
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="additionalSettingsLayout">
|
<layout class="QVBoxLayout" name="additionalSettingsLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -1446,6 +1442,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="OpenLogLocationButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Log Location</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -1483,10 +1486,16 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="descriptionText">
|
<widget class="QTextEdit" name="descriptionText">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>70</height>
|
<height>120</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>الألعاب الأخيرة</translation>
|
<translation>الألعاب الأخيرة</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>خروج</translation>
|
<translation>خروج</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>عرض حجم اللعبة في القائمة</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>إظهار شاشة البداية</translation>
|
<translation>إظهار شاشة البداية</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>مرشح السجل</translation>
|
<translation>مرشح السجل</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>افتح موقع السجل</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>إدخال</translation>
|
<translation>إدخال</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Vis vis spilstørrelse i listen</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Åbn logplacering</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Indtastning</translation>
|
<translation>Indtastning</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Zuletzt gespielt</translation>
|
<translation>Zuletzt gespielt</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Beenden</translation>
|
<translation>Beenden</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Zeigen Sie die Spielgröße in der Liste</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Startbildschirm anzeigen</translation>
|
<translation>Startbildschirm anzeigen</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log-Filter</translation>
|
<translation>Log-Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Protokollspeicherort öffnen</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Eingabe</translation>
|
<translation>Eingabe</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Εμφάνιση Μεγέθους Παιχνιδιού στη Λίστα</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Άνοιγμα τοποθεσίας αρχείου καταγραφής</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Είσοδος</translation>
|
<translation>Είσοδος</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Show Game Size In List</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Open Log Location</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Input</translation>
|
<translation>Input</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Juegos recientes</translation>
|
<translation>Juegos recientes</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Salir</translation>
|
<translation>Salir</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Mostrar Tamaño del Juego en la Lista</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Mostrar splash</translation>
|
<translation>Mostrar splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Filtro de registro</translation>
|
<translation>Filtro de registro</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Abrir ubicación del registro</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Entrada</translation>
|
<translation>Entrada</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>بازی های اخیر</translation>
|
<translation>بازی های اخیر</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>خروج</translation>
|
<translation>خروج</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>فعالسازی پوشه جداگانه برای بهروزرسانی</translation>
|
<translation>فعالسازی پوشه جداگانه برای بهروزرسانی</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>نمایش اندازه بازی در لیست</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Splash نمایش</translation>
|
<translation>Splash نمایش</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log فیلتر</translation>
|
<translation>Log فیلتر</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>باز کردن مکان گزارش</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>ورودی</translation>
|
<translation>ورودی</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Viimeisimmät Pelit</translation>
|
<translation>Viimeisimmät Pelit</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Sulje</translation>
|
<translation>Sulje</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Ota Käyttöön Erillinen Päivityshakemisto</translation>
|
<translation>Ota Käyttöön Erillinen Päivityshakemisto</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Näytä pelin koko luettelossa</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Näytä Aloitusnäyttö</translation>
|
<translation>Näytä Aloitusnäyttö</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Lokisuodatin</translation>
|
<translation>Lokisuodatin</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Avaa lokin sijainti</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Syöttö</translation>
|
<translation>Syöttö</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Jeux récents</translation>
|
<translation>Jeux récents</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Ouvrir le dossier de shadPS4</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Fermer</translation>
|
<translation>Fermer</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Dossier séparé pour les mises à jours</translation>
|
<translation>Dossier séparé pour les mises à jours</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Afficher la taille du jeu dans la liste</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Afficher l'image du jeu</translation>
|
<translation>Afficher l'image du jeu</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Filtre</translation>
|
<translation>Filtre</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Ouvrir l'emplacement du journal</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Entrée</translation>
|
<translation>Entrée</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Legutóbbi Játékok</translation>
|
<translation>Legutóbbi Játékok</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Kilépés</translation>
|
<translation>Kilépés</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Külön Frissítési Mappa Engedélyezése</translation>
|
<translation>Külön Frissítési Mappa Engedélyezése</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Játékméret megjelenítése a listában</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Indítóképernyő Mutatása</translation>
|
<translation>Indítóképernyő Mutatása</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Naplózási Filter</translation>
|
<translation>Naplózási Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Napló helyének megnyitása</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Bemenet</translation>
|
<translation>Bemenet</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Tampilkan Ukuran Game di Daftar</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Buka Lokasi Log</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Masukan</translation>
|
<translation>Masukan</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Giochi Recenti</translation>
|
<translation>Giochi Recenti</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Uscita</translation>
|
<translation>Uscita</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Abilita Cartella Aggiornamenti Separata</translation>
|
<translation>Abilita Cartella Aggiornamenti Separata</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Mostra la dimensione del gioco nell'elenco</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Mostra Schermata Iniziale</translation>
|
<translation>Mostra Schermata Iniziale</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Filtro Log</translation>
|
<translation>Filtro Log</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Apri posizione del registro</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Input</translation>
|
<translation>Input</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>最近のゲーム</translation>
|
<translation>最近のゲーム</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>終了</translation>
|
<translation>終了</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>ゲームサイズをリストに表示</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>スプラッシュを表示する</translation>
|
<translation>スプラッシュを表示する</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>ログフィルター</translation>
|
<translation>ログフィルター</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>ログの場所を開く</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>入力</translation>
|
<translation>入力</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>게임 크기를 목록에 표시</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>로그 위치 열기</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Input</translation>
|
<translation>Input</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Rodyti žaidimo dydį sąraše</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Atidaryti žurnalo vietą</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Įvestis</translation>
|
<translation>Įvestis</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Nylige spill</translation>
|
<translation>Nylige spill</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Avslutt</translation>
|
<translation>Avslutt</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Aktiver seperat oppdateringsmappe</translation>
|
<translation>Aktiver seperat oppdateringsmappe</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Vis spillstørrelse i listen</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Vis velkomstbilde</translation>
|
<translation>Vis velkomstbilde</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Logg filter</translation>
|
<translation>Logg filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Åpne loggplassering</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Inndata</translation>
|
<translation>Inndata</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Toon grootte van het spel in de lijst</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Loglocatie openen</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Invoer</translation>
|
<translation>Invoer</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Ostatnie gry</translation>
|
<translation>Ostatnie gry</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Wyjdź</translation>
|
<translation>Wyjdź</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Pokaż rozmiar gry na liście</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Pokaż ekran powitania</translation>
|
<translation>Pokaż ekran powitania</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Filtrowanie dziennika</translation>
|
<translation>Filtrowanie dziennika</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Otwórz lokalizację dziennika</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Wejście</translation>
|
<translation>Wejście</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Jogos Recentes</translation>
|
<translation>Jogos Recentes</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Abrir pasta shadPS4</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Sair</translation>
|
<translation>Sair</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Habilitar pasta de atualização separada</translation>
|
<translation>Habilitar pasta de atualização separada</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Mostrar Tamanho do Jogo na Lista</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Mostrar Splash Inicial</translation>
|
<translation>Mostrar Splash Inicial</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Filtro do Registro</translation>
|
<translation>Filtro do Registro</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Abrir local do log</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Entradas</translation>
|
<translation>Entradas</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Afișează dimensiunea jocului în listă</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Deschide locația jurnalului</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Introducere</translation>
|
<translation>Introducere</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Недавние игры</translation>
|
<translation>Недавние игры</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Выход</translation>
|
<translation>Выход</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Отдельная папка обновлений</translation>
|
<translation>Отдельная папка обновлений</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Показать размер игры в списке</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Показывать заставку</translation>
|
<translation>Показывать заставку</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Фильтр логов</translation>
|
<translation>Фильтр логов</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Открыть местоположение журнала</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Ввод</translation>
|
<translation>Ввод</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Lojërat e fundit</translation>
|
<translation>Lojërat e fundit</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Dil</translation>
|
<translation>Dil</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Aktivizo dosjen e ndarë të përditësimit</translation>
|
<translation>Aktivizo dosjen e ndarë të përditësimit</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Shfaq madhësinë e lojës në listë</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Shfaq Pamjen e nisjes</translation>
|
<translation>Shfaq Pamjen e nisjes</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Filtri i Ditarit</translation>
|
<translation>Filtri i Ditarit</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Hap vendndodhjen e regjistrit</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Hyrja</translation>
|
<translation>Hyrja</translation>
|
||||||
|
@ -722,6 +722,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Senaste spel</translation>
|
<translation>Senaste spel</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Avsluta</translation>
|
<translation>Avsluta</translation>
|
||||||
@ -1032,6 +1036,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Aktivera separat uppdateringsmapp</translation>
|
<translation>Aktivera separat uppdateringsmapp</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Visa spelstorlek i listan</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Visa startskärm</translation>
|
<translation>Visa startskärm</translation>
|
||||||
@ -1064,6 +1072,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Loggfilter</translation>
|
<translation>Loggfilter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Öppna loggplats</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Inmatning</translation>
|
<translation>Inmatning</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Son Oyunlar</translation>
|
<translation>Son Oyunlar</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Çıkış</translation>
|
<translation>Çıkış</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Göster oyun boyutunu listede</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Başlangıç Ekranını Göster</translation>
|
<translation>Başlangıç Ekranını Göster</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Kayıt Filtresi</translation>
|
<translation>Kayıt Filtresi</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Günlük Konumunu Aç</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Girdi</translation>
|
<translation>Girdi</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Нещодавні ігри</translation>
|
<translation>Нещодавні ігри</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Вихід</translation>
|
<translation>Вихід</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Увімкнути окрему папку оновлень</translation>
|
<translation>Увімкнути окрему папку оновлень</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Показати розмір гри в списку</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Показувати заставку</translation>
|
<translation>Показувати заставку</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Фільтр логів</translation>
|
<translation>Фільтр логів</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Відкрити місце розташування журналу</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Введення</translation>
|
<translation>Введення</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>Hiển thị Kích thước Game trong Danh sách</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>Mở vị trí nhật ký</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>Đầu vào</translation>
|
<translation>Đầu vào</translation>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>最近启动的游戏</translation>
|
<translation>最近启动的游戏</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>退出</translation>
|
<translation>退出</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>启用单独的更新目录</translation>
|
<translation>启用单独的更新目录</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>显示游戏大小在列表中</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>显示启动画面</translation>
|
<translation>显示启动画面</translation>
|
||||||
@ -558,11 +566,11 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Trophy Key</source>
|
<source>Trophy Key</source>
|
||||||
<translation>Trophy Key</translation>
|
<translation>奖杯密钥</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Trophy</source>
|
<source>Trophy</source>
|
||||||
<translation>Trophy</translation>
|
<translation>奖杯</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Logger</source>
|
<source>Logger</source>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>日志过滤</translation>
|
<translation>日志过滤</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>打开日志位置</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>输入</translation>
|
<translation>输入</translation>
|
||||||
@ -778,7 +790,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>TrophyKey</source>
|
<source>TrophyKey</source>
|
||||||
<translation>Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters.</translation>
|
<translation>奖杯密钥:\n用于解密奖杯的密钥。必须从您的越狱主机中获得。\n仅包含十六进制字符。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>logTypeGroupBox</source>
|
<source>logTypeGroupBox</source>
|
||||||
|
@ -247,6 +247,10 @@
|
|||||||
<source>Recent Games</source>
|
<source>Recent Games</source>
|
||||||
<translation>Recent Games</translation>
|
<translation>Recent Games</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open shadPS4 Folder</source>
|
||||||
|
<translation>Open shadPS4 Folder</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>Exit</translation>
|
<translation>Exit</translation>
|
||||||
@ -540,6 +544,10 @@
|
|||||||
<source>Enable Separate Update Folder</source>
|
<source>Enable Separate Update Folder</source>
|
||||||
<translation>Enable Separate Update Folder</translation>
|
<translation>Enable Separate Update Folder</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show Game Size In List</source>
|
||||||
|
<translation>顯示遊戲大小在列表中</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show Splash</source>
|
<source>Show Splash</source>
|
||||||
<translation>Show Splash</translation>
|
<translation>Show Splash</translation>
|
||||||
@ -576,6 +584,10 @@
|
|||||||
<source>Log Filter</source>
|
<source>Log Filter</source>
|
||||||
<translation>Log Filter</translation>
|
<translation>Log Filter</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open Log Location</source>
|
||||||
|
<translation>開啟日誌位置</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Input</source>
|
<source>Input</source>
|
||||||
<translation>輸入</translation>
|
<translation>輸入</translation>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
|
#include "core/libraries/kernel/time.h"
|
||||||
#include "core/libraries/pad/pad.h"
|
#include "core/libraries/pad/pad.h"
|
||||||
#include "imgui/renderer/imgui_core.h"
|
#include "imgui/renderer/imgui_core.h"
|
||||||
#include "input/controller.h"
|
#include "input/controller.h"
|
||||||
@ -20,47 +21,200 @@
|
|||||||
#include <SDL3/SDL_metal.h>
|
#include <SDL3/SDL_metal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace Input {
|
||||||
|
|
||||||
|
using Libraries::Pad::OrbisPadButtonDataOffset;
|
||||||
|
|
||||||
|
static OrbisPadButtonDataOffset SDLGamepadToOrbisButton(u8 button) {
|
||||||
|
using OPBDO = OrbisPadButtonDataOffset;
|
||||||
|
|
||||||
|
switch (button) {
|
||||||
|
case SDL_GAMEPAD_BUTTON_DPAD_DOWN:
|
||||||
|
return OPBDO::Down;
|
||||||
|
case SDL_GAMEPAD_BUTTON_DPAD_UP:
|
||||||
|
return OPBDO::Up;
|
||||||
|
case SDL_GAMEPAD_BUTTON_DPAD_LEFT:
|
||||||
|
return OPBDO::Left;
|
||||||
|
case SDL_GAMEPAD_BUTTON_DPAD_RIGHT:
|
||||||
|
return OPBDO::Right;
|
||||||
|
case SDL_GAMEPAD_BUTTON_SOUTH:
|
||||||
|
return OPBDO::Cross;
|
||||||
|
case SDL_GAMEPAD_BUTTON_NORTH:
|
||||||
|
return OPBDO::Triangle;
|
||||||
|
case SDL_GAMEPAD_BUTTON_WEST:
|
||||||
|
return OPBDO::Square;
|
||||||
|
case SDL_GAMEPAD_BUTTON_EAST:
|
||||||
|
return OPBDO::Circle;
|
||||||
|
case SDL_GAMEPAD_BUTTON_START:
|
||||||
|
return OPBDO::Options;
|
||||||
|
case SDL_GAMEPAD_BUTTON_TOUCHPAD:
|
||||||
|
return OPBDO::TouchPad;
|
||||||
|
case SDL_GAMEPAD_BUTTON_BACK:
|
||||||
|
return OPBDO::TouchPad;
|
||||||
|
case SDL_GAMEPAD_BUTTON_LEFT_SHOULDER:
|
||||||
|
return OPBDO::L1;
|
||||||
|
case SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER:
|
||||||
|
return OPBDO::R1;
|
||||||
|
case SDL_GAMEPAD_BUTTON_LEFT_STICK:
|
||||||
|
return OPBDO::L3;
|
||||||
|
case SDL_GAMEPAD_BUTTON_RIGHT_STICK:
|
||||||
|
return OPBDO::R3;
|
||||||
|
default:
|
||||||
|
return OPBDO::None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static SDL_GamepadAxis InputAxisToSDL(Axis axis) {
|
||||||
|
switch (axis) {
|
||||||
|
case Axis::LeftX:
|
||||||
|
return SDL_GAMEPAD_AXIS_LEFTX;
|
||||||
|
case Axis::LeftY:
|
||||||
|
return SDL_GAMEPAD_AXIS_LEFTY;
|
||||||
|
case Axis::RightX:
|
||||||
|
return SDL_GAMEPAD_AXIS_RIGHTX;
|
||||||
|
case Axis::RightY:
|
||||||
|
return SDL_GAMEPAD_AXIS_RIGHTY;
|
||||||
|
case Axis::TriggerLeft:
|
||||||
|
return SDL_GAMEPAD_AXIS_LEFT_TRIGGER;
|
||||||
|
case Axis::TriggerRight:
|
||||||
|
return SDL_GAMEPAD_AXIS_RIGHT_TRIGGER;
|
||||||
|
default:
|
||||||
|
UNREACHABLE();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SDLInputEngine::~SDLInputEngine() {
|
||||||
|
if (m_gamepad) {
|
||||||
|
SDL_CloseGamepad(m_gamepad);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDLInputEngine::Init() {
|
||||||
|
if (m_gamepad) {
|
||||||
|
SDL_CloseGamepad(m_gamepad);
|
||||||
|
m_gamepad = nullptr;
|
||||||
|
}
|
||||||
|
int gamepad_count;
|
||||||
|
SDL_JoystickID* gamepads = SDL_GetGamepads(&gamepad_count);
|
||||||
|
if (!gamepads) {
|
||||||
|
LOG_ERROR(Input, "Cannot get gamepad list: {}", SDL_GetError());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (gamepad_count == 0) {
|
||||||
|
LOG_INFO(Input, "No gamepad found!");
|
||||||
|
SDL_free(gamepads);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LOG_INFO(Input, "Got {} gamepads. Opening the first one.", gamepad_count);
|
||||||
|
if (!(m_gamepad = SDL_OpenGamepad(gamepads[0]))) {
|
||||||
|
LOG_ERROR(Input, "Failed to open gamepad 0: {}", SDL_GetError());
|
||||||
|
SDL_free(gamepads);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (Config::getIsMotionControlsEnabled()) {
|
||||||
|
if (SDL_SetGamepadSensorEnabled(m_gamepad, SDL_SENSOR_GYRO, true)) {
|
||||||
|
m_gyro_poll_rate = SDL_GetGamepadSensorDataRate(m_gamepad, SDL_SENSOR_GYRO);
|
||||||
|
LOG_INFO(Input, "Gyro initialized, poll rate: {}", m_gyro_poll_rate);
|
||||||
|
} else {
|
||||||
|
LOG_ERROR(Input, "Failed to initialize gyro controls for gamepad");
|
||||||
|
}
|
||||||
|
if (SDL_SetGamepadSensorEnabled(m_gamepad, SDL_SENSOR_ACCEL, true)) {
|
||||||
|
m_accel_poll_rate = SDL_GetGamepadSensorDataRate(m_gamepad, SDL_SENSOR_ACCEL);
|
||||||
|
LOG_INFO(Input, "Accel initialized, poll rate: {}", m_accel_poll_rate);
|
||||||
|
} else {
|
||||||
|
LOG_ERROR(Input, "Failed to initialize accel controls for gamepad");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
SDL_free(gamepads);
|
||||||
|
SetLightBarRGB(0, 0, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDLInputEngine::SetLightBarRGB(u8 r, u8 g, u8 b) {
|
||||||
|
if (m_gamepad) {
|
||||||
|
SDL_SetGamepadLED(m_gamepad, r, g, b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDLInputEngine::SetVibration(u8 smallMotor, u8 largeMotor) {
|
||||||
|
if (m_gamepad) {
|
||||||
|
const auto low_freq = (smallMotor / 255.0f) * 0xFFFF;
|
||||||
|
const auto high_freq = (largeMotor / 255.0f) * 0xFFFF;
|
||||||
|
SDL_RumbleGamepad(m_gamepad, low_freq, high_freq, -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
State SDLInputEngine::ReadState() {
|
||||||
|
State state{};
|
||||||
|
state.time = Libraries::Kernel::sceKernelGetProcessTime();
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
for (u8 i = 0; i < SDL_GAMEPAD_BUTTON_COUNT; ++i) {
|
||||||
|
auto orbisButton = SDLGamepadToOrbisButton(i);
|
||||||
|
if (orbisButton == OrbisPadButtonDataOffset::None) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
state.OnButton(orbisButton, SDL_GetGamepadButton(m_gamepad, (SDL_GamepadButton)i));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Axes
|
||||||
|
for (int i = 0; i < static_cast<int>(Axis::AxisMax); ++i) {
|
||||||
|
const auto axis = static_cast<Axis>(i);
|
||||||
|
const auto value = SDL_GetGamepadAxis(m_gamepad, InputAxisToSDL(axis));
|
||||||
|
switch (axis) {
|
||||||
|
case Axis::TriggerLeft:
|
||||||
|
case Axis::TriggerRight:
|
||||||
|
state.OnAxis(axis, GetAxis(0, 0x8000, value));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state.OnAxis(axis, GetAxis(-0x8000, 0x8000, value));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Touchpad
|
||||||
|
if (SDL_GetNumGamepadTouchpads(m_gamepad) > 0) {
|
||||||
|
for (int finger = 0; finger < 2; ++finger) {
|
||||||
|
bool down;
|
||||||
|
float x, y;
|
||||||
|
if (SDL_GetGamepadTouchpadFinger(m_gamepad, 0, finger, &down, &x, &y, NULL)) {
|
||||||
|
state.OnTouchpad(finger, down, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gyro
|
||||||
|
if (SDL_GamepadHasSensor(m_gamepad, SDL_SENSOR_GYRO)) {
|
||||||
|
float gyro[3];
|
||||||
|
if (SDL_GetGamepadSensorData(m_gamepad, SDL_SENSOR_GYRO, gyro, 3)) {
|
||||||
|
state.OnGyro(gyro);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Accel
|
||||||
|
if (SDL_GamepadHasSensor(m_gamepad, SDL_SENSOR_ACCEL)) {
|
||||||
|
float accel[3];
|
||||||
|
if (SDL_GetGamepadSensorData(m_gamepad, SDL_SENSOR_ACCEL, accel, 3)) {
|
||||||
|
state.OnAccel(accel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
float SDLInputEngine::GetGyroPollRate() const {
|
||||||
|
return m_gyro_poll_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
float SDLInputEngine::GetAccelPollRate() const {
|
||||||
|
return m_accel_poll_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Input
|
||||||
|
|
||||||
namespace Frontend {
|
namespace Frontend {
|
||||||
|
|
||||||
using namespace Libraries::Pad;
|
using namespace Libraries::Pad;
|
||||||
|
|
||||||
static OrbisPadButtonDataOffset SDLGamepadToOrbisButton(u8 button) {
|
|
||||||
switch (button) {
|
|
||||||
case SDL_GAMEPAD_BUTTON_DPAD_DOWN:
|
|
||||||
return OrbisPadButtonDataOffset::Down;
|
|
||||||
case SDL_GAMEPAD_BUTTON_DPAD_UP:
|
|
||||||
return OrbisPadButtonDataOffset::Up;
|
|
||||||
case SDL_GAMEPAD_BUTTON_DPAD_LEFT:
|
|
||||||
return OrbisPadButtonDataOffset::Left;
|
|
||||||
case SDL_GAMEPAD_BUTTON_DPAD_RIGHT:
|
|
||||||
return OrbisPadButtonDataOffset::Right;
|
|
||||||
case SDL_GAMEPAD_BUTTON_SOUTH:
|
|
||||||
return OrbisPadButtonDataOffset::Cross;
|
|
||||||
case SDL_GAMEPAD_BUTTON_NORTH:
|
|
||||||
return OrbisPadButtonDataOffset::Triangle;
|
|
||||||
case SDL_GAMEPAD_BUTTON_WEST:
|
|
||||||
return OrbisPadButtonDataOffset::Square;
|
|
||||||
case SDL_GAMEPAD_BUTTON_EAST:
|
|
||||||
return OrbisPadButtonDataOffset::Circle;
|
|
||||||
case SDL_GAMEPAD_BUTTON_START:
|
|
||||||
return OrbisPadButtonDataOffset::Options;
|
|
||||||
case SDL_GAMEPAD_BUTTON_TOUCHPAD:
|
|
||||||
return OrbisPadButtonDataOffset::TouchPad;
|
|
||||||
case SDL_GAMEPAD_BUTTON_BACK:
|
|
||||||
return OrbisPadButtonDataOffset::TouchPad;
|
|
||||||
case SDL_GAMEPAD_BUTTON_LEFT_SHOULDER:
|
|
||||||
return OrbisPadButtonDataOffset::L1;
|
|
||||||
case SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER:
|
|
||||||
return OrbisPadButtonDataOffset::R1;
|
|
||||||
case SDL_GAMEPAD_BUTTON_LEFT_STICK:
|
|
||||||
return OrbisPadButtonDataOffset::L3;
|
|
||||||
case SDL_GAMEPAD_BUTTON_RIGHT_STICK:
|
|
||||||
return OrbisPadButtonDataOffset::R3;
|
|
||||||
default:
|
|
||||||
return OrbisPadButtonDataOffset::None;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static Uint32 SDLCALL PollController(void* userdata, SDL_TimerID timer_id, Uint32 interval) {
|
static Uint32 SDLCALL PollController(void* userdata, SDL_TimerID timer_id, Uint32 interval) {
|
||||||
auto* controller = reinterpret_cast<Input::GameController*>(userdata);
|
auto* controller = reinterpret_cast<Input::GameController*>(userdata);
|
||||||
return controller->Poll();
|
return controller->Poll();
|
||||||
@ -112,7 +266,7 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_
|
|||||||
SDL_SetWindowFullscreen(window, Config::getIsFullscreen());
|
SDL_SetWindowFullscreen(window, Config::getIsFullscreen());
|
||||||
|
|
||||||
SDL_InitSubSystem(SDL_INIT_GAMEPAD);
|
SDL_InitSubSystem(SDL_INIT_GAMEPAD);
|
||||||
controller->TryOpenSDLController();
|
controller->SetEngine(std::make_unique<Input::SDLInputEngine>());
|
||||||
|
|
||||||
#if defined(SDL_PLATFORM_WIN32)
|
#if defined(SDL_PLATFORM_WIN32)
|
||||||
window_info.type = WindowSystemType::Windows;
|
window_info.type = WindowSystemType::Windows;
|
||||||
@ -205,7 +359,9 @@ void WindowSDL::InitTimers() {
|
|||||||
|
|
||||||
void WindowSDL::RequestKeyboard() {
|
void WindowSDL::RequestKeyboard() {
|
||||||
if (keyboard_grab == 0) {
|
if (keyboard_grab == 0) {
|
||||||
SDL_StartTextInput(window);
|
SDL_RunOnMainThread(
|
||||||
|
[](void* userdata) { SDL_StartTextInput(static_cast<SDL_Window*>(userdata)); }, window,
|
||||||
|
true);
|
||||||
}
|
}
|
||||||
keyboard_grab++;
|
keyboard_grab++;
|
||||||
}
|
}
|
||||||
@ -214,7 +370,9 @@ void WindowSDL::ReleaseKeyboard() {
|
|||||||
ASSERT(keyboard_grab > 0);
|
ASSERT(keyboard_grab > 0);
|
||||||
keyboard_grab--;
|
keyboard_grab--;
|
||||||
if (keyboard_grab == 0) {
|
if (keyboard_grab == 0) {
|
||||||
SDL_StopTextInput(window);
|
SDL_RunOnMainThread(
|
||||||
|
[](void* userdata) { SDL_StopTextInput(static_cast<SDL_Window*>(userdata)); }, window,
|
||||||
|
true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +576,7 @@ void WindowSDL::OnGamepadEvent(const SDL_Event* event) {
|
|||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case SDL_EVENT_GAMEPAD_ADDED:
|
case SDL_EVENT_GAMEPAD_ADDED:
|
||||||
case SDL_EVENT_GAMEPAD_REMOVED:
|
case SDL_EVENT_GAMEPAD_REMOVED:
|
||||||
controller->TryOpenSDLController();
|
controller->SetEngine(std::make_unique<Input::SDLInputEngine>());
|
||||||
break;
|
break;
|
||||||
case SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN:
|
case SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN:
|
||||||
case SDL_EVENT_GAMEPAD_TOUCHPAD_UP:
|
case SDL_EVENT_GAMEPAD_TOUCHPAD_UP:
|
||||||
@ -429,7 +587,7 @@ void WindowSDL::OnGamepadEvent(const SDL_Event* event) {
|
|||||||
break;
|
break;
|
||||||
case SDL_EVENT_GAMEPAD_BUTTON_DOWN:
|
case SDL_EVENT_GAMEPAD_BUTTON_DOWN:
|
||||||
case SDL_EVENT_GAMEPAD_BUTTON_UP: {
|
case SDL_EVENT_GAMEPAD_BUTTON_UP: {
|
||||||
button = SDLGamepadToOrbisButton(event->gbutton.button);
|
button = Input::SDLGamepadToOrbisButton(event->gbutton.button);
|
||||||
if (button == OrbisPadButtonDataOffset::None) {
|
if (button == OrbisPadButtonDataOffset::None) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5,14 +5,32 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
#include "input/controller.h"
|
||||||
|
|
||||||
struct SDL_Window;
|
struct SDL_Window;
|
||||||
struct SDL_Gamepad;
|
struct SDL_Gamepad;
|
||||||
union SDL_Event;
|
union SDL_Event;
|
||||||
|
|
||||||
namespace Input {
|
namespace Input {
|
||||||
class GameController;
|
|
||||||
}
|
class SDLInputEngine : public Engine {
|
||||||
|
public:
|
||||||
|
~SDLInputEngine() override;
|
||||||
|
void Init() override;
|
||||||
|
void SetLightBarRGB(u8 r, u8 g, u8 b) override;
|
||||||
|
void SetVibration(u8 smallMotor, u8 largeMotor) override;
|
||||||
|
float GetGyroPollRate() const override;
|
||||||
|
float GetAccelPollRate() const override;
|
||||||
|
State ReadState() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
SDL_Gamepad* m_gamepad = nullptr;
|
||||||
|
|
||||||
|
float m_gyro_poll_rate{};
|
||||||
|
float m_accel_poll_rate{};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Input
|
||||||
|
|
||||||
namespace Frontend {
|
namespace Frontend {
|
||||||
|
|
||||||
|
@ -172,20 +172,18 @@ Id EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, u32 handle, Id lod
|
|||||||
const auto& texture = ctx.images[handle & 0xFFFF];
|
const auto& texture = ctx.images[handle & 0xFFFF];
|
||||||
const Id image = ctx.OpLoad(texture.image_type, texture.id);
|
const Id image = ctx.OpLoad(texture.image_type, texture.id);
|
||||||
const auto sharp = ctx.info.images[handle & 0xFFFF].GetSharp(ctx.info);
|
const auto sharp = ctx.info.images[handle & 0xFFFF].GetSharp(ctx.info);
|
||||||
const auto type = sharp.GetBoundType();
|
|
||||||
const Id zero = ctx.u32_zero_value;
|
const Id zero = ctx.u32_zero_value;
|
||||||
const auto mips{[&] { return has_mips ? ctx.OpImageQueryLevels(ctx.U32[1], image) : zero; }};
|
const auto mips{[&] { return has_mips ? ctx.OpImageQueryLevels(ctx.U32[1], image) : zero; }};
|
||||||
const bool uses_lod{type != AmdGpu::ImageType::Color2DMsaa && !texture.is_storage};
|
const bool uses_lod{texture.view_type != AmdGpu::ImageType::Color2DMsaa && !texture.is_storage};
|
||||||
const auto query{[&](Id type) {
|
const auto query{[&](Id type) {
|
||||||
return uses_lod ? ctx.OpImageQuerySizeLod(type, image, lod)
|
return uses_lod ? ctx.OpImageQuerySizeLod(type, image, lod)
|
||||||
: ctx.OpImageQuerySize(type, image);
|
: ctx.OpImageQuerySize(type, image);
|
||||||
}};
|
}};
|
||||||
switch (type) {
|
switch (texture.view_type) {
|
||||||
case AmdGpu::ImageType::Color1D:
|
case AmdGpu::ImageType::Color1D:
|
||||||
return ctx.OpCompositeConstruct(ctx.U32[4], query(ctx.U32[1]), zero, zero, mips());
|
return ctx.OpCompositeConstruct(ctx.U32[4], query(ctx.U32[1]), zero, zero, mips());
|
||||||
case AmdGpu::ImageType::Color1DArray:
|
case AmdGpu::ImageType::Color1DArray:
|
||||||
case AmdGpu::ImageType::Color2D:
|
case AmdGpu::ImageType::Color2D:
|
||||||
case AmdGpu::ImageType::Cube:
|
|
||||||
case AmdGpu::ImageType::Color2DMsaa:
|
case AmdGpu::ImageType::Color2DMsaa:
|
||||||
return ctx.OpCompositeConstruct(ctx.U32[4], query(ctx.U32[2]), zero, mips());
|
return ctx.OpCompositeConstruct(ctx.U32[4], query(ctx.U32[2]), zero, mips());
|
||||||
case AmdGpu::ImageType::Color2DArray:
|
case AmdGpu::ImageType::Color2DArray:
|
||||||
@ -257,4 +255,12 @@ void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id
|
|||||||
ctx.OpImageWrite(image, coords, texel, operands.mask, operands.operands);
|
ctx.OpImageWrite(image, coords, texel, operands.mask, operands.operands);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Id EmitCubeFaceIndex(EmitContext& ctx, IR::Inst* inst, Id cube_coords) {
|
||||||
|
if (ctx.profile.supports_native_cube_calc) {
|
||||||
|
return ctx.OpCubeFaceIndexAMD(ctx.F32[1], cube_coords);
|
||||||
|
} else {
|
||||||
|
UNREACHABLE_MSG("SPIR-V Instruction");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Shader::Backend::SPIRV
|
} // namespace Shader::Backend::SPIRV
|
||||||
|
@ -439,6 +439,7 @@ Id EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords,
|
|||||||
Id EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value);
|
Id EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value);
|
||||||
Id EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value);
|
Id EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value);
|
||||||
Id EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value);
|
Id EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value);
|
||||||
|
Id EmitCubeFaceIndex(EmitContext& ctx, IR::Inst* inst, Id cube_coords);
|
||||||
Id EmitLaneId(EmitContext& ctx);
|
Id EmitLaneId(EmitContext& ctx);
|
||||||
Id EmitWarpId(EmitContext& ctx);
|
Id EmitWarpId(EmitContext& ctx);
|
||||||
Id EmitQuadShuffle(EmitContext& ctx, Id value, Id index);
|
Id EmitQuadShuffle(EmitContext& ctx, Id value, Id index);
|
||||||
|
@ -24,10 +24,48 @@ void ConvertDepthMode(EmitContext& ctx) {
|
|||||||
ctx.OpStore(ctx.output_position, vector);
|
ctx.OpStore(ctx.output_position, vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConvertPositionToClipSpace(EmitContext& ctx) {
|
||||||
|
const Id type{ctx.F32[1]};
|
||||||
|
Id position{ctx.OpLoad(ctx.F32[4], ctx.output_position)};
|
||||||
|
const Id x{ctx.OpCompositeExtract(type, position, 0u)};
|
||||||
|
const Id y{ctx.OpCompositeExtract(type, position, 1u)};
|
||||||
|
const Id z{ctx.OpCompositeExtract(type, position, 2u)};
|
||||||
|
const Id w{ctx.OpCompositeExtract(type, position, 3u)};
|
||||||
|
const Id xoffset_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type),
|
||||||
|
ctx.push_data_block,
|
||||||
|
ctx.ConstU32(PushData::XOffsetIndex))};
|
||||||
|
const Id xoffset{ctx.OpLoad(type, xoffset_ptr)};
|
||||||
|
const Id yoffset_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type),
|
||||||
|
ctx.push_data_block,
|
||||||
|
ctx.ConstU32(PushData::YOffsetIndex))};
|
||||||
|
const Id yoffset{ctx.OpLoad(type, yoffset_ptr)};
|
||||||
|
const Id xscale_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type),
|
||||||
|
ctx.push_data_block,
|
||||||
|
ctx.ConstU32(PushData::XScaleIndex))};
|
||||||
|
const Id xscale{ctx.OpLoad(type, xscale_ptr)};
|
||||||
|
const Id yscale_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type),
|
||||||
|
ctx.push_data_block,
|
||||||
|
ctx.ConstU32(PushData::YScaleIndex))};
|
||||||
|
const Id yscale{ctx.OpLoad(type, yscale_ptr)};
|
||||||
|
const Id vport_w =
|
||||||
|
ctx.Constant(type, float(std::min<u32>(ctx.profile.max_viewport_width / 2, 8_KB)));
|
||||||
|
const Id wnd_x = ctx.OpFAdd(type, ctx.OpFMul(type, x, xscale), xoffset);
|
||||||
|
const Id ndc_x = ctx.OpFSub(type, ctx.OpFDiv(type, wnd_x, vport_w), ctx.Constant(type, 1.f));
|
||||||
|
const Id vport_h =
|
||||||
|
ctx.Constant(type, float(std::min<u32>(ctx.profile.max_viewport_height / 2, 8_KB)));
|
||||||
|
const Id wnd_y = ctx.OpFAdd(type, ctx.OpFMul(type, y, yscale), yoffset);
|
||||||
|
const Id ndc_y = ctx.OpFSub(type, ctx.OpFDiv(type, wnd_y, vport_h), ctx.Constant(type, 1.f));
|
||||||
|
const Id vector{ctx.OpCompositeConstruct(ctx.F32[4], std::array<Id, 4>({ndc_x, ndc_y, z, w}))};
|
||||||
|
ctx.OpStore(ctx.output_position, vector);
|
||||||
|
}
|
||||||
|
|
||||||
void EmitEpilogue(EmitContext& ctx) {
|
void EmitEpilogue(EmitContext& ctx) {
|
||||||
if (ctx.stage == Stage::Vertex && ctx.runtime_info.vs_info.emulate_depth_negative_one_to_one) {
|
if (ctx.stage == Stage::Vertex && ctx.runtime_info.vs_info.emulate_depth_negative_one_to_one) {
|
||||||
ConvertDepthMode(ctx);
|
ConvertDepthMode(ctx);
|
||||||
}
|
}
|
||||||
|
if (ctx.stage == Stage::Vertex && ctx.runtime_info.vs_info.clip_disable) {
|
||||||
|
ConvertPositionToClipSpace(ctx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitDiscard(EmitContext& ctx) {
|
void EmitDiscard(EmitContext& ctx) {
|
||||||
|
@ -395,7 +395,7 @@ void EmitContext::DefineInputs() {
|
|||||||
DefineVariable(U32[1], spv::BuiltIn::PatchVertices, spv::StorageClass::Input);
|
DefineVariable(U32[1], spv::BuiltIn::PatchVertices, spv::StorageClass::Input);
|
||||||
primitive_id = DefineVariable(U32[1], spv::BuiltIn::PrimitiveId, spv::StorageClass::Input);
|
primitive_id = DefineVariable(U32[1], spv::BuiltIn::PrimitiveId, spv::StorageClass::Input);
|
||||||
|
|
||||||
const u32 num_attrs = runtime_info.hs_info.ls_stride >> 4;
|
const u32 num_attrs = Common::AlignUp(runtime_info.hs_info.ls_stride, 16) >> 4;
|
||||||
if (num_attrs > 0) {
|
if (num_attrs > 0) {
|
||||||
const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))};
|
const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))};
|
||||||
// The input vertex count isn't statically known, so make length 32 (what glslang does)
|
// The input vertex count isn't statically known, so make length 32 (what glslang does)
|
||||||
@ -409,7 +409,7 @@ void EmitContext::DefineInputs() {
|
|||||||
tess_coord = DefineInput(F32[3], std::nullopt, spv::BuiltIn::TessCoord);
|
tess_coord = DefineInput(F32[3], std::nullopt, spv::BuiltIn::TessCoord);
|
||||||
primitive_id = DefineVariable(U32[1], spv::BuiltIn::PrimitiveId, spv::StorageClass::Input);
|
primitive_id = DefineVariable(U32[1], spv::BuiltIn::PrimitiveId, spv::StorageClass::Input);
|
||||||
|
|
||||||
const u32 num_attrs = runtime_info.vs_info.hs_output_cp_stride >> 4;
|
const u32 num_attrs = Common::AlignUp(runtime_info.vs_info.hs_output_cp_stride, 16) >> 4;
|
||||||
if (num_attrs > 0) {
|
if (num_attrs > 0) {
|
||||||
const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))};
|
const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))};
|
||||||
// The input vertex count isn't statically known, so make length 32 (what glslang does)
|
// The input vertex count isn't statically known, so make length 32 (what glslang does)
|
||||||
@ -418,7 +418,7 @@ void EmitContext::DefineInputs() {
|
|||||||
Name(input_attr_array, "in_attrs");
|
Name(input_attr_array, "in_attrs");
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 patch_base_location = runtime_info.vs_info.hs_output_cp_stride >> 4;
|
const u32 patch_base_location = num_attrs;
|
||||||
for (size_t index = 0; index < 30; ++index) {
|
for (size_t index = 0; index < 30; ++index) {
|
||||||
if (!(info.uses_patches & (1U << index))) {
|
if (!(info.uses_patches & (1U << index))) {
|
||||||
continue;
|
continue;
|
||||||
@ -453,7 +453,7 @@ void EmitContext::DefineOutputs() {
|
|||||||
DefineVariable(type, spv::BuiltIn::CullDistance, spv::StorageClass::Output);
|
DefineVariable(type, spv::BuiltIn::CullDistance, spv::StorageClass::Output);
|
||||||
}
|
}
|
||||||
if (stage == Shader::Stage::Local && runtime_info.ls_info.links_with_tcs) {
|
if (stage == Shader::Stage::Local && runtime_info.ls_info.links_with_tcs) {
|
||||||
const u32 num_attrs = runtime_info.ls_info.ls_stride >> 4;
|
const u32 num_attrs = Common::AlignUp(runtime_info.ls_info.ls_stride, 16) >> 4;
|
||||||
if (num_attrs > 0) {
|
if (num_attrs > 0) {
|
||||||
const Id type{TypeArray(F32[4], ConstU32(num_attrs))};
|
const Id type{TypeArray(F32[4], ConstU32(num_attrs))};
|
||||||
output_attr_array = DefineOutput(type, 0);
|
output_attr_array = DefineOutput(type, 0);
|
||||||
@ -488,7 +488,7 @@ void EmitContext::DefineOutputs() {
|
|||||||
Decorate(output_tess_level_inner, spv::Decoration::Patch);
|
Decorate(output_tess_level_inner, spv::Decoration::Patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 num_attrs = runtime_info.hs_info.hs_output_cp_stride >> 4;
|
const u32 num_attrs = Common::AlignUp(runtime_info.hs_info.hs_output_cp_stride, 16) >> 4;
|
||||||
if (num_attrs > 0) {
|
if (num_attrs > 0) {
|
||||||
const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))};
|
const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))};
|
||||||
// The input vertex count isn't statically known, so make length 32 (what glslang does)
|
// The input vertex count isn't statically known, so make length 32 (what glslang does)
|
||||||
@ -498,7 +498,7 @@ void EmitContext::DefineOutputs() {
|
|||||||
Name(output_attr_array, "out_attrs");
|
Name(output_attr_array, "out_attrs");
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 patch_base_location = runtime_info.hs_info.hs_output_cp_stride >> 4;
|
const u32 patch_base_location = num_attrs;
|
||||||
for (size_t index = 0; index < 30; ++index) {
|
for (size_t index = 0; index < 30; ++index) {
|
||||||
if (!(info.uses_patches & (1U << index))) {
|
if (!(info.uses_patches & (1U << index))) {
|
||||||
continue;
|
continue;
|
||||||
@ -568,25 +568,34 @@ void EmitContext::DefineOutputs() {
|
|||||||
|
|
||||||
void EmitContext::DefinePushDataBlock() {
|
void EmitContext::DefinePushDataBlock() {
|
||||||
// Create push constants block for instance steps rates
|
// Create push constants block for instance steps rates
|
||||||
const Id struct_type{Name(
|
const Id struct_type{Name(TypeStruct(U32[1], U32[1], U32[4], U32[4], U32[4], U32[4], U32[4],
|
||||||
TypeStruct(U32[1], U32[1], U32[4], U32[4], U32[4], U32[4], U32[4], U32[4]), "AuxData")};
|
U32[4], F32[1], F32[1], F32[1], F32[1]),
|
||||||
|
"AuxData")};
|
||||||
Decorate(struct_type, spv::Decoration::Block);
|
Decorate(struct_type, spv::Decoration::Block);
|
||||||
MemberName(struct_type, 0, "sr0");
|
MemberName(struct_type, 0, "sr0");
|
||||||
MemberName(struct_type, 1, "sr1");
|
MemberName(struct_type, 1, "sr1");
|
||||||
MemberName(struct_type, 2, "buf_offsets0");
|
MemberName(struct_type, Shader::PushData::BufOffsetIndex + 0, "buf_offsets0");
|
||||||
MemberName(struct_type, 3, "buf_offsets1");
|
MemberName(struct_type, Shader::PushData::BufOffsetIndex + 1, "buf_offsets1");
|
||||||
MemberName(struct_type, 4, "ud_regs0");
|
MemberName(struct_type, Shader::PushData::UdRegsIndex + 0, "ud_regs0");
|
||||||
MemberName(struct_type, 5, "ud_regs1");
|
MemberName(struct_type, Shader::PushData::UdRegsIndex + 1, "ud_regs1");
|
||||||
MemberName(struct_type, 6, "ud_regs2");
|
MemberName(struct_type, Shader::PushData::UdRegsIndex + 2, "ud_regs2");
|
||||||
MemberName(struct_type, 7, "ud_regs3");
|
MemberName(struct_type, Shader::PushData::UdRegsIndex + 3, "ud_regs3");
|
||||||
|
MemberName(struct_type, Shader::PushData::XOffsetIndex, "xoffset");
|
||||||
|
MemberName(struct_type, Shader::PushData::YOffsetIndex, "yoffset");
|
||||||
|
MemberName(struct_type, Shader::PushData::XScaleIndex, "xscale");
|
||||||
|
MemberName(struct_type, Shader::PushData::YScaleIndex, "yscale");
|
||||||
MemberDecorate(struct_type, 0, spv::Decoration::Offset, 0U);
|
MemberDecorate(struct_type, 0, spv::Decoration::Offset, 0U);
|
||||||
MemberDecorate(struct_type, 1, spv::Decoration::Offset, 4U);
|
MemberDecorate(struct_type, 1, spv::Decoration::Offset, 4U);
|
||||||
MemberDecorate(struct_type, 2, spv::Decoration::Offset, 8U);
|
MemberDecorate(struct_type, Shader::PushData::BufOffsetIndex + 0, spv::Decoration::Offset, 8U);
|
||||||
MemberDecorate(struct_type, 3, spv::Decoration::Offset, 24U);
|
MemberDecorate(struct_type, Shader::PushData::BufOffsetIndex + 1, spv::Decoration::Offset, 24U);
|
||||||
MemberDecorate(struct_type, 4, spv::Decoration::Offset, 40U);
|
MemberDecorate(struct_type, Shader::PushData::UdRegsIndex + 0, spv::Decoration::Offset, 40U);
|
||||||
MemberDecorate(struct_type, 5, spv::Decoration::Offset, 56U);
|
MemberDecorate(struct_type, Shader::PushData::UdRegsIndex + 1, spv::Decoration::Offset, 56U);
|
||||||
MemberDecorate(struct_type, 6, spv::Decoration::Offset, 72U);
|
MemberDecorate(struct_type, Shader::PushData::UdRegsIndex + 2, spv::Decoration::Offset, 72U);
|
||||||
MemberDecorate(struct_type, 7, spv::Decoration::Offset, 88U);
|
MemberDecorate(struct_type, Shader::PushData::UdRegsIndex + 3, spv::Decoration::Offset, 88U);
|
||||||
|
MemberDecorate(struct_type, Shader::PushData::XOffsetIndex, spv::Decoration::Offset, 104U);
|
||||||
|
MemberDecorate(struct_type, Shader::PushData::YOffsetIndex, spv::Decoration::Offset, 108U);
|
||||||
|
MemberDecorate(struct_type, Shader::PushData::XScaleIndex, spv::Decoration::Offset, 112U);
|
||||||
|
MemberDecorate(struct_type, Shader::PushData::YScaleIndex, spv::Decoration::Offset, 116U);
|
||||||
push_data_block = DefineVar(struct_type, spv::StorageClass::PushConstant);
|
push_data_block = DefineVar(struct_type, spv::StorageClass::PushConstant);
|
||||||
Name(push_data_block, "push_data");
|
Name(push_data_block, "push_data");
|
||||||
interfaces.push_back(push_data_block);
|
interfaces.push_back(push_data_block);
|
||||||
@ -773,8 +782,8 @@ spv::ImageFormat GetFormat(const AmdGpu::Image& image) {
|
|||||||
Id ImageType(EmitContext& ctx, const ImageResource& desc, Id sampled_type) {
|
Id ImageType(EmitContext& ctx, const ImageResource& desc, Id sampled_type) {
|
||||||
const auto image = desc.GetSharp(ctx.info);
|
const auto image = desc.GetSharp(ctx.info);
|
||||||
const auto format = desc.is_atomic ? GetFormat(image) : spv::ImageFormat::Unknown;
|
const auto format = desc.is_atomic ? GetFormat(image) : spv::ImageFormat::Unknown;
|
||||||
const auto type = image.GetBoundType();
|
const auto type = image.GetViewType(desc.is_array);
|
||||||
const u32 sampled = desc.IsStorage(image) ? 2 : 1;
|
const u32 sampled = desc.is_written ? 2 : 1;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case AmdGpu::ImageType::Color1D:
|
case AmdGpu::ImageType::Color1D:
|
||||||
return ctx.TypeImage(sampled_type, spv::Dim::Dim1D, false, false, false, sampled, format);
|
return ctx.TypeImage(sampled_type, spv::Dim::Dim1D, false, false, false, sampled, format);
|
||||||
@ -788,9 +797,6 @@ Id ImageType(EmitContext& ctx, const ImageResource& desc, Id sampled_type) {
|
|||||||
return ctx.TypeImage(sampled_type, spv::Dim::Dim2D, false, false, true, sampled, format);
|
return ctx.TypeImage(sampled_type, spv::Dim::Dim2D, false, false, true, sampled, format);
|
||||||
case AmdGpu::ImageType::Color3D:
|
case AmdGpu::ImageType::Color3D:
|
||||||
return ctx.TypeImage(sampled_type, spv::Dim::Dim3D, false, false, false, sampled, format);
|
return ctx.TypeImage(sampled_type, spv::Dim::Dim3D, false, false, false, sampled, format);
|
||||||
case AmdGpu::ImageType::Cube:
|
|
||||||
return ctx.TypeImage(sampled_type, spv::Dim::Cube, false, desc.is_array, false, sampled,
|
|
||||||
format);
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -802,7 +808,7 @@ void EmitContext::DefineImagesAndSamplers() {
|
|||||||
const auto sharp = image_desc.GetSharp(info);
|
const auto sharp = image_desc.GetSharp(info);
|
||||||
const auto nfmt = sharp.GetNumberFmt();
|
const auto nfmt = sharp.GetNumberFmt();
|
||||||
const bool is_integer = AmdGpu::IsInteger(nfmt);
|
const bool is_integer = AmdGpu::IsInteger(nfmt);
|
||||||
const bool is_storage = image_desc.IsStorage(sharp);
|
const bool is_storage = image_desc.is_written;
|
||||||
const VectorIds& data_types = GetAttributeType(*this, nfmt);
|
const VectorIds& data_types = GetAttributeType(*this, nfmt);
|
||||||
const Id sampled_type = data_types[1];
|
const Id sampled_type = data_types[1];
|
||||||
const Id image_type{ImageType(*this, image_desc, sampled_type)};
|
const Id image_type{ImageType(*this, image_desc, sampled_type)};
|
||||||
@ -817,6 +823,7 @@ void EmitContext::DefineImagesAndSamplers() {
|
|||||||
.sampled_type = is_storage ? sampled_type : TypeSampledImage(image_type),
|
.sampled_type = is_storage ? sampled_type : TypeSampledImage(image_type),
|
||||||
.pointer_type = pointer_type,
|
.pointer_type = pointer_type,
|
||||||
.image_type = image_type,
|
.image_type = image_type,
|
||||||
|
.view_type = sharp.GetViewType(image_desc.is_array),
|
||||||
.is_integer = is_integer,
|
.is_integer = is_integer,
|
||||||
.is_storage = is_storage,
|
.is_storage = is_storage,
|
||||||
});
|
});
|
||||||
@ -849,6 +856,10 @@ void EmitContext::DefineSharedMemory() {
|
|||||||
if (shared_memory_size == 0) {
|
if (shared_memory_size == 0) {
|
||||||
shared_memory_size = DefaultSharedMemSize;
|
shared_memory_size = DefaultSharedMemSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const u32 max_shared_memory_size = runtime_info.cs_info.max_shared_memory_size;
|
||||||
|
ASSERT(shared_memory_size <= max_shared_memory_size);
|
||||||
|
|
||||||
const u32 num_elements{Common::DivCeil(shared_memory_size, 4U)};
|
const u32 num_elements{Common::DivCeil(shared_memory_size, 4U)};
|
||||||
const Id type{TypeArray(U32[1], ConstU32(num_elements))};
|
const Id type{TypeArray(U32[1], ConstU32(num_elements))};
|
||||||
shared_memory_u32_type = TypePointer(spv::StorageClass::Workgroup, type);
|
shared_memory_u32_type = TypePointer(spv::StorageClass::Workgroup, type);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user