mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-15 05:15:14 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d2965ed0b1 |
@@ -0,0 +1,11 @@
|
||||
--- a/libs/context/CMakeLists.txt 2025-09-08 00:42:31.303651800 -0400
|
||||
+++ b/libs/context/CMakeLists.txt 2025-09-08 00:42:40.592184300 -0400
|
||||
@@ -146,7 +146,7 @@
|
||||
set(ASM_LANGUAGE ASM)
|
||||
endif()
|
||||
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL armasm)
|
||||
- set(ASM_LANGUAGE ASM_ARMASM)
|
||||
+ set(ASM_LANGUAGE ASM_MARMASM)
|
||||
else()
|
||||
set(ASM_LANGUAGE ASM_MASM)
|
||||
endif()
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/libs/context/CMakeLists.txt b/libs/context/CMakeLists.txt
|
||||
index 8210f65..0e59dd7 100644
|
||||
--- a/libs/context/CMakeLists.txt
|
||||
+++ b/libs/context/CMakeLists.txt
|
||||
@@ -186,7 +186,8 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
|
||||
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/safeseh")
|
||||
endif()
|
||||
|
||||
- else() # masm
|
||||
+ # armasm doesn't support most of these options
|
||||
+ elseif(NOT BOOST_CONTEXT_ASSEMBLER STREQUAL armasm) # masm
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
@@ -1,62 +1,52 @@
|
||||
From 436fc1978c78edd085d99b33275b24be0ac96aa0 Mon Sep 17 00:00:00 2001
|
||||
From e1a946ffb79022d38351a0623f819a5419965c3e Mon Sep 17 00:00:00 2001
|
||||
From: crueter <crueter@eden-emu.dev>
|
||||
Date: Sun, 1 Feb 2026 16:21:10 -0500
|
||||
Subject: [PATCH] Fix build on MinGW
|
||||
Date: Fri, 24 Oct 2025 23:41:09 -0700
|
||||
Subject: [PATCH] [build] Fix MinGW missing GetAddrInfoExCancel definition
|
||||
|
||||
MinGW doesn't define GetAddrInfoExCancel.
|
||||
MinGW does not define GetAddrInfoExCancel in its wstcpi whatever header,
|
||||
so to get around this we can just load it with GetProcAddress et al.
|
||||
|
||||
Signed-off-by: crueter <crueter@eden-emu.dev>
|
||||
---
|
||||
httplib.h | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
httplib.h | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/httplib.h b/httplib.h
|
||||
index ec8d2a2..5f9a510 100644
|
||||
index e15ba44..90a76dc 100644
|
||||
--- a/httplib.h
|
||||
+++ b/httplib.h
|
||||
@@ -203,14 +203,17 @@
|
||||
@@ -203,11 +203,13 @@
|
||||
#error Sorry, Visual Studio versions prior to 2015 are not supported
|
||||
#endif
|
||||
|
||||
-#pragma comment(lib, "ws2_32.lib")
|
||||
-
|
||||
#ifndef _SSIZE_T_DEFINED
|
||||
using ssize_t = __int64;
|
||||
#define _SSIZE_T_DEFINED
|
||||
#endif
|
||||
#endif // _MSC_VER
|
||||
|
||||
+#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
+#pragma comment(lib, "ws2_32.lib")
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(m) (((m) & S_IFREG) == S_IFREG)
|
||||
#endif // S_ISREG
|
||||
@@ -4528,7 +4531,17 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service,
|
||||
@@ -3557,7 +3559,15 @@ inline int getaddrinfo_with_timeout(const char *node, const char *service,
|
||||
auto wait_result =
|
||||
::WaitForSingleObject(event, static_cast<DWORD>(timeout_sec * 1000));
|
||||
if (wait_result == WAIT_TIMEOUT) {
|
||||
+#ifdef __MINGW32__
|
||||
+ typedef INT(WSAAPI * PFN_GETADDRINFOEXCANCEL)(HANDLE * CancelHandle);
|
||||
+ auto wsdll = LoadLibraryW((wchar_t *)"ws2_32.lib");
|
||||
+ PFN_GETADDRINFOEXCANCEL GetAddrInfoExCancel =
|
||||
+ (PFN_GETADDRINFOEXCANCEL)GetProcAddress(wsdll, "GetAddrInfoExCancel");
|
||||
+ typedef INT (WSAAPI *PFN_GETADDRINFOEXCANCEL)(HANDLE *CancelHandle);
|
||||
+ auto wsdll = LoadLibraryW((wchar_t*) "ws2_32.lib");
|
||||
+ PFN_GETADDRINFOEXCANCEL GetAddrInfoExCancel = (PFN_GETADDRINFOEXCANCEL) GetProcAddress(wsdll, "GetAddrInfoExCancel");
|
||||
+
|
||||
+ if (cancel_handle) { GetAddrInfoExCancel(&cancel_handle); }
|
||||
+#else
|
||||
if (cancel_handle) { ::GetAddrInfoExCancel(&cancel_handle); }
|
||||
+#endif
|
||||
+
|
||||
::CloseHandle(event);
|
||||
return EAI_AGAIN;
|
||||
}
|
||||
@@ -13952,3 +13965,4 @@ inline SSL_CTX *Client::ssl_context() const {
|
||||
} // namespace httplib
|
||||
|
||||
#endif // CPPHTTPLIB_HTTPLIB_H
|
||||
+
|
||||
--
|
||||
2.51.2
|
||||
2.51.0
|
||||
|
||||
|
||||
@@ -693,14 +693,6 @@ if (ENABLE_QT)
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
# Qt6 sets cxx_std_17 and we need to undo that
|
||||
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||
|
||||
## Qt Externals ##
|
||||
|
||||
# QuaZip
|
||||
AddJsonPackage(quazip)
|
||||
|
||||
# frozen
|
||||
AddJsonPackage(frozen)
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_STATIC_ROOM AND NOT (YUZU_USE_BUNDLED_FFMPEG OR YUZU_USE_EXTERNAL_FFMPEG))
|
||||
|
||||
+7
-24
@@ -12,12 +12,14 @@
|
||||
"repo": "boostorg/boost",
|
||||
"tag": "boost-%VERSION%",
|
||||
"artifact": "%TAG%-cmake.tar.xz",
|
||||
"hash": "6ae6e94664fe7f2fb01976b59b276ac5df8085c7503fa829d810fbfe495960cfec44fa2c36e2cb23480bc19c956ed199d4952b02639a00a6c07625d4e7130c2d",
|
||||
"git_version": "1.90.0",
|
||||
"hash": "4fb7f6fde92762305aad8754d7643cd918dd1f3f67e104e9ab385b18c73178d72a17321354eb203b790b6702f2cf6d725a5d6e2dfbc63b1e35f9eb59fb42ece9",
|
||||
"git_version": "1.89.0",
|
||||
"version": "1.57",
|
||||
"find_args": "CONFIG OPTIONAL_COMPONENTS headers context system fiber filesystem",
|
||||
"patches": [
|
||||
"0001-clang-cl.patch"
|
||||
"0001-clang-cl.patch",
|
||||
"0002-use-marmasm.patch",
|
||||
"0003-armasm-options.patch"
|
||||
]
|
||||
},
|
||||
"fmt": {
|
||||
@@ -46,9 +48,9 @@
|
||||
"package": "ZLIB",
|
||||
"repo": "madler/zlib",
|
||||
"tag": "v%VERSION%",
|
||||
"hash": "06eaa3a1eaaeb31f461a2283b03a91ed8eb2406e62cd97ea1c69836324909edeecd93edd03ff0bf593d9dde223e3376149134c5b1fe2e8688c258cadf8cd60ff",
|
||||
"hash": "8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9088",
|
||||
"version": "1.2",
|
||||
"git_version": "1.3.1.2",
|
||||
"git_version": "1.3.1",
|
||||
"options": [
|
||||
"ZLIB_BUILD_SHARED OFF",
|
||||
"ZLIB_INSTALL OFF"
|
||||
@@ -101,24 +103,5 @@
|
||||
"git_version": "1.4.335.0",
|
||||
"artifact": "android-binaries-%VERSION%.zip",
|
||||
"hash": "48167c4a17736301bd08f9290f41830443e1f18cce8ad867fc6f289b49e18b40e93c9850b377951af82f51b5b6d7313aa6a884fc5df79f5ce3df82696c1c1244"
|
||||
},
|
||||
"quazip": {
|
||||
"package": "QuaZip-Qt6",
|
||||
"repo": "stachenov/quazip",
|
||||
"sha": "2e95c9001b",
|
||||
"hash": "609c240c7f029ac26a37d8fbab51bc16284e05e128b78b9b9c0e95d083538c36047a67d682759ac990e4adb0eeb90f04f1ea7fe2253bbda7e7e3bcce32e53dd8",
|
||||
"version": "1.3",
|
||||
"git_version": "1.5",
|
||||
"options": [
|
||||
"QUAZIP_QT_MAJOR_VERSION 6",
|
||||
"QUAZIP_INSTALL OFF",
|
||||
"QUAZIP_ENABLE_QTEXTCODEC OFF"
|
||||
]
|
||||
},
|
||||
"frozen": {
|
||||
"package": "frozen",
|
||||
"repo": "serge-sans-paille/frozen",
|
||||
"sha": "61dce5ae18",
|
||||
"hash": "b8dfe741c82bc178dfc9749d4ab5a130cee718d9ee7b71d9b547cf5f7f23027ed0152ad250012a8546399fcc1e12187efc68d89d6731256c4d2df7d04eef8d5c"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-3
@@ -83,9 +83,8 @@ endif()
|
||||
# mcl
|
||||
AddJsonPackage(mcl)
|
||||
|
||||
# Vulkan stuff
|
||||
AddJsonPackage(vulkan-headers)
|
||||
AddJsonPackage(vulkan-utility-libraries)
|
||||
# VulkanUtilityHeaders - pulls in headers and utility libs
|
||||
AddJsonPackage(vulkan-utility-headers)
|
||||
|
||||
# small hack
|
||||
if (NOT VulkanUtilityLibraries_ADDED)
|
||||
|
||||
Vendored
+13
-19
@@ -28,8 +28,8 @@
|
||||
"httplib": {
|
||||
"repo": "yhirose/cpp-httplib",
|
||||
"tag": "v%VERSION%",
|
||||
"hash": "a229e24cca4afe78e5c0aa2e482f15108ac34101fd8dbd927365f15e8c37dec4de38c5277d635017d692a5b320e1b929f8bfcc076f52b8e4dcdab8fe53bfdf2e",
|
||||
"git_version": "0.30.1",
|
||||
"hash": "e7a8877d489c97669a8ee536e1498575be921e558ed947253013fe6b67a49d4569eedd01f543caa70183b92d8ac0e8687d662a70d880954412e387317008a239",
|
||||
"git_version": "0.28.0",
|
||||
"find_args": "MODULE GLOBAL",
|
||||
"patches": [
|
||||
"0001-mingw.patch"
|
||||
@@ -118,6 +118,15 @@
|
||||
"git_version": "1.3.18",
|
||||
"find_args": "MODULE"
|
||||
},
|
||||
"vulkan-utility-headers": {
|
||||
"package": "VulkanUtilityLibraries",
|
||||
"repo": "scripts/VulkanUtilityHeaders",
|
||||
"tag": "%VERSION%",
|
||||
"git_version": "1.4.335",
|
||||
"artifact": "VulkanUtilityHeaders.tar.zst",
|
||||
"git_host": "git.crueter.xyz",
|
||||
"hash": "16dac0e6586702580c4279e4cd37ffe3cf909c93eb31b5069da7af36436d47b270a9cbaac953bb66c22ed12ed67ffa096688599267f307dfb62be1bc09f79833"
|
||||
},
|
||||
"spirv-tools": {
|
||||
"package": "SPIRV-Tools",
|
||||
"repo": "KhronosGroup/SPIRV-Tools",
|
||||
@@ -165,9 +174,9 @@
|
||||
"package": "Catch2",
|
||||
"repo": "catchorg/Catch2",
|
||||
"tag": "v%VERSION%",
|
||||
"hash": "acb3f463a7404d6a3bce52e474075cdadf9bb241d93feaf147c182d756e5a2f8bd412f4658ca186d15ab8fed36fc587d79ec311f55642d8e4ded16df9e213656",
|
||||
"hash": "a95495142f915d6e9c2a23e80fe360343e9097680066a2f9d3037a070ba5f81ee5559a0407cc9e972dc2afae325873f1fc7ea07a64012c0f01aac6e549f03e3f",
|
||||
"version": "3.0.1",
|
||||
"git_version": "3.12.0",
|
||||
"git_version": "3.11.0",
|
||||
"patches": [
|
||||
"0001-solaris-isnan-fix.patch"
|
||||
]
|
||||
@@ -272,20 +281,5 @@
|
||||
"tag": "%VERSION%",
|
||||
"hash": "dc37a189a44ce8b5c988ca550582431a6c7eadfd3c6e709bee6277116ee803e714333e85c9e6cbb5c69346a14d6f2cc7ed96e8aa09cc5fb8a89f945059651db6",
|
||||
"version": "121125"
|
||||
},
|
||||
"vulkan-headers": {
|
||||
"repo": "KhronosGroup/Vulkan-Headers",
|
||||
"package": "VulkanHeaders",
|
||||
"version": "1.3.274",
|
||||
"hash": "26e0ad8fa34ab65a91ca62ddc54cc4410d209a94f64f2817dcdb8061dc621539a4262eab6387e9b9aa421db3dbf2cf8e2a4b041b696d0d03746bae1f25191272",
|
||||
"git_version": "1.4.342",
|
||||
"tag": "v%VERSION%"
|
||||
},
|
||||
"vulkan-utility-libraries": {
|
||||
"repo": "KhronosGroup/Vulkan-Utility-Libraries",
|
||||
"package": "VulkanUtilityLibraries",
|
||||
"hash": "8147370f964fd82c315d6bb89adeda30186098427bf3efaa641d36282d42a263f31e96e4586bfd7ae0410ff015379c19aa4512ba160630444d3d8553afd1ec14",
|
||||
"git_version": "1.4.342",
|
||||
"tag": "v%VERSION%"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,4 @@ pkgs.mkShellNoCC {
|
||||
# optional components
|
||||
discord-rpc gamemode
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,14 @@ import org.yuzu.yuzu_emu.features.settings.model.AbstractShortSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting
|
||||
|
||||
class QuickSettings(val emulationFragment: EmulationFragment) {
|
||||
// Kinda a crappy workaround to get a title from setting keys
|
||||
// Idk how to do this witthout hardcoding every single one
|
||||
private fun getSettingTitle(settingKey: String): String {
|
||||
return settingKey.replace("_", " ").split(" ")
|
||||
.joinToString(" ") { it.replaceFirstChar { c -> c.uppercase() } }
|
||||
|
||||
}
|
||||
|
||||
private fun saveSettings() {
|
||||
if (emulationFragment.shouldUseCustom) {
|
||||
NativeConfig.savePerGameConfig()
|
||||
@@ -52,7 +60,6 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
||||
// settings
|
||||
|
||||
fun addIntSetting(
|
||||
name: Int,
|
||||
container: ViewGroup,
|
||||
setting: IntSetting,
|
||||
namesArrayId: Int,
|
||||
@@ -66,7 +73,7 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
||||
val expandIcon = itemView.findViewById<android.widget.ImageView>(R.id.expand_icon)
|
||||
val radioGroup = itemView.findViewById<RadioGroup>(R.id.radio_group)
|
||||
|
||||
titleView.text = YuzuApplication.appContext.getString(name)
|
||||
titleView.text = getSettingTitle(setting.key)
|
||||
|
||||
val names = emulationFragment.resources.getStringArray(namesArrayId)
|
||||
val values = emulationFragment.resources.getIntArray(valuesArrayId)
|
||||
@@ -108,8 +115,6 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
||||
}
|
||||
|
||||
fun addBooleanSetting(
|
||||
name: Int,
|
||||
|
||||
container: ViewGroup,
|
||||
setting: BooleanSetting
|
||||
) {
|
||||
@@ -120,7 +125,7 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
||||
val titleView = itemView.findViewById<TextView>(R.id.switch_title)
|
||||
val switchView = itemView.findViewById<com.google.android.material.materialswitch.MaterialSwitch>(R.id.setting_switch)
|
||||
|
||||
titleView.text = YuzuApplication.appContext.getString(name)
|
||||
titleView.text = getSettingTitle(setting.key)
|
||||
switchContainer.visibility = View.VISIBLE
|
||||
switchView.isChecked = setting.getBoolean()
|
||||
|
||||
@@ -136,7 +141,6 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
||||
}
|
||||
|
||||
fun addSliderSetting(
|
||||
name: Int,
|
||||
container: ViewGroup,
|
||||
setting: AbstractSetting,
|
||||
minValue: Int = 0,
|
||||
@@ -152,7 +156,7 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
||||
val slider = itemView.findViewById<com.google.android.material.slider.Slider>(R.id.setting_slider)
|
||||
|
||||
|
||||
titleView.text = YuzuApplication.appContext.getString(name)
|
||||
titleView.text = getSettingTitle(setting.key)
|
||||
sliderContainer.visibility = View.VISIBLE
|
||||
|
||||
slider.valueFrom = minValue.toFloat()
|
||||
|
||||
+1
-5
@@ -36,9 +36,6 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
||||
USE_CUSTOM_RTC("custom_rtc_enabled"),
|
||||
BLACK_BACKGROUNDS("black_backgrounds"),
|
||||
|
||||
ENABLE_FOLDER_BUTTON("enable_folder_button"),
|
||||
ENABLE_QLAUNCH_BUTTON("enable_qlaunch_button"),
|
||||
|
||||
ENABLE_UPDATE_CHECKS("enable_update_checks"),
|
||||
JOYSTICK_REL_CENTER("joystick_rel_center"),
|
||||
DPAD_SLIDE("dpad_slide"),
|
||||
@@ -82,9 +79,8 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
||||
GPU_LOG_VULKAN_CALLS("gpu_log_vulkan_calls"),
|
||||
GPU_LOG_SHADER_DUMPS("gpu_log_shader_dumps"),
|
||||
GPU_LOG_MEMORY_TRACKING("gpu_log_memory_tracking"),
|
||||
GPU_LOG_DRIVER_DEBUG("gpu_log_driver_debug"),
|
||||
GPU_LOG_DRIVER_DEBUG("gpu_log_driver_debug");
|
||||
|
||||
ENABLE_QUICK_SETTINGS("enable_quick_settings");
|
||||
|
||||
// external fun isFrameSkippingEnabled(): Boolean
|
||||
external fun isFrameInterpolationEnabled(): Boolean
|
||||
|
||||
-26
@@ -60,11 +60,6 @@ abstract class SettingsItem(
|
||||
return NativeInput.getStyleIndex(0) != NpadStyleIndex.Handheld
|
||||
}
|
||||
|
||||
// Can't edit enable_qlaunch_button if firmware is not available
|
||||
if (setting.key == BooleanSetting.ENABLE_QLAUNCH_BUTTON.key) {
|
||||
return NativeLibrary.isFirmwareAvailable()
|
||||
}
|
||||
|
||||
// Can't edit settings that aren't saveable in per-game config even if they are switchable
|
||||
if (NativeConfig.isPerGameConfigLoaded() && !setting.isSaveable) {
|
||||
return false
|
||||
@@ -799,27 +794,6 @@ abstract class SettingsItem(
|
||||
descriptionId = R.string.enable_update_checks_description,
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.ENABLE_QUICK_SETTINGS,
|
||||
titleId = R.string.enable_quick_settings,
|
||||
descriptionId = R.string.enable_quick_settings_description,
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.ENABLE_FOLDER_BUTTON,
|
||||
titleId = R.string.enable_folder_button,
|
||||
descriptionId = R.string.enable_folder_button_description,
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.ENABLE_QLAUNCH_BUTTON,
|
||||
titleId = R.string.enable_qlaunch_button,
|
||||
descriptionId = R.string.enable_qlaunch_button_description,
|
||||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.APP_LANGUAGE,
|
||||
|
||||
-9
@@ -1074,8 +1074,6 @@ class SettingsFragmentPresenter(
|
||||
add(BooleanSetting.ENABLE_UPDATE_CHECKS.key)
|
||||
}
|
||||
|
||||
add(BooleanSetting.ENABLE_QUICK_SETTINGS.key)
|
||||
|
||||
add(HeaderSetting(R.string.theme_and_color))
|
||||
|
||||
|
||||
@@ -1193,13 +1191,6 @@ class SettingsFragmentPresenter(
|
||||
descriptionId = R.string.use_black_backgrounds_description
|
||||
)
|
||||
)
|
||||
|
||||
add(HeaderSetting(R.string.buttons))
|
||||
add(BooleanSetting.ENABLE_FOLDER_BUTTON.key)
|
||||
add(BooleanSetting.ENABLE_QLAUNCH_BUTTON.key)
|
||||
if (!NativeLibrary.isFirmwareAvailable()) {
|
||||
BooleanSetting.ENABLE_QLAUNCH_BUTTON.setBoolean(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -690,18 +690,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
})
|
||||
binding.drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
|
||||
|
||||
if (!BooleanSetting.ENABLE_QUICK_SETTINGS.getBoolean()) {
|
||||
binding.drawerLayout.setDrawerLockMode(
|
||||
DrawerLayout.LOCK_MODE_LOCKED_CLOSED,
|
||||
binding.quickSettingsSheet
|
||||
)
|
||||
}
|
||||
|
||||
updateGameTitle()
|
||||
|
||||
binding.inGameMenu.menu.findItem(R.id.menu_quick_settings)?.isVisible =
|
||||
BooleanSetting.ENABLE_QUICK_SETTINGS.getBoolean()
|
||||
|
||||
binding.inGameMenu.menu.findItem(R.id.menu_lock_drawer).apply {
|
||||
val lockMode = IntSetting.LOCK_DRAWER.getInt()
|
||||
val titleId = if (lockMode == DrawerLayout.LOCK_MODE_LOCKED_CLOSED) {
|
||||
@@ -759,11 +749,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
true
|
||||
}
|
||||
|
||||
if (BooleanSetting.ENABLE_QUICK_SETTINGS.getBoolean())
|
||||
R.id.menu_quick_settings else 0 -> {
|
||||
openQuickSettingsMenu()
|
||||
true
|
||||
}
|
||||
R.id.menu_quick_settings -> {
|
||||
openQuickSettingsMenu()
|
||||
true
|
||||
}
|
||||
|
||||
R.id.menu_settings_per_game -> {
|
||||
val action = HomeNavigationDirections.actionGlobalSettingsActivity(
|
||||
@@ -1056,13 +1045,11 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
quickSettings.addBooleanSetting(
|
||||
R.string.frame_limit_enable,
|
||||
container,
|
||||
BooleanSetting.RENDERER_USE_SPEED_LIMIT,
|
||||
)
|
||||
|
||||
quickSettings.addSliderSetting(
|
||||
R.string.frame_limit_slider,
|
||||
container,
|
||||
ShortSetting.RENDERER_SPEED_LIMIT,
|
||||
minValue = 0,
|
||||
@@ -1071,7 +1058,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
)
|
||||
|
||||
quickSettings.addBooleanSetting(
|
||||
R.string.use_docked_mode,
|
||||
container,
|
||||
BooleanSetting.USE_DOCKED_MODE,
|
||||
)
|
||||
@@ -1079,7 +1065,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
quickSettings.addDivider(container)
|
||||
|
||||
quickSettings.addIntSetting(
|
||||
R.string.renderer_accuracy,
|
||||
container,
|
||||
IntSetting.RENDERER_ACCURACY,
|
||||
R.array.rendererAccuracyNames,
|
||||
@@ -1088,7 +1073,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
|
||||
|
||||
quickSettings.addIntSetting(
|
||||
R.string.renderer_scaling_filter,
|
||||
container,
|
||||
IntSetting.RENDERER_SCALING_FILTER,
|
||||
R.array.rendererScalingFilterNames,
|
||||
@@ -1096,7 +1080,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
)
|
||||
|
||||
quickSettings.addSliderSetting(
|
||||
R.string.fsr_sharpness,
|
||||
container,
|
||||
IntSetting.FSR_SHARPENING_SLIDER,
|
||||
minValue = 0,
|
||||
@@ -1105,7 +1088,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||
)
|
||||
|
||||
quickSettings.addIntSetting(
|
||||
R.string.renderer_anti_aliasing,
|
||||
container,
|
||||
IntSetting.RENDERER_ANTI_ALIASING,
|
||||
R.array.rendererAntiAliasingNames,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.ui
|
||||
@@ -13,7 +13,6 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.PopupMenu
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
@@ -28,14 +27,10 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.adapters.GameAdapter
|
||||
import org.yuzu.yuzu_emu.databinding.FragmentGamesBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
|
||||
import org.yuzu.yuzu_emu.model.AppletInfo
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.model.GamesViewModel
|
||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||
@@ -178,16 +173,10 @@ class GamesFragment : Fragment() {
|
||||
|
||||
setupTopView()
|
||||
|
||||
updateButtonsVisibility()
|
||||
|
||||
binding.addDirectory.setOnClickListener {
|
||||
getGamesDirectory.launch(Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).data)
|
||||
}
|
||||
|
||||
binding.launchQlaunch?.setOnClickListener {
|
||||
launchQLaunch()
|
||||
}
|
||||
|
||||
setInsets()
|
||||
}
|
||||
|
||||
@@ -456,47 +445,6 @@ class GamesFragment : Fragment() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun launchQLaunch() {
|
||||
try {
|
||||
val appletPath = NativeLibrary.getAppletLaunchPath(AppletInfo.QLaunch.entryId)
|
||||
if (appletPath.isEmpty()) {
|
||||
Toast.makeText(
|
||||
requireContext(),
|
||||
R.string.applets_error_applet,
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
return
|
||||
}
|
||||
|
||||
NativeLibrary.setCurrentAppletId(AppletInfo.QLaunch.appletId)
|
||||
|
||||
val qlaunchGame = Game(
|
||||
title = getString(R.string.qlaunch_applet),
|
||||
path = appletPath
|
||||
)
|
||||
|
||||
val action = HomeNavigationDirections.actionGlobalEmulationActivity(qlaunchGame)
|
||||
findNavController().navigate(action)
|
||||
} catch (e: Exception) {
|
||||
Toast.makeText(
|
||||
requireContext(),
|
||||
"Failed to launch QLaunch: ${e.message}",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateButtonsVisibility() {
|
||||
val showQLaunch = BooleanSetting.ENABLE_QLAUNCH_BUTTON.getBoolean()
|
||||
val showFolder = BooleanSetting.ENABLE_FOLDER_BUTTON.getBoolean()
|
||||
val isFirmwareAvailable = NativeLibrary.isFirmwareAvailable()
|
||||
|
||||
val shouldShowQLaunch = showQLaunch && isFirmwareAvailable
|
||||
binding.launchQlaunch.visibility = if (shouldShowQLaunch) View.VISIBLE else View.GONE
|
||||
|
||||
binding.addDirectory.visibility = if (showFolder) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
private fun setInsets() =
|
||||
ViewCompat.setOnApplyWindowInsetsListener(
|
||||
binding.root
|
||||
@@ -550,13 +498,6 @@ class GamesFragment : Fragment() {
|
||||
mlpFab.rightMargin = rightInset + fabPadding
|
||||
binding.addDirectory.layoutParams = mlpFab
|
||||
|
||||
binding.launchQlaunch?.let { qlaunchButton ->
|
||||
val mlpQLaunch = qlaunchButton.layoutParams as ViewGroup.MarginLayoutParams
|
||||
mlpQLaunch.leftMargin = leftInset + fabPadding
|
||||
mlpQLaunch.bottomMargin = barInsets.bottom + fabPadding
|
||||
qlaunchButton.layoutParams = mlpQLaunch
|
||||
}
|
||||
|
||||
val navInsets = windowInsets.getInsets(WindowInsetsCompat.Type.navigationBars())
|
||||
val gestureInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemGestures())
|
||||
val bottomInset = maxOf(navInsets.bottom, gestureInsets.bottom, cutoutInsets.bottom)
|
||||
|
||||
@@ -65,10 +65,6 @@ namespace AndroidSettings {
|
||||
Settings::Setting<s32> app_language{linkage, 0, "app_language", Settings::Category::Android};
|
||||
Settings::Setting<bool> enable_update_checks{linkage, true, "enable_update_checks",
|
||||
Settings::Category::Android};
|
||||
Settings::Setting<bool> enable_folder_button{linkage, true, "enable_folder_button",
|
||||
Settings::Category::Android};
|
||||
Settings::Setting<bool> enable_qlaunch_button{linkage, false, "enable_qlaunch_button",
|
||||
Settings::Category::Android};
|
||||
|
||||
// Input/performance overlay settings
|
||||
std::vector<OverlayControlData> overlay_control_data;
|
||||
@@ -202,14 +198,9 @@ namespace AndroidSettings {
|
||||
Settings::Specialization::Default, true, true,
|
||||
&show_soc_overlay};
|
||||
|
||||
// MISC
|
||||
Settings::Setting<bool> dont_show_driver_shader_warning{linkage, false,
|
||||
"dont_show_driver_shader_warning",
|
||||
Settings::Category::Android, Settings::Specialization::Default, true, true};
|
||||
Settings::Setting<bool> enable_quick_settings{linkage, true,
|
||||
"enable_quick_settings",
|
||||
Settings::Category::Android, Settings::Specialization::Default, true,
|
||||
false};
|
||||
};
|
||||
|
||||
extern Values values;
|
||||
|
||||
@@ -220,23 +220,6 @@
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:rippleColor="#99FFFFFF"
|
||||
/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/launch_qlaunch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="Launch QLaunch"
|
||||
android:text="@string/qlaunch_applet"
|
||||
app:icon="@drawable/ic_home"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:rippleColor="#99FFFFFF"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -214,22 +214,6 @@
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/launch_qlaunch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="Launch QLaunch"
|
||||
android:text="@string/qlaunch_applet"
|
||||
app:icon="@drawable/ic_home"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:rippleColor="#99FFFFFF"
|
||||
/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/add_directory"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -243,7 +227,6 @@
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:rippleColor="#99FFFFFF"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -556,11 +556,13 @@
|
||||
<string name="flush_by_line_description">Flushes debugging logs on each line written, making debugging easier in cases of crashing or freezing.</string>
|
||||
|
||||
<!-- GPU Logging strings -->
|
||||
<string name="gpu_logging">GPU Logging</string>
|
||||
<string name="gpu_logging_header">GPU Logging</string>
|
||||
<string name="gpu_logging_enabled">Enable GPU Logging</string>
|
||||
<string name="gpu_logging_enabled_description">Log GPU operations to eden_gpu.log for debugging Adreno drivers</string>
|
||||
<string name="gpu_log_level">Log Level</string>
|
||||
<string name="gpu_log_level_description">Detail level for GPU logs (higher = more detail, more overhead)</string>
|
||||
<string name="gpu_logging_features">Logging Features</string>
|
||||
<string name="gpu_log_vulkan_calls">Log Vulkan API Calls</string>
|
||||
<string name="gpu_log_vulkan_calls_description">Track all Vulkan API calls in ring buffer</string>
|
||||
<string name="gpu_log_shader_dumps">Dump Shaders</string>
|
||||
@@ -736,8 +738,6 @@
|
||||
<string name="preferences_graphics">Graphics</string>
|
||||
<string name="preferences_graphics_description">Accuracy level, resolution, shader cache</string>
|
||||
<string name="quick_settings">Quick Settings</string>
|
||||
<string name="enable_quick_settings">Enable Quick Settings</string>
|
||||
<string name="enable_quick_settings_description">Allow access to quick settings menu via swipe and menu button</string>
|
||||
<string name="preferences_audio">Audio</string>
|
||||
<string name="preferences_audio_description">Output engine, volume</string>
|
||||
<string name="preferences_controls">Controls</string>
|
||||
@@ -1163,12 +1163,6 @@
|
||||
<string name="use_black_backgrounds">Black backgrounds</string>
|
||||
<string name="use_black_backgrounds_description">When using the dark theme, apply black backgrounds.</string>
|
||||
|
||||
<!-- Buttons -->
|
||||
<string name="enable_folder_button">Folder</string>
|
||||
<string name="enable_folder_button_description">Show the button to add game folders</string>
|
||||
<string name="enable_qlaunch_button">QLaunch</string>
|
||||
<string name="enable_qlaunch_button_description">Show the button to launch QLaunch</string>
|
||||
|
||||
<!-- App Language -->
|
||||
<string name="app_language">App Language</string>
|
||||
<string name="app_language_description">Change the language of the app interface</string>
|
||||
|
||||
@@ -739,7 +739,7 @@ struct Values {
|
||||
Setting<bool> disable_web_applet{linkage, true, "disable_web_applet", Category::Debugging};
|
||||
|
||||
// GPU Logging
|
||||
Setting<bool> gpu_logging_enabled{linkage, false, "gpu_logging_enabled", Category::Debugging};
|
||||
Setting<bool> gpu_logging_enabled{linkage, true, "gpu_logging_enabled", Category::Debugging};
|
||||
SwitchableSetting<GpuLogLevel> gpu_log_level{linkage, GpuLogLevel::Standard, "gpu_log_level",
|
||||
Category::Debugging};
|
||||
Setting<bool> gpu_log_vulkan_calls{linkage, true, "gpu_log_vulkan_calls", Category::Debugging};
|
||||
|
||||
@@ -176,5 +176,6 @@ std::optional<UpdateChecker::Update> UpdateChecker::GetUpdate() {
|
||||
}
|
||||
|
||||
empty:
|
||||
return std::nullopt;
|
||||
return UpdateChecker::Update{};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
add_library(qt_common STATIC
|
||||
@@ -78,6 +78,8 @@ target_compile_definitions(qt_common PUBLIC
|
||||
QT_NO_URL_CAST_FROM_STRING
|
||||
)
|
||||
|
||||
add_subdirectory(externals)
|
||||
|
||||
# pass targets
|
||||
find_package(frozen)
|
||||
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
include(CPMUtil)
|
||||
|
||||
# Disable tests/tools in all externals supporting the standard option name
|
||||
set(BUILD_TESTING OFF)
|
||||
|
||||
# Build only static externals
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
# Skip install rules for all externals
|
||||
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON)
|
||||
|
||||
# QuaZip
|
||||
AddJsonPackage(quazip)
|
||||
|
||||
# frozen
|
||||
AddJsonPackage(frozen)
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"quazip": {
|
||||
"package": "QuaZip-Qt6",
|
||||
"repo": "crueter/quazip-qt6",
|
||||
"sha": "f838774d63",
|
||||
"hash": "e8f950f47c1f358e2666f08517a9b5b06980677540d3836384e2c27ff5bb129b218f1502b03fdb207d7fd4cd56893f0a0d9094ba8309f19a49cb11e3bb911594",
|
||||
"version": "1.3",
|
||||
"options": [
|
||||
"QUAZIP_INSTALL OFF"
|
||||
]
|
||||
},
|
||||
"frozen": {
|
||||
"package": "frozen",
|
||||
"repo": "serge-sans-paille/frozen",
|
||||
"sha": "61dce5ae18",
|
||||
"hash": "b8dfe741c82bc178dfc9749d4ab5a130cee718d9ee7b71d9b547cf5f7f23027ed0152ad250012a8546399fcc1e12187efc68d89d6731256c4d2df7d04eef8d5c"
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@ target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
||||
target_link_libraries(video_core PRIVATE sirit::sirit)
|
||||
|
||||
# Header-only stuff needed by all dependent targets
|
||||
target_link_libraries(video_core PUBLIC Vulkan::Headers Vulkan::UtilityHeaders GPUOpen::VulkanMemoryAllocator)
|
||||
target_link_libraries(video_core PUBLIC Vulkan::UtilityHeaders GPUOpen::VulkanMemoryAllocator)
|
||||
|
||||
if (ENABLE_NSIGHT_AFTERMATH)
|
||||
if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK})
|
||||
|
||||
@@ -36,12 +36,6 @@ struct EncodingData {
|
||||
uint data;
|
||||
};
|
||||
|
||||
struct PartitionTable {
|
||||
uint s1, s2, s3, s4, s5, s6, s7, s8;
|
||||
uint rnum;
|
||||
bool small_block;
|
||||
};
|
||||
|
||||
layout(binding = BINDING_INPUT_BUFFER, std430) readonly restrict buffer InputBufferU32 {
|
||||
uvec4 astc_data[];
|
||||
};
|
||||
@@ -68,40 +62,32 @@ const uint encoding_values[22] = uint[](
|
||||
(QUINT | (4u << 8u)), (TRIT | (5u << 8u)), (JUST_BITS | (7u << 8u)), (QUINT | (5u << 8u)),
|
||||
(TRIT | (6u << 8u)), (JUST_BITS | (8u << 8u)));
|
||||
|
||||
// Shared memory for workgroup processing
|
||||
shared uvec4 local_buff;
|
||||
shared int total_bitsread;
|
||||
// Input ASTC texture globals
|
||||
int total_bitsread = 0;
|
||||
uvec4 local_buff;
|
||||
|
||||
// Color data globals
|
||||
shared uvec4 color_endpoint_data;
|
||||
shared int color_bitsread;
|
||||
uvec4 color_endpoint_data;
|
||||
int color_bitsread = 0;
|
||||
|
||||
// Global "vector" to be pushed into when decoding
|
||||
// At most will require BLOCK_WIDTH x BLOCK_HEIGHT in single plane mode
|
||||
// At most will require BLOCK_WIDTH x BLOCK_HEIGHT x 2 in dual plane mode
|
||||
// So the maximum would be 144 (12 x 12) elements, x 2 for two planes
|
||||
#define DIVCEIL(number, divisor) (number + divisor - 1) / divisor
|
||||
#define ARRAY_NUM_ELEMENTS 144
|
||||
#define VECTOR_ARRAY_SIZE DIVCEIL(ARRAY_NUM_ELEMENTS * 2, 4)
|
||||
shared uint result_vector[ARRAY_NUM_ELEMENTS * 2];
|
||||
uint result_vector[ARRAY_NUM_ELEMENTS * 2];
|
||||
|
||||
shared int result_index;
|
||||
shared uint result_vector_max_index;
|
||||
shared bool result_limit_reached;
|
||||
int result_index = 0;
|
||||
uint result_vector_max_index;
|
||||
bool result_limit_reached = false;
|
||||
|
||||
// avoid intermediate result_vector storage during color decode phase
|
||||
shared bool write_color_values;
|
||||
shared uint color_values_direct[32];
|
||||
shared uint color_out_index;
|
||||
shared uint color_num_values;
|
||||
|
||||
// Shared variables for DecompressBlock interthread communication
|
||||
shared uvec4 endpoints0[4];
|
||||
shared uvec4 endpoints1[4];
|
||||
shared PartitionTable pt;
|
||||
shared uvec2 size_params;
|
||||
shared uint num_partitions;
|
||||
shared uint partition_index;
|
||||
shared uint plane_index;
|
||||
shared bool dual_plane;
|
||||
shared vec4 fill_color;
|
||||
bool write_color_values = false;
|
||||
uint color_values_direct[32];
|
||||
uint color_out_index = 0;
|
||||
uint color_num_values = 0;
|
||||
|
||||
// EncodingData helpers
|
||||
uint Encoding(EncodingData val) {
|
||||
@@ -317,7 +303,11 @@ uint Hash52(uint p) {
|
||||
p ^= p >> 17;
|
||||
return p;
|
||||
}
|
||||
|
||||
struct PartitionTable {
|
||||
uint s1, s2, s3, s4, s5, s6, s7, s8;
|
||||
uint rnum;
|
||||
bool small_block;
|
||||
};
|
||||
|
||||
PartitionTable GetPartitionTable(uint seed, uint partition_count) {
|
||||
PartitionTable pt;
|
||||
@@ -907,32 +897,27 @@ int FindLayout(uint mode) {
|
||||
|
||||
|
||||
void FillError(ivec3 coord) {
|
||||
const uint total_texels = block_dims.x * block_dims.y;
|
||||
for (uint tid = gl_LocalInvocationIndex; tid < total_texels; tid += gl_WorkGroupSize.x * gl_WorkGroupSize.y) {
|
||||
uint x = tid % block_dims.x;
|
||||
uint y = tid / block_dims.x;
|
||||
imageStore(dest_image, coord + ivec3(x, y, 0), vec4(0.0, 0.0, 0.0, 0.0));
|
||||
for (uint j = 0; j < block_dims.y; j++) {
|
||||
for (uint i = 0; i < block_dims.x; i++) {
|
||||
imageStore(dest_image, coord + ivec3(i, j, 0), vec4(0.0, 0.0, 0.0, 0.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FillVoidExtentLDR(ivec3 coord) {
|
||||
// Thread 0 decodes color
|
||||
|
||||
if (gl_LocalInvocationIndex == 0) {
|
||||
SkipBits(52);
|
||||
const uint r_u = StreamBits(16);
|
||||
const uint g_u = StreamBits(16);
|
||||
const uint b_u = StreamBits(16);
|
||||
const uint a_u = StreamBits(16);
|
||||
fill_color = vec4(float(r_u) / 65535.0f, float(g_u) / 65535.0f, float(b_u) / 65535.0f, float(a_u) / 65535.0f);
|
||||
}
|
||||
barrier();
|
||||
|
||||
const uint total_texels = block_dims.x * block_dims.y;
|
||||
for (uint tid = gl_LocalInvocationIndex; tid < total_texels; tid += gl_WorkGroupSize.x * gl_WorkGroupSize.y) {
|
||||
uint x = tid % block_dims.x;
|
||||
uint y = tid / block_dims.x;
|
||||
imageStore(dest_image, coord + ivec3(x, y, 0), fill_color);
|
||||
SkipBits(52);
|
||||
const uint r_u = StreamBits(16);
|
||||
const uint g_u = StreamBits(16);
|
||||
const uint b_u = StreamBits(16);
|
||||
const uint a_u = StreamBits(16);
|
||||
const float a = float(a_u) / 65535.0f;
|
||||
const float r = float(r_u) / 65535.0f;
|
||||
const float g = float(g_u) / 65535.0f;
|
||||
const float b = float(b_u) / 65535.0f;
|
||||
for (uint j = 0; j < block_dims.y; j++) {
|
||||
for (uint i = 0; i < block_dims.x; i++) {
|
||||
imageStore(dest_image, coord + ivec3(i, j, 0), vec4(r, g, b, a));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1014,156 +999,163 @@ uint DecodeMaxWeight(uint mode) {
|
||||
}
|
||||
|
||||
void DecompressBlock(ivec3 coord) {
|
||||
if (gl_LocalInvocationIndex == 0) {
|
||||
uint mode = StreamBits(11);
|
||||
bool early_exit = false;
|
||||
if (IsError(mode)) {
|
||||
size_params = uvec2(0);
|
||||
early_exit = true;
|
||||
} else if ((mode & 0x1ff) == 0x1fc) {
|
||||
size_params = uvec2(0xFFFFFFFF);
|
||||
early_exit = true;
|
||||
} else {
|
||||
size_params = DecodeBlockSize(mode);
|
||||
if ((size_params.x > block_dims.x) || (size_params.y > block_dims.y)) {
|
||||
size_params = uvec2(0);
|
||||
early_exit = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!early_exit) {
|
||||
num_partitions = StreamBits(2) + 1;
|
||||
uint mode_layout = FindLayout(mode);
|
||||
dual_plane = (mode_layout != 9) && ((mode & 0x400) != 0);
|
||||
if (num_partitions > 4 || (num_partitions == 4 && dual_plane)) {
|
||||
size_params = uvec2(0);
|
||||
early_exit = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!early_exit) {
|
||||
uint partition_index_local = 1;
|
||||
uvec4 color_endpoint_mode = uvec4(0);
|
||||
uint ced_pointer = 0;
|
||||
uint base_cem = 0;
|
||||
if (num_partitions == 1) {
|
||||
color_endpoint_mode.x = StreamBits(4);
|
||||
partition_index_local = 0;
|
||||
} else {
|
||||
partition_index_local = StreamBits(10);
|
||||
base_cem = StreamBits(6);
|
||||
}
|
||||
partition_index = partition_index_local; // Store to shared
|
||||
const uint base_mode = base_cem & 3;
|
||||
const uint max_weight = DecodeMaxWeight(mode);
|
||||
const uint weight_bits = GetPackedBitSize(size_params, dual_plane, max_weight);
|
||||
uint remaining_bits = 128 - weight_bits - total_bitsread;
|
||||
uint extra_cem_bits = 0;
|
||||
if (base_mode > 0) {
|
||||
switch (num_partitions) {
|
||||
case 2: extra_cem_bits += 2; break;
|
||||
case 3: extra_cem_bits += 5; break;
|
||||
case 4: extra_cem_bits += 8; break;
|
||||
}
|
||||
}
|
||||
remaining_bits -= extra_cem_bits;
|
||||
const uint plane_selector_bits = dual_plane ? 2 : 0;
|
||||
remaining_bits -= plane_selector_bits;
|
||||
if (remaining_bits > 128) {
|
||||
size_params = uvec2(0); // Error
|
||||
} else {
|
||||
const uint color_data_bits = remaining_bits;
|
||||
while (remaining_bits > 0) {
|
||||
const int nb = int(min(remaining_bits, 32U));
|
||||
const uint b = StreamBits(nb);
|
||||
color_endpoint_data[ced_pointer] = uint(bitfieldExtract(b, 0, nb));
|
||||
++ced_pointer;
|
||||
remaining_bits -= nb;
|
||||
}
|
||||
plane_index = uint(StreamBits(plane_selector_bits));
|
||||
if (base_mode > 0) {
|
||||
const uint extra_cem = StreamBits(extra_cem_bits);
|
||||
uint cem = (extra_cem << 6) | base_cem;
|
||||
cem >>= 2;
|
||||
uvec4 C = uvec4(0);
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
C[i] = (cem & 1); cem >>= 1;
|
||||
}
|
||||
uvec4 M = uvec4(0);
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
M[i] = cem & 3; cem >>= 2;
|
||||
}
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
color_endpoint_mode[i] = base_mode;
|
||||
if (C[i] == 0) --color_endpoint_mode[i];
|
||||
color_endpoint_mode[i] <<= 2;
|
||||
color_endpoint_mode[i] |= M[i];
|
||||
}
|
||||
} else if (num_partitions > 1) {
|
||||
const uint cem = base_cem >> 2;
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
color_endpoint_mode[i] = cem;
|
||||
}
|
||||
}
|
||||
|
||||
result_limit_reached = false;
|
||||
uint colvals_index = 0;
|
||||
DecodeColorValues(color_endpoint_mode, num_partitions, color_data_bits);
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
ComputeEndpoints(endpoints0[i], endpoints1[i], color_endpoint_mode[i], color_values_direct, colvals_index);
|
||||
}
|
||||
|
||||
color_endpoint_data = local_buff;
|
||||
color_endpoint_data = bitfieldReverse(color_endpoint_data).wzyx;
|
||||
const uint clear_byte_start = (weight_bits >> 3) + 1;
|
||||
const uint byte_insert = ExtractBits(color_endpoint_data, int(clear_byte_start - 1) * 8, 8) & uint(((1 << (weight_bits % 8)) - 1));
|
||||
const uint vec_index = (clear_byte_start - 1) >> 2;
|
||||
color_endpoint_data[vec_index] = bitfieldInsert(color_endpoint_data[vec_index], byte_insert, int((clear_byte_start - 1) % 4) * 8, 8);
|
||||
for (uint i = clear_byte_start; i < 16; ++i) {
|
||||
const uint idx = i >> 2;
|
||||
color_endpoint_data[idx] = bitfieldInsert(color_endpoint_data[idx], 0, int(i % 4) * 8, 8);
|
||||
}
|
||||
|
||||
result_index = 0;
|
||||
color_bitsread = 0;
|
||||
result_limit_reached = false;
|
||||
result_vector_max_index = size_params.x * size_params.y;
|
||||
if (dual_plane) result_vector_max_index *= 2;
|
||||
DecodeIntegerSequence(max_weight, GetNumWeightValues(size_params, dual_plane));
|
||||
UnquantizeTexelWeights(size_params, dual_plane);
|
||||
|
||||
if (num_partitions > 1) {
|
||||
pt = GetPartitionTable(partition_index, num_partitions);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
barrier();
|
||||
|
||||
if (size_params.x == 0) {
|
||||
uint mode = StreamBits(11);
|
||||
if (IsError(mode)) {
|
||||
FillError(coord);
|
||||
return;
|
||||
}
|
||||
if (size_params.x == 0xFFFFFFFF) {
|
||||
if ((mode & 0x1ff) == 0x1fc) {
|
||||
// params.void_extent_ldr = true;
|
||||
FillVoidExtentLDR(coord);
|
||||
return;
|
||||
}
|
||||
|
||||
const uint total_texels = block_dims.x * block_dims.y;
|
||||
for (uint tid = gl_LocalInvocationIndex; tid < total_texels; tid += gl_WorkGroupSize.x * gl_WorkGroupSize.y) {
|
||||
uint x = tid % block_dims.x;
|
||||
uint y = tid / block_dims.x;
|
||||
|
||||
uint local_partition = 0;
|
||||
if (num_partitions > 1) {
|
||||
local_partition = SelectPartition(pt, x, y, num_partitions);
|
||||
const uvec2 size_params = DecodeBlockSize(mode);
|
||||
if ((size_params.x > block_dims.x) || (size_params.y > block_dims.y)) {
|
||||
FillError(coord);
|
||||
return;
|
||||
}
|
||||
const uint num_partitions = StreamBits(2) + 1;
|
||||
const uint mode_layout = FindLayout(mode);
|
||||
const bool dual_plane = (mode_layout != 9) && ((mode & 0x400) != 0);
|
||||
if (num_partitions > 4 || (num_partitions == 4 && dual_plane)) {
|
||||
FillError(coord);
|
||||
return;
|
||||
}
|
||||
uint partition_index = 1;
|
||||
uvec4 color_endpoint_mode = uvec4(0);
|
||||
uint ced_pointer = 0;
|
||||
uint base_cem = 0;
|
||||
if (num_partitions == 1) {
|
||||
color_endpoint_mode.x = StreamBits(4);
|
||||
partition_index = 0;
|
||||
} else {
|
||||
partition_index = StreamBits(10);
|
||||
base_cem = StreamBits(6);
|
||||
}
|
||||
const uint base_mode = base_cem & 3;
|
||||
const uint max_weight = DecodeMaxWeight(mode);
|
||||
const uint weight_bits = GetPackedBitSize(size_params, dual_plane, max_weight);
|
||||
uint remaining_bits = 128 - weight_bits - total_bitsread;
|
||||
uint extra_cem_bits = 0;
|
||||
if (base_mode > 0) {
|
||||
switch (num_partitions) {
|
||||
case 2:
|
||||
extra_cem_bits += 2;
|
||||
break;
|
||||
case 3:
|
||||
extra_cem_bits += 5;
|
||||
break;
|
||||
case 4:
|
||||
extra_cem_bits += 8;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
remaining_bits -= extra_cem_bits;
|
||||
const uint plane_selector_bits = dual_plane ? 2 : 0;
|
||||
remaining_bits -= plane_selector_bits;
|
||||
if (remaining_bits > 128) {
|
||||
// Bad data, more remaining bits than 4 bytes
|
||||
// return early
|
||||
return;
|
||||
}
|
||||
// Read color data...
|
||||
const uint color_data_bits = remaining_bits;
|
||||
while (remaining_bits > 0) {
|
||||
const int nb = int(min(remaining_bits, 32U));
|
||||
const uint b = StreamBits(nb);
|
||||
color_endpoint_data[ced_pointer] = uint(bitfieldExtract(b, 0, nb));
|
||||
++ced_pointer;
|
||||
remaining_bits -= nb;
|
||||
}
|
||||
const uint plane_index = uint(StreamBits(plane_selector_bits));
|
||||
if (base_mode > 0) {
|
||||
const uint extra_cem = StreamBits(extra_cem_bits);
|
||||
uint cem = (extra_cem << 6) | base_cem;
|
||||
cem >>= 2;
|
||||
uvec4 C = uvec4(0);
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
C[i] = (cem & 1);
|
||||
cem >>= 1;
|
||||
}
|
||||
uvec4 M = uvec4(0);
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
M[i] = cem & 3;
|
||||
cem >>= 2;
|
||||
}
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
color_endpoint_mode[i] = base_mode;
|
||||
if (C[i] == 0) {
|
||||
--color_endpoint_mode[i];
|
||||
}
|
||||
color_endpoint_mode[i] <<= 2;
|
||||
color_endpoint_mode[i] |= M[i];
|
||||
}
|
||||
} else if (num_partitions > 1) {
|
||||
const uint cem = base_cem >> 2;
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
color_endpoint_mode[i] = cem;
|
||||
}
|
||||
}
|
||||
|
||||
uvec4 endpoints0[4];
|
||||
uvec4 endpoints1[4];
|
||||
{
|
||||
// Decode directly into color_values_direct[] (no intermediate result_vector storage)
|
||||
result_limit_reached = false;
|
||||
uint colvals_index = 0;
|
||||
DecodeColorValues(color_endpoint_mode, num_partitions, color_data_bits);
|
||||
for (uint i = 0; i < num_partitions; i++) {
|
||||
ComputeEndpoints(endpoints0[i], endpoints1[i], color_endpoint_mode[i], color_values_direct,
|
||||
colvals_index);
|
||||
}
|
||||
}
|
||||
color_endpoint_data = local_buff;
|
||||
color_endpoint_data = bitfieldReverse(color_endpoint_data).wzyx;
|
||||
const uint clear_byte_start = (weight_bits >> 3) + 1;
|
||||
|
||||
const uint byte_insert = ExtractBits(color_endpoint_data, int(clear_byte_start - 1) * 8, 8) &
|
||||
uint(((1 << (weight_bits % 8)) - 1));
|
||||
const uint vec_index = (clear_byte_start - 1) >> 2;
|
||||
color_endpoint_data[vec_index] = bitfieldInsert(color_endpoint_data[vec_index], byte_insert,
|
||||
int((clear_byte_start - 1) % 4) * 8, 8);
|
||||
for (uint i = clear_byte_start; i < 16; ++i) {
|
||||
const uint idx = i >> 2;
|
||||
color_endpoint_data[idx] = bitfieldInsert(color_endpoint_data[idx], 0, int(i % 4) * 8, 8);
|
||||
}
|
||||
|
||||
// Re-init vector variables for next decode phase
|
||||
result_index = 0;
|
||||
color_bitsread = 0;
|
||||
result_limit_reached = false;
|
||||
|
||||
// The limit for the Unquantize phase, avoids decoding more data than needed.
|
||||
result_vector_max_index = size_params.x * size_params.y;
|
||||
if (dual_plane) {
|
||||
result_vector_max_index *= 2;
|
||||
}
|
||||
DecodeIntegerSequence(max_weight, GetNumWeightValues(size_params, dual_plane));
|
||||
|
||||
UnquantizeTexelWeights(size_params, dual_plane);
|
||||
PartitionTable pt;
|
||||
if (num_partitions > 1) {
|
||||
pt = GetPartitionTable(partition_index, num_partitions);
|
||||
}
|
||||
for (uint j = 0; j < block_dims.y; j++) {
|
||||
for (uint i = 0; i < block_dims.x; i++) {
|
||||
uint local_partition = 0;
|
||||
if (num_partitions > 1) {
|
||||
local_partition = SelectPartition(pt, i, j, num_partitions);
|
||||
}
|
||||
const uvec4 C0 = ReplicateByteTo16(endpoints0[local_partition]);
|
||||
const uvec4 C1 = ReplicateByteTo16(endpoints1[local_partition]);
|
||||
const uvec4 weight_vec = GetUnquantizedWeightVector(j, i, size_params, plane_index, dual_plane);
|
||||
const vec4 Cf =
|
||||
vec4((C0 * (uvec4(64) - weight_vec) + C1 * weight_vec + uvec4(32)) / 64);
|
||||
const vec4 p = (Cf / 65535.0f);
|
||||
imageStore(dest_image, coord + ivec3(i, j, 0), p.gbar);
|
||||
}
|
||||
const uvec4 C0 = ReplicateByteTo16(endpoints0[local_partition]);
|
||||
const uvec4 C1 = ReplicateByteTo16(endpoints1[local_partition]);
|
||||
const uvec4 weight_vec = GetUnquantizedWeightVector(y, x, size_params, plane_index, dual_plane);
|
||||
const vec4 Cf = vec4((C0 * (uvec4(64) - weight_vec) + C1 * weight_vec + uvec4(32)) / 64);
|
||||
const vec4 p = (Cf / 65535.0f);
|
||||
imageStore(dest_image, coord + ivec3(x, y, 0), p.gbar);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1176,8 +1168,7 @@ uint SwizzleOffset(uvec2 pos) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
uvec3 block_id = gl_WorkGroupID;
|
||||
uvec3 pos = block_id;
|
||||
uvec3 pos = gl_GlobalInvocationID;
|
||||
pos.x <<= BYTES_PER_BLOCK_LOG2;
|
||||
const uint swizzle = SwizzleOffset(pos.xy);
|
||||
const uint block_y = pos.y >> GOB_SIZE_Y_SHIFT;
|
||||
@@ -1189,21 +1180,10 @@ void main() {
|
||||
offset += (pos.x >> GOB_SIZE_X_SHIFT) << x_shift;
|
||||
offset += swizzle;
|
||||
|
||||
if (gl_LocalInvocationIndex == 0) {
|
||||
total_bitsread = 0;
|
||||
result_index = 0;
|
||||
color_bitsread = 0;
|
||||
write_color_values = false;
|
||||
result_limit_reached = false;
|
||||
color_out_index = 0;
|
||||
color_num_values = 0;
|
||||
local_buff = astc_data[offset / 16];
|
||||
}
|
||||
barrier();
|
||||
|
||||
ivec3 coord = ivec3(block_id * uvec3(block_dims, 1));
|
||||
const ivec3 coord = ivec3(gl_GlobalInvocationID * uvec3(block_dims, 1));
|
||||
if (any(greaterThanEqual(coord, imageSize(dest_image)))) {
|
||||
return;
|
||||
}
|
||||
local_buff = astc_data[offset / 16];
|
||||
DecompressBlock(coord);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||
@@ -586,8 +586,8 @@ void ASTCDecoderPass::Assemble(Image& image, const StagingBufferRef& map,
|
||||
});
|
||||
for (const VideoCommon::SwizzleParameters& swizzle : swizzles) {
|
||||
const size_t input_offset = swizzle.buffer_offset + map.offset;
|
||||
const u32 num_dispatches_x = swizzle.num_tiles.width;
|
||||
const u32 num_dispatches_y = swizzle.num_tiles.height;
|
||||
const u32 num_dispatches_x = Common::DivCeil(swizzle.num_tiles.width, 8U);
|
||||
const u32 num_dispatches_y = Common::DivCeil(swizzle.num_tiles.height, 8U);
|
||||
const u32 num_dispatches_z = image.info.resources.layers;
|
||||
|
||||
compute_pass_descriptor_queue.Acquire();
|
||||
|
||||
+41
-126
@@ -1,6 +1,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "yuzu/game_list.h"
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
@@ -10,28 +11,22 @@
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QScroller>
|
||||
#include <QScrollBar>
|
||||
#include <QThreadPool>
|
||||
#include <QToolButton>
|
||||
#include <QVariantAnimation>
|
||||
#include <fmt/ranges.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qscroller.h>
|
||||
#include <qscrollerproperties.h>
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/core.h"
|
||||
#include "core/file_sys/patch_manager.h"
|
||||
#include "core/file_sys/registered_cache.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "qt_common/util/game.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "yuzu/compatibility_list.h"
|
||||
#include "yuzu/game_list.h"
|
||||
#include "yuzu/game_list_p.h"
|
||||
#include "yuzu/game_list_worker.h"
|
||||
#include "yuzu/main_window.h"
|
||||
#include "yuzu/util/controller_navigation.h"
|
||||
#include <fmt/ranges.h>
|
||||
#include <regex>
|
||||
|
||||
GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist_, QObject* parent)
|
||||
: QObject(parent), gamelist{gamelist_} {}
|
||||
@@ -333,22 +328,6 @@ GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvid
|
||||
item_model = new QStandardItemModel(tree_view);
|
||||
tree_view->setModel(item_model);
|
||||
|
||||
SetupScrollAnimation();
|
||||
tree_view->viewport()->installEventFilter(this);
|
||||
|
||||
// touch gestures
|
||||
tree_view->viewport()->grabGesture(Qt::SwipeGesture);
|
||||
tree_view->viewport()->grabGesture(Qt::PanGesture);
|
||||
|
||||
// TODO: touch?
|
||||
QScroller::grabGesture(tree_view->viewport(), QScroller::LeftMouseButtonGesture);
|
||||
|
||||
auto scroller = QScroller::scroller(tree_view->viewport());
|
||||
QScrollerProperties props;
|
||||
props.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff);
|
||||
props.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff);
|
||||
scroller->setScrollerProperties(props);
|
||||
|
||||
tree_view->setAlternatingRowColors(true);
|
||||
tree_view->setSelectionMode(QHeaderView::SingleSelection);
|
||||
tree_view->setSelectionBehavior(QHeaderView::SelectRows);
|
||||
@@ -373,7 +352,7 @@ GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvid
|
||||
connect(tree_view, &QTreeView::customContextMenuRequested, this, &GameList::PopupContextMenu);
|
||||
connect(tree_view, &QTreeView::expanded, this, &GameList::OnItemExpanded);
|
||||
connect(tree_view, &QTreeView::collapsed, this, &GameList::OnItemExpanded);
|
||||
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent, this,
|
||||
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent,
|
||||
[this](Qt::Key key) {
|
||||
// Avoid pressing buttons while playing
|
||||
if (system.IsPoweredOn()) {
|
||||
@@ -498,7 +477,7 @@ void GameList::DonePopulating(const QStringList& watch_list) {
|
||||
UISettings::values.favorited_ids.size() == 0);
|
||||
tree_view->setExpanded(item_model->invisibleRootItem()->child(0)->index(),
|
||||
UISettings::values.favorites_expanded.GetValue());
|
||||
for (const auto id : std::as_const(UISettings::values.favorited_ids)) {
|
||||
for (const auto id : UISettings::values.favorited_ids) {
|
||||
AddFavorite(id);
|
||||
}
|
||||
|
||||
@@ -634,73 +613,73 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri
|
||||
auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
|
||||
navigate_to_gamedb_entry->setVisible(it != compatibility_list.end() && program_id != 0);
|
||||
|
||||
connect(favorite, &QAction::triggered, this, [this, program_id]() { ToggleFavorite(program_id); });
|
||||
connect(open_save_location, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(favorite, &QAction::triggered, [this, program_id]() { ToggleFavorite(program_id); });
|
||||
connect(open_save_location, &QAction::triggered, [this, program_id, path]() {
|
||||
emit OpenFolderRequested(program_id, GameListOpenTarget::SaveData, path);
|
||||
});
|
||||
connect(start_game, &QAction::triggered, this,
|
||||
connect(start_game, &QAction::triggered,
|
||||
[this, path]() { emit BootGame(QString::fromStdString(path), StartGameType::Normal); });
|
||||
connect(start_game_global, &QAction::triggered, this,
|
||||
connect(start_game_global, &QAction::triggered,
|
||||
[this, path]() { emit BootGame(QString::fromStdString(path), StartGameType::Global); });
|
||||
connect(open_mod_location, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(open_mod_location, &QAction::triggered, [this, program_id, path]() {
|
||||
emit OpenFolderRequested(program_id, GameListOpenTarget::ModData, path);
|
||||
});
|
||||
connect(open_transferable_shader_cache, &QAction::triggered, this,
|
||||
connect(open_transferable_shader_cache, &QAction::triggered,
|
||||
[this, program_id]() { emit OpenTransferableShaderCacheRequested(program_id); });
|
||||
connect(remove_all_content, &QAction::triggered, this, [this, program_id]() {
|
||||
connect(remove_all_content, &QAction::triggered, [this, program_id]() {
|
||||
emit RemoveInstalledEntryRequested(program_id, QtCommon::Game::InstalledEntryType::Game);
|
||||
});
|
||||
connect(remove_update, &QAction::triggered, this, [this, program_id]() {
|
||||
connect(remove_update, &QAction::triggered, [this, program_id]() {
|
||||
emit RemoveInstalledEntryRequested(program_id, QtCommon::Game::InstalledEntryType::Update);
|
||||
});
|
||||
connect(remove_dlc, &QAction::triggered, this, [this, program_id]() {
|
||||
connect(remove_dlc, &QAction::triggered, [this, program_id]() {
|
||||
emit RemoveInstalledEntryRequested(program_id, QtCommon::Game::InstalledEntryType::AddOnContent);
|
||||
});
|
||||
connect(remove_gl_shader_cache, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(remove_gl_shader_cache, &QAction::triggered, [this, program_id, path]() {
|
||||
emit RemoveFileRequested(program_id, QtCommon::Game::GameListRemoveTarget::GlShaderCache, path);
|
||||
});
|
||||
connect(remove_vk_shader_cache, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(remove_vk_shader_cache, &QAction::triggered, [this, program_id, path]() {
|
||||
emit RemoveFileRequested(program_id, QtCommon::Game::GameListRemoveTarget::VkShaderCache, path);
|
||||
});
|
||||
connect(remove_shader_cache, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(remove_shader_cache, &QAction::triggered, [this, program_id, path]() {
|
||||
emit RemoveFileRequested(program_id, QtCommon::Game::GameListRemoveTarget::AllShaderCache, path);
|
||||
});
|
||||
connect(remove_custom_config, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(remove_custom_config, &QAction::triggered, [this, program_id, path]() {
|
||||
emit RemoveFileRequested(program_id, QtCommon::Game::GameListRemoveTarget::CustomConfiguration, path);
|
||||
});
|
||||
connect(set_play_time, &QAction::triggered, this,
|
||||
connect(set_play_time, &QAction::triggered,
|
||||
[this, program_id]() { emit SetPlayTimeRequested(program_id); });
|
||||
connect(remove_play_time_data, &QAction::triggered, this,
|
||||
connect(remove_play_time_data, &QAction::triggered,
|
||||
[this, program_id]() { emit RemovePlayTimeRequested(program_id); });
|
||||
connect(remove_cache_storage, &QAction::triggered, this, [this, program_id, path] {
|
||||
connect(remove_cache_storage, &QAction::triggered, [this, program_id, path] {
|
||||
emit RemoveFileRequested(program_id, QtCommon::Game::GameListRemoveTarget::CacheStorage, path);
|
||||
});
|
||||
connect(dump_romfs, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(dump_romfs, &QAction::triggered, [this, program_id, path]() {
|
||||
emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::Normal);
|
||||
});
|
||||
connect(dump_romfs_sdmc, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(dump_romfs_sdmc, &QAction::triggered, [this, program_id, path]() {
|
||||
emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::SDMC);
|
||||
});
|
||||
connect(verify_integrity, &QAction::triggered, this,
|
||||
connect(verify_integrity, &QAction::triggered,
|
||||
[this, path]() { emit VerifyIntegrityRequested(path); });
|
||||
connect(copy_tid, &QAction::triggered, this,
|
||||
connect(copy_tid, &QAction::triggered,
|
||||
[this, program_id]() { emit CopyTIDRequested(program_id); });
|
||||
connect(navigate_to_gamedb_entry, &QAction::triggered, this, [this, program_id]() {
|
||||
connect(navigate_to_gamedb_entry, &QAction::triggered, [this, program_id]() {
|
||||
emit NavigateToGamedbEntryRequested(program_id, compatibility_list);
|
||||
});
|
||||
// TODO: Implement shortcut creation for macOS
|
||||
#if !defined(__APPLE__)
|
||||
connect(create_desktop_shortcut, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(create_desktop_shortcut, &QAction::triggered, [this, program_id, path]() {
|
||||
emit CreateShortcut(program_id, path, QtCommon::Game::ShortcutTarget::Desktop);
|
||||
});
|
||||
connect(create_applications_menu_shortcut, &QAction::triggered, this, [this, program_id, path]() {
|
||||
connect(create_applications_menu_shortcut, &QAction::triggered, [this, program_id, path]() {
|
||||
emit CreateShortcut(program_id, path, QtCommon::Game::ShortcutTarget::Applications);
|
||||
});
|
||||
#endif
|
||||
connect(properties, &QAction::triggered, this,
|
||||
connect(properties, &QAction::triggered,
|
||||
[this, path]() { emit OpenPerGameGeneralRequested(path); });
|
||||
|
||||
connect(ryujinx, &QAction::triggered, this, [this, program_id]() { emit LinkToRyujinxRequested(program_id);
|
||||
connect(ryujinx, &QAction::triggered, [this, program_id]() { emit LinkToRyujinxRequested(program_id);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -714,11 +693,11 @@ void GameList::AddCustomDirPopup(QMenu& context_menu, QModelIndex selected) {
|
||||
deep_scan->setCheckable(true);
|
||||
deep_scan->setChecked(game_dir.deep_scan);
|
||||
|
||||
connect(deep_scan, &QAction::triggered, this, [this, &game_dir] {
|
||||
connect(deep_scan, &QAction::triggered, [this, &game_dir] {
|
||||
game_dir.deep_scan = !game_dir.deep_scan;
|
||||
PopulateAsync(UISettings::values.game_dirs);
|
||||
});
|
||||
connect(delete_dir, &QAction::triggered, this, [this, &game_dir, selected] {
|
||||
connect(delete_dir, &QAction::triggered, [this, &game_dir, selected] {
|
||||
UISettings::values.game_dirs.removeOne(game_dir);
|
||||
item_model->invisibleRootItem()->removeRow(selected.row());
|
||||
OnTextChanged(search_field->filterText());
|
||||
@@ -737,7 +716,7 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
|
||||
move_up->setEnabled(row > 1);
|
||||
move_down->setEnabled(row < item_model->rowCount() - 2);
|
||||
|
||||
connect(move_up, &QAction::triggered, this, [this, selected, row, game_dir_index] {
|
||||
connect(move_up, &QAction::triggered, [this, selected, row, game_dir_index] {
|
||||
const int other_index = selected.sibling(row - 1, 0).data(GameListDir::GameDirRole).toInt();
|
||||
// swap the items in the settings
|
||||
std::swap(UISettings::values.game_dirs[game_dir_index],
|
||||
@@ -753,7 +732,7 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
|
||||
UISettings::values.game_dirs[other_index].expanded);
|
||||
});
|
||||
|
||||
connect(move_down, &QAction::triggered, this, [this, selected, row, game_dir_index] {
|
||||
connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] {
|
||||
const int other_index = selected.sibling(row + 1, 0).data(GameListDir::GameDirRole).toInt();
|
||||
// swap the items in the settings
|
||||
std::swap(UISettings::values.game_dirs[game_dir_index],
|
||||
@@ -769,7 +748,7 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
|
||||
UISettings::values.game_dirs[other_index].expanded);
|
||||
});
|
||||
|
||||
connect(open_directory_location, &QAction::triggered, this, [this, game_dir_index] {
|
||||
connect(open_directory_location, &QAction::triggered, [this, game_dir_index] {
|
||||
emit OpenDirectory(
|
||||
QString::fromStdString(UISettings::values.game_dirs[game_dir_index].path));
|
||||
});
|
||||
@@ -778,8 +757,8 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
|
||||
void GameList::AddFavoritesPopup(QMenu& context_menu) {
|
||||
QAction* clear = context_menu.addAction(tr("Clear"));
|
||||
|
||||
connect(clear, &QAction::triggered, this, [this] {
|
||||
for (const auto id : std::as_const(UISettings::values.favorited_ids)) {
|
||||
connect(clear, &QAction::triggered, [this] {
|
||||
for (const auto id : UISettings::values.favorited_ids) {
|
||||
RemoveFavorite(id);
|
||||
}
|
||||
UISettings::values.favorited_ids.clear();
|
||||
@@ -809,7 +788,7 @@ void GameList::LoadCompatibilityList() {
|
||||
const QJsonDocument json = QJsonDocument::fromJson(content);
|
||||
const QJsonArray arr = json.array();
|
||||
|
||||
for (const QJsonValue &value : arr) {
|
||||
for (const QJsonValue value : arr) {
|
||||
const QJsonObject game = value.toObject();
|
||||
const QString compatibility_key = QStringLiteral("compatibility");
|
||||
|
||||
@@ -821,7 +800,7 @@ void GameList::LoadCompatibilityList() {
|
||||
const QString directory = game[QStringLiteral("directory")].toString();
|
||||
const QJsonArray ids = game[QStringLiteral("releases")].toArray();
|
||||
|
||||
for (const QJsonValue &id_ref : ids) {
|
||||
for (const QJsonValue id_ref : ids) {
|
||||
const QJsonObject id_object = id_ref.toObject();
|
||||
const QString id = id_object[QStringLiteral("id")].toString();
|
||||
|
||||
@@ -940,7 +919,7 @@ void GameList::ToggleFavorite(u64 program_id) {
|
||||
tree_view->setRowHidden(0, item_model->invisibleRootItem()->index(), true);
|
||||
}
|
||||
}
|
||||
emit SaveConfig();
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
void GameList::AddFavorite(u64 program_id) {
|
||||
@@ -1010,70 +989,6 @@ void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) {
|
||||
emit GameListPlaceholder::AddDirectory();
|
||||
}
|
||||
|
||||
void GameList::SetupScrollAnimation() {
|
||||
auto setup = [this](QVariantAnimation* anim, QScrollBar* bar) {
|
||||
// animation handles moving the bar instead of Qt's built in crap
|
||||
anim->setEasingCurve(QEasingCurve::OutCubic);
|
||||
anim->setDuration(200);
|
||||
connect(anim, &QVariantAnimation::valueChanged, this, [bar](const QVariant& value) {
|
||||
bar->setValue(value.toInt());
|
||||
});
|
||||
};
|
||||
|
||||
vertical_scroll = new QVariantAnimation(this);
|
||||
horizontal_scroll = new QVariantAnimation(this);
|
||||
|
||||
setup(vertical_scroll, tree_view->verticalScrollBar());
|
||||
setup(horizontal_scroll, tree_view->horizontalScrollBar());
|
||||
}
|
||||
|
||||
bool GameList::eventFilter(QObject* obj, QEvent* event) {
|
||||
if (obj == tree_view->viewport() && event->type() == QEvent::Wheel) {
|
||||
QWheelEvent* wheelEvent = static_cast<QWheelEvent*>(event);
|
||||
|
||||
bool horizontal = wheelEvent->modifiers() & Qt::ShiftModifier;
|
||||
|
||||
int deltaX = wheelEvent->angleDelta().x();
|
||||
int deltaY = wheelEvent->angleDelta().y();
|
||||
|
||||
// if shift is held do a horizontal scroll
|
||||
if (horizontal && deltaY != 0 && deltaX == 0) {
|
||||
deltaX = deltaY;
|
||||
deltaY = 0;
|
||||
}
|
||||
|
||||
// TODO(crueter): dedup this
|
||||
if (deltaY != 0) {
|
||||
if (vertical_scroll->state() == QAbstractAnimation::Stopped)
|
||||
vertical_scroll_target = tree_view->verticalScrollBar()->value();
|
||||
|
||||
vertical_scroll_target -= deltaY;
|
||||
vertical_scroll_target = qBound(0, vertical_scroll_target, tree_view->verticalScrollBar()->maximum());
|
||||
|
||||
vertical_scroll->stop();
|
||||
vertical_scroll->setStartValue(tree_view->verticalScrollBar()->value());
|
||||
vertical_scroll->setEndValue(vertical_scroll_target);
|
||||
vertical_scroll->start();
|
||||
}
|
||||
|
||||
if (deltaX != 0) {
|
||||
if (horizontal_scroll->state() == QAbstractAnimation::Stopped)
|
||||
horizontal_scroll_target = tree_view->horizontalScrollBar()->value();
|
||||
|
||||
horizontal_scroll_target -= deltaX;
|
||||
horizontal_scroll_target = qBound(0, horizontal_scroll_target, tree_view->horizontalScrollBar()->maximum());
|
||||
|
||||
horizontal_scroll->stop();
|
||||
horizontal_scroll->setStartValue(tree_view->horizontalScrollBar()->value());
|
||||
horizontal_scroll->setEndValue(horizontal_scroll_target);
|
||||
horizontal_scroll->start();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return QWidget::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
void GameListPlaceholder::changeEvent(QEvent* event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
RetranslateUI();
|
||||
|
||||
+1
-10
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "yuzu/compatibility_list.h"
|
||||
#include "frontend_common/play_time_manager.h"
|
||||
|
||||
class QVariantAnimation;
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
@@ -163,14 +162,6 @@ private:
|
||||
ControllerNavigation* controller_navigation = nullptr;
|
||||
CompatibilityList compatibility_list;
|
||||
|
||||
QVariantAnimation* vertical_scroll = nullptr;
|
||||
QVariantAnimation* horizontal_scroll = nullptr;
|
||||
int vertical_scroll_target = 0;
|
||||
int horizontal_scroll_target = 0;
|
||||
|
||||
void SetupScrollAnimation();
|
||||
bool eventFilter(QObject* obj, QEvent* event) override;
|
||||
|
||||
friend class GameListSearchField;
|
||||
|
||||
const PlayTime::PlayTimeManager& play_time_manager;
|
||||
|
||||
Reference in New Issue
Block a user