Merge remote-tracking branch 'origin/main' into game-args

This commit is contained in:
kalaposfos13 2025-01-13 07:42:18 +01:00
commit 711b1190ba
50 changed files with 786 additions and 104 deletions

View File

@ -254,6 +254,8 @@ set(KERNEL_LIB src/core/libraries/kernel/sync/mutex.cpp
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

2
externals/sdl3 vendored

@ -1 +1 @@
Subproject commit 3a1d76d298db023f6cf37fb08ee766f20a4e12ab Subproject commit 22422f7748d5128135995ed34c8f8012861c7332

View File

@ -72,6 +72,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;
@ -102,6 +103,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;
} }
@ -650,6 +659,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);
@ -755,6 +765,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};

View File

@ -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();

View File

@ -95,6 +95,7 @@ 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, Ssl2) \
SUB(Lib, SysModule) \ SUB(Lib, SysModule) \

View File

@ -65,6 +65,7 @@ enum class Class : u8 {
Lib_Ssl, ///< The LibSceSsl implementation. Lib_Ssl, ///< The LibSceSsl implementation.
Lib_Ssl2, ///< The LibSceSsl2 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_NpCommon, ///< The LibSceNpCommon implementation
Lib_NpManager, ///< The LibSceNpManager implementation Lib_NpManager, ///< The LibSceNpManager implementation

View File

@ -21,6 +21,7 @@
#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"
@ -66,6 +67,7 @@ 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);

View 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

View 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

View File

@ -11,7 +11,6 @@
#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
@ -72,33 +71,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, &params->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;
} }
} }

View File

@ -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);

View File

@ -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) {

View File

@ -315,6 +315,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")));
@ -568,6 +569,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());

View File

@ -68,7 +68,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>946</width> <width>946</width>
<height>536</height> <height>586</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0"> <layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
@ -134,7 +134,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="fullscreenModeGroupBox"> <widget class="QGroupBox" name="fullscreenModeGroupBox">
<property name="title"> <property name="title">
<string>Fullscreen Mode</string> <string>Fullscreen Mode</string>
@ -483,6 +483,13 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>11</number> <number>11</number>
</property> </property>
<item>
<widget class="QCheckBox" name="gameSizeCheckBox">
<property name="text">
<string>Show Game Size In List</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="playBGMCheckBox"> <widget class="QCheckBox" name="playBGMCheckBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -557,59 +564,59 @@
</property> </property>
</widget> </widget>
</item> </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> <item>
<layout class="QVBoxLayout" name="vLayoutTrophy"> <layout class="QHBoxLayout" name="hLayoutTrophy">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>80</number>
</property>
<item> <item>
<layout class="QHBoxLayout" name="hLayoutTrophy"> <widget class="QGroupBox" name="trophyGroupBox">
<item> <property name="title">
<widget class="QGroupBox" name="trophyGroupBox"> <string>Trophy</string>
<property name="title"> </property>
<string>Trophy</string> <layout class="QVBoxLayout" name="userNameLayout">
</property> <item>
<layout class="QVBoxLayout" name="userNameLayout"> <widget class="QCheckBox" name="disableTrophycheckBox">
<item> <property name="text">
<widget class="QCheckBox" name="disableTrophycheckBox"> <string>Disable Trophy Pop-ups</string>
<property name="text"> </property>
<string>Disable Trophy Pop-ups</string> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QLabel" name="label_Trophy">
<item> <property name="text">
<widget class="QLabel" name="label_Trophy"> <string>Trophy Key</string>
<property name="text"> </property>
<string>Trophy Key</string> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QLineEdit" name="trophyKeyLineEdit">
<item> <property name="minimumSize">
<widget class="QLineEdit" name="trophyKeyLineEdit"> <size>
<property name="minimumSize"> <width>0</width>
<size> <height>0</height>
<width>0</width> </size>
<height>0</height> </property>
</size> <property name="font">
</property> <font>
<property name="font"> <pointsize>10</pointsize>
<font> <bold>false</bold>
<pointsize>10</pointsize> </font>
<bold>false</bold> </property>
</font> </widget>
</property> </item>
</widget> </layout>
</item> </widget>
</layout>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </item>
@ -637,8 +644,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>926</width> <width>946</width>
<height>536</height> <height>586</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0"> <layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
@ -853,13 +860,13 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="motionControlsCheckBox"> <widget class="QCheckBox" name="motionControlsCheckBox">
<property name="text"> <property name="text">
<string>Enable Motion Controls</string> <string>Enable Motion Controls</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="controllerWidgetSpacer" native="true"> <widget class="QWidget" name="controllerWidgetSpacer" native="true">
<property name="enabled"> <property name="enabled">
@ -935,8 +942,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>926</width> <width>946</width>
<height>536</height> <height>586</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0"> <layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
@ -1186,8 +1193,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>926</width> <width>946</width>
<height>536</height> <height>586</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="pathsTabLayout" stretch="0"> <layout class="QVBoxLayout" name="pathsTabLayout" stretch="0">
@ -1259,8 +1266,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>926</width> <width>946</width>
<height>536</height> <height>586</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,1"> <layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,1">

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,10 @@
<source>Enable Separate Update Folder</source> <source>Enable Separate Update Folder</source>
<translation>Aktivizo dosjen e ndarë përditësimit</translation> <translation>Aktivizo dosjen e ndarë përditësimit</translation>
</message> </message>
<message>
<source>Show Game Size In List</source>
<translation>Shfaq madhësinë e lojës 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>

