mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-15 21:19:47 +00:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed556a9053 | |||
| 54046ac60e | |||
| 39763e7321 | |||
| e69415c07b | |||
| dc1486485b | |||
| f561a10bd8 | |||
| 6272f8ab24 | |||
| eebb4bd91e | |||
| 58dee53305 | |||
| 7b13113fbe | |||
| b9a88297cb | |||
| 0133caf702 | |||
| 9d60030af5 | |||
| f5d1a78846 | |||
| 5d3ad94e18 | |||
| 479df9809a | |||
| 5b4c29b123 | |||
| 5b4dc32c1a | |||
| a90ba7f6ac | |||
| 9b2a36791d | |||
| b85f289048 | |||
| 89004124a5 | |||
| eb9280dedf | |||
| 8b8034a2a0 | |||
| 9a0e6b3c28 | |||
| defb8bf2e2 | |||
| 6295d23581 | |||
| 7f85c6e282 | |||
| 39b2c79985 | |||
| a27d35463e | |||
| 5606edd1a6 | |||
| cd003e5ec9 |
@@ -0,0 +1,5 @@
|
||||
- [ ] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
|
||||
- [ ] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
|
||||
- [ ] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
|
||||
|
||||
-------------------
|
||||
@@ -112,11 +112,6 @@ Files: src/yuzu/*.ui
|
||||
Copyright: 2018-2022 yuzu Emulator Project
|
||||
License: GPL-2.0-or-later
|
||||
|
||||
Files: src/yuzu/compatdb.ui
|
||||
src/yuzu/main.ui
|
||||
Copyright: 2014-2017 Citra Emulator Project
|
||||
License: GPL-2.0-or-later
|
||||
|
||||
Files: src/yuzu/loading_screen.ui
|
||||
Copyright: 2019 James Rowe <jroweboy@gmail.com>
|
||||
License: GPL-2.0-or-later
|
||||
|
||||
@@ -281,25 +281,6 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(compat_base dist/compatibility_list/compatibility_list)
|
||||
set(compat_qrc ${compat_base}.qrc)
|
||||
set(compat_json ${compat_base}.json)
|
||||
|
||||
configure_file(${PROJECT_SOURCE_DIR}/${compat_qrc}
|
||||
${PROJECT_BINARY_DIR}/${compat_qrc}
|
||||
COPYONLY)
|
||||
|
||||
if (EXISTS ${PROJECT_SOURCE_DIR}/${compat_json})
|
||||
configure_file("${PROJECT_SOURCE_DIR}/${compat_json}"
|
||||
"${PROJECT_BINARY_DIR}/${compat_json}"
|
||||
COPYONLY)
|
||||
endif()
|
||||
|
||||
# TODO: Compat list download
|
||||
if (NOT EXISTS ${PROJECT_BINARY_DIR}/${compat_json})
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/${compat_json} "")
|
||||
endif()
|
||||
|
||||
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
||||
set(HAS_NCE 1)
|
||||
add_compile_definitions(HAS_NCE=1)
|
||||
|
||||
+35
-89
@@ -95,7 +95,7 @@ macro(echo)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
||||
"${message}")
|
||||
else()
|
||||
message(STATUS "${message}")
|
||||
message(DEBUG "${message}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -120,47 +120,6 @@ macro(sleep time)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${time})
|
||||
endmacro()
|
||||
|
||||
# Analogous to GNU mktemp, with fallbacks
|
||||
function(mktempdir out)
|
||||
# shell out to system mktemp if available
|
||||
find_program(MKTEMP_EXECUTABLE mktemp)
|
||||
if (MKTEMP_EXECUTABLE)
|
||||
execute_process(COMMAND mktemp -d
|
||||
OUTPUT_VARIABLE dir
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
RESULT_VARIABLE ret)
|
||||
|
||||
if (ret EQUAL 0)
|
||||
set(${out} "${dir}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(RANDOM LENGTH 10 rand_str)
|
||||
set(tmp_str "tmp.${rand_str}")
|
||||
|
||||
# create something in /tmp if it exists
|
||||
if(EXISTS "/tmp" AND IS_DIRECTORY "/tmp")
|
||||
set(dir "/tmp/${tmp_str}")
|
||||
file(MAKE_DIRECTORY "${dir}" RESULT res)
|
||||
if (res EQUAL 0)
|
||||
set(${out} "${dir}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tmpdir does not exist, extremely legacy mode
|
||||
set(dir "${CMAKE_CURRENT_LIST_DIR}/.tmp/${tmp_str}")
|
||||
file(MAKE_DIRECTORY "${dir}" RESULT res)
|
||||
if (res EQUAL 0)
|
||||
set(${out} "${dir}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
fatal("Fatal: Could not create temporary directory. "
|
||||
"Check write permissions to the current directory")
|
||||
endfunction()
|
||||
|
||||
# Get a package's effective URL.
|
||||
function(get_package_url)
|
||||
set(oneValueArgs
|
||||
@@ -218,6 +177,7 @@ endfunction()
|
||||
# Download a URL to file, with a sha512 hash
|
||||
# And retry 5 times
|
||||
function(cpm_download url file)
|
||||
echo("Downloading ${url} to ${file}")
|
||||
list(LENGTH ARGN argn_len)
|
||||
if(argn_len GREATER 0)
|
||||
list(GET ARGN 0 hash)
|
||||
@@ -229,8 +189,7 @@ function(cpm_download url file)
|
||||
foreach(i RANGE 5)
|
||||
file(DOWNLOAD ${url} ${file}
|
||||
${args}
|
||||
STATUS ret
|
||||
LOG log)
|
||||
STATUS ret)
|
||||
|
||||
list(GET ret 0 code)
|
||||
if (code EQUAL 0)
|
||||
@@ -339,60 +298,47 @@ function(fetch_package)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Temporary directory.
|
||||
mktempdir(TMP)
|
||||
|
||||
# Get filename from URL
|
||||
get_filename_component(base_filename ${ARG_URL} NAME)
|
||||
|
||||
# Download
|
||||
set(file ${TMP}/${base_filename})
|
||||
cpm_download(${ARG_URL} ${file} ${ARG_HASH})
|
||||
message(DEBUG "Downloaded ${base_filename}")
|
||||
|
||||
# Extract the downloaded archive
|
||||
# TODO: Moar error handling
|
||||
set(dir ${TMP}/${base_filename}-extracted)
|
||||
file(MAKE_DIRECTORY ${dir})
|
||||
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${file}
|
||||
DESTINATION ${dir})
|
||||
|
||||
# This is copied near-verbatim from ExternalProject/extractfile.cmake.in
|
||||
|
||||
# If there's just one subdirectory and nothing else, move it
|
||||
file(GLOB contents "${dir}/*")
|
||||
list(REMOVE_ITEM contents "${dir}/.DS_Store")
|
||||
list(LENGTH contents n)
|
||||
|
||||
# If n == 1 and contents points to a directory, this is a GitHub-style pack
|
||||
# In this case contents points to the subdir which will get renamed
|
||||
# If not, contents will point to the parent dir which will get renamed
|
||||
if (NOT n EQUAL 1 OR NOT IS_DIRECTORY "${contents}")
|
||||
set(contents "${dir}")
|
||||
endif()
|
||||
|
||||
file(REAL_PATH "${contents}" contents_abs)
|
||||
|
||||
# paths
|
||||
cmake_path(ABSOLUTE_PATH ARG_PATH
|
||||
NORMALIZE
|
||||
OUTPUT_VARIABLE abs_path)
|
||||
|
||||
cmake_path(GET abs_path PARENT_PATH path_parent)
|
||||
cmake_path(GET abs_path FILENAME path_name)
|
||||
file(MAKE_DIRECTORY ${path_parent})
|
||||
|
||||
# rename tmp dir
|
||||
set(tmp_renamed "${TMP}/${path_name}")
|
||||
file(RENAME "${contents_abs}" "${tmp_renamed}")
|
||||
# Get filename from URL
|
||||
get_filename_component(base_filename ${ARG_URL} NAME)
|
||||
|
||||
# now copy
|
||||
# TODO: Error handling beyond what cmake does????
|
||||
file(COPY ${tmp_renamed} DESTINATION ${path_parent})
|
||||
# Download
|
||||
set(file ${path_parent}/${base_filename})
|
||||
cpm_download(${ARG_URL} ${file} ${ARG_HASH})
|
||||
echo("Downloaded ${base_filename}")
|
||||
|
||||
# Extract
|
||||
echo("Extracting ${file}...")
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${file}
|
||||
DESTINATION ${abs_path})
|
||||
|
||||
# This is copied near-verbatim from ExternalProject/extractfile.cmake.in
|
||||
|
||||
# If there's just one subdirectory and nothing else, move it
|
||||
file(GLOB contents "${abs_path}/*")
|
||||
list(REMOVE_ITEM contents "${abs_path}/.DS_Store")
|
||||
list(LENGTH contents n)
|
||||
|
||||
# If n == 1 and contents points to a directory, this is a GitHub-style pack
|
||||
# In this case contents points to the subdir which will get renamed
|
||||
# If not, contents will point to the parent dir which will get renamed
|
||||
if (n EQUAL 1 AND IS_DIRECTORY "${contents}")
|
||||
set(temp_path "${abs_path}_tmp")
|
||||
file(RENAME "${contents}" "${temp_path}")
|
||||
file(REMOVE_RECURSE "${abs_path}")
|
||||
file(RENAME "${temp_path}" "${abs_path}")
|
||||
endif()
|
||||
|
||||
# TODO: only echo this in script mode
|
||||
message(DEBUG "Extracted to ${abs_path}")
|
||||
echo("Extracted to ${abs_path}")
|
||||
|
||||
# Apply patches
|
||||
apply_patches("${ARG_PATCHES}" "${abs_path}")
|
||||
@@ -401,7 +347,7 @@ function(fetch_package)
|
||||
file(WRITE "${abs_path}/.cpm_patch_key" ${ARG_PATCH_KEY})
|
||||
|
||||
# done! :)
|
||||
file(REMOVE_RECURSE ${TMP})
|
||||
file(REMOVE_RECURSE ${file})
|
||||
endfunction()
|
||||
|
||||
# compute a hash of all patch file contents
|
||||
|
||||
-354
@@ -1,354 +0,0 @@
|
||||
[
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "the-legend-of-zelda-breath-of-the-wild",
|
||||
"releases": [
|
||||
{"id": "01007EF00011E000"}
|
||||
],
|
||||
"title": "The Legend of Zelda: Breath of the Wild"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "super-mario-odyssey",
|
||||
"releases": [
|
||||
{"id": "0100000000010000"}
|
||||
],
|
||||
"title": "Super Mario Odyssey"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "animal-crossing-new-horizons",
|
||||
"releases": [
|
||||
{"id": "01006F8002326000"}
|
||||
],
|
||||
"title": "Animal Crossing: New Horizons"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "pokemon-legends-z-a",
|
||||
"releases": [
|
||||
{"id": "0100F43008C44000"}
|
||||
],
|
||||
"title": "Pokémon Legends: Z-A"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "the-legend-of-zelda-tears-of-the-kingdom",
|
||||
"releases": [
|
||||
{"id": "0100F2C0115B6000"}
|
||||
],
|
||||
"title": "The Legend of Zelda: Tears of the Kingdom"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "super-mario-galaxy",
|
||||
"releases": [
|
||||
{"id": "010099C022B96000"}
|
||||
],
|
||||
"title": "Super Mario Galaxy"
|
||||
},
|
||||
{
|
||||
"compatibility": 3,
|
||||
"directory": "star-wars-republic-commando",
|
||||
"releases": [
|
||||
{"id": "0100FA10115F8000"}
|
||||
],
|
||||
"title": "Star Wars: Republic Commando"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "doki-doki-literature-club-plus",
|
||||
"releases": [
|
||||
{"id": "010086901543E000"}
|
||||
],
|
||||
"title": "Doki Doki Literature Club Plus"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "pokemon-scarlet",
|
||||
"releases": [
|
||||
{"id": "0100A3D008C5C000"}
|
||||
],
|
||||
"title": "Pokémon Scarlet"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "pokemon-violet",
|
||||
"releases": [
|
||||
{"id": "01008F6008C5E000"}
|
||||
],
|
||||
"title": "Pokémon Violet"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "pokemon-legends-arceus",
|
||||
"releases": [
|
||||
{"id": "01001E300D162000"}
|
||||
],
|
||||
"title": "Pokémon Legends: Arceus"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "splatoon-2",
|
||||
"releases": [
|
||||
{"id": "01003BC0000A0000"}
|
||||
],
|
||||
"title": "Splatoon 2"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "super-smash-bros-ultimate",
|
||||
"releases": [
|
||||
{"id": "01006A800016E000"}
|
||||
],
|
||||
"title": "Super Smash Bros. Ultimate"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "mario-kart-8-deluxe",
|
||||
"releases": [
|
||||
{"id": "0100152000022000"}
|
||||
],
|
||||
"title": "Mario Kart 8 Deluxe"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "splatoon-3",
|
||||
"releases": [
|
||||
{"id": "0100C2500FC20000"}
|
||||
],
|
||||
"title": "Splatoon 3"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "new-super-mario-bros-u-deluxe",
|
||||
"releases": [
|
||||
{"id": "0100EA80032EA000"}
|
||||
],
|
||||
"title": "New Super Mario Bros. U Deluxe"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "hyrule-warriors-age-of-calamity",
|
||||
"releases": [
|
||||
{"id": "01002B00111A2000"}
|
||||
],
|
||||
"title": "Hyrule Warriors: Age of Calamity"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "luigis-mansion-3",
|
||||
"releases": [
|
||||
{"id": "0100DCA0064A6000"}
|
||||
],
|
||||
"title": "Luigi's Mansion 3"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "pokemon-brilliant-diamond",
|
||||
"releases": [
|
||||
{"id": "0100000011D90000"}
|
||||
],
|
||||
"title": "Pokémon Brilliant Diamond"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "pokemon-shining-pearl",
|
||||
"releases": [
|
||||
{"id": "010018E011D92000"}
|
||||
],
|
||||
"title": "Pokémon Shining Pearl"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "super-mario-3d-world-bowsers-fury",
|
||||
"releases": [
|
||||
{"id": "010028600EBDA000"}
|
||||
],
|
||||
"title": "Super Mario 3D World + Bowser's Fury"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "the-legend-of-zelda-links-awakening",
|
||||
"releases": [
|
||||
{"id": "01006BB00C6F0000"}
|
||||
],
|
||||
"title": "The Legend of Zelda: Link's Awakening"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "fire-emblem-three-houses",
|
||||
"releases": [
|
||||
{"id": "010055D009F78000"}
|
||||
],
|
||||
"title": "Fire Emblem: Three Houses"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "metroid-dread",
|
||||
"releases": [
|
||||
{"id": "010093801237C000"}
|
||||
],
|
||||
"title": "Metroid Dread"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "paper-mario-the-origami-king",
|
||||
"releases": [
|
||||
{"id": "0100A3900C3E2000"}
|
||||
],
|
||||
"title": "Paper Mario: The Origami King"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "xenoblade-chronicles-definitive-edition",
|
||||
"releases": [
|
||||
{"id": "0100FF500E34A000"}
|
||||
],
|
||||
"title": "Xenoblade Chronicles: Definitive Edition"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "xenoblade-chronicles-3",
|
||||
"releases": [
|
||||
{"id": "010074F013262000"}
|
||||
],
|
||||
"title": "Xenoblade Chronicles 3"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "pikmin-3-deluxe",
|
||||
"releases": [
|
||||
{"id": "0100F8600D4B0000"}
|
||||
],
|
||||
"title": "Pikmin 3 Deluxe"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "donkey-kong-country-tropical-freeze",
|
||||
"releases": [
|
||||
{"id": "0100C1F0054B6000"}
|
||||
],
|
||||
"title": "Donkey Kong Country: Tropical Freeze"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "kirby-and-the-forgotten-land",
|
||||
"releases": [
|
||||
{"id": "01004D300C5AE000"}
|
||||
],
|
||||
"title": "Kirby and the Forgotten Land"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "mario-party-superstars",
|
||||
"releases": [
|
||||
{"id": "01006B400D8B2000"}
|
||||
],
|
||||
"title": "Mario Party Superstars"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "clubhouse-games-51-worldwide-classics",
|
||||
"releases": [
|
||||
{"id": "0100F8600D4B0000"}
|
||||
],
|
||||
"title": "Clubhouse Games: 51 Worldwide Classics"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "ring-fit-adventure",
|
||||
"releases": [
|
||||
{"id": "01006B300BAF8000"}
|
||||
],
|
||||
"title": "Ring Fit Adventure"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "arms",
|
||||
"releases": [
|
||||
{"id": "01009B500007C000"}
|
||||
],
|
||||
"title": "ARMS"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "super-mario-maker-2",
|
||||
"releases": [
|
||||
{"id": "01009B90006DC000"}
|
||||
],
|
||||
"title": "Super Mario Maker 2"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "pokemon-lets-go-pikachu",
|
||||
"releases": [
|
||||
{"id": "010003F003A34000"}
|
||||
],
|
||||
"title": "Pokémon: Let's Go, Pikachu!"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "pokemon-lets-go-eevee",
|
||||
"releases": [
|
||||
{"id": "0100187003A36000"}
|
||||
],
|
||||
"title": "Pokémon: Let's Go, Eevee!"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "pokemon-sword",
|
||||
"releases": [
|
||||
{"id": "0100ABF008968000"}
|
||||
],
|
||||
"title": "Pokémon Sword"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "pokemon-shield",
|
||||
"releases": [
|
||||
{"id": "01008DB008C2C000"}
|
||||
],
|
||||
"title": "Pokémon Shield"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "new-pokemon-snap",
|
||||
"releases": [
|
||||
{"id": "0100F4300C182000"}
|
||||
],
|
||||
"title": "New Pokémon Snap"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "mario-golf-super-rush",
|
||||
"releases": [
|
||||
{"id": "0100C9C00E25C000"}
|
||||
],
|
||||
"title": "Mario Golf: Super Rush"
|
||||
},
|
||||
{
|
||||
"compatibility": 1,
|
||||
"directory": "mario-tennis-aces",
|
||||
"releases": [
|
||||
{"id": "0100BDE00862A000"}
|
||||
],
|
||||
"title": "Mario Tennis Aces"
|
||||
},
|
||||
{
|
||||
"compatibility": 2,
|
||||
"directory": "wario-ware-get-it-together",
|
||||
"releases": [
|
||||
{"id": "0100563010F22000"}
|
||||
],
|
||||
"title": "WarioWare: Get It Together!"
|
||||
},
|
||||
{
|
||||
"compatibility": 0,
|
||||
"directory": "big-brain-academy-brain-vs-brain",
|
||||
"releases": [
|
||||
{"id": "0100190010F24000"}
|
||||
],
|
||||
"title": "Big Brain Academy: Brain vs. Brain"
|
||||
}
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="compatibility_list">
|
||||
<file>compatibility_list.json</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Vendored
+603
-755
File diff suppressed because it is too large
Load Diff
Vendored
+592
-749
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+581
-741
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+583
-743
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+579
-736
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+580
-739
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+625
-777
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+580
-739
File diff suppressed because it is too large
Load Diff
Vendored
+580
-740
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+580
-740
File diff suppressed because it is too large
Load Diff
Vendored
+580
-739
File diff suppressed because it is too large
Load Diff
Vendored
+580
-737
File diff suppressed because it is too large
Load Diff
Vendored
+580
-738
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
Vendored
+581
-741
File diff suppressed because it is too large
Load Diff
Vendored
+578
-735
File diff suppressed because it is too large
Load Diff
@@ -27,3 +27,6 @@ There are two main applications, an SDL-based app (`eden-cli`) and a Qt based ap
|
||||
- `--user/-u`: Specify the user index.
|
||||
- `--version/-v`: Display version and quit.
|
||||
- `--input-profile/-i`: Specifies input profile name to use (for player #0 only).
|
||||
- `--null-render/-n`: Forces the usage of the "Null" render backend irrespective of settings.
|
||||
- `--filter/-x`: Sets the debug log filter irrespective of settings.
|
||||
- `--singlecore/-s`: Forces single-core regardless of settings.
|
||||
|
||||
-1
@@ -16,7 +16,6 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
||||
RENDERER_USE_SPEED_LIMIT("use_speed_limit"),
|
||||
USE_CUSTOM_CPU_TICKS("use_custom_cpu_ticks"),
|
||||
SKIP_CPU_INNER_INVALIDATION("skip_cpu_inner_invalidation"),
|
||||
ANTIFLICKER("antiflicker"),
|
||||
FIX_BLOOM_EFFECTS("fix_bloom_effects"),
|
||||
EMULATE_BGR565("emulate_bgr565"),
|
||||
RESCALE_HACK("rescale_hack"),
|
||||
|
||||
@@ -27,6 +27,7 @@ enum class IntSetting(override val key: String) : AbstractIntSetting {
|
||||
|
||||
RENDERER_DYNA_STATE("dyna_state"),
|
||||
DMA_ACCURACY("dma_accuracy"),
|
||||
GPU_FENCE_BEHAVIOR("gpu_fence_behavior"),
|
||||
FRAME_PACING_MODE("frame_pacing_mode"),
|
||||
AUDIO_OUTPUT_ENGINE("output_engine"),
|
||||
MAX_ANISOTROPY("max_anisotropy"),
|
||||
|
||||
+9
-7
@@ -669,6 +669,15 @@ abstract class SettingsItem(
|
||||
valuesId = R.array.dmaAccuracyValues
|
||||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.GPU_FENCE_BEHAVIOR,
|
||||
titleId = R.string.gpu_fence_behavior,
|
||||
descriptionId = R.string.gpu_fence_behavior_description,
|
||||
choicesId = R.array.gpuFenceBehaviorNames,
|
||||
valuesId = R.array.gpuFenceBehaviorValues
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_ASYNCHRONOUS_SHADERS,
|
||||
@@ -757,13 +766,6 @@ abstract class SettingsItem(
|
||||
descriptionId = R.string.skip_cpu_inner_invalidation_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.ANTIFLICKER,
|
||||
titleId = R.string.antiflicker,
|
||||
descriptionId = R.string.antiflicker_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.FIX_BLOOM_EFFECTS,
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
@@ -169,7 +169,7 @@ class InputDialogFragment : DialogFragment() {
|
||||
NativeInput.onGamePadButtonEvent(
|
||||
controllerData.getGUID(),
|
||||
controllerData.getPort(),
|
||||
event.keyCode,
|
||||
InputHandler.getButtonIdFromEvent(event),
|
||||
action
|
||||
)
|
||||
onInputReceived(event.device)
|
||||
|
||||
+1
-1
@@ -283,6 +283,7 @@ class SettingsFragmentPresenter(
|
||||
|
||||
add(IntSetting.RENDERER_ACCURACY.key)
|
||||
add(IntSetting.DMA_ACCURACY.key)
|
||||
add(IntSetting.GPU_FENCE_BEHAVIOR.key)
|
||||
add(IntSetting.MAX_ANISOTROPY.key)
|
||||
add(IntSetting.RENDERER_VRAM_USAGE_MODE.key)
|
||||
add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key)
|
||||
@@ -299,7 +300,6 @@ class SettingsFragmentPresenter(
|
||||
|
||||
add(IntSetting.FAST_GPU_TIME.key)
|
||||
add(BooleanSetting.SKIP_CPU_INNER_INVALIDATION.key)
|
||||
add(BooleanSetting.ANTIFLICKER.key)
|
||||
add(BooleanSetting.FIX_BLOOM_EFFECTS.key)
|
||||
add(BooleanSetting.EMULATE_BGR565.key)
|
||||
add(BooleanSetting.RESCALE_HACK.key)
|
||||
|
||||
@@ -49,6 +49,12 @@ object InputHandler {
|
||||
MotionEvent.AXIS_RTRIGGER
|
||||
)
|
||||
|
||||
// Currently, Android doesn't support Joy-Con D-pad buttons. We fall back to the scan code
|
||||
private const val LINUX_BUTTON_DPAD_UP = 0x220
|
||||
private const val LINUX_BUTTON_DPAD_DOWN = 0x221
|
||||
private const val LINUX_BUTTON_DPAD_LEFT = 0x222
|
||||
private const val LINUX_BUTTON_DPAD_RIGHT = 0x223
|
||||
|
||||
fun isPhysicalGameController(device: InputDevice?): Boolean {
|
||||
device ?: return false
|
||||
|
||||
@@ -87,12 +93,25 @@ object InputHandler {
|
||||
NativeInput.onGamePadButtonEvent(
|
||||
controllerData.getGUID(),
|
||||
controllerData.getPort(),
|
||||
event.keyCode,
|
||||
getButtonIdFromEvent(event),
|
||||
action
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
fun getButtonIdFromEvent(event: KeyEvent): Int {
|
||||
if (event.keyCode == 0) {
|
||||
return when (event.scanCode) {
|
||||
LINUX_BUTTON_DPAD_UP -> KeyEvent.KEYCODE_DPAD_UP
|
||||
LINUX_BUTTON_DPAD_DOWN -> KeyEvent.KEYCODE_DPAD_DOWN
|
||||
LINUX_BUTTON_DPAD_LEFT -> KeyEvent.KEYCODE_DPAD_LEFT
|
||||
LINUX_BUTTON_DPAD_RIGHT -> KeyEvent.KEYCODE_DPAD_RIGHT
|
||||
else -> return 0
|
||||
}
|
||||
}
|
||||
return event.keyCode
|
||||
}
|
||||
|
||||
fun dispatchGenericMotionEvent(event: MotionEvent): Boolean {
|
||||
val controllerData =
|
||||
androidControllers[event.device.controllerNumber] ?: return false
|
||||
|
||||
@@ -473,9 +473,11 @@
|
||||
<string name="advanced">متقدم</string>
|
||||
|
||||
<string name="renderer_accuracy">وضع وحدة معالجة الرسومات</string>
|
||||
<string name="renderer_accuracy_description">يتحكم في وضع محاكاة وحدة معالجة الرسومات. تعمل معظم الألعاب بشكل جيد مع وضعي سريع أو متوازن، لكن الوضع الدقيق لا يزال مطلوبًا لبعض الألعاب. تميل الجسيمات إلى العرض بشكل صحيح فقط عند استخدام الوضع الدقيق.</string>
|
||||
<string name="renderer_accuracy_description">يتحكم هذا الخيار في وضع محاكاة وحدة معالجة الرسومات. تعمل معظم الألعاب بشكل جيد مع الوضع السريع، لكن الوضع الدقيق لا يزال ضروريًا لبعضها. تميل الجسيمات إلى الظهور بشكل صحيح فقط مع الوضع الدقيق.</string>
|
||||
<string name="dma_accuracy">دقة DMA</string>
|
||||
<string name="dma_accuracy_description">يتحكم في دقة DMA. يمكن أن تؤدي الدقة الآمنة إلى حل المشكلات في بعض الألعاب، ولكنها قد تؤثر أيضًا على الأداء في بعض الحالات. إذا لم تكن متأكدًا، فاترك هذا الخيار على الإعداد الافتراضي.</string>
|
||||
<string name="gpu_fence_behavior">سلوك حاجز وحدة معالجة الرسومات</string>
|
||||
<string name="gpu_fence_behavior_description">يتحكم في سلوك تزامن حاجز وحدة معالجة الرسوميات. الخيار الفوري هو الأسرع، لكنه قد يسبب بعض المشاكل. الخيار المتوازن يقدم توافقًا أفضل وقد يصلح مشاكل في بعض الألعاب. الخيار الدقيق يحسن التوافق أكثر لكنه قد يقلل الأداء قليلاً. الخيار الصارم هو الأبطأ، لكنه قد يصلح المشاكل التي تتطلب تزامنًا أكثر صرامة. الإعداد الافتراضي يتبع إعداد دقة وحدة معالجة الرسوميات.</string>
|
||||
<string name="anisotropic_filtering">تصفية متباينة الخواص</string>
|
||||
<string name="anisotropic_filtering_description">يحسن جودة الأنسجة عند عرضها بزوايا مائلة</string>
|
||||
<string name="vram_usage_mode">وضع استخدام ذاكرة VRAM</string>
|
||||
@@ -497,6 +499,8 @@
|
||||
<string name="renderer_reactive_flushing_description">يحسن دقة العرض في بعض الألعاب على حساب الأداء.</string>
|
||||
<string name="enable_buffer_history">تمكين سجل التخزين المؤقت</string>
|
||||
<string name="enable_buffer_history_description">يُتيح هذا الخيار الوصول إلى حالات التخزين المؤقت السابقة. وقد يُحسّن جودة العرض وثبات الأداء في بعض الألعاب.</string>
|
||||
<string name="enable_gpu_buffer_readback">تفعيل قراءة مخزن وحدة معالجة الرسومات</string>
|
||||
<string name="enable_gpu_buffer_readback_description">يحافظ هذا النظام على بيانات المخزن المؤقت المُعدّلة بواسطة وحدة معالجة الرسومات عن طريق قراءتها مرة أخرى قبل التحميل. تتطلب بعض الألعاب ذلك لعرض بعض التأثيرات بشكل صحيح. قد يُسبب ذلك مشاكل إذا لم يتمكن الجهاز من التعامل مع عبء العمل الإضافي.</string>
|
||||
<string name="use_optimized_vertex_buffers">مخازن الرؤوس المُحسّنة</string>
|
||||
<string name="use_optimized_vertex_buffers_description">يُتيح ربطًا مُحسَّنًا لمخازن الرؤوس لتحسين الأداء. يتطلب برامج تشغيل Mesa 26.0+ Turnip/ برامج تشغيل QCOM. قد يتعطل على برامج تشغيل Turnip القديمة (25.3 وما دون).</string>
|
||||
|
||||
@@ -506,8 +510,6 @@
|
||||
<string name="fast_gpu_time_description">يُجبر هذا الخيار معظم الألعاب على العمل بأعلى دقة عرض أصلية. استخدم 256 للحصول على أقصى أداء و512 للحصول على أعلى جودة رسومات.</string>
|
||||
<string name="skip_cpu_inner_invalidation">تخطي إبطال صلاحية وحدة المعالجة المركزية الداخلية</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">يتخطى بعض عمليات إبطال ذاكرة التخزين المؤقتة من جانب وحدة المعالجة المركزية أثناء تحديثات الذاكرة، مما يقلل من استخدام وحدة المعالجة المركزية ويحسن أداءها. قد يتسبب ذلك في حدوث أعطال أو تعطل في بعض الألعاب.</string>
|
||||
<string name="antiflicker">مضاد الوميض</string>
|
||||
<string name="antiflicker_description">يُجبر هذا الوضع وظائف وحدة معالجة الرسومات على الانتظار حتى يتم إرسال العمل إليها. استخدمه مع وضع وحدة معالجة الرسومات السريع لتجنب الوميض مع تأثير أقل على الأداء.</string>
|
||||
<string name="fix_bloom_effects">إصلاح تأثيرات التوهج</string>
|
||||
<string name="fix_bloom_effects_description">يقلل من ضبابية التوهج في LA/EOW (Adreno A6XX - A7XX/ Turnip)، ويزيل التوهج في Burnout. تحذير: قد يسبب تشوهات رسومية في ألعاب أخرى.</string>
|
||||
<string name="emulate_bgr565">محاكاة BGR565</string>
|
||||
@@ -573,6 +575,12 @@
|
||||
<string name="gpu_log_level_description">مستوى التفاصيل لسجلات وحدة معالجة الرسومات (كلما زاد المستوى، زادت التفاصيل وزادت التكاليف الإضافية)</string>
|
||||
<string name="gpu_log_vulkan_calls">تسجيل استدعاءات واجهة برمجة تطبيقات Vulkan</string>
|
||||
<string name="gpu_log_vulkan_calls_description">تتبع جميع استدعاءات واجهة برمجة تطبيقات Vulkan في المخزن المؤقت الحلقي</string>
|
||||
<string name="gpu_log_shader_dumps">تفريغ مظللات SPIR-V</string>
|
||||
<string name="gpu_log_shader_dumps_description">احفظ ملفات SPIR-V الثنائية المُعاد تجميعها (.spv) في مجلد التفريغ. افحصها باستخدام spirv-dis/spirv-cross/spirv-val.</string>
|
||||
<string name="dump_guest_shaders">تظليلات ضيف التفريغ (ماكسويل)</string>
|
||||
<string name="dump_guest_shaders_description">احفظ ملفات بايت كود برنامج التظليل الضيف الخاص بـ «ماكسويل» (*.ash) في مجلد «dump». افحصها باستخدام nvdisasm.</string>
|
||||
<string name="dump_macros">تفريغ ماكرو ماكسويل</string>
|
||||
<string name="dump_macros_description">احفظ ملفات برامج ماكرو ماكسويل (*.macro) في مجلد «dump». افحصها باستخدام برنامج «envydis».</string>
|
||||
<string name="gpu_log_memory_tracking">تتبع ذاكرة وحدة معالجة الرسومات</string>
|
||||
<string name="gpu_log_memory_tracking_description">مراقبة تخصيصات ذاكرة وحدة معالجة الرسومات وإلغاء تخصيصها</string>
|
||||
<string name="gpu_log_driver_debug">معلومات تصحيح أخطاء برنامج التشغيل</string>
|
||||
@@ -992,7 +1000,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">سريع</string>
|
||||
<string name="renderer_accuracy_medium">متوازن</string>
|
||||
<string name="renderer_accuracy_high">دقيق</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
@@ -1000,6 +1007,13 @@
|
||||
<string name="dma_accuracy_unsafe">غير آمن</string>
|
||||
<string name="dma_accuracy_safe">آمن</string>
|
||||
|
||||
<!-- GPU Fence Behavior -->
|
||||
<string name="gpu_fence_behavior_default">افتراضي</string>
|
||||
<string name="gpu_fence_behavior_immediate">فوري</string>
|
||||
<string name="gpu_fence_behavior_balanced">متوازن</string>
|
||||
<string name="gpu_fence_behavior_accurate">دقيق</string>
|
||||
<string name="gpu_fence_behavior_strict">صارم</string>
|
||||
|
||||
<string name="vram_usage_conservative">محافظ</string>
|
||||
<string name="vram_usage_aggressive">عدواني</string>
|
||||
|
||||
|
||||
@@ -445,7 +445,6 @@
|
||||
<string name="advanced">Pokročilé</string>
|
||||
|
||||
<string name="renderer_accuracy">Režim GPU</string>
|
||||
<string name="renderer_accuracy_description">Určuje režim emulovaného GPU. Většina her běží bez problémů v rychlém, nebo vyváženém režimu, ale některé stále vyžadují přesný režim. Částicové efekty se většinou zobrazují korektně pouze v přesném režimu. </string>
|
||||
<string name="dma_accuracy">Přesnost DMA</string>
|
||||
<string name="dma_accuracy_description">Ovládá přesnost DMA. Bezpečná přesnost může vyřešit problémy v některých hrách, ale v některých případech může také ovlivnit výkon. Pokud si nejste jisti, použijte výchozí nastavení.</string>
|
||||
<string name="anisotropic_filtering">Anizotropní filtrování</string>
|
||||
@@ -707,7 +706,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Rychlý</string>
|
||||
<string name="renderer_accuracy_medium">Vyvážený</string>
|
||||
<string name="renderer_accuracy_high">Přesný</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
|
||||
@@ -457,7 +457,6 @@ Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die
|
||||
<string name="advanced">Erweitert</string>
|
||||
|
||||
<string name="renderer_accuracy">GPU-Modus</string>
|
||||
<string name="renderer_accuracy_description">Steuert den GPU-Emulationsmodus. Die meisten Spiele werden im Modus \"Fast\" oder \"Balanced\" gut gerendert, für einige ist jedoch weiterhin der Modus \"Accurate\" erforderlich. Partikel werden in der Regel nur im Modus \"Accurate\" korrekt gerendert.</string>
|
||||
<string name="dma_accuracy">DMA-Genauigkeit</string>
|
||||
<string name="dma_accuracy_description">Steuert die DMA-Präzisionsgenauigkeit. Sichere Präzision kann Probleme in einigen Spielen beheben, kann aber in einigen Fällen auch die Leistung beeinträchtigen. Im Zweifel lassen Sie dies auf Standard stehen.</string>
|
||||
<string name="anisotropic_filtering">Anisotrope Filterung</string>
|
||||
@@ -927,7 +926,6 @@ Wirklich fortfahren?</string>
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Schnell</string>
|
||||
<string name="renderer_accuracy_medium">Ausgeglichen</string>
|
||||
<string name="renderer_accuracy_high">Genau</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
|
||||
@@ -467,9 +467,9 @@
|
||||
<string name="advanced">Avanzado</string>
|
||||
|
||||
<string name="renderer_accuracy">Modo de la GPU</string>
|
||||
<string name="renderer_accuracy_description">Controla el modo de la emulación de la GPU. La mayoría de los juegos se renderizan correctamente en los modos Rápido o Equilibrado, pero algunos requieren Preciso. Las partículas tienden a renderizarse correctamente solo con el modo Preciso.</string>
|
||||
<string name="dma_accuracy">Precisión de DMA</string>
|
||||
<string name="dma_accuracy_description">Controla la precisión de DMA. La precisión segura puede solucionar problemas en algunos juegos, pero también puede afectar al rendimiento en algunos casos. Si no está seguro, déjelo en Predeterminado.</string>
|
||||
<string name="gpu_fence_behavior">Comportamiento de vallado de la GPU</string>
|
||||
<string name="anisotropic_filtering">Filtrado anisotrópico</string>
|
||||
<string name="anisotropic_filtering_description">Mejora la calidad de las texturas al ser observadas desde ángulos oblicuos</string>
|
||||
<string name="vram_usage_mode">Modo de uso de VRAM</string>
|
||||
@@ -502,8 +502,6 @@
|
||||
<string name="fast_gpu_time_description">Fuerza a la mayoría de los juegos a ejecutarse a su resolución nativa más alta. Usa 256 para un máximo rendimiento y 512 para una fidelidad gráfica óptima.</string>
|
||||
<string name="skip_cpu_inner_invalidation">Omitir invalidación interna de la CPU</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">Omite ciertas invalidaciones de caché de la CPU durante las actualizaciones de memoria, lo que reduce el uso de la CPU y mejora su rendimiento. Esto puede causar fallos o bloqueos en algunos juegos.</string>
|
||||
<string name="antiflicker">Antiparpadeo</string>
|
||||
<string name="antiflicker_description">Fuerza a las funciones de devolución de llamada de la GPU a esperar a que se envíen las tareas a la GPU.\nÚsalo con el modo de GPU rápida para evitar el parpadeo con un menor impacto en el rendimiento.</string>
|
||||
<string name="fix_bloom_effects">Arreglar los efectos de resplandor</string>
|
||||
<string name="fix_bloom_effects_description">Reduce el efecto de resplandor en LA/EOW (Adreno A6XX - A7XX/ Turnip), elimina el resplandor en Burnout. Advertencia: puede causar artefactos gráficos en otros juegos.</string>
|
||||
<string name="emulate_bgr565">Emular BGR565</string>
|
||||
@@ -994,7 +992,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Rápido</string>
|
||||
<string name="renderer_accuracy_medium">Equilibrado</string>
|
||||
<string name="renderer_accuracy_high">Preciso</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
@@ -1002,6 +999,13 @@
|
||||
<string name="dma_accuracy_unsafe">Inseguro</string>
|
||||
<string name="dma_accuracy_safe">Seguro</string>
|
||||
|
||||
<!-- GPU Fence Behavior -->
|
||||
<string name="gpu_fence_behavior_default">Predeterminado</string>
|
||||
<string name="gpu_fence_behavior_immediate">Inmediato</string>
|
||||
<string name="gpu_fence_behavior_balanced">Equilibrado</string>
|
||||
<string name="gpu_fence_behavior_accurate">Preciso</string>
|
||||
<string name="gpu_fence_behavior_strict">Estricto</string>
|
||||
|
||||
<string name="vram_usage_conservative">Conservador</string>
|
||||
<string name="vram_usage_aggressive">Agresivo</string>
|
||||
|
||||
|
||||
@@ -939,7 +939,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Rapide</string>
|
||||
<string name="renderer_accuracy_medium">Moyen</string>
|
||||
<string name="renderer_accuracy_high">Précis</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
|
||||
@@ -445,7 +445,6 @@
|
||||
<string name="advanced">Zaawansowane</string>
|
||||
|
||||
<string name="renderer_accuracy">Tryb GPU</string>
|
||||
<string name="renderer_accuracy_description">Steruje trybem emulacji GPU. Większość gier renderuje się poprawnie w trybach Szybki lub Zrównoważony, ale dla niektórych nadal wymagany jest tryb Dokładny. Efekty cząsteczkowe zwykle renderują się poprawnie tylko w trybie Dokładnym.</string>
|
||||
<string name="dma_accuracy">Dokładność DMA</string>
|
||||
<string name="dma_accuracy_description">Kontroluje dokładność precyzji DMA. Bezpieczna precyzja może naprawić problemy w niektórych grach, ale w niektórych przypadkach może również wpłynąć na wydajność. Jeśli nie jesteś pewien, pozostaw wartość Domyślną.</string>
|
||||
<string name="anisotropic_filtering">Filtrowanie anizotropowe</string>
|
||||
@@ -893,7 +892,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Szybkie</string>
|
||||
<string name="renderer_accuracy_medium">Zrównoważony</string>
|
||||
<string name="renderer_accuracy_high">Dokładny</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
|
||||
@@ -840,7 +840,6 @@
|
||||
|
||||
<string name="renderer_none">Nenhum</string>
|
||||
|
||||
<string name="renderer_accuracy_medium">Média</string>
|
||||
<string name="renderer_accuracy_high">Alta</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
|
||||
@@ -424,6 +424,9 @@
|
||||
<string name="cpu_accuracy">Точность ЦП</string>
|
||||
<string name="value_with_units">%1$s%2$s</string>
|
||||
|
||||
<string name="program_args">Аргументы Homebrew</string>
|
||||
<string name="program_args_description">Аргументы командной строки, переданные Homebrew при запуске (например, -noglsl)</string>
|
||||
|
||||
<!-- System settings strings -->
|
||||
<string name="device_name">Название устройства</string>
|
||||
<string name="use_docked_mode">Режим док-станции</string>
|
||||
@@ -466,9 +469,11 @@
|
||||
<string name="advanced">Расширенные</string>
|
||||
|
||||
<string name="renderer_accuracy">Режим ГПУ</string>
|
||||
<string name="renderer_accuracy_description">Управляет режимом эмуляции графического процессора. Большинство игр нормально отображаются в режимах «Быстрый» или «Сбалансированный», но для некоторых требуется режим «Точный». Частицы обычно корректно отображаются только в режиме «Точный».</string>
|
||||
<string name="renderer_accuracy_description">Управляет режимом эмуляции ГПУ. Большинство игр нормально отображаются в режиме Быстрый, но для некоторых требуется режим Точный. Частицы обычно корректно отображаются только в режиме Точный.</string>
|
||||
<string name="dma_accuracy">Точность DMA</string>
|
||||
<string name="dma_accuracy_description">Управляет точностью DMA. Безопасная точность может исправить проблемы в некоторых играх, но в некоторых случаях также может повлиять на производительность. Если не уверены, оставьте значение По умолчанию.</string>
|
||||
<string name="gpu_fence_behavior">Поведение барьеров ГПУ</string>
|
||||
<string name="gpu_fence_behavior_description">Управляет поведением синхронизации через барьеры ГПУ. Мгновенный — самый быстрый вариант, но может вызывать некоторые проблемы. Сбалансированный обеспечивает лучшую совместимость и может исправлять проблемы в некоторых играх. Точный ещё больше повышает совместимость ценой некоторого снижения производительности. Строгий — самый медленный вариант, но может исправлять проблемы, требующие более строгой синхронизации. По умолчанию соответствует настройке точности ГПУ.</string>
|
||||
<string name="anisotropic_filtering">Анизотропная фильтрация</string>
|
||||
<string name="anisotropic_filtering_description">Улучшает качество текстур под углом</string>
|
||||
<string name="vram_usage_mode">Режим VRAM</string>
|
||||
@@ -490,6 +495,8 @@
|
||||
<string name="renderer_reactive_flushing_description">Повышение точности рендеринга в некоторых играх за счет снижения производительности.</string>
|
||||
<string name="enable_buffer_history">Включить историю буфера</string>
|
||||
<string name="enable_buffer_history_description">Позволяет обращаться к предыдущим состояниям буфера. Эта опция может повысить качество рендеринга и стабильность производительности в некоторых играх.</string>
|
||||
<string name="enable_gpu_buffer_readback">Включить обратное чтение буфера ГПУ</string>
|
||||
<string name="enable_gpu_buffer_readback_description">Сохраняет измененные ГПУ данные буфера путем чтения их обратно перед выгрузками. Некоторые игры требуют этого, чтобы рендерить определенные эффекты правильно. Может вызывать проблемы если оборудование не может обработать дополнительную рабочую нагрузку.</string>
|
||||
<string name="use_optimized_vertex_buffers">Оптимизированные вершинные буферы</string>
|
||||
<string name="use_optimized_vertex_buffers_description">Включает оптимизированную привязку вершинного буфера для повышения производительности. Требует Mesa Turnip 26.0+ / QCOM. Приводит к вылету на старых версиях драйверов Turnip (25.3 и ниже).</string>
|
||||
|
||||
@@ -499,8 +506,6 @@
|
||||
<string name="fast_gpu_time_description">Принудительно запускает большинство игр в их максимальном нативном разрешении. Используйте значение 256 для максимальной производительности и 512 для максимального качества графики.</string>
|
||||
<string name="skip_cpu_inner_invalidation">Пропустить внутреннюю инвалидацию ЦП</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">Пропускает некоторые инвалидации кэша на стороне ЦП при обновлениях памяти, уменьшая нагрузку на процессор и повышая производительность. Может вызывать сбои в некоторых играх.</string>
|
||||
<string name="antiflicker">Анти-мерцание</string>
|
||||
<string name="antiflicker_description">Принудительно заставляет обратные вызовы ГПУ-фильтра ожидать выполнения отправленных задач на ГПУ. Используйте с Быстрым режимом ГПУ, что бы избежать мерцаний с меньшим влиянием на производительность.</string>
|
||||
<string name="fix_bloom_effects">Исправить эффекты размытия</string>
|
||||
<string name="fix_bloom_effects_description">Частично убирает размытие в LA/EOW (Adreno A6XX - A7XX/ Turnip), полностью отключает его в Burnout. Внимание: может вызывать графические артефакты в других играх.</string>
|
||||
<string name="emulate_bgr565">Эмулировать BGR565</string>
|
||||
@@ -566,6 +571,12 @@
|
||||
<string name="gpu_log_level_description">Уровень детализации логов ГПУ (больше значение = больше деталей, выше нагрузка)</string>
|
||||
<string name="gpu_log_vulkan_calls">Записывать вызовы Vulkan API</string>
|
||||
<string name="gpu_log_vulkan_calls_description">Отслеживать все вызовы Vulkan API в кольцевом буфере</string>
|
||||
<string name="gpu_log_shader_dumps">Выгрузить SPIR-V шейдеры</string>
|
||||
<string name="gpu_log_shader_dumps_description">Сохранять перекомпилированные SPIR-V бинарные файлы (.spv) в папку дампа. Проверять с помощью spirv-dis/spirv-cross/spirv-val.</string>
|
||||
<string name="dump_guest_shaders">Выгрузить гостевые (Maxwell) шейдеры</string>
|
||||
<string name="dump_guest_shaders_description">Сохранять файлы байткода гостевых шейдеров Maxwell (*.ash) в папку дампа. Проверять с помощью nvdisasm.</string>
|
||||
<string name="dump_macros">Выгрузить макросы Maxwell</string>
|
||||
<string name="dump_macros_description">Сохранять файлы макропрограмм Maxwell (*.macro) в папку дампа. Проверять с помощью envydis.</string>
|
||||
<string name="gpu_log_memory_tracking">Отслеживать память ГПУ</string>
|
||||
<string name="gpu_log_memory_tracking_description">Мониторить выделение и освобождение памяти ГПУ</string>
|
||||
<string name="gpu_log_driver_debug">Отладочная информация драйвера</string>
|
||||
@@ -985,7 +996,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Быстрый</string>
|
||||
<string name="renderer_accuracy_medium">Сбалансированный</string>
|
||||
<string name="renderer_accuracy_high">Точный</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
@@ -993,6 +1003,13 @@
|
||||
<string name="dma_accuracy_unsafe">Небезопасно</string>
|
||||
<string name="dma_accuracy_safe">Безопасный</string>
|
||||
|
||||
<!-- GPU Fence Behavior -->
|
||||
<string name="gpu_fence_behavior_default">По умолчанию</string>
|
||||
<string name="gpu_fence_behavior_immediate">Мгновенный</string>
|
||||
<string name="gpu_fence_behavior_balanced">Сбалансированный</string>
|
||||
<string name="gpu_fence_behavior_accurate">Точный</string>
|
||||
<string name="gpu_fence_behavior_strict">Строгий</string>
|
||||
|
||||
<string name="vram_usage_conservative">Консервативный</string>
|
||||
<string name="vram_usage_aggressive">Агрессивный</string>
|
||||
|
||||
|
||||
@@ -469,7 +469,6 @@
|
||||
<string name="advanced">Додаткові</string>
|
||||
|
||||
<string name="renderer_accuracy">Режим ГП</string>
|
||||
<string name="renderer_accuracy_description">Керує режимом емуляції ГП. Більшість ігор добре візуалізуються з режимами «Швидко» або «Збалансовано», але деякі ігри можуть потребувати режиму «Точно». Частинки зазвичай правильно візуалізуються лише з режимом «Точно».</string>
|
||||
<string name="dma_accuracy">Точність DMA</string>
|
||||
<string name="dma_accuracy_description">Керує точністю DMA. Безпечна точність може виправити проблеми в деяких іграх, але в деяких випадках також може вплинути на продуктивність. Якщо не впевнені, залиште це значення за замовчуванням.</string>
|
||||
<string name="anisotropic_filtering">Анізотропне фільтрування</string>
|
||||
@@ -502,8 +501,6 @@
|
||||
<string name="fast_gpu_time_description">Примушує більшість ігор працювати на їхній максимальній нативній роздільності. Використовуйте 256 для максимальної продуктивності та 512 для найкращої якості.</string>
|
||||
<string name="skip_cpu_inner_invalidation">Пропустити внутрішнє інвалідування CPU</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">Пропускає деякі інвалідації кешу на стороні CPU під час оновлення пам\'яті, зменшуючи навантаження на процесор і покращуючи продуктивність. Може спричинити збої в деяких іграх.</string>
|
||||
<string name="antiflicker">Антимерехтіння</string>
|
||||
<string name="antiflicker_description">Змушує механізм синхронізації чекати, доки ГП завершить подані завдання. Використовуйте з режимом ГП «Швидко», щоб уникнути мерехтіння з меншими втратами продуктивності.</string>
|
||||
<string name="fix_bloom_effects">Виправити ефекти світіння</string>
|
||||
<string name="fix_bloom_effects_description">Зменшує розмиття світіння в LA/EOW (Adreno A6XX–A7XX / Turnip), прибирає світіння в Burnout. Увага: може спричинити графічні артефакти в інших іграх.</string>
|
||||
<string name="emulate_bgr565">Емулювати BGR565</string>
|
||||
@@ -988,7 +985,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Швидко</string>
|
||||
<string name="renderer_accuracy_medium">Збалансовано</string>
|
||||
<string name="renderer_accuracy_high">Точно</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<string name="show_shaders_building">显示着色器编译信息</string>
|
||||
<string name="show_shaders_building_description">显示当前正在编译的着色器数量</string>
|
||||
<string name="pipeline_worker_cores">管线工作线程</string>
|
||||
<string name="pipeline_worker_cores_description">管理用于构建 Vulkan 管线的核心数量,数值越高则管线编译性能越好,但温度也会随之升高。</string>
|
||||
<string name="pipeline_worker_cores_description">管理用于构建 Vulkan 管线的核心数量,较高的值可提升管线编译性能,但温度也会随之升高。</string>
|
||||
<string name="overlay_position">叠加层位置</string>
|
||||
<string name="overlay_position_description">选择叠加层在屏幕上显示的位置</string>
|
||||
<string name="overlay_position_top_left">左上</string>
|
||||
@@ -185,7 +185,7 @@
|
||||
<string name="multiplayer_preferred_game_name">首选游戏</string>
|
||||
<string name="multiplayer_lobby_type">游戏大厅类型</string>
|
||||
<string name="multiplayer_room_name_error">长度需为3-20个字符</string>
|
||||
<string name="multiplayer_required">必填</string>
|
||||
<string name="multiplayer_required">需要</string>
|
||||
<string name="multiplayer_token_required">需要Web令牌,请前往高级设置 -> 系统 -> 网络</string>
|
||||
<string name="multiplayer_ip_error">IP格式无效</string>
|
||||
<string name="multiplayer_username_error">必须为4至20个字符,且仅包含字母、数字、点号、连字符、下划线和空格</string>
|
||||
@@ -287,7 +287,7 @@
|
||||
<string name="warning_skip">跳过</string>
|
||||
<string name="warning_cancel">取消</string>
|
||||
<string name="install_amiibo_keys">安装 Amiibo 密钥文件</string>
|
||||
<string name="install_amiibo_keys_description">在遊戏中使用 Amiibo 时必需</string>
|
||||
<string name="install_amiibo_keys_description">在遊戏中使用 Amiibo 时需要</string>
|
||||
<string name="gpu_driver_fetcher">GPU驱动获取器</string>
|
||||
<string name="gpu_driver_manager">GPU 驱动管理器</string>
|
||||
<string name="install_gpu_driver_description">安装替代的驱动程序以获得更好的性能和精度</string>
|
||||
@@ -463,11 +463,13 @@
|
||||
<string name="advanced">高级</string>
|
||||
|
||||
<string name="renderer_accuracy">GPU 模式</string>
|
||||
<string name="renderer_accuracy_description">控制 GPU 模拟模式。大多数游戏在“快速”或“平衡”模式下都能正常渲染,但有些游戏仍需使用“精确”模式。粒子效果通常只有在“精确”模式下才能正确渲染。</string>
|
||||
<string name="renderer_accuracy_description">控制 GPU 模拟模式。大多数游戏在“快速”模式下渲染效果良好,但有些游戏仍需使用“精确”模式。而粒子效果通常只有在“精确”模式下才能正确渲染。</string>
|
||||
<string name="dma_accuracy">DMA 精度</string>
|
||||
<string name="dma_accuracy_description">控制 DMA 的精准度。安全精度可以修复存在于某些游戏中的问题,但在某些情况下也会对性能造成影响。如不确定,请保持“默认”。</string>
|
||||
<string name="gpu_fence_behavior">GPU 围栏行为</string>
|
||||
<string name="gpu_fence_behavior_description">控制 GPU 围栏同步行为。“即时”是速度最快的选项,但可能会引入一些问题。“均衡”提供了更好的兼容性,可能修复某些游戏中的问题。“精确”在牺牲部分性能的前提下进一步提升兼容性。“严格”是速度最慢的选项,但可以修复那些要求更严格同步的问题。默认遵循 GPU “精确”设定。</string>
|
||||
<string name="anisotropic_filtering">各向异性过滤</string>
|
||||
<string name="anisotropic_filtering_description">提高斜角的纹理质量</string>
|
||||
<string name="anisotropic_filtering_description">提升斜视角下的纹理质量</string>
|
||||
<string name="vram_usage_mode">显存使用模式</string>
|
||||
<string name="vram_usage_mode_description">控制显存分配与释放策略</string>
|
||||
<string name="accelerate_astc">ASTC解码方式</string>
|
||||
@@ -488,7 +490,7 @@
|
||||
<string name="enable_buffer_history">启用缓冲区历史</string>
|
||||
<string name="enable_buffer_history_description">启用对先前缓冲区状态的访问。此选项可在某些游戏中提升渲染质量并保持性能的一致性。</string>
|
||||
<string name="enable_gpu_buffer_readback">启用 GPU 缓冲区回读</string>
|
||||
<string name="enable_gpu_buffer_readback_description">在上传前回读经由 GPU 修改过的缓冲区数据,以将其保留。一些游戏需要这样做才能正确渲染某些效果。如果硬件无法处理额外的工作负载,则可能会导致问题。</string>
|
||||
<string name="enable_gpu_buffer_readback_description">在上传前回读经由 GPU 修改过的缓冲区数据,以将其保留。一些游戏会用到这项设定以正确渲染某些效果。如果硬件无法处理额外的工作负载,则可能会导致问题。</string>
|
||||
<string name="use_optimized_vertex_buffers">优化顶点缓冲区</string>
|
||||
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 或 QCOM 驱动程序。若使用较旧版本的 Turnip 驱动 (25.3 及以下版本) 则会导致崩溃。</string>
|
||||
|
||||
@@ -498,8 +500,6 @@
|
||||
<string name="fast_gpu_time_description">强制大多数游戏以其最高原生分辨率运行。设置为 256 可获得最佳性能,设置为 512 可获得最佳画面保真度。</string>
|
||||
<string name="skip_cpu_inner_invalidation">跳过CPU内部无效化</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">在更新内存时跳过某些 CPU 端的缓存失效操作,从而降低 CPU 占用率并提升性能。可能会在某些游戏中引发故障点或崩溃。</string>
|
||||
<string name="antiflicker">防闪烁</string>
|
||||
<string name="antiflicker_description">强制 GPU 围栏回调等待已提交的 GPU 任务。配合“快速 GPU 模式”一起使用,以牺牲少量性能为代价来避免画面闪烁现象。</string>
|
||||
<string name="fix_bloom_effects">修复 Bloom 效果</string>
|
||||
<string name="fix_bloom_effects_description">减少《智慧的再现》和《众神的三角力量2》(Adreno A6XX - A7XX/ Turnip)中的 bloom 模糊,并移除《Burnout》中的 bloom 效果。警告:可能会导致在其他游戏中出现图形异常。</string>
|
||||
<string name="emulate_bgr565">模拟 BGR565</string>
|
||||
@@ -513,7 +513,7 @@
|
||||
<string name="gpu_unswizzle_enable">启用 GPU Unswizzle</string>
|
||||
<string name="gpu_unswizzle_disabled">禁用</string>
|
||||
<string name="gpu_unswizzle_texture_size">GPU Unswizzle 最大纹理尺寸</string>
|
||||
<string name="gpu_unswizzle_texture_size_description">设置基于 GPU 的纹理 unswizzling 的最大尺寸(MB)。虽然 GPU 处理中等和大型纹理的速度更快,但对于非常小的纹理,CPU 可能更为高效。通过调节此项设置,以尝试在 GPU 加速与 CPU 开销之间找到平衡。</string>
|
||||
<string name="gpu_unswizzle_texture_size_description">设置基于 GPU 的纹理 unswizzling 的最大尺寸(MB)。虽然 GPU 处理中等和大型纹理的速度更快,但对于非常小的纹理,CPU 可能更为高效。通过调节此项设置,以平衡GPU 加速与 CPU 开销。</string>
|
||||
<string name="gpu_unswizzle_stream_size">GPU Unswizzle 流大小</string>
|
||||
<string name="gpu_unswizzle_stream_size_description">设置用于 unswizzling 大型纹理时的每帧数据限制。较高的数值可以加速纹理的加载过程,但会带来更高的帧延迟。而较低的数值则可以降低 GPU 的开销,但也可能会导致可见的纹理闪现。</string>
|
||||
<string name="gpu_unswizzle_chunk_size">GPU Unswizzle 块大小</string>
|
||||
@@ -990,7 +990,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">快速</string>
|
||||
<string name="renderer_accuracy_medium">平衡</string>
|
||||
<string name="renderer_accuracy_high">精确</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
@@ -998,6 +997,13 @@
|
||||
<string name="dma_accuracy_unsafe">不安全</string>
|
||||
<string name="dma_accuracy_safe">安全</string>
|
||||
|
||||
<!-- GPU Fence Behavior -->
|
||||
<string name="gpu_fence_behavior_default">默认</string>
|
||||
<string name="gpu_fence_behavior_immediate">即时</string>
|
||||
<string name="gpu_fence_behavior_balanced">均衡</string>
|
||||
<string name="gpu_fence_behavior_accurate">精确</string>
|
||||
<string name="gpu_fence_behavior_strict">严格</string>
|
||||
|
||||
<string name="vram_usage_conservative">保守式</string>
|
||||
<string name="vram_usage_aggressive">主动式</string>
|
||||
|
||||
@@ -1021,7 +1027,7 @@
|
||||
<string name="ratio_stretch">拉伸窗口</string>
|
||||
|
||||
<!-- CPU Accuracy -->
|
||||
<string name="cpu_accuracy_accurate">精准</string>
|
||||
<string name="cpu_accuracy_accurate">精确</string>
|
||||
<string name="cpu_accuracy_unsafe">不安全</string>
|
||||
<string name="cpu_accuracy_paranoid">极致</string>
|
||||
<string name="cpu_accuracy_debugging">调试</string>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<string name="app_disclaimer">本軟體可執行Nintendo Switch主機的遊戲,軟體不提供遊戲和金鑰檔案。<br/> <br/>在開始之前,請先安裝您的 <<![CDATA[ <b>prod.keys</b> ]]> 檔案,<br /><br /><![CDATA[<a href=\"https://yuzu-mirror.github.io/help/quickstart\">了解更多</a>]]></string>
|
||||
<string name="notice_notification_channel_name">通知和錯誤</string>
|
||||
<string name="notice_notification_channel_description">發生錯誤時顯示通知。</string>
|
||||
<string name="notice_notification_channel_description">發生錯誤時顯示通知</string>
|
||||
<string name="notification_permission_not_granted">未授予通知權限!</string>
|
||||
<string name="app_notification_channel_description">Eden模擬器通知</string>
|
||||
<string name="app_notification_running">Eden正在執行</string>
|
||||
@@ -16,7 +16,7 @@
|
||||
<string name="value_too_high">範圍最大必須為%1$d</string>
|
||||
<string name="invalid_value">無效的範圍</string>
|
||||
|
||||
<string name="using_per_game_config">使用自定義組態中</string>
|
||||
<string name="using_per_game_config">使用個別設定中</string>
|
||||
|
||||
<!-- Input Overlay -->
|
||||
<string name="show_input_overlay">顯示虛擬按鍵</string>
|
||||
@@ -25,7 +25,7 @@
|
||||
<string name="overlay_snap_to_grid_description">編輯時將虛擬按鍵與網格對齊</string>
|
||||
<string name="overlay_grid_size">網格大小</string>
|
||||
<string name="overlay_grid_size_description">調整網格格線間距</string>
|
||||
<string name="input_overlay_behavior">行為模式</string>
|
||||
<string name="input_overlay_behavior">隱藏</string>
|
||||
<string name="overlay_auto_hide">自動隱藏虛擬按鍵</string>
|
||||
<string name="overlay_auto_hide_description">在未使用虛擬按鍵幾秒後自動隱藏</string>
|
||||
<string name="enable_input_overlay_auto_hide">啟用自動隱藏虛擬按鍵</string>
|
||||
@@ -46,7 +46,7 @@
|
||||
<string name="shaders_suffix">著色器</string>
|
||||
<string name="charging">(充電中)</string>
|
||||
|
||||
<string name="system_info_label">系統:</string>
|
||||
<string name="system_info_label">系統:</string>
|
||||
<string name="show_stats_overlay">顯示效能統計疊加層</string>
|
||||
<string name="stats_overlay_customization">自訂</string>
|
||||
<string name="stats_overlay_items">可見項目</string>
|
||||
@@ -54,18 +54,20 @@
|
||||
<string name="enable_stats_overlay_">啟用效能統計疊加層</string>
|
||||
<string name="stats_overlay_options_description">設定疊加層中顯示的資訊</string>
|
||||
<string name="show_fps">顯示FPS</string>
|
||||
<string name="show_fps_description">顯示當前幀率</string>
|
||||
<string name="show_frametime">顯示幀時間</string>
|
||||
<string name="show_fps_description">顯示當前影格率</string>
|
||||
<string name="show_frametime">顯示影格時間</string>
|
||||
<string name="show_app_ram_usage">顯示應用程式的記憶體用量</string>
|
||||
<string name="show_app_ram_usage_description">顯示模擬器正在使用的記憶體量</string>
|
||||
<string name="show_app_ram_usage_description">顯示模擬器的記憶體用量</string>
|
||||
<string name="show_system_ram_usage">顯示系統記憶體用量</string>
|
||||
<string name="show_system_ram_usage_description">顯示系統使用的記憶體量</string>
|
||||
<string name="show_system_ram_usage_description">顯示系統的記憶體用量</string>
|
||||
<string name="show_bat_temperature">顯示電池溫度</string>
|
||||
<string name="bat_temperature_unit">電池溫度單位</string>
|
||||
<string name="show_power_info">顯示電池資訊</string>
|
||||
<string name="show_power_info_description">顯示當前功耗和電池可續航時間</string>
|
||||
<string name="show_shaders_building">當著色器在編譯時顯示</string>
|
||||
<string name="show_shaders_building_description">顯示正在編譯的著色器數量</string>
|
||||
<string name="pipeline_worker_cores">管線工作執行緒</string>
|
||||
<string name="pipeline_worker_cores_description">設定用於建置 Vulkan 管線的 CPU 核心數量,設定的數值越大效能越好,但溫度也會上升更快</string>
|
||||
<string name="overlay_position">疊加層位置</string>
|
||||
<string name="overlay_position_description">選擇疊加層在畫面上的顯示位置</string>
|
||||
<string name="overlay_position_top_left">左上</string>
|
||||
@@ -78,10 +80,10 @@
|
||||
<string name="perf_overlay_background_description">為疊加層添加背景以提高可讀性</string>
|
||||
|
||||
<!-- Device Overlay settings -->
|
||||
<string name="show_soc_overlay">顯示裝置資訊浮層</string>
|
||||
<string name="enable_soc_overlay">啟用裝置浮層</string>
|
||||
<string name="soc_overlay_options">裝置浮層</string>
|
||||
<string name="soc_overlay_options_description">設定裝置浮層中顯示的資訊</string>
|
||||
<string name="show_soc_overlay">顯示裝置資訊疊加層</string>
|
||||
<string name="enable_soc_overlay">啟用裝置疊加層</string>
|
||||
<string name="soc_overlay_options">裝置疊加層</string>
|
||||
<string name="soc_overlay_options_description">設定裝置疊加層中顯示的資訊</string>
|
||||
|
||||
<string name="show_build_id">顯示Eden的組建版本</string>
|
||||
<string name="show_driver_version">顯示圖形驅動程式的版本</string>
|
||||
@@ -92,10 +94,10 @@
|
||||
|
||||
<!-- Eden\'s Veil -->
|
||||
<string name="buffer_reorder_disable">停用緩衝區重新排序</string>
|
||||
<string name="buffer_reorder_disable_description">勾選時,停用映射記憶體上傳的重新排序功能,允許將上傳與特定繪製關聯。某些情況下可能會降低效能。</string>
|
||||
<string name="buffer_reorder_disable_description">勾選時,停用映射記憶體上傳的重新排序功能,允許將上傳與特定繪製關聯。某些情況下可能會降低效能</string>
|
||||
|
||||
<string name="use_sync_core">同步核心速度</string>
|
||||
<string name="use_sync_core_description">將核心速度與最大速度百分比同步,在不改變遊戲實際速度的情況下提高效能。</string>
|
||||
<string name="use_sync_core_description">將核心速度與最大速度百分比同步,在不改變遊戲實際速度的情況下提高效能</string>
|
||||
<string name="cpuopt_unsafe_host_mmu">啟用主機 MMU 模擬</string>
|
||||
<string name="cpuopt_unsafe_host_mmu_description">此最佳化可加速來賓程式的記憶體存取。啟用後,來賓記憶體讀取/寫入將直接在記憶體中執行並利用主機的 MMU。停用此功能將強制所有記憶體存取使用軟體 MMU 模擬。</string>
|
||||
<string name="debug_knobs">偵錯開關</string>
|
||||
@@ -171,7 +173,7 @@
|
||||
<string name="multiplayer_ban">封鎖使用者</string>
|
||||
<string name="multiplayer_room_browser">公開房間</string>
|
||||
<string name="multiplayer_no_rooms_found">未找到公開房間</string>
|
||||
<string name="multiplayer_password_required">需輸入密碼</string>
|
||||
<string name="multiplayer_password_required">需要輸入密碼</string>
|
||||
<string name="multiplayer_player_count">:%1$d/%2$d</string>
|
||||
<string name="multiplayer_game">遊戲</string>
|
||||
<string name="multiplayer_no_game_info">任意遊戲</string>
|
||||
@@ -190,7 +192,7 @@
|
||||
<string name="multiplayer_nickname_invalid">使用者名稱無效,請在系統→網路中檢查設定</string>
|
||||
<string name="multiplayer_token_error">必須為48個字元,且僅包含小寫字母a-z</string>
|
||||
<string name="multiplayer_port_error">埠號需為1-65535</string>
|
||||
<string name="cancel">取消</string>
|
||||
<string name="cancel">略過</string>
|
||||
<string name="ok">確定</string>
|
||||
<string name="refresh">重新整理</string>
|
||||
<string name="room_list">房間列表</string>
|
||||
@@ -244,21 +246,21 @@
|
||||
<string name="home_search_games">搜尋遊戲</string>
|
||||
<string name="search_settings">搜尋設定</string>
|
||||
<string name="install_prod_keys">安裝 prod.keys</string>
|
||||
<string name="install_prod_keys_description">需要解密零售遊戲</string>
|
||||
<string name="install_prod_keys_description">需要用來解密零售遊戲</string>
|
||||
<string name="install_prod_keys_warning">跳過安裝金鑰?</string>
|
||||
<string name="install_prod_keys_warning_description">模擬零售遊戲需要有效的金鑰,若要繼續,將僅有自製遊戲可以運作。</string>
|
||||
<string name="install_prod_keys_warning_description">模擬零售遊戲需要有效的金鑰,如果不安裝將僅有自製遊戲可以運作</string>
|
||||
<string name="install_prod_keys_warning_help">https://yuzu-mirror.github.io/help/quickstart/#guide-introduction</string>
|
||||
<string name="install_firmware_warning">跳過安裝韌體?</string>
|
||||
<string name="emulator_data">設定模擬器資料</string>
|
||||
<string name="emulator_data_description">模擬器需要金鑰才能正常執行,同時建議安裝韌體以啟動QLaunch小程式</string>
|
||||
<string name="permissions">授予權限</string>
|
||||
<string name="permissions_description">授予權限以使用模擬器的特定功能</string>
|
||||
<string name="install_firmware_warning_description">許多遊戲需要韌體才能正常運作。</string>
|
||||
<string name="install_firmware_warning_description">許多遊戲需要韌體才能正常運作</string>
|
||||
<string name="install_firmware_warning_help">https://yuzu-mirror.github.io/help/quickstart/#guide-introduction</string>
|
||||
<string name="notifications">通知</string>
|
||||
<string name="notifications_description">使用下方的按鈕授予通知權限。</string>
|
||||
<string name="notifications_description">使用下方的按鈕授予通知權限</string>
|
||||
<string name="permission_denied">權限遭拒</string>
|
||||
<string name="permission_denied_description">您曾多次拒絕了權限要求,現在您需要在系統設定中手動授予權限。</string>
|
||||
<string name="permission_denied_description">您多次拒絕了要求的權限,現在您需要在系統設定中手動授予</string>
|
||||
<string name="about">關於</string>
|
||||
<string name="about_description">組建版本、製作群、以及更多</string>
|
||||
<string name="system_information">裝置資訊</string>
|
||||
@@ -285,7 +287,7 @@
|
||||
<string name="warning_skip">跳過</string>
|
||||
<string name="warning_cancel">取消</string>
|
||||
<string name="install_amiibo_keys">安裝 Amiibo 金鑰</string>
|
||||
<string name="install_amiibo_keys_description">需要在遊戲中使用 Amiibo</string>
|
||||
<string name="install_amiibo_keys_description">若要在遊戲中使用 Amiibo 得先安裝</string>
|
||||
<string name="gpu_driver_fetcher">GPU驅動程式下載器</string>
|
||||
<string name="gpu_driver_manager">GPU 驅動程式管理員</string>
|
||||
<string name="install_gpu_driver_description">安裝替代驅動程式以取得潛在的更佳效能或準確度</string>
|
||||
@@ -300,14 +302,14 @@
|
||||
<string name="notification_no_directory_link">無法開啟 Eden 目錄</string>
|
||||
<string name="notification_no_directory_link_description">請使用檔案管理員的側邊面板手動定位到使用者資料夾。</string>
|
||||
<string name="manage_save_data">管理儲存資料</string>
|
||||
<string name="manage_save_data_description">已找到儲存資料,請選取下方的選項。</string>
|
||||
<string name="manage_save_data_description">導入/導出遊戲的儲存資料</string>
|
||||
<string name="import_save_warning">導入儲存資料</string>
|
||||
<string name="import_save_warning_description">這將會以提供的檔案覆寫所有現有的儲存資料,您確定要繼續嗎?</string>
|
||||
<string name="import_save_warning_description">這將會以提供的檔案覆寫現有的該遊戲儲存資料,您確定要繼續嗎?</string>
|
||||
<string name="save_files_importing">正在導入儲存資料…</string>
|
||||
<string name="save_files_exporting">正在導出儲存資料…</string>
|
||||
<string name="save_file_imported_success">已成功導入</string>
|
||||
<string name="save_file_invalid_zip_structure">無效的儲存目錄結構</string>
|
||||
<string name="save_file_invalid_zip_structure_description">首個子資料夾名稱必須為遊戲標題 ID。</string>
|
||||
<string name="save_file_invalid_zip_structure_description">首個子資料夾名稱必須為遊戲 ID</string>
|
||||
<string name="install_firmware">安裝韌體</string>
|
||||
<string name="install_firmware_description">韌體必須為 ZIP 壓縮檔,將會用於部分遊戲的啟動</string>
|
||||
<string name="firmware_installing">正在安裝韌體</string>
|
||||
@@ -317,12 +319,15 @@
|
||||
<string name="share_log">分享偵錯記錄</string>
|
||||
<string name="share_log_description">分享 Eden 的記錄檔以便對相關問題進行偵錯</string>
|
||||
<string name="share_log_missing">找不到日誌檔案</string>
|
||||
<string name="share_gpu_log">分享 GPU 日誌</string>
|
||||
<string name="share_gpu_log_description">分享 Eden 的 GPU 日誌以對圖形問題進行偵錯</string>
|
||||
<string name="share_gpu_log_missing">找不到 GPU 日誌檔案</string>
|
||||
<string name="install_game_content">安裝遊戲內容</string>
|
||||
<string name="install_game_content_description">安裝遊戲更新或 DLC</string>
|
||||
<string name="installing_game_content">正在安裝內容…</string>
|
||||
<string name="install_game_content_failure">安裝檔案至 NAND 時發生錯誤</string>
|
||||
<string name="install_game_content_failure_description">請確保內容有效並且 prod.keys 檔案已安裝。</string>
|
||||
<string name="install_game_content_failure_base">為避免可能的衝突,無法直接安裝遊戲本體。</string>
|
||||
<string name="install_game_content_failure_description">請確保內容有效並且 prod.keys 檔案已安裝</string>
|
||||
<string name="install_game_content_failure_base">為避免產生衝突,無法直接安裝遊戲本體</string>
|
||||
<string name="install_game_content_failed_count">%1$d 安裝錯誤</string>
|
||||
<string name="install_game_content_success">遊戲內容已成功安裝</string>
|
||||
<string name="install_game_content_success_install">%1$d 安裝成功</string>
|
||||
@@ -331,12 +336,12 @@
|
||||
<string name="custom_driver_not_supported">您的裝置不支援自訂驅動程式</string>
|
||||
<string name="custom_driver_not_supported_description">此裝置不支援注入自訂驅動程式。\n請以後再來查看是否已新增支援!</string>
|
||||
<string name="manage_yuzu_data">管理 Eden 資料</string>
|
||||
<string name="manage_yuzu_data_description">安裝韌體、金鑰,導入/導出使用者資料及安裝其他項目!</string>
|
||||
<string name="manage_yuzu_data_description">安裝韌體、金鑰,導入/導出使用者資料及安裝其它項目!</string>
|
||||
<string name="game_folders">遊戲資料夾</string>
|
||||
<string name="deep_scan">深度掃描</string>
|
||||
<string name="add_game_folder">新增遊戲資料夾</string>
|
||||
<string name="folder_already_added">這個資料夾已經新增過了!</string>
|
||||
<string name="game_folder_properties">遊戲資料夾屬性</string>
|
||||
<string name="game_folder_properties">遊戲資料夾設定</string>
|
||||
<plurals name="saves_import_failed">
|
||||
<item quantity="other">%d 個存檔導入失敗</item>
|
||||
</plurals>
|
||||
@@ -347,28 +352,30 @@
|
||||
<string name="verify_installed_content">驗證已安裝內容的完整性</string>
|
||||
<string name="verify_installed_content_description">檢查所有已安裝的內容是否有損壞</string>
|
||||
|
||||
<string name="keys_missing">缺少解密金鑰</string>
|
||||
<string name="keys_missing">缺少 prod.keys</string>
|
||||
<string name="keys_missing_description">無法解密韌體和零售遊戲</string>
|
||||
<string name="keys_missing_help">https://yuzu-mirror.github.io/help/quickstart/#dumping-decryption-keys</string>
|
||||
|
||||
<string name="uninstall_firmware">解除安裝韌體</string>
|
||||
<string name="uninstall_firmware_description">解除安裝韌體將從裝置中刪除它並可能影響遊戲相容性。</string>
|
||||
<string name="uninstall_firmware_description">解除安裝韌體將從裝置中刪除它並可能影響遊戲相容性</string>
|
||||
<string name="firmware_uninstalling">正在解除安裝韌體...</string>
|
||||
<string name="firmware_uninstalled_success">韌體解除安裝成功</string>
|
||||
|
||||
|
||||
<string name="keys_failed">金鑰安裝失敗</string>
|
||||
<string name="keys_install_success">金鑰安裝成功</string>
|
||||
<string name="error_keys_copy_failed">一個或多個金鑰複製失敗。</string>
|
||||
<string name="error_keys_copy_failed">一個或多個金鑰安裝失敗</string>
|
||||
<string name="error_keys_invalid_filename">請確保金鑰檔案具有.keys副檔名後重試。</string>
|
||||
<string name="error_keys_failed_init">金鑰初始化失敗。請檢查您的轉儲工具是否為最新版本並重新轉儲金鑰。</string>
|
||||
|
||||
<!-- Applet launcher strings -->
|
||||
<string name="qlaunch_applet">Qlaunch</string>
|
||||
<string name="qlaunch_description">從系統主畫面啟動應用程式</string>
|
||||
<string name="qlaunch_description">從Switch系統主畫面啟動應用程式(目前僅支援英文)</string>
|
||||
<string name="applets">小程式啟動器</string>
|
||||
<string name="applets_description">使用已安裝的韌體啟動系統小程式</string>
|
||||
<string name="applets_error_firmware">未安裝韌體</string>
|
||||
<string name="applets_error_applet">無法使用小程式</string>
|
||||
<string name="applets_error_description"><![CDATA[請確定您的<a href=\"https://yuzu-mirror.github.io/help/quickstart/#dumping-prodkeys-and-titlekeys\">prod.keys</a>檔案和<a href=\"https://yuzu-mirror.github.io/help/quickstart/#dumping-system-firmware\">韌體</a>已安裝並重試]]></string>
|
||||
<string name="album_applet">相簿</string>
|
||||
<string name="album_applet_description">使用系統相片檢視器查看儲存在使用者螢幕截圖資料夾中的影像</string>
|
||||
<string name="mii_edit_applet">Mii 編輯</string>
|
||||
@@ -377,47 +384,58 @@
|
||||
<string name="cabinet_applet_description">編輯、刪除儲存在 amiibo 上的資料</string>
|
||||
<string name="cabinet_launcher">Cabinet 啟動器</string>
|
||||
<string name="cabinet_nickname_and_owner">暱稱和擁有者設定</string>
|
||||
<string name="cabinet_game_data_eraser">遊戲資料橡皮擦</string>
|
||||
<string name="cabinet_game_data_eraser">刪除遊戲資料</string>
|
||||
<string name="cabinet_restorer">還原程式</string>
|
||||
<string name="cabinet_formatter">格式化程式</string>
|
||||
|
||||
<!-- About screen strings -->
|
||||
<string name="gaia_is_not_real">Gaia不是真的</string>
|
||||
<string name="gaia_is_not_real">Gaia 不存在</string>
|
||||
<string name="copied_to_clipboard">已複製到剪貼簿</string>
|
||||
<string name="about_app_description">一個開放原始碼的 Switch 模擬器</string>
|
||||
<string name="contributors">參與者</string>
|
||||
<string name="contributors_description">這些人讓 Eden Android 版成為可能</string>
|
||||
<string name="licenses_description">這些專案使 Eden Android 版成為可能</string>
|
||||
<string name="build">組建版本</string>
|
||||
<string name="user_data">使用者資料</string>
|
||||
<string name="user_data_description">導入/導出所有應用程式資料。\n\n導入使用者資料時,現有的使用者資料將被取代!\n\n直接從 Citron 導入資料可能會出現問題,建議手動導入所有所需資料。</string>
|
||||
<string name="user_data_description">導入/導出所有應用程式資料。\n\n導入使用者資料時,現有的使用者資料將被取代!\n\n直接從 Citron 導入使用者資料可能會出現問題,建議手動導入所有所需資料。</string>
|
||||
<string name="exporting_user_data">正在導出使用者資料…</string>
|
||||
<string name="importing_user_data">正在導入使用者資料…</string>
|
||||
<string name="invalid_yuzu_backup">無效的 Eden 備份</string>
|
||||
<string name="user_data_export_success">使用者資料導出成功</string>
|
||||
<string name="user_data_import_success">使用者資料導入成功</string>
|
||||
<string name="user_data_export_cancelled">導出已取消</string>
|
||||
<string name="user_data_import_failed_description">請確保使用者資料夾位於 zip 壓縮檔的根目錄,並在 config/config.ini 路徑中包含組態檔案,並再試一次。</string>
|
||||
<string name="user_data_import_failed_description">請確保使用者資料夾位於 zip 壓縮檔的根目錄,並在 config/config.ini 路徑中包含組態檔案,並再試一次</string>
|
||||
<!-- General settings strings -->
|
||||
<string name="frame_limit_enable">限制速度</string>
|
||||
<string name="frame_limit_enable_description">將模擬速度限制在標準速度的指定百分比。</string>
|
||||
<string name="frame_limit_enable">限制模擬速度</string>
|
||||
<string name="frame_limit_enable_description">將模擬速度限制在標準速度的指定百分比</string>
|
||||
<string name="frame_limit_slider">限制速度百分比</string>
|
||||
<string name="frame_limit_slider_description">指定限制模擬速度的百分比。100% 為標準速度,更高或更低的值將會增加或減少速度限制。</string>
|
||||
<string name="frame_limit_slider_description">指定模擬速度的百分比。100% 為標準速度,更高或更低的值將會減少或增加速度限制</string>
|
||||
<string name="turbo_speed_limit">加速模式</string>
|
||||
<string name="turbo_speed_limit_description">當開啟加速模式時,模擬器將以此速度執行</string>
|
||||
<string name="slow_speed_limit">慢速模式</string>
|
||||
<string name="slow_speed_limit_description">當慢速模式開啟時,模擬器將會以此速度執行</string>
|
||||
<string name="cpu_backend">CPU 後端</string>
|
||||
<string name="cpu_accuracy">CPU 準確度</string>
|
||||
<string name="value_with_units">%1$s%2$s</string>
|
||||
|
||||
<string name="program_args">Homebrew 參數</string>
|
||||
<string name="program_args_description">在啟動時傳遞給 Homebrew 的命令列參數(例如:-noglsl)</string>
|
||||
|
||||
<!-- System settings strings -->
|
||||
<string name="device_name">裝置名稱</string>
|
||||
<string name="use_docked_mode">底座模式</string>
|
||||
<string name="use_docked_mode_description">提高解析度,降低效能。停用後將會使用手提模式,會降低解析度並提高效能。</string>
|
||||
<string name="use_docked_mode_description">提高解析度,降低效能。停用後將會使用手提模式,會降低解析度並提高效能</string>
|
||||
<string name="emulated_region">模擬區域</string>
|
||||
<string name="emulated_language">模擬語言</string>
|
||||
<string name="select_rtc_date">選擇 RTC 日期</string>
|
||||
<string name="select_rtc_time">選擇 RTC 時間</string>
|
||||
<string name="use_custom_rtc">自訂 RTC</string>
|
||||
<string name="use_custom_rtc_description">允許您設定與您的目前系統時間相互獨立的自訂時間。</string>
|
||||
<string name="use_custom_rtc_description">允許您設定與您的目前系統時間相互獨立的自訂時間</string>
|
||||
<string name="set_custom_rtc">設定自訂 RTC</string>
|
||||
|
||||
<!-- CPU -->
|
||||
<string name="fast_cpu_time">CPU 超頻</string>
|
||||
<string name="fast_cpu_time_description">強制模擬 CPU 以更高的時脈運作,減少某些 FPS 限制。使用 加速 (1700MHz) 以 Switch 的最高原生時脈執行,或 高速 (2000MHz) 以雙倍時脈執行</string>
|
||||
<string name="custom_cpu_ticks">自訂CPU時脈</string>
|
||||
<string name="custom_cpu_ticks_description">自訂CPU時脈。更高的值可能提高效能,但也可能導致遊戲卡死。建議範圍為77-21000。</string>
|
||||
<string name="cpu_ticks">時脈</string>
|
||||
@@ -428,33 +446,41 @@
|
||||
|
||||
<!-- Network settings strings -->
|
||||
<string name="web_token">網路令牌</string>
|
||||
<string name="web_token_description">用於建立公開大廳的網路令牌。它是由48個小寫字母a-z組成的字串。</string>
|
||||
<string name="web_token_description">用於建立公開大廳的網路令牌。由48個小寫字母a-z組成</string>
|
||||
<string name="web_username">網路使用者名稱</string>
|
||||
<string name="web_username_description">多人遊戲房間中顯示的使用者名稱。必須為4-20個字元,僅能使用英文字母、數字、句點、破折號、底線和空格(標點符號須為英文格式)。</string>
|
||||
<string name="web_username_description">多人遊戲房間中顯示的使用者名稱。必須為4-20個字元,僅能使用英文字母、數字、句點、破折號、底線和空格(標點符號須為英文格式)</string>
|
||||
<string name="network">網路</string>
|
||||
|
||||
<!-- Graphics settings strings -->
|
||||
<string name="renderer_resolution">解析度 (手提/底座)</string>
|
||||
<string name="renderer_vsync">垂直同步</string>
|
||||
<string name="renderer_scaling_filter">視窗適應過濾器</string>
|
||||
<string name="renderer_scaling_filter">視窗自適應濾波器</string>
|
||||
<string name="fsr_sharpness">FSR/SGSR 銳化度</string>
|
||||
<string name="fsr_sharpness_description">使用 FSR/SGSR 時圖片的銳化程度</string>
|
||||
<string name="renderer_anti_aliasing">抗鋸齒</string>
|
||||
|
||||
|
||||
<string name="advanced">進階</string>
|
||||
|
||||
<string name="renderer_accuracy">GPU 模式</string>
|
||||
<string name="renderer_accuracy_description">設定 GPU 模擬的準確度。大多數遊戲在設定為快速時即可正常渲染,但有些需要渲染粒子的遊戲仍需設為準確來避免圖形錯誤</string>
|
||||
<string name="dma_accuracy">DMA 準確度</string>
|
||||
<string name="dma_accuracy_description">控制 DMA 準確度。安全準確度可以修復某些遊戲中的問題,但在某些情況下也可能影響效能。如果不確定,請保留為「預設」。</string>
|
||||
<string name="dma_accuracy_description">控制 DMA 準確度。將準確度設為穩定可以修復某些遊戲中的問題,但在某些情況下也可能影響效能。如果不確定,請保留為預設</string>
|
||||
<string name="gpu_fence_behavior">GPU 同步柵欄模式</string>
|
||||
<string name="gpu_fence_behavior_description">控制 GPU 同步柵欄模式。即時是速度最快的選項,但可能會導致一些問題。使用平衡可以提供更好的相容性並修復某些遊戲中的錯誤。準確則是在犧牲部分效能的情況下進一步提升相容性。嚴格是最慢的選項,但可以修復那些對同步要求更嚴格的遊戲中的問題。預設則會依照 GPU 準確度設定</string>
|
||||
<string name="anisotropic_filtering">各向異性過濾</string>
|
||||
<string name="anisotropic_filtering_description">改善斜角檢視時的紋理品質</string>
|
||||
<string name="vram_usage_mode">VRAM使用模式</string>
|
||||
<string name="vram_usage_mode_description">控制GPU記憶體的分配與釋放策略</string>
|
||||
<string name="accelerate_astc">ASTC解碼方式</string>
|
||||
<string name="accelerate_astc_description">選擇ASTC壓縮紋理的解碼方式:CPU(慢速、安全)、GPU(快速、推薦)或CPU非同步(無卡頓,可能導致問題)</string>
|
||||
<string name="accelerate_astc_description">選擇ASTC壓縮紋理的解碼方式:CPU(慢速、穩定)、GPU(快速、推薦)或CPU非同步(無卡頓,可能導致問題)</string>
|
||||
|
||||
<string name="sync_memory_operations">同步記憶體操作</string>
|
||||
<string name="sync_memory_operations_description">確保計算和記憶體操作之間的資料一致性。 此選項應能修復某些遊戲中的問題,但在某些情況下可能會降低效能。 使用Unreal Engine 4的遊戲似乎受影響最大。</string>
|
||||
<string name="sync_memory_operations_description">確保計算和記憶體操作之間的資料一致性。 此選項應能修復某些遊戲中的問題,但在某些情況下可能會降低效能。 使用Unreal Engine 4的遊戲似乎受影響最大</string>
|
||||
<string name="use_disk_shader_cache">磁碟著色器快取</string>
|
||||
<string name="use_disk_shader_cache_description">將產生的著色器快取儲存至硬碟以減少中斷。</string>
|
||||
<string name="use_disk_shader_cache_description">將產生的著色器快取儲存至硬碟以減少中斷</string>
|
||||
<string name="renderer_force_max_clock">強制使用最大時脈 (僅限Adreno)</string>
|
||||
<string name="renderer_force_max_clock_description">強制 GPU 以可能的最大時脈執行 (熱溫限制仍會被套用)。</string>
|
||||
<string name="renderer_force_max_clock_description">強制 GPU 以可能的最大時脈執行 (熱溫限制仍會被套用)</string>
|
||||
<string name="renderer_reactive_flushing">使用重新啟用排清</string>
|
||||
<string name="renderer_reactive_flushing_description">犧牲效能,以改善部分遊戲的轉譯準確度。</string>
|
||||
<string name="skip_cpu_inner_invalidation">跳過CPU內部失效處理</string>
|
||||
@@ -603,7 +629,7 @@
|
||||
<string name="import_complete">導入完成</string>
|
||||
<string name="use_global_setting">使用全域設定</string>
|
||||
<string name="operation_completed_successfully">操作已成功完成</string>
|
||||
<string name="confirm">確定</string>
|
||||
<string name="confirm">下載</string>
|
||||
<string name="load">載入</string>
|
||||
<string name="save">儲存</string>
|
||||
|
||||
@@ -821,8 +847,8 @@
|
||||
|
||||
<!-- Memory Layouts -->
|
||||
<string name="memory_4gb">4GB (推薦)</string>
|
||||
<string name="memory_6gb">6GB (不安全)</string>
|
||||
<string name="memory_8gb">8GB (不安全)</string>
|
||||
<string name="memory_6gb">6GB (不穩定)</string>
|
||||
<string name="memory_8gb">8GB (不穩定)</string>
|
||||
|
||||
<!--CPU clock speeds-->
|
||||
<string name="clock_boost">加速 (1700MHz)</string>
|
||||
@@ -843,13 +869,12 @@
|
||||
|
||||
<string name="renderer_none">無</string>
|
||||
|
||||
<string name="renderer_accuracy_medium">平衡</string>
|
||||
<string name="renderer_accuracy_high">準確</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
<string name="dma_accuracy_default">預設</string>
|
||||
<string name="dma_accuracy_unsafe">不安全</string>
|
||||
<string name="dma_accuracy_safe">安全</string>
|
||||
<string name="dma_accuracy_unsafe">不穩定</string>
|
||||
<string name="dma_accuracy_safe">穩定</string>
|
||||
|
||||
<string name="vram_usage_conservative">保守</string>
|
||||
<string name="vram_usage_aggressive">積極</string>
|
||||
@@ -875,7 +900,7 @@
|
||||
|
||||
<!-- CPU Accuracy -->
|
||||
<string name="cpu_accuracy_accurate">高準確度</string>
|
||||
<string name="cpu_accuracy_unsafe">低準確度(不安全)</string>
|
||||
<string name="cpu_accuracy_unsafe">低準確度(不穩定)</string>
|
||||
<string name="cpu_accuracy_paranoid">不合理</string>
|
||||
<string name="cpu_accuracy_debugging">偵錯</string>
|
||||
|
||||
|
||||
@@ -103,14 +103,12 @@
|
||||
|
||||
<string-array name="rendererAccuracyNames">
|
||||
<item>@string/renderer_accuracy_low</item>
|
||||
<item>@string/renderer_accuracy_medium</item>
|
||||
<item>@string/renderer_accuracy_high</item>
|
||||
</string-array>
|
||||
|
||||
<integer-array name="rendererAccuracyValues">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- VRAM USAGE MODE CHOICES -->
|
||||
@@ -522,6 +520,21 @@
|
||||
<item>2</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array name="gpuFenceBehaviorNames">
|
||||
<item>@string/gpu_fence_behavior_default</item>
|
||||
<item>@string/gpu_fence_behavior_immediate</item>
|
||||
<item>@string/gpu_fence_behavior_balanced</item>
|
||||
<item>@string/gpu_fence_behavior_accurate</item>
|
||||
<item>@string/gpu_fence_behavior_strict</item>
|
||||
</string-array>
|
||||
<integer-array name="gpuFenceBehaviorValues">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
</integer-array>
|
||||
|
||||
|
||||
<string-array name="appletEntries">
|
||||
<item>@string/applet_hle</item>
|
||||
|
||||
@@ -479,9 +479,11 @@
|
||||
<string name="advanced">Advanced</string>
|
||||
|
||||
<string name="renderer_accuracy">GPU Mode</string>
|
||||
<string name="renderer_accuracy_description">Controls the GPU emulation mode. Most games render fine with Fast or Balanced modes, but Accurate is still required for some. Particles tend to only render correctly with Accurate mode.</string>
|
||||
<string name="renderer_accuracy_description">Controls the GPU emulation mode. Most games render fine with Fast, but Accurate is still required for some. Particles tend to only render correctly with Accurate mode.</string>
|
||||
<string name="dma_accuracy">DMA Accuracy</string>
|
||||
<string name="dma_accuracy_description">Controls the DMA precision accuracy. Safe precision can fix issues in some games, but it can also impact performance in some cases. If unsure, leave this on Default.</string>
|
||||
<string name="gpu_fence_behavior">GPU Fence Behavior</string>
|
||||
<string name="gpu_fence_behavior_description">Controls the GPU fence synchronization behavior. Immediate is the fastest option, but can introduce some issues. Balanced offers better compatibility and may fix issues in some games. Accurate further improves compatibility at the cost of some performance. Strict is the slowest option, but can fix issues that require stricter synchronization. Default follows the GPU Accuracy setting.</string>
|
||||
<string name="anisotropic_filtering">Anisotropic filtering</string>
|
||||
<string name="anisotropic_filtering_description">Improves the quality of textures when viewed at oblique angles</string>
|
||||
<string name="vram_usage_mode">VRAM Usage Mode</string>
|
||||
@@ -514,8 +516,6 @@
|
||||
<string name="fast_gpu_time_description">Forces most games to run at their highest native resolution. Use 256 for maximal performance and 512 for maximal graphics fidelity.</string>
|
||||
<string name="skip_cpu_inner_invalidation">Skip CPU Inner Invalidation</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">Skips certain CPU-side cache invalidations during memory updates, reducing CPU usage and improving it\'s performance. This may cause glitches or crashes on some games.</string>
|
||||
<string name="antiflicker">Anti-Flicker</string>
|
||||
<string name="antiflicker_description">Forces GPU fence callbacks to wait for submitted GPU work. Use with Fast GPU mode, to avoid flicker with lower performance impact.</string>
|
||||
<string name="fix_bloom_effects">Fix Bloom Effects</string>
|
||||
<string name="fix_bloom_effects_description">Reduces bloom blur in LA/EOW (Adreno A6XX - A7XX/ Turnip), removes bloom in Burnout. Warning: may cause graphical artifacts in other games.</string>
|
||||
<string name="emulate_bgr565">Emulate BGR565</string>
|
||||
@@ -1039,7 +1039,6 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">Fast</string>
|
||||
<string name="renderer_accuracy_medium">Balanced</string>
|
||||
<string name="renderer_accuracy_high">Accurate</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
@@ -1047,6 +1046,13 @@
|
||||
<string name="dma_accuracy_unsafe">Unsafe</string>
|
||||
<string name="dma_accuracy_safe">Safe</string>
|
||||
|
||||
<!-- GPU Fence Behavior -->
|
||||
<string name="gpu_fence_behavior_default">Default</string>
|
||||
<string name="gpu_fence_behavior_immediate">Immediate</string>
|
||||
<string name="gpu_fence_behavior_balanced">Balanced</string>
|
||||
<string name="gpu_fence_behavior_accurate">Accurate</string>
|
||||
<string name="gpu_fence_behavior_strict">Strict</string>
|
||||
|
||||
<!-- ASTC Decoding Method Choices -->
|
||||
<string name="accelerate_astc_cpu" translatable="false">CPU</string>
|
||||
<string name="accelerate_astc_gpu" translatable="false">GPU</string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -147,7 +147,7 @@ Result OpusDecoder::DecodeInterleavedForMultiStream(u32* out_data_size, u64* out
|
||||
auto* header_p{reinterpret_cast<const OpusPacketHeader*>(input_data.data())};
|
||||
OpusPacketHeader header{ReverseHeader(*header_p)};
|
||||
|
||||
LOG_TRACE(Service_Audio, "header size {:#X} input data size 0x{:X} in_data size 0x{:X}",
|
||||
LOG_TRACE(Service_Audio, "header size {:#x} input data size {:#x} in_data size {:#x}",
|
||||
header.size, input_data.size_bytes(), in_data.size_bytes());
|
||||
|
||||
R_UNLESS(in_data.size_bytes() >= header.size &&
|
||||
|
||||
@@ -369,7 +369,7 @@ Result InfoUpdater::UpdateMixes(MixContext& mix_context, const u32 mix_buffer_co
|
||||
if (mix_count < 0 || mix_count > 0x100) {
|
||||
LOG_ERROR(
|
||||
Service_Audio,
|
||||
"Invalid mix count from dirty parameter: count={}, magic=0x{:X}, expected_size={}",
|
||||
"Invalid mix count from dirty parameter: count={}, magic={:#x}, expected_size={}",
|
||||
mix_count, in_dirty_params->magic, in_header->mix_size);
|
||||
return Service::Audio::ResultInvalidUpdateInfo;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2021 Skyline Team and Contributors
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -43,13 +46,13 @@ MAP_MEMBER(void)::MapLocked(VaType virt, PaType phys, VaType size, ExtraBlockInf
|
||||
|
||||
if (virt_end > va_limit) {
|
||||
ASSERT_MSG(false,
|
||||
"Trying to map a block past the VA limit: virt_end: 0x{:X}, va_limit: 0x{:X}",
|
||||
"Trying to map a block past the VA limit: virt_end: {:#x}, va_limit: {:#x}",
|
||||
virt_end, va_limit);
|
||||
}
|
||||
|
||||
auto block_end_successor{std::lower_bound(blocks.begin(), blocks.end(), virt_end)};
|
||||
if (block_end_successor == blocks.begin()) {
|
||||
ASSERT_MSG(false, "Trying to map a block before the VA start: virt_end: 0x{:X}", virt_end);
|
||||
ASSERT_MSG(false, "Trying to map a block before the VA start: virt_end: {:#x}", virt_end);
|
||||
}
|
||||
|
||||
auto block_end_predecessor{std::prev(block_end_successor)};
|
||||
@@ -124,7 +127,7 @@ MAP_MEMBER(void)::MapLocked(VaType virt, PaType phys, VaType size, ExtraBlockInf
|
||||
|
||||
// Check that the start successor is either the end block or something in between
|
||||
if (block_start_successor->virt > virt_end) {
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: 0x{:X}", block_start_successor->virt);
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: {:#x}", block_start_successor->virt);
|
||||
} else if (block_start_successor->virt == virt_end) {
|
||||
// We need to create a new block as there are none spare that we would overwrite
|
||||
blocks.insert(block_start_successor, Block(virt, phys, extra_info));
|
||||
@@ -150,13 +153,13 @@ MAP_MEMBER(void)::UnmapLocked(VaType virt, VaType size) {
|
||||
|
||||
if (virt_end > va_limit) {
|
||||
ASSERT_MSG(false,
|
||||
"Trying to map a block past the VA limit: virt_end: 0x{:X}, va_limit: 0x{:X}",
|
||||
"Trying to map a block past the VA limit: virt_end: {:#x}, va_limit: {:#x}",
|
||||
virt_end, va_limit);
|
||||
}
|
||||
|
||||
auto block_end_successor{std::lower_bound(blocks.begin(), blocks.end(), virt_end)};
|
||||
if (block_end_successor == blocks.begin()) {
|
||||
ASSERT_MSG(false, "Trying to unmap a block before the VA start: virt_end: 0x{:X}",
|
||||
ASSERT_MSG(false, "Trying to unmap a block before the VA start: virt_end: {:#x}",
|
||||
virt_end);
|
||||
}
|
||||
|
||||
@@ -257,7 +260,7 @@ MAP_MEMBER(void)::UnmapLocked(VaType virt, VaType size) {
|
||||
auto block_start_successor{std::next(block_start_predecessor)};
|
||||
|
||||
if (block_start_successor->virt > virt_end) {
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: 0x{:X}", block_start_successor->virt);
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: {:#x}", block_start_successor->virt);
|
||||
} else if (block_start_successor->virt == virt_end) {
|
||||
// There are no blocks between the start and the end that would let us skip inserting a new
|
||||
// one for head
|
||||
|
||||
@@ -476,6 +476,29 @@ std::string SanitizePath(std::string_view path_, DirectorySeparator directory_se
|
||||
path.erase(std::unique(start, path.end(),
|
||||
[type2](char c1, char c2) { return c1 == type2 && c2 == type2; }),
|
||||
path.end());
|
||||
|
||||
const bool absolute = !path.empty() && path[0] == type2;
|
||||
std::vector<std::string_view> parts;
|
||||
|
||||
for (const auto part : SplitPathComponents(path))
|
||||
{
|
||||
if (part.empty() || part == ".")
|
||||
continue;
|
||||
if (part == ".." && !parts.empty() && parts.back() != "..")
|
||||
parts.pop_back();
|
||||
else if (part != "..") parts.push_back(part);
|
||||
}
|
||||
|
||||
std::string resolved = absolute ? std::string(1, type2) : std::string{};
|
||||
for (std::size_t i = 0; i < parts.size(); ++i)
|
||||
{
|
||||
if (i != 0)
|
||||
resolved += type2;
|
||||
resolved.append(parts[i].data(), parts[i].size());
|
||||
}
|
||||
|
||||
path = std::move(resolved);
|
||||
|
||||
return std::string(RemoveTrailingSlash(path));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2013 Dolphin Emulator Project
|
||||
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
@@ -12,7 +15,7 @@ std::vector<u8> HexStringToVector(std::string_view str, bool little_endian) {
|
||||
for (std::size_t i = str.size() - 2; i <= str.size(); i -= 2)
|
||||
out[i / 2] = (ToHexNibble(str[i]) << 4) | ToHexNibble(str[i + 1]);
|
||||
} else {
|
||||
for (std::size_t i = 0; i < str.size(); i += 2)
|
||||
for (std::size_t i = 0; i + 1 < str.size(); i += 2)
|
||||
out[i / 2] = (ToHexNibble(str[i]) << 4) | ToHexNibble(str[i + 1]);
|
||||
}
|
||||
return out;
|
||||
|
||||
+19
-5
@@ -41,6 +41,19 @@ namespace Common::Log {
|
||||
|
||||
namespace {
|
||||
|
||||
/// @brief A log entry. Log entries are store in a structured format to permit more varied output
|
||||
/// formatting on different frontends, as well as facilitating filtering and aggregation.
|
||||
struct Entry {
|
||||
std::string_view thread_name;
|
||||
std::string message;
|
||||
std::chrono::microseconds timestamp;
|
||||
Class log_class{};
|
||||
Level log_level{};
|
||||
const char* filename = nullptr;
|
||||
const char* function = nullptr;
|
||||
unsigned int line_num = 0;
|
||||
};
|
||||
|
||||
/// @brief Returns the name of the passed log class as a C-string. Subclasses are separated by periods
|
||||
/// instead of underscores as in the enumeration.
|
||||
/// @note GetClassName is a macro defined by Windows.h, grrr...
|
||||
@@ -79,7 +92,7 @@ std::string FormatLogMessage(const Entry& entry) noexcept {
|
||||
auto const time_fractional = uint32_t(entry.timestamp.count() % 1000000);
|
||||
auto const class_name = GetLogClassName(entry.log_class);
|
||||
auto const level_name = GetLevelName(entry.log_level);
|
||||
return fmt::format("[{:4d}.{:06d}] {} <{}> {}:{}:{}: {}", time_seconds, time_fractional, class_name, level_name, entry.filename, entry.line_num, entry.function, entry.message);
|
||||
return fmt::format("[{:4d}.{:06d}] {} <{}> (eden:{}) {}:{}:{}: {}", time_seconds, time_fractional, class_name, level_name, entry.thread_name.data(), entry.filename, entry.line_num, entry.function, entry.message);
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -165,7 +178,7 @@ struct Backend {
|
||||
};
|
||||
|
||||
/// @brief Formatting specifier (to use with printf) of the equivalent fmt::format() expression
|
||||
#define CCB_PRINTF_FMT "[%4d.%06d] %s <%s> %s:%u:%s: %s"
|
||||
#define CCB_PRINTF_FMT "[%4d.%06d] %s <%s> (eden:%s) %s:%u:%s: %s"
|
||||
|
||||
/// @brief Instead of using fmt::format() just use the system's formatting capabilities directly
|
||||
struct DirectFormatArgs {
|
||||
@@ -208,7 +221,7 @@ struct ColorConsoleBackend final : public Backend {
|
||||
}());
|
||||
SetConsoleTextAttribute(console_handle, color);
|
||||
auto const df = GetDirectFormatArgs(entry);
|
||||
std::fprintf(stdout, CCB_PRINTF_FMT "\n", df.time_seconds, df.time_fractional, df.class_name, df.level_name, entry.filename, entry.line_num, entry.function, entry.message.c_str());
|
||||
std::fprintf(stdout, CCB_PRINTF_FMT "\n", df.time_seconds, df.time_fractional, df.class_name, df.level_name, entry.thread_name.data(), entry.filename, entry.line_num, entry.function, entry.message.c_str());
|
||||
}
|
||||
}
|
||||
void Flush() noexcept override {}
|
||||
@@ -234,7 +247,7 @@ struct ColorConsoleBackend final : public Backend {
|
||||
}
|
||||
}();
|
||||
auto const df = GetDirectFormatArgs(entry);
|
||||
std::fprintf(stdout, color_str, df.time_seconds, df.time_fractional, df.class_name, df.level_name, entry.filename, entry.line_num, entry.function, entry.message.c_str());
|
||||
std::fprintf(stdout, color_str, df.time_seconds, df.time_fractional, df.class_name, df.level_name, entry.thread_name.data(), entry.filename, entry.line_num, entry.function, entry.message.c_str());
|
||||
#undef ESC
|
||||
}
|
||||
}
|
||||
@@ -338,7 +351,7 @@ struct LogcatBackend : public Backend {
|
||||
}
|
||||
}();
|
||||
auto const df = GetDirectFormatArgs(entry);
|
||||
__android_log_print(android_log_priority, "YuzuNative", CCB_PRINTF_FMT, df.time_seconds, df.time_fractional, df.class_name, df.level_name, entry.filename, entry.line_num, entry.function, entry.message.c_str());
|
||||
__android_log_print(android_log_priority, "YuzuNative", CCB_PRINTF_FMT, df.time_seconds, df.time_fractional, df.class_name, df.level_name, entry.thread_name.data(), entry.filename, entry.line_num, entry.function, entry.message.c_str());
|
||||
}
|
||||
void Flush() noexcept override {}
|
||||
};
|
||||
@@ -421,6 +434,7 @@ void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, u
|
||||
auto const flush = ::Settings::values.log_flush_line.GetValue();
|
||||
logging_instance->ForEachBackend([=](Backend& backend) {
|
||||
backend.Write(Entry{
|
||||
.thread_name = Common::GetCurrentThreadName(),
|
||||
.message = fmt::vformat(format, args),
|
||||
.timestamp = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - logging_instance->time_origin),
|
||||
.log_class = log_class,
|
||||
|
||||
@@ -140,25 +140,4 @@ void Stop();
|
||||
void SetGlobalFilter(const Filter& filter);
|
||||
void SetColorConsoleBackendEnabled(bool enabled);
|
||||
|
||||
/// @brief A log entry. Log entries are store in a structured format to permit more varied output
|
||||
/// formatting on different frontends, as well as facilitating filtering and aggregation.
|
||||
struct Entry {
|
||||
std::string message;
|
||||
std::chrono::microseconds timestamp;
|
||||
Class log_class{};
|
||||
Level log_level{};
|
||||
const char* filename = nullptr;
|
||||
const char* function = nullptr;
|
||||
unsigned int line_num = 0;
|
||||
};
|
||||
|
||||
/// Formats a log entry into the provided text buffer.
|
||||
std::string FormatLogMessage(const Entry& entry) noexcept;
|
||||
|
||||
/// Prints the same message as `PrintMessage`, but colored according to the severity level.
|
||||
void PrintColoredMessage(const Entry& entry) noexcept;
|
||||
|
||||
/// Formats and prints a log entry to the android logcat.
|
||||
void PrintMessageToLogcat(const Entry& entry) noexcept;
|
||||
|
||||
} // namespace Common::Log
|
||||
|
||||
+16
-8
@@ -156,14 +156,6 @@ void UpdateGPUAccuracy() {
|
||||
values.current_gpu_accuracy = values.gpu_accuracy.GetValue();
|
||||
}
|
||||
|
||||
bool IsGPULevelLow() {
|
||||
return values.current_gpu_accuracy == GpuAccuracy::Low;
|
||||
}
|
||||
|
||||
bool IsGPULevelMedium() {
|
||||
return values.current_gpu_accuracy == GpuAccuracy::Medium;
|
||||
}
|
||||
|
||||
bool IsGPULevelHigh() {
|
||||
return values.current_gpu_accuracy == GpuAccuracy::High;
|
||||
}
|
||||
@@ -176,6 +168,22 @@ bool IsDMALevelSafe() {
|
||||
return values.dma_accuracy.GetValue() == DmaAccuracy::Safe;
|
||||
}
|
||||
|
||||
bool IsGPUFenceBehaviorDefault() {
|
||||
return values.gpu_fence_behavior.GetValue() == GpuFenceBehavior::Default;
|
||||
}
|
||||
|
||||
bool IsGPUFenceBehaviorBalanced() {
|
||||
return values.gpu_fence_behavior.GetValue() == GpuFenceBehavior::Balanced;
|
||||
}
|
||||
|
||||
bool IsGPUFenceBehaviorAccurate() {
|
||||
return values.gpu_fence_behavior.GetValue() == GpuFenceBehavior::Accurate;
|
||||
}
|
||||
|
||||
bool IsGPUFenceBehaviorStrict() {
|
||||
return values.gpu_fence_behavior.GetValue() == GpuFenceBehavior::Strict;
|
||||
}
|
||||
|
||||
bool IsFastmemEnabled() {
|
||||
if (values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Debugging)
|
||||
return bool(values.cpuopt_fastmem);
|
||||
|
||||
+17
-11
@@ -420,7 +420,7 @@ struct Values {
|
||||
#ifdef __ANDROID__
|
||||
GpuAccuracy::Low,
|
||||
#else
|
||||
GpuAccuracy::Medium,
|
||||
GpuAccuracy::High,
|
||||
#endif
|
||||
"gpu_accuracy",
|
||||
Category::RendererAdvanced,
|
||||
@@ -428,7 +428,7 @@ struct Values {
|
||||
true,
|
||||
true};
|
||||
|
||||
GpuAccuracy current_gpu_accuracy{GpuAccuracy::Medium};
|
||||
GpuAccuracy current_gpu_accuracy{GpuAccuracy::High};
|
||||
|
||||
SwitchableSetting<DmaAccuracy, true> dma_accuracy{linkage,
|
||||
DmaAccuracy::Default,
|
||||
@@ -438,6 +438,16 @@ struct Values {
|
||||
true,
|
||||
true};
|
||||
|
||||
SwitchableSetting<GpuFenceBehavior, true> gpu_fence_behavior{linkage,
|
||||
GpuFenceBehavior::Default,
|
||||
GpuFenceBehavior::Default,
|
||||
GpuFenceBehavior::Strict,
|
||||
"gpu_fence_behavior",
|
||||
Category::RendererAdvanced,
|
||||
Specialization::Default,
|
||||
true,
|
||||
true};
|
||||
|
||||
SwitchableSetting<VramUsageMode, true> vram_usage_mode{linkage,
|
||||
VramUsageMode::Conservative,
|
||||
"vram_usage_mode",
|
||||
@@ -545,13 +555,6 @@ struct Values {
|
||||
Specialization::Default,
|
||||
true,
|
||||
true};
|
||||
SwitchableSetting<bool> antiflicker{linkage,
|
||||
false,
|
||||
"antiflicker",
|
||||
Category::RendererHacks,
|
||||
Specialization::Default,
|
||||
true,
|
||||
true};
|
||||
SwitchableSetting<bool> async_presentation{linkage,
|
||||
#ifdef __ANDROID__
|
||||
false,
|
||||
@@ -871,13 +874,16 @@ extern Values values;
|
||||
bool getDebugKnobAt(u8 i);
|
||||
|
||||
void UpdateGPUAccuracy();
|
||||
bool IsGPULevelLow();
|
||||
bool IsGPULevelMedium();
|
||||
bool IsGPULevelHigh();
|
||||
|
||||
bool IsDMALevelDefault();
|
||||
bool IsDMALevelSafe();
|
||||
|
||||
bool IsGPUFenceBehaviorDefault();
|
||||
bool IsGPUFenceBehaviorBalanced();
|
||||
bool IsGPUFenceBehaviorAccurate();
|
||||
bool IsGPUFenceBehaviorStrict();
|
||||
|
||||
bool IsFastmemEnabled();
|
||||
void SetNceEnabled(bool is_64bit);
|
||||
bool IsNceEnabled();
|
||||
|
||||
@@ -135,8 +135,9 @@ ENUM(FramePacingMode, Target_Auto, Target_30, Target_60, Target_90, Target_120);
|
||||
ENUM(VSyncMode, Immediate, Mailbox, Fifo, FifoRelaxed);
|
||||
ENUM(VramUsageMode, Conservative, Aggressive);
|
||||
ENUM(RendererBackend, OpenGL_GLSL, Vulkan, Null, OpenGL_GLASM, OpenGL_SPIRV);
|
||||
ENUM(GpuAccuracy, Low, Medium, High);
|
||||
ENUM(GpuAccuracy, Low, High);
|
||||
ENUM(DmaAccuracy, Default, Unsafe, Safe);
|
||||
ENUM(GpuFenceBehavior, Default, Immediate, Balanced, Accurate, Strict);
|
||||
ENUM(CpuBackend, Dynarmic, Nce);
|
||||
ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid, Debugging);
|
||||
ENUM(CpuClock, Off, Boost, Fast)
|
||||
|
||||
+13
-1
@@ -52,6 +52,13 @@
|
||||
|
||||
namespace Common {
|
||||
|
||||
// The use of TLS is justified as it is faster than using pthread_* functions
|
||||
// and generally will be better long term... yeah %fs/%gs reloads aren't great
|
||||
// but it's better than doing a potential call-stack-fuckery...
|
||||
thread_local struct {
|
||||
std::string name{};
|
||||
} per_thread_data = {};
|
||||
|
||||
void SetCurrentThreadPriority(ThreadPriority new_priority) {
|
||||
#ifdef _WIN32
|
||||
int windows_priority = [&]() {
|
||||
@@ -96,7 +103,7 @@ void SetCurrentThreadPriority(ThreadPriority new_priority) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetCurrentThreadName(const char* name) {
|
||||
void SetCurrentThreadName(const char* name) noexcept {
|
||||
#ifdef _MSC_VER
|
||||
// Sets the debugger-visible name of the current thread.
|
||||
if (auto pf = (decltype(&SetThreadDescription))(void*)GetProcAddress(GetModuleHandle(TEXT("KernelBase.dll")), "SetThreadDescription"); pf)
|
||||
@@ -130,6 +137,11 @@ void SetCurrentThreadName(const char* name) {
|
||||
#else
|
||||
pthread_setname_np(pthread_self(), name);
|
||||
#endif
|
||||
per_thread_data.name = std::string{name};
|
||||
}
|
||||
|
||||
std::string_view GetCurrentThreadName() noexcept {
|
||||
return per_thread_data.name;
|
||||
}
|
||||
|
||||
void PinCurrentThreadToPerformanceCore(size_t core_id) {
|
||||
|
||||
+2
-1
@@ -100,7 +100,8 @@ enum class ThreadPriority : u32 {
|
||||
};
|
||||
|
||||
void SetCurrentThreadPriority(ThreadPriority new_priority);
|
||||
void SetCurrentThreadName(const char* name);
|
||||
void SetCurrentThreadName(const char* name) noexcept;
|
||||
std::string_view GetCurrentThreadName() noexcept;
|
||||
void PinCurrentThreadToPerformanceCore(size_t core_id);
|
||||
|
||||
} // namespace Common
|
||||
|
||||
@@ -145,7 +145,14 @@ bool Patcher::PatchText(std::span<const u8> program_image, const Kernel::CodeSet
|
||||
|
||||
// MRS Xn, CNTFRQ_EL0
|
||||
if (auto mrs = MRS{inst}; mrs.Verify() && mrs.GetSystemReg() == CntfrqEl0) {
|
||||
UNREACHABLE();
|
||||
bool pre_buffer = false;
|
||||
auto ret = AddRelocations(pre_buffer);
|
||||
if (pre_buffer) {
|
||||
WriteCntfrqHandler(ret, oaknut::XReg{static_cast<int>(mrs.GetRt())}, c_pre);
|
||||
} else {
|
||||
WriteCntfrqHandler(ret, oaknut::XReg{static_cast<int>(mrs.GetRt())}, c);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// MSR TPIDR_EL0, Xn
|
||||
@@ -577,6 +584,16 @@ void Patcher::WriteMsrHandler(ModuleDestLabel module_dest, oaknut::XReg src_reg,
|
||||
this->BranchToModule(module_dest);
|
||||
}
|
||||
|
||||
void Patcher::WriteCntfrqHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg, oaknut::VectorCodeGenerator& cg) {
|
||||
cg.MOV(dest_reg, Common::WallClock::CNTFRQ);
|
||||
|
||||
// Jump back to the instruction after the emulated MRS.
|
||||
if (&cg == &c_pre)
|
||||
this->BranchToModulePre(module_dest);
|
||||
else
|
||||
this->BranchToModule(module_dest);
|
||||
}
|
||||
|
||||
void Patcher::WriteCntpctHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg, oaknut::VectorCodeGenerator& cg) {
|
||||
#if defined(HAS_NCE)
|
||||
static Common::WallClock clock(false, 1);
|
||||
|
||||
@@ -80,6 +80,7 @@ private:
|
||||
void WriteSvcTrampoline(ModuleDestLabel module_dest, u32 svc_id, oaknut::VectorCodeGenerator& code, oaknut::Label& save_ctx, oaknut::Label& load_ctx);
|
||||
void WriteMrsHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg, oaknut::SystemReg src_reg, oaknut::VectorCodeGenerator& code);
|
||||
void WriteMsrHandler(ModuleDestLabel module_dest, oaknut::XReg src_reg, oaknut::VectorCodeGenerator& code);
|
||||
void WriteCntfrqHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg, oaknut::VectorCodeGenerator& code);
|
||||
void WriteCntpctHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg, oaknut::VectorCodeGenerator& code);
|
||||
|
||||
// Convenience wrappers using default code generator
|
||||
@@ -90,6 +91,7 @@ private:
|
||||
void WriteSvcTrampoline(ModuleDestLabel module_dest, u32 svc_id) { WriteSvcTrampoline(module_dest, svc_id, c, m_save_context, m_load_context); }
|
||||
void WriteMrsHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg, oaknut::SystemReg src_reg) { WriteMrsHandler(module_dest, dest_reg, src_reg, c); }
|
||||
void WriteMsrHandler(ModuleDestLabel module_dest, oaknut::XReg src_reg) { WriteMsrHandler(module_dest, src_reg, c); }
|
||||
void WriteCntfrqHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg) { WriteCntfrqHandler(module_dest, dest_reg, c); }
|
||||
void WriteCntpctHandler(ModuleDestLabel module_dest, oaknut::XReg dest_reg) { WriteCntpctHandler(module_dest, dest_reg, c); }
|
||||
|
||||
private:
|
||||
|
||||
+3
-5
@@ -264,9 +264,7 @@ struct System::Impl {
|
||||
|
||||
// Setting changes may require a full system reinitialization (e.g., disabling multicore).
|
||||
ReinitializeIfNecessary(system);
|
||||
|
||||
kernel.Initialize();
|
||||
cpu_manager.Initialize();
|
||||
}
|
||||
|
||||
SystemResultStatus SetupForApplicationProcess(System& system, Frontend::EmuWindow& emu_window) {
|
||||
@@ -293,9 +291,7 @@ struct System::Impl {
|
||||
return SystemResultStatus::Success;
|
||||
}
|
||||
|
||||
SystemResultStatus Load(System& system, Frontend::EmuWindow& emu_window,
|
||||
const std::string& filepath,
|
||||
Service::AM::FrontendAppletParameters& params) {
|
||||
SystemResultStatus Load(System& system, Frontend::EmuWindow& emu_window, const std::string& filepath, Service::AM::FrontendAppletParameters& params) {
|
||||
InitializeKernel(system);
|
||||
|
||||
const auto file = GetGameFileFromPath(virtual_filesystem, filepath);
|
||||
@@ -342,6 +338,8 @@ struct System::Impl {
|
||||
ShutdownMainProcess();
|
||||
return init_result;
|
||||
}
|
||||
// Waiting for GPU before initializing CPU
|
||||
cpu_manager.Initialize();
|
||||
|
||||
// Initialize cheat engine
|
||||
if (cheat_engine) {
|
||||
|
||||
@@ -431,7 +431,7 @@ void DeviceMemoryManager<Traits>::ReadBlock(DAddr address, void* dest_pointer, s
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device ReadBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
std::memset(dest_pointer, 0, copy_amount);
|
||||
},
|
||||
@@ -450,7 +450,7 @@ void DeviceMemoryManager<Traits>::WriteBlock(DAddr address, const void* src_poin
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device WriteBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
},
|
||||
[&](size_t copy_amount, u8* const dst_ptr) {
|
||||
@@ -489,7 +489,7 @@ void DeviceMemoryManager<Traits>::ReadBlockUnsafe(DAddr address, void* dest_poin
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device ReadBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
std::memset(dest_pointer, 0, copy_amount);
|
||||
},
|
||||
@@ -509,7 +509,7 @@ void DeviceMemoryManager<Traits>::WriteBlockUnsafe(DAddr address, const void* sr
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device WriteBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
},
|
||||
[&](size_t copy_amount, u8* const dst_ptr) {
|
||||
|
||||
@@ -256,7 +256,7 @@ void IPSwitchCompiler::Parse() {
|
||||
const auto& patch_line = lines[++i];
|
||||
|
||||
// Patch line may contain comments
|
||||
if (StartsWith(patch_line, "//")) {
|
||||
if (StartsWith(patch_line, "//") || StartsWith(patch_line, "#")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ void IPSwitchCompiler::Parse() {
|
||||
|
||||
if (print_values) {
|
||||
LOG_INFO(Loader,
|
||||
"[IPSwitchCompiler ('{}')] - Patching value at offset 0x{:08X} "
|
||||
"[IPSwitchCompiler ('{}')] - Patching value at offset {:#08x} "
|
||||
"with byte string '{}'",
|
||||
patch_text->GetName(), offset, Common::HexToString(replace));
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address
|
||||
}
|
||||
|
||||
bool ProgramMetadata::Is64BitProgram() const {
|
||||
return npdm_header.has_64_bit_instructions;
|
||||
return bool(npdm_header.has_64_bit_instructions);
|
||||
}
|
||||
|
||||
ProgramAddressSpaceType ProgramMetadata::GetAddressSpaceType() const {
|
||||
@@ -181,11 +181,11 @@ const ProgramMetadata::KernelCapabilityDescriptors& ProgramMetadata::GetKernelCa
|
||||
|
||||
void ProgramMetadata::Print() const {
|
||||
LOG_DEBUG(Service_FS, "Magic: {:.4}", npdm_header.magic.data());
|
||||
LOG_DEBUG(Service_FS, "Main thread priority: 0x{:02X}", npdm_header.main_thread_priority);
|
||||
LOG_DEBUG(Service_FS, "Main thread priority: {:#02x}", npdm_header.main_thread_priority);
|
||||
LOG_DEBUG(Service_FS, "Main thread core: {}", npdm_header.main_thread_cpu);
|
||||
LOG_DEBUG(Service_FS, "Main thread stack size: {:#X} bytes", npdm_header.main_stack_size);
|
||||
LOG_DEBUG(Service_FS, "Main thread stack size: {:#x} bytes", npdm_header.main_stack_size);
|
||||
LOG_DEBUG(Service_FS, "Process category: {}", npdm_header.process_category);
|
||||
LOG_DEBUG(Service_FS, "Flags: 0x{:02X}", npdm_header.flags);
|
||||
LOG_DEBUG(Service_FS, "Flags: {:#02x}", npdm_header.flags);
|
||||
LOG_DEBUG(Service_FS, " > 64-bit instructions: {}",
|
||||
npdm_header.has_64_bit_instructions ? "YES" : "NO");
|
||||
|
||||
@@ -209,15 +209,15 @@ void ProgramMetadata::Print() const {
|
||||
|
||||
// Begin ACID printing (potential perms, signed)
|
||||
LOG_DEBUG(Service_FS, "Magic: {:.4}", acid_header.magic.data());
|
||||
LOG_DEBUG(Service_FS, "Flags: 0x{:02X}", acid_header.flags);
|
||||
LOG_DEBUG(Service_FS, "Flags: {:#02x}", acid_header.flags);
|
||||
LOG_DEBUG(Service_FS, " > Is Retail: {}", acid_header.production_flag ? "YES" : "NO");
|
||||
LOG_DEBUG(Service_FS, "Title ID Min: 0x{:016X}", acid_header.title_id_min);
|
||||
LOG_DEBUG(Service_FS, "Title ID Max: 0x{:016X}", acid_header.title_id_max);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", acid_file_access.permissions);
|
||||
LOG_DEBUG(Service_FS, "Title ID Min: {:#016x}", acid_header.title_id_min);
|
||||
LOG_DEBUG(Service_FS, "Title ID Max: {:#016x}", acid_header.title_id_max);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: {:#016x}\n", acid_file_access.permissions);
|
||||
|
||||
// Begin ACI0 printing (actual perms, unsigned)
|
||||
LOG_DEBUG(Service_FS, "Magic: {:.4}", aci_header.magic.data());
|
||||
LOG_DEBUG(Service_FS, "Title ID: 0x{:016X}", aci_header.title_id);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", aci_file_access.permissions);
|
||||
LOG_DEBUG(Service_FS, "Title ID: {:#016x}", aci_header.title_id);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: {:#016x}\n", aci_file_access.permissions);
|
||||
}
|
||||
} // namespace FileSys
|
||||
|
||||
@@ -984,6 +984,22 @@ bool RegisteredCache::RemoveExistingEntry(u64 title_id) const {
|
||||
return removed_data;
|
||||
}
|
||||
|
||||
bool RegisteredCache::Delete(const NcaID& id) const {
|
||||
const auto path = GetRelativePathFromNcaID(id, false, true, false);
|
||||
|
||||
const bool is_file = dir->GetFileRelative(path) != nullptr;
|
||||
const bool is_dir = dir->GetDirectoryRelative(path) != nullptr;
|
||||
|
||||
if (is_file) {
|
||||
return dir->DeleteFile(path);
|
||||
}
|
||||
if (is_dir) {
|
||||
return dir->DeleteSubdirectoryRecursive(path);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
InstallResult RegisteredCache::RawInstallNCA(const NCA& nca, const VfsCopyFunction& copy,
|
||||
bool overwrite_if_exists,
|
||||
std::optional<NcaID> override_id) {
|
||||
|
||||
@@ -188,6 +188,7 @@ public:
|
||||
|
||||
// Removes an existing entry based on title id
|
||||
bool RemoveExistingEntry(u64 title_id) const;
|
||||
bool Delete(const NcaID& id) const;
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
|
||||
@@ -76,7 +76,7 @@ constexpr inline SystemArchiveDescriptor GetSystemArchive(u64 title_id) {
|
||||
|
||||
VirtualFile SynthesizeSystemArchive(const u64 title_id) {
|
||||
auto const desc = GetSystemArchive(title_id);
|
||||
LOG_INFO(Service_FS, "Synthesizing system archive '{}' (0x{:016X}).", desc.name, title_id);
|
||||
LOG_INFO(Service_FS, "Synthesizing system archive '{}' ({:#016x}).", desc.name, title_id);
|
||||
if (desc.supplier != nullptr) {
|
||||
if (auto const dir = desc.supplier(); dir != nullptr) {
|
||||
if (auto const romfs = CreateRomFS(dir); romfs != nullptr) {
|
||||
|
||||
@@ -35,6 +35,16 @@ namespace {
|
||||
|
||||
constexpr size_t MaxOpenFiles = 8192;
|
||||
|
||||
bool IsWithinRoot(std::string_view root, std::string_view full_path) {
|
||||
if (root.empty())
|
||||
return true;
|
||||
|
||||
if (full_path.size() < root.size() || full_path.substr(0, root.size()) != root)
|
||||
return false;
|
||||
|
||||
return full_path.size() == root.size() || full_path[root.size()] == '/' || full_path[root.size()] == '\\';
|
||||
}
|
||||
|
||||
constexpr FS::FileAccessMode ModeFlagsToFileAccessMode(OpenMode mode) {
|
||||
switch (mode) {
|
||||
case OpenMode::Read:
|
||||
@@ -403,7 +413,8 @@ RealVfsDirectory::~RealVfsDirectory() = default;
|
||||
|
||||
VirtualFile RealVfsDirectory::GetFileRelative(std::string_view relative_path) const {
|
||||
const auto full_path = FS::SanitizePath(path + '/' + std::string(relative_path));
|
||||
if (!FS::Exists(full_path) || FS::IsDir(full_path)) {
|
||||
if (!FS::Exists(full_path) || FS::IsDir(full_path)
|
||||
|| !IsWithinRoot(FS::SanitizePath(path), full_path)) {
|
||||
return nullptr;
|
||||
}
|
||||
return base.OpenFile(full_path, perms);
|
||||
@@ -411,7 +422,8 @@ VirtualFile RealVfsDirectory::GetFileRelative(std::string_view relative_path) co
|
||||
|
||||
VirtualDir RealVfsDirectory::GetDirectoryRelative(std::string_view relative_path) const {
|
||||
const auto full_path = FS::SanitizePath(path + '/' + std::string(relative_path));
|
||||
if (!FS::Exists(full_path) || !FS::IsDir(full_path)) {
|
||||
if (!FS::Exists(full_path) || !FS::IsDir(full_path)
|
||||
|| !IsWithinRoot(FS::SanitizePath(path), full_path)) {
|
||||
return nullptr;
|
||||
}
|
||||
return base.OpenDirectory(full_path, perms);
|
||||
@@ -427,7 +439,7 @@ VirtualDir RealVfsDirectory::GetSubdirectory(std::string_view name) const {
|
||||
|
||||
VirtualFile RealVfsDirectory::CreateFileRelative(std::string_view relative_path) {
|
||||
const auto full_path = FS::SanitizePath(path + '/' + std::string(relative_path));
|
||||
if (!FS::CreateParentDirs(full_path)) {
|
||||
if (!FS::CreateParentDirs(full_path) || !IsWithinRoot(FS::SanitizePath(path), full_path)) {
|
||||
return nullptr;
|
||||
}
|
||||
return base.CreateFile(full_path, perms);
|
||||
@@ -440,7 +452,7 @@ VirtualDir RealVfsDirectory::CreateDirectoryRelative(std::string_view relative_p
|
||||
|
||||
bool RealVfsDirectory::DeleteSubdirectoryRecursive(std::string_view name) {
|
||||
const auto full_path = FS::SanitizePath(this->path + '/' + std::string(name));
|
||||
return base.DeleteDirectory(full_path);
|
||||
return FS::RemoveDirRecursively(full_path);
|
||||
}
|
||||
|
||||
std::vector<VirtualFile> RealVfsDirectory::GetFiles() const {
|
||||
@@ -506,7 +518,7 @@ VirtualFile RealVfsDirectory::CreateFile(std::string_view name) {
|
||||
|
||||
bool RealVfsDirectory::DeleteSubdirectory(std::string_view name) {
|
||||
const std::string subdir_path = (path + '/').append(name);
|
||||
return base.DeleteDirectory(subdir_path);
|
||||
return FS::RemoveDir(subdir_path);
|
||||
}
|
||||
|
||||
bool RealVfsDirectory::DeleteFile(std::string_view name) {
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Kernel::Svc {
|
||||
/// Sets the thread activity
|
||||
Result SetThreadActivity(Core::System& system, Handle thread_handle,
|
||||
ThreadActivity thread_activity) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, activity=0x{:08X}", thread_handle,
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle={:#08x}, activity={:#08x}", thread_handle,
|
||||
thread_activity);
|
||||
|
||||
// Validate the activity.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -43,7 +43,7 @@ constexpr bool IsValidArbitrationType(Svc::ArbitrationType type) {
|
||||
// Wait for an address (via Address Arbiter)
|
||||
Result WaitForAddress(Core::System& system, u64 address, ArbitrationType arb_type, s32 value,
|
||||
s64 timeout_ns) {
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#X}, arb_type=0x{:X}, value=0x{:X}, timeout_ns={}",
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#x}, arb_type={:#x}, value={:#x}, timeout_ns={}",
|
||||
address, arb_type, value, timeout_ns);
|
||||
|
||||
// Validate input.
|
||||
@@ -74,7 +74,7 @@ Result WaitForAddress(Core::System& system, u64 address, ArbitrationType arb_typ
|
||||
// Signals to an address (via Address Arbiter)
|
||||
Result SignalToAddress(Core::System& system, u64 address, SignalType signal_type, s32 value,
|
||||
s32 count) {
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#X}, signal_type=0x{:X}, value=0x{:X}, count=0x{:X}",
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#x}, signal_type={:#x}, value={:#x}, count={:#x}",
|
||||
address, signal_type, value, count);
|
||||
|
||||
// Validate input.
|
||||
|
||||
@@ -33,7 +33,7 @@ constexpr bool IsValidUnmapFromOwnerCodeMemoryPermission(MemoryPermission perm)
|
||||
} // namespace
|
||||
|
||||
Result CreateCodeMemory(Core::System& system, Handle* out, u64 address, uint64_t size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#X}, size=0x{:X}", address, size);
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#x}, size={:#x}", address, size);
|
||||
|
||||
// Validate address / size.
|
||||
R_UNLESS(Common::IsAligned(address, PageSize), ResultInvalidAddress);
|
||||
@@ -69,8 +69,8 @@ Result ControlCodeMemory(Core::System& system, Handle code_memory_handle,
|
||||
MemoryPermission perm) {
|
||||
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, code_memory_handle={:#X}, operation=0x{:X}, address=0x{:X}, size=0x{:X}, "
|
||||
"permission={:#X}",
|
||||
"called, code_memory_handle={:#x}, operation={:#x}, address={:#x}, size={:#x}, "
|
||||
"permission={:#x}",
|
||||
code_memory_handle, operation, address, size, perm);
|
||||
|
||||
// Validate the address / size.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -17,7 +17,7 @@ namespace Kernel::Svc {
|
||||
/// Wait process wide key atomic
|
||||
Result WaitProcessWideKeyAtomic(Core::System& system, u64 address, u64 cv_key, u32 tag,
|
||||
s64 timeout_ns) {
|
||||
LOG_TRACE(Kernel_SVC, "called address={:X}, cv_key={:X}, tag=0x{:08X}, timeout_ns={}", address,
|
||||
LOG_TRACE(Kernel_SVC, "called address={:X}, cv_key={:X}, tag={:#08x}, timeout_ns={}", address,
|
||||
cv_key, tag, timeout_ns);
|
||||
|
||||
// Validate input.
|
||||
@@ -48,7 +48,7 @@ Result WaitProcessWideKeyAtomic(Core::System& system, u64 address, u64 cv_key, u
|
||||
|
||||
/// Signal process wide key
|
||||
void SignalProcessWideKey(Core::System& system, u64 cv_key, s32 count) {
|
||||
LOG_TRACE(Kernel_SVC, "called, cv_key={:#X}, count=0x{:08X}", cv_key, count);
|
||||
LOG_TRACE(Kernel_SVC, "called, cv_key={:#x}, count={:#08x}", cv_key, count);
|
||||
|
||||
// Signal the condition variable.
|
||||
return GetCurrentProcess(system.Kernel())
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace Kernel::Svc {
|
||||
|
||||
Result SignalEvent(Core::System& system, Handle event_handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, event_handle=0x{:08X}", event_handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called, event_handle={:#08x}", event_handle);
|
||||
|
||||
// Get the current handle table.
|
||||
const KHandleTable& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
@@ -26,7 +26,7 @@ Result SignalEvent(Core::System& system, Handle event_handle) {
|
||||
if (event.IsNotNull()) {
|
||||
event->Signal(system.Kernel());
|
||||
} else {
|
||||
LOG_WARNING(Kernel_SVC, "SignalEvent best-effort unknown handle=0x{:08X} (ignored)",
|
||||
LOG_WARNING(Kernel_SVC, "SignalEvent best-effort unknown handle={:#08x} (ignored)",
|
||||
event_handle);
|
||||
}
|
||||
R_SUCCEED();
|
||||
@@ -41,7 +41,7 @@ Result SignalEvent(Core::System& system, Handle event_handle) {
|
||||
}
|
||||
|
||||
Result ClearEvent(Core::System& system, Handle event_handle) {
|
||||
LOG_TRACE(Kernel_SVC, "called, event_handle=0x{:08X}", event_handle);
|
||||
LOG_TRACE(Kernel_SVC, "called, event_handle={:#08x}", event_handle);
|
||||
|
||||
// Get the current handle table.
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <cctype>
|
||||
#include "core/core.h"
|
||||
#include "core/debugger/debugger.h"
|
||||
#include "core/hle/kernel/k_process.h"
|
||||
@@ -41,7 +42,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
std::string hexdump;
|
||||
for (std::size_t i = 0; i < debug_buffer.size(); i++) {
|
||||
hexdump += fmt::format("{:02X} ", debug_buffer[i]);
|
||||
if (i != 0 && i % 16 == 0) {
|
||||
if ((i + 1) % 32 == 0) {
|
||||
hexdump += '\n';
|
||||
}
|
||||
}
|
||||
@@ -51,35 +52,35 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
};
|
||||
switch (break_reason) {
|
||||
case BreakReason::Panic:
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace PANIC! info1=0x{:016X}, info2=0x{:016X}", info1,
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace PANIC! info1={:#016x}, info2={:#016x}", info1,
|
||||
info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
case BreakReason::Assert:
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace Assertion failed! info1=0x{:016X}, info2=0x{:016X}",
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace Assertion failed! info1={:#016x}, info2={:#016x}",
|
||||
info1, info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
case BreakReason::User:
|
||||
LOG_WARNING(Debug_Emulated, "Userspace Break! 0x{:016X} with size 0x{:016X}", info1, info2);
|
||||
LOG_WARNING(Debug_Emulated, "Userspace Break! {:#016x} with size {:#016x}", info1, info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
case BreakReason::PreLoadDll:
|
||||
LOG_INFO(Debug_Emulated,
|
||||
"Userspace Attempting to load an NRO at 0x{:016X} with size 0x{:016X}", info1,
|
||||
"Userspace Attempting to load an NRO at {:#016x} with size {:#016x}", info1,
|
||||
info2);
|
||||
break;
|
||||
case BreakReason::PostLoadDll:
|
||||
LOG_INFO(Debug_Emulated, "Userspace Loaded an NRO at 0x{:016X} with size 0x{:016X}", info1,
|
||||
LOG_INFO(Debug_Emulated, "Userspace Loaded an NRO at {:#016x} with size {:#016x}", info1,
|
||||
info2);
|
||||
break;
|
||||
case BreakReason::PreUnloadDll:
|
||||
LOG_INFO(Debug_Emulated,
|
||||
"Userspace Attempting to unload an NRO at 0x{:016X} with size 0x{:016X}", info1,
|
||||
"Userspace Attempting to unload an NRO at {:#016x} with size {:#016x}", info1,
|
||||
info2);
|
||||
break;
|
||||
case BreakReason::PostUnloadDll:
|
||||
LOG_INFO(Debug_Emulated, "Userspace Unloaded an NRO at 0x{:016X} with size 0x{:016X}",
|
||||
LOG_INFO(Debug_Emulated, "Userspace Unloaded an NRO at {:#016x} with size {:#016x}",
|
||||
info1, info2);
|
||||
break;
|
||||
case BreakReason::CppException:
|
||||
@@ -88,7 +89,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
default:
|
||||
LOG_WARNING(
|
||||
Debug_Emulated,
|
||||
"Signalling debugger, Unknown break reason {:#X}, info1=0x{:016X}, info2=0x{:016X}",
|
||||
"Signalling debugger, Unknown break reason {:#x}, info1={:#016x}, info2={:#016x}",
|
||||
reason, info1, info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
@@ -101,7 +102,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
if (!notification_only) {
|
||||
LOG_CRITICAL(
|
||||
Debug_Emulated,
|
||||
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
||||
"Emulated program broke execution! reason={:#016x}, info1={:#016x}, info2={:#016x}",
|
||||
reason, info1, info2);
|
||||
|
||||
handle_debug_buffer(info1, info2);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Kernel::Svc {
|
||||
/// Gets system/memory information for the current process
|
||||
Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle handle,
|
||||
u64 info_sub_id) {
|
||||
LOG_TRACE(Kernel_SVC, "called info_id={:#X}, info_sub_id=0x{:X}, handle=0x{:08X}",
|
||||
LOG_TRACE(Kernel_SVC, "called info_id={:#x}, info_sub_id={:#x}, handle={:#08x}",
|
||||
info_id_type, info_sub_id, handle);
|
||||
|
||||
u32 info_id = static_cast<u32>(info_id_type);
|
||||
@@ -153,7 +153,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id=0x{:016X}", info_id);
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id={:#016x}", info_id);
|
||||
R_THROW(ResultInvalidEnumValue);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
|
||||
.GetHandleTable()
|
||||
.GetObject<KThread>(system.Kernel(), Handle(handle));
|
||||
if (thread.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}",
|
||||
LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle={:#08x}",
|
||||
static_cast<Handle>(handle));
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
|
||||
R_SUCCEED();
|
||||
}
|
||||
default:
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id=0x{:016X}", info_id);
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id={:#016x}", info_id);
|
||||
R_THROW(ResultInvalidEnumValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -13,7 +13,7 @@ namespace Kernel::Svc {
|
||||
|
||||
/// Attempts to locks a mutex
|
||||
Result ArbitrateLock(Core::System& system, Handle thread_handle, u64 address, u32 tag) {
|
||||
LOG_TRACE(Kernel_SVC, "called thread_handle=0x{:08X}, address={:#X}, tag=0x{:08X}",
|
||||
LOG_TRACE(Kernel_SVC, "called thread_handle={:#08x}, address={:#x}, tag={:#08x}",
|
||||
thread_handle, address, tag);
|
||||
|
||||
// Validate the input address.
|
||||
@@ -25,7 +25,7 @@ Result ArbitrateLock(Core::System& system, Handle thread_handle, u64 address, u3
|
||||
|
||||
/// Unlock a mutex
|
||||
Result ArbitrateUnlock(Core::System& system, u64 address) {
|
||||
LOG_TRACE(Kernel_SVC, "called address={:#X}", address);
|
||||
LOG_TRACE(Kernel_SVC, "called address={:#x}", address);
|
||||
|
||||
// Validate the input address.
|
||||
R_UNLESS(!IsKernelAddress(address), ResultInvalidCurrentMemory);
|
||||
|
||||
@@ -34,12 +34,12 @@ constexpr bool IsValidAddressRange(u64 address, u64 size) {
|
||||
// in the same order.
|
||||
Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
if (!Common::IsAligned(dst_addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, 0x{:016X}", dst_addr);
|
||||
LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, {:#016X}", dst_addr);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(src_addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Source address is not aligned to 4KB, 0x{:016X}", src_addr);
|
||||
LOG_ERROR(Kernel_SVC, "Source address is not aligned to 4KB, {:#016X}", src_addr);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
@@ -49,26 +49,26 @@ Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Size is not aligned to 4KB, 0x{:016X}", size);
|
||||
LOG_ERROR(Kernel_SVC, "Size is not aligned to 4KB, {:#016X}", size);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(dst_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Destination is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
|
||||
"Destination is not a valid address range, addr={:#016x}, size={:#016x}",
|
||||
dst_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(src_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC, "Source is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
|
||||
LOG_ERROR(Kernel_SVC, "Source is not a valid address range, addr={:#016x}, size={:#016x}",
|
||||
src_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!manager.Contains(src_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source is not within the address space, addr=0x{:016X}, size=0x{:016X}",
|
||||
"Source is not within the address space, addr={:#016x}, size={:#016x}",
|
||||
src_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr
|
||||
} // namespace
|
||||
|
||||
Result SetMemoryPermission(Core::System& system, u64 address, u64 size, MemoryPermission perm) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, address=0x{:016X}, size={:#X}, perm=0x{:08X}", address, size,
|
||||
LOG_DEBUG(Kernel_SVC, "called, address={:#016x}, size={:#x}, perm={:#08x}", address, size,
|
||||
perm);
|
||||
|
||||
// Validate address / size.
|
||||
@@ -101,7 +101,7 @@ Result SetMemoryPermission(Core::System& system, u64 address, u64 size, MemoryPe
|
||||
|
||||
Result SetMemoryAttribute(Core::System& system, u64 address, u64 size, u32 mask, u32 attr) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called, address=0x{:016X}, size={:#X}, mask=0x{:08X}, attribute=0x{:08X}", address,
|
||||
"called, address={:#016x}, size={:#x}, mask={:#08x}, attribute={:#08x}", address,
|
||||
size, mask, attr);
|
||||
|
||||
// Validate address / size.
|
||||
@@ -132,7 +132,7 @@ Result SetMemoryAttribute(Core::System& system, u64 address, u64 size, u32 mask,
|
||||
|
||||
/// Maps a memory range into a different range.
|
||||
Result MapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#x}, src_addr={:#x}, size={:#x}", dst_addr,
|
||||
src_addr, size);
|
||||
|
||||
auto& page_table{GetCurrentProcess(system.Kernel()).GetPageTable()};
|
||||
@@ -147,7 +147,7 @@ Result MapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
|
||||
/// Unmaps a region that was previously mapped with svcMapMemory
|
||||
Result UnmapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#x}, src_addr={:#x}, size={:#x}", dst_addr,
|
||||
src_addr, size);
|
||||
|
||||
auto& page_table{GetCurrentProcess(system.Kernel()).GetPageTable()};
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Kernel::Svc {
|
||||
|
||||
/// Set the process heap to a given Size. It can both extend and shrink the heap.
|
||||
Result SetHeapSize(Core::System& system, u64* out_address, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, heap_size={:#X}", size);
|
||||
LOG_TRACE(Kernel_SVC, "called, heap_size={:#x}", size);
|
||||
|
||||
// Validate size.
|
||||
R_UNLESS(Common::IsAligned(size, HeapSizeAlignment), ResultInvalidSize);
|
||||
@@ -31,10 +31,10 @@ Result SetHeapSize(Core::System& system, u64* out_address, u64 size) {
|
||||
|
||||
/// Maps memory at a desired address
|
||||
Result MapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size={:#X}", addr, size);
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr={:#016x}, size={:#x}", addr, size);
|
||||
|
||||
if (!Common::IsAligned(addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, 0x{:016X}", addr);
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, {:#016X}", addr);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
@@ -63,14 +63,14 @@ Result MapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
|
||||
if (!page_table.Contains(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the address space, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the address space, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
|
||||
if (!page_table.IsInAliasRegion(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the alias region, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the alias region, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
@@ -80,10 +80,10 @@ Result MapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
|
||||
/// Unmaps memory previously mapped via MapPhysicalMemory
|
||||
Result UnmapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size={:#X}", addr, size);
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr={:#016x}, size={:#x}", addr, size);
|
||||
|
||||
if (!Common::IsAligned(addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, 0x{:016X}", addr);
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, {:#016X}", addr);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
@@ -112,14 +112,14 @@ Result UnmapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
|
||||
if (!page_table.Contains(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the address space, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the address space, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
|
||||
if (!page_table.IsInAliasRegion(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the alias region, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the alias region, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ void ExitProcess(Core::System& system) {
|
||||
|
||||
/// Gets the ID of the specified process or a specified thread's owning process.
|
||||
Result GetProcessId(Core::System& system, u64* out_process_id, Handle handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called handle=0x{:08X}", handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called handle={:#08x}", handle);
|
||||
|
||||
// Get the object from the handle table.
|
||||
KScopedAutoObject obj = GetCurrentProcess(system.Kernel())
|
||||
@@ -55,7 +55,7 @@ Result GetProcessId(Core::System& system, u64* out_process_id, Handle handle) {
|
||||
|
||||
Result GetProcessList(Core::System& system, s32* out_num_processes, u64 out_process_ids,
|
||||
int32_t out_process_ids_size) {
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_process_ids=0x{:016X}, out_process_ids_size={}",
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_process_ids={:#016x}, out_process_ids_size={}",
|
||||
out_process_ids, out_process_ids_size);
|
||||
|
||||
// If the supplied size is negative or greater than INT32_MAX / sizeof(u64), bail.
|
||||
@@ -71,7 +71,7 @@ Result GetProcessList(Core::System& system, s32* out_num_processes, u64 out_proc
|
||||
|
||||
if (out_process_ids_size > 0 &&
|
||||
!GetCurrentProcess(kernel).GetPageTable().Contains(out_process_ids, total_copy_size)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin=0x{:016X}, end=0x{:016X}",
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin={:#016x}, end={:#016x}",
|
||||
out_process_ids, out_process_ids + total_copy_size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -95,12 +95,12 @@ Result GetProcessList(Core::System& system, s32* out_num_processes, u64 out_proc
|
||||
|
||||
Result GetProcessInfo(Core::System& system, s64* out, Handle process_handle,
|
||||
ProcessInfoType info_type) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, type={:#X}", process_handle, info_type);
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle={:#08x}, type={:#x}", process_handle, info_type);
|
||||
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}",
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle={:#08x}",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ constexpr bool IsValidProcessMemoryPermission(Svc::MemoryPermission perm) {
|
||||
Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, u64 address,
|
||||
u64 size, Svc::MemoryPermission perm) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, process_handle={:#X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
|
||||
"called, process_handle={:#x}, addr={:#x}, size={:#x}, permissions={:#08x}",
|
||||
process_handle, address, size, perm);
|
||||
|
||||
// Validate the address/size.
|
||||
@@ -62,7 +62,7 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, u
|
||||
Result MapProcessMemory(Core::System& system, u64 dst_address, Handle process_handle,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, dst_address={:#X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}",
|
||||
"called, dst_address={:#x}, process_handle={:#x}, src_address={:#x}, size={:#x}",
|
||||
dst_address, process_handle, src_address, size);
|
||||
|
||||
// Validate the address/size.
|
||||
@@ -103,7 +103,7 @@ Result MapProcessMemory(Core::System& system, u64 dst_address, Handle process_ha
|
||||
Result UnmapProcessMemory(Core::System& system, u64 dst_address, Handle process_handle,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, dst_address={:#X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}",
|
||||
"called, dst_address={:#x}, process_handle={:#x}, src_address={:#x}, size={:#x}",
|
||||
dst_address, process_handle, src_address, size);
|
||||
|
||||
// Validate the address/size.
|
||||
@@ -136,39 +136,39 @@ Result UnmapProcessMemory(Core::System& system, u64 dst_address, Handle process_
|
||||
Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst_address,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called. process_handle=0x{:08X}, dst_address=0x{:016X}, "
|
||||
"src_address=0x{:016X}, size=0x{:016X}",
|
||||
"called. process_handle={:#08x}, dst_address={:#016x}, "
|
||||
"src_address={:#016x}, size={:#016x}",
|
||||
process_handle, dst_address, src_address, size);
|
||||
|
||||
if (!Common::IsAligned(src_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address={:#016X}).",
|
||||
src_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(dst_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address={:#016X}).",
|
||||
dst_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (size == 0 || !Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size=0x{:016X})", size);
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size={:#016X})", size);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(dst_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Destination address range overflows the address space (dst_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Destination address range overflows the address space (dst_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
dst_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range overflows the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range overflows the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -176,7 +176,7 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle=0x{:08X}).",
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle={:#08x}).",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
@@ -184,8 +184,8 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst
|
||||
auto& page_table = process->GetPageTable();
|
||||
if (!page_table.Contains(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range is not within the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range is not within the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -197,39 +197,39 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst
|
||||
Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst_address,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called. process_handle=0x{:08X}, dst_address=0x{:016X}, src_address=0x{:016X}, "
|
||||
"size=0x{:016X}",
|
||||
"called. process_handle={:#08x}, dst_address={:#016x}, src_address={:#016x}, "
|
||||
"size={:#016x}",
|
||||
process_handle, dst_address, src_address, size);
|
||||
|
||||
if (!Common::IsAligned(dst_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address={:#016X}).",
|
||||
dst_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(src_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address={:#016X}).",
|
||||
src_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (size == 0 || !Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size=0x{:016X}).", size);
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size={:#016X}).", size);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(dst_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Destination address range overflows the address space (dst_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Destination address range overflows the address space (dst_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
dst_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range overflows the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range overflows the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle=0x{:08X}).",
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle={:#08x}).",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
@@ -245,8 +245,8 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d
|
||||
auto& page_table = process->GetPageTable();
|
||||
if (!page_table.Contains(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range is not within the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range is not within the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Kernel::Svc {
|
||||
Result QueryMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info,
|
||||
u64 query_address) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, out_memory_info=0x{:016X}, "
|
||||
"query_address=0x{:016X}",
|
||||
"called, out_memory_info={:#016x}, "
|
||||
"query_address={:#016x}",
|
||||
out_memory_info, query_address);
|
||||
|
||||
// Query memory is just QueryProcessMemory on the current process.
|
||||
@@ -24,11 +24,11 @@ Result QueryMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out
|
||||
|
||||
Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info,
|
||||
Handle process_handle, uint64_t address) {
|
||||
LOG_TRACE(Kernel_SVC, "called process=0x{:08X} address={:X}", process_handle, address);
|
||||
LOG_TRACE(Kernel_SVC, "called process={:#08x} address={:X}", process_handle, address);
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}",
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle={:#08x}",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ constexpr bool IsValidSharedMemoryPermission(MemoryPermission perm) {
|
||||
Result MapSharedMemory(Core::System& system, Handle shmem_handle, u64 address, u64 size,
|
||||
Svc::MemoryPermission map_perm) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, shared_memory_handle={:#X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
|
||||
"called, shared_memory_handle={:#x}, addr={:#x}, size={:#x}, permissions={:#08x}",
|
||||
shmem_handle, address, size, map_perm);
|
||||
|
||||
// Validate the address/size.
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Kernel::Svc {
|
||||
|
||||
/// Close a handle
|
||||
Result CloseHandle(Core::System& system, Handle handle) {
|
||||
LOG_TRACE(Kernel_SVC, "Closing handle 0x{:08X}", handle);
|
||||
LOG_TRACE(Kernel_SVC, "Closing handle {:#08x}", handle);
|
||||
|
||||
// Remove the handle.
|
||||
R_UNLESS(GetCurrentProcess(system.Kernel()).GetHandleTable().Remove(system.Kernel(), handle),
|
||||
@@ -28,7 +28,7 @@ Result CloseHandle(Core::System& system, Handle handle) {
|
||||
|
||||
/// Clears the signaled state of an event or process.
|
||||
Result ResetSignal(Core::System& system, Handle handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called handle 0x{:08X}", handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called handle {:#08x}", handle);
|
||||
|
||||
// Get the current handle table.
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
@@ -103,7 +103,7 @@ Result WaitSynchronization(Core::System& system, int32_t* out_index, u64 user_ha
|
||||
|
||||
/// Resumes a thread waiting on WaitSynchronization
|
||||
Result CancelSynchronization(Core::System& system, Handle handle) {
|
||||
LOG_TRACE(Kernel_SVC, "called handle={:#X}", handle);
|
||||
LOG_TRACE(Kernel_SVC, "called handle={:#x}", handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), handle);
|
||||
|
||||
@@ -26,8 +26,8 @@ constexpr bool IsValidVirtualCoreId(int32_t core_id) {
|
||||
Result CreateThread(Core::System& system, Handle* out_handle, u64 entry_point, u64 arg,
|
||||
u64 stack_bottom, s32 priority, s32 core_id) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called entry_point=0x{:08X}, arg=0x{:08X}, stack_bottom=0x{:08X}, "
|
||||
"priority=0x{:08X}, core_id=0x{:08X}",
|
||||
"called entry_point={:#08x}, arg={:#08x}, stack_bottom={:#08x}, "
|
||||
"priority={:#08x}, core_id={:#08x}",
|
||||
entry_point, arg, stack_bottom, priority, core_id);
|
||||
|
||||
// Adjust core id, if it's the default magic.
|
||||
@@ -85,7 +85,7 @@ Result CreateThread(Core::System& system, Handle* out_handle, u64 entry_point, u
|
||||
|
||||
/// Starts the thread for the provided handle
|
||||
Result StartThread(Core::System& system, Handle thread_handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called thread={:#08x}", thread_handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), thread_handle);
|
||||
@@ -143,7 +143,7 @@ void SleepThread(Core::System& system, s64 ns) {
|
||||
|
||||
/// Gets the thread context
|
||||
Result GetThreadContext3(Core::System& system, u64 out_context, Handle thread_handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, out_context=0x{:08X}, thread_handle={:#X}", out_context, thread_handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called, out_context={:#08x}, thread_handle={:#x}", out_context, thread_handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), thread_handle);
|
||||
@@ -202,7 +202,7 @@ Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_
|
||||
// TODO: Handle this case when debug events are supported.
|
||||
UNIMPLEMENTED_IF(debug_handle != InvalidHandle);
|
||||
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_thread_ids=0x{:016X}, out_thread_ids_size={}",
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_thread_ids={:#016x}, out_thread_ids_size={}",
|
||||
out_thread_ids, out_thread_ids_size);
|
||||
|
||||
// If the size is negative or larger than INT32_MAX / sizeof(u64)
|
||||
@@ -217,7 +217,7 @@ Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_
|
||||
|
||||
if (out_thread_ids_size > 0 &&
|
||||
!current_process->GetPageTable().Contains(out_thread_ids, total_copy_size)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin=0x{:016X}, end=0x{:016X}",
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin={:#016x}, end={:#016x}",
|
||||
out_thread_ids, out_thread_ids + total_copy_size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -239,7 +239,7 @@ Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_
|
||||
|
||||
Result GetThreadCoreMask(Core::System& system, s32* out_core_id, u64* out_affinity_mask,
|
||||
Handle thread_handle) {
|
||||
LOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}", thread_handle);
|
||||
LOG_TRACE(Kernel_SVC, "called, handle={:#08x}", thread_handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), thread_handle);
|
||||
|
||||
@@ -41,7 +41,6 @@ ButtonPoller::ButtonPoller(Core::System& system, WindowSystem& window_system) {
|
||||
Core::HID::ControllerUpdateCallback engine_callback{
|
||||
.on_change = [this, &window_system](Core::HID::ControllerTriggerType type) {
|
||||
if (type == Core::HID::ControllerTriggerType::Button) {
|
||||
std::unique_lock lk{m_mutex};
|
||||
OnButtonStateChanged(window_system);
|
||||
}
|
||||
},
|
||||
@@ -52,29 +51,11 @@ ButtonPoller::ButtonPoller(Core::System& system, WindowSystem& window_system) {
|
||||
m_handheld_key = m_handheld->SetCallback(engine_callback);
|
||||
m_player1 = system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1);
|
||||
m_player1_key = m_player1->SetCallback(engine_callback);
|
||||
|
||||
m_thread = std::jthread([this, &window_system](std::stop_token stop_token) {
|
||||
Common::SetCurrentThreadName("ButtonPoller");
|
||||
while (!stop_token.stop_requested()) {
|
||||
using namespace std::chrono_literals;
|
||||
std::unique_lock lk{m_mutex};
|
||||
m_cv.wait_for(lk, 50ms);
|
||||
if (stop_token.stop_requested())
|
||||
break;
|
||||
OnButtonStateChanged(window_system);
|
||||
std::this_thread::sleep_for(5ms);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ButtonPoller::~ButtonPoller() {
|
||||
m_handheld->DeleteCallback(m_handheld_key);
|
||||
m_player1->DeleteCallback(m_player1_key);
|
||||
m_cv.notify_all();
|
||||
if (m_thread.joinable()) {
|
||||
m_thread.request_stop();
|
||||
m_thread.join();
|
||||
}
|
||||
}
|
||||
|
||||
void ButtonPoller::OnButtonStateChanged(WindowSystem& window_system) {
|
||||
|
||||
@@ -33,9 +33,6 @@ public:
|
||||
void OnButtonStateChanged(WindowSystem& window_system);
|
||||
|
||||
private:
|
||||
std::mutex m_mutex;
|
||||
std::condition_variable m_cv;
|
||||
std::jthread m_thread;
|
||||
std::optional<std::chrono::steady_clock::time_point> m_home_button_press_start{};
|
||||
std::optional<std::chrono::steady_clock::time_point> m_capture_button_press_start{};
|
||||
std::optional<std::chrono::steady_clock::time_point> m_power_button_press_start{};
|
||||
|
||||
@@ -26,13 +26,12 @@ EventObserver::EventObserver(Core::System& system, WindowSystem& window_system)
|
||||
m_window_system.SetEventObserver(this);
|
||||
m_wakeup_holder.SetUserData(static_cast<uintptr_t>(UserDataTag::WakeupEvent));
|
||||
m_wakeup_holder.LinkToMultiWait(std::addressof(m_multi_wait));
|
||||
m_thread = std::thread([this] {
|
||||
m_thread = std::jthread([this](std::stop_token stop_token) {
|
||||
Common::SetCurrentThreadName("am:EventObserver");
|
||||
while (true) {
|
||||
auto* signaled_holder = this->WaitSignaled();
|
||||
if (!signaled_holder) {
|
||||
while (!stop_token.stop_requested()) {
|
||||
auto* signaled_holder = this->WaitSignaled(stop_token);
|
||||
if (!signaled_holder)
|
||||
break;
|
||||
}
|
||||
this->Process(signaled_holder);
|
||||
}
|
||||
});
|
||||
@@ -40,9 +39,12 @@ EventObserver::EventObserver(Core::System& system, WindowSystem& window_system)
|
||||
|
||||
EventObserver::~EventObserver() {
|
||||
// Signal thread and wait for processing to finish.
|
||||
m_stop_source.request_stop();
|
||||
m_wakeup_event.Signal(m_system.Kernel());
|
||||
m_thread.join();
|
||||
if (m_thread.joinable()) {
|
||||
// Signal thread and wait for processing to finish.
|
||||
m_thread.request_stop();
|
||||
m_wakeup_event.Signal(m_system.Kernel());
|
||||
m_thread.join();
|
||||
}
|
||||
|
||||
// Free remaining owned sessions.
|
||||
auto it = m_process_holder_list.begin();
|
||||
@@ -88,12 +90,12 @@ void EventObserver::LinkDeferred() {
|
||||
m_multi_wait.MoveAll(std::addressof(m_deferred_wait_list));
|
||||
}
|
||||
|
||||
MultiWaitHolder* EventObserver::WaitSignaled() {
|
||||
MultiWaitHolder* EventObserver::WaitSignaled(std::stop_token stop_token) {
|
||||
while (true) {
|
||||
this->LinkDeferred();
|
||||
|
||||
// If we're done, return before we start waiting.
|
||||
if (m_stop_source.stop_requested()) {
|
||||
if (stop_token.stop_requested()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -131,7 +133,6 @@ void EventObserver::OnProcessEvent(ProcessHolder* holder) {
|
||||
// Check process state.
|
||||
auto& applet = holder->GetApplet();
|
||||
auto& process = holder->GetProcess();
|
||||
|
||||
{
|
||||
std::scoped_lock lk{m_lock, applet.lock};
|
||||
if (process.IsTerminated()) {
|
||||
@@ -156,7 +157,6 @@ void EventObserver::OnProcessEvent(ProcessHolder* holder) {
|
||||
void EventObserver::DestroyAppletProcessHolderLocked(ProcessHolder* holder) {
|
||||
// Remove from owned list.
|
||||
m_process_holder_list.erase(m_process_holder_list.iterator_to(*holder));
|
||||
|
||||
// Destroy and free.
|
||||
delete holder;
|
||||
}
|
||||
|
||||
@@ -32,19 +32,14 @@ public:
|
||||
|
||||
private:
|
||||
void LinkDeferred();
|
||||
MultiWaitHolder* WaitSignaled();
|
||||
MultiWaitHolder* WaitSignaled(std::stop_token stop_token);
|
||||
void Process(MultiWaitHolder* holder);
|
||||
bool WaitAndProcessImpl();
|
||||
void LoopProcess();
|
||||
|
||||
private:
|
||||
void OnWakeupEvent(MultiWaitHolder* holder);
|
||||
void OnProcessEvent(ProcessHolder* holder);
|
||||
|
||||
private:
|
||||
void DestroyAppletProcessHolderLocked(ProcessHolder* holder);
|
||||
|
||||
private:
|
||||
// System reference and context.
|
||||
Core::System& m_system;
|
||||
KernelHelpers::ServiceContext m_context;
|
||||
@@ -67,8 +62,7 @@ private:
|
||||
MultiWait m_deferred_wait_list;
|
||||
|
||||
// Processing thread.
|
||||
std::thread m_thread{};
|
||||
std::stop_source m_stop_source{};
|
||||
std::jthread m_thread{};
|
||||
};
|
||||
|
||||
} // namespace Service::AM
|
||||
|
||||
@@ -57,7 +57,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet>
|
||||
{64, nullptr, "SetInputDetectionSourceSet"},
|
||||
{65, D<&ISelfController::ReportUserIsActive>, "ReportUserIsActive"},
|
||||
{66, nullptr, "GetCurrentIlluminance"},
|
||||
{67, nullptr, "IsIlluminanceAvailable"},
|
||||
{67, D<&ISelfController::IsIlluminanceAvailable>, "IsIlluminanceAvailable"},
|
||||
{68, D<&ISelfController::SetAutoSleepDisabled>, "SetAutoSleepDisabled"},
|
||||
{69, D<&ISelfController::IsAutoSleepDisabled>, "IsAutoSleepDisabled"},
|
||||
{70, nullptr, "ReportMultimediaError"},
|
||||
@@ -347,6 +347,12 @@ Result ISelfController::IsAutoSleepDisabled(Out<bool> out_is_auto_sleep_disabled
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ISelfController::IsIlluminanceAvailable(Out<bool> out_is_illuminance_available) {
|
||||
LOG_WARNING(Service_AM, "(stubbed)");
|
||||
*out_is_illuminance_available = false;
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ISelfController::SetInputDetectionPolicy(InputDetectionPolicy input_detection_policy) {
|
||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||
R_SUCCEED();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user