View File

@ -1032,6 +1032,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -540,6 +540,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>

View File

@ -205,7 +205,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 +216,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);
} }
} }

View File

@ -119,6 +119,7 @@ constexpr std::string_view NameOf(ImageType type) {
enum class TilingMode : u32 { enum class TilingMode : u32 {
Depth_MacroTiled = 0u, Depth_MacroTiled = 0u,
Display_Linear = 0x8u, Display_Linear = 0x8u,
Display_MicroTiled = 0x9u,
Display_MacroTiled = 0xAu, Display_MacroTiled = 0xAu,
Texture_MicroTiled = 0xDu, Texture_MicroTiled = 0xDu,
Texture_MacroTiled = 0xEu, Texture_MacroTiled = 0xEu,
@ -131,6 +132,8 @@ constexpr std::string_view NameOf(TilingMode type) {
return "Depth_MacroTiled"; return "Depth_MacroTiled";
case TilingMode::Display_Linear: case TilingMode::Display_Linear:
return "Display_Linear"; return "Display_Linear";
case TilingMode::Display_MicroTiled:
return "Display_MicroTiled";
case TilingMode::Display_MacroTiled: case TilingMode::Display_MacroTiled:
return "Display_MacroTiled"; return "Display_MacroTiled";
case TilingMode::Texture_MicroTiled: case TilingMode::Texture_MicroTiled:

View File

@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
set(SHADER_FILES set(SHADER_FILES
detilers/display_micro_64bpp.comp
detilers/macro_32bpp.comp detilers/macro_32bpp.comp
detilers/macro_64bpp.comp detilers/macro_64bpp.comp
detilers/macro_8bpp.comp detilers/macro_8bpp.comp

View File

@ -0,0 +1,60 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#version 450
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
layout(std430, binding = 0) buffer input_buf {
uint in_data[];
};
layout(std430, binding = 1) buffer output_buf {
uint out_data[];
};
layout(push_constant) uniform image_info {
uint num_levels;
uint pitch;
uint height;
uint c0;
uint c1;
} info;
const uint lut_64bpp[16] = {
0x05040100, 0x0d0c0908,
0x07060302, 0x0f0e0b0a,
0x15141110, 0x1d1c1918,
0x17161312, 0x1f1e1b1a,
0x25242120, 0x2d2c2928,
0x27262322, 0x2f2e2b2a,
0x35343130, 0x3d3c3938,
0x37363332, 0x3f3e3b3a,
};
#define MICRO_TILE_DIM (8)
#define MICRO_TILE_SZ (512)
#define TEXELS_PER_ELEMENT (1)
#define BPP (64)
void main() {
uint x = gl_GlobalInvocationID.x % info.pitch;
uint y = (gl_GlobalInvocationID.x / info.pitch) % info.height;
uint z = gl_GlobalInvocationID.x / (info.pitch * info.height);
uint col = bitfieldExtract(x, 0, 3);
uint row = bitfieldExtract(y, 0, 3);
uint idx_dw = lut_64bpp[(col + row * MICRO_TILE_DIM) >> 2u];
uint byte_ofs = gl_LocalInvocationID.x & 3u;
uint idx = bitfieldExtract(idx_dw >> (8 * byte_ofs), 0, 8);
uint slice_offs = z * info.c1 * MICRO_TILE_SZ;
uint tile_row = y / MICRO_TILE_DIM;
uint tile_column = x / MICRO_TILE_DIM;
uint tile_offs = ((tile_row * info.c0) + tile_column) * MICRO_TILE_SZ;
uint offs = slice_offs + tile_offs + ((idx * BPP) / 8u);
uint p0 = in_data[(offs >> 2) + 0];
uint p1 = in_data[(offs >> 2) + 1];
out_data[2 * gl_GlobalInvocationID.x + 0] = p0;
out_data[2 * gl_GlobalInvocationID.x + 1] = p1;
}

View File

@ -182,6 +182,7 @@ void ImageInfo::UpdateSize() {
case AmdGpu::TilingMode::Texture_Volume: case AmdGpu::TilingMode::Texture_Volume:
mip_d += (-mip_d) & 3u; mip_d += (-mip_d) & 3u;
[[fallthrough]]; [[fallthrough]];
case AmdGpu::TilingMode::Display_MicroTiled:
case AmdGpu::TilingMode::Texture_MicroTiled: { case AmdGpu::TilingMode::Texture_MicroTiled: {
std::tie(mip_info.pitch, mip_info.size) = std::tie(mip_info.pitch, mip_info.size) =
ImageSizeMicroTiled(mip_w, mip_h, bpp, num_samples); ImageSizeMicroTiled(mip_w, mip_h, bpp, num_samples);

View File

@ -469,9 +469,6 @@ ImageView& TextureCache::FindDepthTarget(BaseDesc& desc) {
} }
void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_scheduler /*= nullptr*/) { void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_scheduler /*= nullptr*/) {
RENDERER_TRACE;
TRACE_HINT(fmt::format("{:x}:{:x}", image.info.guest_address, image.info.guest_size));
if (False(image.flags & ImageFlagBits::Dirty)) { if (False(image.flags & ImageFlagBits::Dirty)) {
return; return;
} }
@ -480,6 +477,9 @@ void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_schedule
return; return;
} }
RENDERER_TRACE;
TRACE_HINT(fmt::format("{:x}:{:x}", image.info.guest_address, image.info.guest_size));
if (True(image.flags & ImageFlagBits::MaybeCpuDirty) && if (True(image.flags & ImageFlagBits::MaybeCpuDirty) &&
False(image.flags & ImageFlagBits::CpuDirty)) { False(image.flags & ImageFlagBits::CpuDirty)) {
// The image size should be less than page size to be considered MaybeCpuDirty // The image size should be less than page size to be considered MaybeCpuDirty

View File

@ -8,6 +8,7 @@
#include "video_core/texture_cache/image_view.h" #include "video_core/texture_cache/image_view.h"
#include "video_core/texture_cache/tile_manager.h" #include "video_core/texture_cache/tile_manager.h"
#include "video_core/host_shaders/detilers/display_micro_64bpp_comp.h"
#include "video_core/host_shaders/detilers/macro_32bpp_comp.h" #include "video_core/host_shaders/detilers/macro_32bpp_comp.h"
#include "video_core/host_shaders/detilers/macro_64bpp_comp.h" #include "video_core/host_shaders/detilers/macro_64bpp_comp.h"
#include "video_core/host_shaders/detilers/macro_8bpp_comp.h" #include "video_core/host_shaders/detilers/macro_8bpp_comp.h"
@ -53,6 +54,14 @@ const DetilerContext* TileManager::GetDetiler(const ImageInfo& info) const {
return nullptr; return nullptr;
} }
break; break;
case AmdGpu::TilingMode::Display_MicroTiled:
switch (bpp) {
case 64:
return &detilers[DetilerType::Display_Micro64];
default:
return nullptr;
}
break;
default: default:
return nullptr; return nullptr;
} }
@ -68,10 +77,11 @@ struct DetilerParams {
TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler) TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler)
: instance{instance}, scheduler{scheduler} { : instance{instance}, scheduler{scheduler} {
static const std::array detiler_shaders{ static const std::array detiler_shaders{
HostShaders::MICRO_8BPP_COMP, HostShaders::MICRO_16BPP_COMP, HostShaders::MICRO_8BPP_COMP, HostShaders::MICRO_16BPP_COMP,
HostShaders::MICRO_32BPP_COMP, HostShaders::MICRO_64BPP_COMP, HostShaders::MICRO_32BPP_COMP, HostShaders::MICRO_64BPP_COMP,
HostShaders::MICRO_128BPP_COMP, HostShaders::MACRO_8BPP_COMP, HostShaders::MICRO_128BPP_COMP, HostShaders::MACRO_8BPP_COMP,
HostShaders::MACRO_32BPP_COMP, HostShaders::MACRO_64BPP_COMP, HostShaders::MACRO_32BPP_COMP, HostShaders::MACRO_64BPP_COMP,
HostShaders::DISPLAY_MICRO_64BPP_COMP,
}; };
boost::container::static_vector<vk::DescriptorSetLayoutBinding, 2> bindings{ boost::container::static_vector<vk::DescriptorSetLayoutBinding, 2> bindings{
@ -258,7 +268,8 @@ std::pair<vk::Buffer, u32> TileManager::TryDetile(vk::Buffer in_buffer, u32 in_o
params.num_levels = info.resources.levels; params.num_levels = info.resources.levels;
params.pitch0 = info.pitch >> (info.props.is_block ? 2u : 0u); params.pitch0 = info.pitch >> (info.props.is_block ? 2u : 0u);
params.height = info.size.height; params.height = info.size.height;
if (info.tiling_mode == AmdGpu::TilingMode::Texture_Volume) { if (info.tiling_mode == AmdGpu::TilingMode::Texture_Volume ||
info.tiling_mode == AmdGpu::TilingMode::Display_MicroTiled) {
ASSERT(info.resources.levels == 1); ASSERT(info.resources.levels == 1);
const auto tiles_per_row = info.pitch / 8u; const auto tiles_per_row = info.pitch / 8u;
const auto tiles_per_slice = tiles_per_row * ((info.size.height + 7u) / 8u); const auto tiles_per_slice = tiles_per_row * ((info.size.height + 7u) / 8u);

View File

@ -22,6 +22,8 @@ enum DetilerType : u32 {
Macro32, Macro32,
Macro64, Macro64,
Display_Micro64,
Max Max
}; };