mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-15 05:15:14 +00:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 002cd922a3 | |||
| 2ffb812e2a | |||
| 3e17ff32d3 | |||
| 26e9a6e308 | |||
| 02d74e1372 | |||
| 9a4f67ff7e | |||
| c9f7905e55 | |||
| 683d54cc22 | |||
| a6630d5a1b | |||
| 076cee88df | |||
| 2c62ad44af | |||
| 9cc8dd40a3 | |||
| 208eae5d94 | |||
| 10eb1ef059 | |||
| ea9be2b91e | |||
| ddca87271a | |||
| 47e9709658 | |||
| cd0b66ecc5 | |||
| f7c40ac8db | |||
| 9caa3212fa | |||
| ea6e890ab9 | |||
| 794988cbca | |||
| 3a9a15e4cc | |||
| cfeb8959c0 | |||
| 6b5d29428d | |||
| 8ecb8cfe0c | |||
| a5f5712316 | |||
| f1a970cac9 | |||
| 031eaf8868 | |||
| 735c2fc23f | |||
| 5bb858d2ce | |||
| 966e975ed9 | |||
| 5979df41df | |||
| 11e8e1de63 |
@@ -112,6 +112,11 @@ 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
|
||||
|
||||
@@ -69,6 +69,26 @@ if (YUZU_STATIC_ROOM)
|
||||
set(fmt_FORCE_BUNDLED ON)
|
||||
endif()
|
||||
|
||||
# my unity/jumbo build
|
||||
option(ENABLE_UNITY_BUILD "Enable Unity/Jumbo build" OFF)
|
||||
|
||||
# 0 compiles all files in
|
||||
# not ideal, but if you're going gung-ho with a unity build, expect failure
|
||||
# MSVC physically can't compile that many files into one TU, so we limit it to 100.
|
||||
if (MSVC)
|
||||
set(_unity_default 100)
|
||||
else()
|
||||
set(_unity_default 0)
|
||||
endif()
|
||||
|
||||
set(UNITY_BATCH_SIZE ${_unity_default} CACHE STRING "Unity build batch size")
|
||||
|
||||
if(MSVC AND ENABLE_UNITY_BUILD)
|
||||
message(STATUS "Unity build")
|
||||
# Unity builds need big objects for MSVC...
|
||||
add_compile_options(/bigobj)
|
||||
endif()
|
||||
|
||||
# qt stuff
|
||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||
@@ -281,6 +301,25 @@ 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)
|
||||
|
||||
+89
-35
@@ -95,7 +95,7 @@ macro(echo)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
||||
"${message}")
|
||||
else()
|
||||
message(DEBUG "${message}")
|
||||
message(STATUS "${message}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -120,6 +120,47 @@ 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
|
||||
@@ -177,7 +218,6 @@ 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)
|
||||
@@ -189,7 +229,8 @@ function(cpm_download url file)
|
||||
foreach(i RANGE 5)
|
||||
file(DOWNLOAD ${url} ${file}
|
||||
${args}
|
||||
STATUS ret)
|
||||
STATUS ret
|
||||
LOG log)
|
||||
|
||||
list(GET ret 0 code)
|
||||
if (code EQUAL 0)
|
||||
@@ -298,47 +339,60 @@ 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)
|
||||
file(MAKE_DIRECTORY ${path_parent})
|
||||
cmake_path(GET abs_path FILENAME path_name)
|
||||
|
||||
# Get filename from URL
|
||||
get_filename_component(base_filename ${ARG_URL} NAME)
|
||||
# rename tmp dir
|
||||
set(tmp_renamed "${TMP}/${path_name}")
|
||||
file(RENAME "${contents_abs}" "${tmp_renamed}")
|
||||
|
||||
# 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()
|
||||
# now copy
|
||||
# TODO: Error handling beyond what cmake does????
|
||||
file(COPY ${tmp_renamed} DESTINATION ${path_parent})
|
||||
|
||||
# TODO: only echo this in script mode
|
||||
echo("Extracted to ${abs_path}")
|
||||
message(DEBUG "Extracted to ${abs_path}")
|
||||
|
||||
# Apply patches
|
||||
apply_patches("${ARG_PATCHES}" "${abs_path}")
|
||||
@@ -347,7 +401,7 @@ function(fetch_package)
|
||||
file(WRITE "${abs_path}/.cpm_patch_key" ${ARG_PATCH_KEY})
|
||||
|
||||
# done! :)
|
||||
file(REMOVE_RECURSE ${file})
|
||||
file(REMOVE_RECURSE ${TMP})
|
||||
endfunction()
|
||||
|
||||
# compute a hash of all patch file contents
|
||||
|
||||
+354
@@ -0,0 +1,354 @@
|
||||
[
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="compatibility_list">
|
||||
<file>compatibility_list.json</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Vendored
+765
-613
File diff suppressed because it is too large
Load Diff
Vendored
+768
-611
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+761
-604
File diff suppressed because it is too large
Load Diff
Vendored
+751
-591
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+753
-591
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+746
-589
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+744
-587
File diff suppressed because it is too large
Load Diff
Vendored
+749
-590
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+787
-635
File diff suppressed because it is too large
Load Diff
Vendored
+754
-597
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+749
-590
File diff suppressed because it is too large
Load Diff
Vendored
+750
-590
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+750
-590
File diff suppressed because it is too large
Load Diff
Vendored
+749
-590
File diff suppressed because it is too large
Load Diff
Vendored
+747
-590
File diff suppressed because it is too large
Load Diff
Vendored
+750
-590
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
Vendored
+751
-591
File diff suppressed because it is too large
Load Diff
Vendored
+753
-596
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,7 @@ These options control dependencies.
|
||||
- This option is subject for removal.
|
||||
- `YUZU_TESTS` (ON) Compile tests - requires Catch2
|
||||
- `ENABLE_LTO` (OFF) Enable link-time optimization
|
||||
- `ENABLE_UNITY_BUILD` (OFF) Enables "Unity/Jumbo" builds
|
||||
- Not recommended on Windows
|
||||
- UNIX may be better off appending `-flto=thin` to compiler args
|
||||
- `USE_FASTER_LINKER` (OFF) Check if a faster linker is available
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
# Enable modules to include each other's files
|
||||
include_directories(.)
|
||||
|
||||
if (ENABLE_UNITY_BUILD)
|
||||
set(CMAKE_UNITY_BUILD ON)
|
||||
set(CMAKE_UNITY_BUILD_BATCH_SIZE ${UNITY_BATCH_SIZE})
|
||||
endif()
|
||||
|
||||
# Dynarmic
|
||||
if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64 OR ARCHITECTURE_riscv64 OR ARCHITECTURE_loongarch64) AND NOT YUZU_STATIC_ROOM)
|
||||
add_subdirectory(dynarmic)
|
||||
|
||||
+1
@@ -16,6 +16,7 @@ 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,7 +27,6 @@ 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"),
|
||||
|
||||
+7
-9
@@ -669,15 +669,6 @@ 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,
|
||||
@@ -766,6 +757,13 @@ 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,
|
||||
|
||||
+1
-1
@@ -283,7 +283,6 @@ 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)
|
||||
@@ -300,6 +299,7 @@ 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)
|
||||
|
||||
@@ -476,8 +476,6 @@
|
||||
<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>
|
||||
@@ -499,8 +497,6 @@
|
||||
<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>
|
||||
|
||||
@@ -510,6 +506,8 @@
|
||||
<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>
|
||||
@@ -575,12 +573,6 @@
|
||||
<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>
|
||||
@@ -1008,13 +1000,6 @@
|
||||
<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>
|
||||
|
||||
|
||||
@@ -470,7 +470,6 @@
|
||||
<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>
|
||||
@@ -503,6 +502,8 @@
|
||||
<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>
|
||||
@@ -1001,13 +1002,6 @@
|
||||
<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>
|
||||
|
||||
|
||||
@@ -499,6 +499,8 @@
|
||||
<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>
|
||||
|
||||
@@ -502,6 +502,8 @@
|
||||
<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>
|
||||
|
||||
@@ -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,13 +463,11 @@
|
||||
<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>
|
||||
@@ -490,7 +488,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>
|
||||
|
||||
@@ -500,6 +498,8 @@
|
||||
<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,7 @@
|
||||
|
||||
<!-- Renderer Accuracy -->
|
||||
<string name="renderer_accuracy_low">快速</string>
|
||||
<string name="renderer_accuracy_medium">均衡</string>
|
||||
<string name="renderer_accuracy_medium">平衡</string>
|
||||
<string name="renderer_accuracy_high">精确</string>
|
||||
|
||||
<!-- DMA Accuracy -->
|
||||
@@ -998,13 +998,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1028,7 +1021,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>
|
||||
|
||||
@@ -522,21 +522,6 @@
|
||||
<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>
|
||||
|
||||
@@ -482,8 +482,6 @@
|
||||
<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="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>
|
||||
@@ -516,6 +514,8 @@
|
||||
<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>
|
||||
@@ -1047,13 +1047,6 @@
|
||||
<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,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -5,17 +8,11 @@
|
||||
#include "common/assert.h"
|
||||
|
||||
namespace AudioCore::ADSP::OpusDecoder {
|
||||
namespace {
|
||||
bool IsValidChannelCount(u32 channel_count) {
|
||||
return channel_count == 1 || channel_count == 2;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
u32 OpusDecodeObject::GetWorkBufferSize(u32 channel_count) {
|
||||
if (!IsValidChannelCount(channel_count)) {
|
||||
if (channel_count == 1 || channel_count == 2)
|
||||
return 0;
|
||||
}
|
||||
return static_cast<u32>(sizeof(OpusDecodeObject)) + opus_decoder_get_size(channel_count);
|
||||
return u32(sizeof(OpusDecodeObject)) + opus_decoder_get_size(channel_count);
|
||||
}
|
||||
|
||||
OpusDecodeObject& OpusDecodeObject::Initialize(u64 buffer, u64 buffer2) {
|
||||
|
||||
@@ -22,10 +22,6 @@ namespace AudioCore::ADSP::OpusDecoder {
|
||||
namespace {
|
||||
constexpr size_t OpusStreamCountMax = 255;
|
||||
|
||||
bool IsValidChannelCount(u32 channel_count) {
|
||||
return channel_count == 1 || channel_count == 2;
|
||||
}
|
||||
|
||||
bool IsValidMultiStreamChannelCount(u32 channel_count) {
|
||||
return channel_count <= OpusStreamCountMax;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -7,13 +10,10 @@
|
||||
namespace AudioCore::ADSP::OpusDecoder {
|
||||
|
||||
namespace {
|
||||
bool IsValidChannelCount(u32 channel_count) {
|
||||
return channel_count == 1 || channel_count == 2;
|
||||
}
|
||||
|
||||
bool IsValidStreamCounts(u32 total_stream_count, u32 stereo_stream_count) {
|
||||
return total_stream_count > 0 && static_cast<s32>(stereo_stream_count) >= 0 &&
|
||||
stereo_stream_count <= total_stream_count && IsValidChannelCount(total_stream_count);
|
||||
return total_stream_count > 0 && s32(stereo_stream_count) >= 0
|
||||
&& stereo_stream_count <= total_stream_count
|
||||
&& (total_stream_count == 1 || total_stream_count == 2);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
namespace AudioCore {
|
||||
|
||||
AudioCore::AudioCore(Core::System& system) {
|
||||
audio_manager.emplace(system);
|
||||
audio_manager.emplace();
|
||||
CreateSinks();
|
||||
// Must be created after the sinks
|
||||
adsp.emplace(system, *output_sink);
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
|
||||
namespace AudioCore::AudioIn {
|
||||
|
||||
Manager::Manager(Core::System& system) {
|
||||
Manager::Manager(Core::System& system_) : system{system_} {
|
||||
std::iota(session_ids.begin(), session_ids.end(), 0);
|
||||
num_free_sessions = MaxInSessions;
|
||||
}
|
||||
|
||||
Result Manager::AcquireSessionId(Core::System& system, size_t& session_id) {
|
||||
Result Manager::AcquireSessionId(size_t& session_id) {
|
||||
if (num_free_sessions == 0) {
|
||||
LOG_ERROR(Service_Audio, "All 4 AudioIn sessions are in use, cannot create any more");
|
||||
return Service::Audio::ResultOutOfSessions;
|
||||
@@ -31,7 +31,7 @@ Result Manager::AcquireSessionId(Core::System& system, size_t& session_id) {
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void Manager::ReleaseSessionId(Core::System& system, const size_t session_id) {
|
||||
void Manager::ReleaseSessionId(const size_t session_id) {
|
||||
std::scoped_lock l{mutex};
|
||||
LOG_DEBUG(Service_Audio, "Freeing AudioIn session {}", session_id);
|
||||
session_ids[free_session_id] = session_id;
|
||||
@@ -41,20 +41,21 @@ void Manager::ReleaseSessionId(Core::System& system, const size_t session_id) {
|
||||
applet_resource_user_ids[session_id] = 0;
|
||||
}
|
||||
|
||||
Result Manager::LinkToManager(Core::System& system) {
|
||||
Result Manager::LinkToManager() {
|
||||
std::scoped_lock l{mutex};
|
||||
if (!linked_to_manager) {
|
||||
system.AudioCore().GetAudioManager().SetInManager(&Manager::BufferReleaseAndRegister);
|
||||
system.AudioCore().GetAudioManager().SetInManager(std::bind(&Manager::BufferReleaseAndRegister, this));
|
||||
linked_to_manager = true;
|
||||
}
|
||||
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void Manager::Start(Core::System& system) {
|
||||
void Manager::Start() {
|
||||
if (sessions_started) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::scoped_lock l{mutex};
|
||||
for (auto& session : sessions) {
|
||||
if (session) {
|
||||
@@ -65,19 +66,21 @@ void Manager::Start(Core::System& system) {
|
||||
sessions_started = true;
|
||||
}
|
||||
|
||||
void Manager::BufferReleaseAndRegister(void *data, Core::System& system) noexcept {
|
||||
Manager* this_ = (Manager*)data;
|
||||
std::scoped_lock l{this_->mutex};
|
||||
for (auto& session : this_->sessions) {
|
||||
void Manager::BufferReleaseAndRegister() {
|
||||
std::scoped_lock l{mutex};
|
||||
for (auto& session : sessions) {
|
||||
if (session != nullptr) {
|
||||
session->ReleaseAndRegisterBuffers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 Manager::GetDeviceNames(Core::System& system, std::span<Renderer::AudioDevice::AudioDeviceName> names, [[maybe_unused]] const bool filter) {
|
||||
u32 Manager::GetDeviceNames(std::span<Renderer::AudioDevice::AudioDeviceName> names,
|
||||
[[maybe_unused]] const bool filter) {
|
||||
std::scoped_lock l{mutex};
|
||||
LinkToManager(system);
|
||||
|
||||
LinkToManager();
|
||||
|
||||
auto input_devices{Sink::GetDeviceListForSink(Settings::values.sink_id.GetValue(), true)};
|
||||
if (!input_devices.empty() && !names.empty()) {
|
||||
names[0] = Renderer::AudioDevice::AudioDeviceName("Uac");
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -33,29 +30,31 @@ public:
|
||||
* @param session_id - Output session_id.
|
||||
* @return Result code.
|
||||
*/
|
||||
Result AcquireSessionId(Core::System& system, size_t& session_id);
|
||||
Result AcquireSessionId(size_t& session_id);
|
||||
|
||||
/**
|
||||
* Release a session id on close.
|
||||
*
|
||||
* @param session_id - Session id to free.
|
||||
*/
|
||||
void ReleaseSessionId(Core::System& system, const size_t session_id);
|
||||
void ReleaseSessionId(size_t session_id);
|
||||
|
||||
/**
|
||||
* Link the audio in manager to the main audio manager.
|
||||
*
|
||||
* @return Result code.
|
||||
*/
|
||||
Result LinkToManager(Core::System& system);
|
||||
Result LinkToManager();
|
||||
|
||||
/**
|
||||
* Start the audio in manager.
|
||||
*/
|
||||
void Start(Core::System& system);
|
||||
void Start();
|
||||
|
||||
/// @brief Callback function, called by the audio manager when the audio in event is signalled.
|
||||
static void BufferReleaseAndRegister(void *data, Core::System& system) noexcept;
|
||||
/**
|
||||
* Callback function, called by the audio manager when the audio in event is signalled.
|
||||
*/
|
||||
void BufferReleaseAndRegister();
|
||||
|
||||
/**
|
||||
* Get a list of audio in device names.
|
||||
@@ -65,8 +64,10 @@ public:
|
||||
*
|
||||
* @return Number of names written.
|
||||
*/
|
||||
u32 GetDeviceNames(Core::System& system, std::span<Renderer::AudioDevice::AudioDeviceName> names, bool filter);
|
||||
u32 GetDeviceNames(std::span<Renderer::AudioDevice::AudioDeviceName> names, bool filter);
|
||||
|
||||
/// Core system
|
||||
Core::System& system;
|
||||
/// Array of session ids
|
||||
std::array<size_t, MaxInSessions> session_ids{};
|
||||
/// Array of resource user ids
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace AudioCore {
|
||||
|
||||
AudioManager::AudioManager(Core::System& system) {
|
||||
thread = std::jthread([&](std::stop_token stop_token) {
|
||||
AudioManager::AudioManager() {
|
||||
thread = std::jthread([this](std::stop_token stop_token) {
|
||||
Common::SetCurrentThreadName("AudioManager");
|
||||
std::unique_lock l{events.GetAudioEventLock()};
|
||||
events.ClearEvents();
|
||||
@@ -25,7 +25,7 @@ AudioManager::AudioManager(Core::System& system) {
|
||||
const auto event_type = Event::Type(i);
|
||||
if (events.CheckAudioEventSet(event_type) || timed_out) {
|
||||
if (buffer_events[i]) {
|
||||
buffer_events[i](this, system);
|
||||
buffer_events[i]();
|
||||
}
|
||||
}
|
||||
events.SetAudioEvent(event_type, false);
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
|
||||
#include "audio_core/audio_event.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
union Result;
|
||||
|
||||
namespace AudioCore {
|
||||
@@ -38,9 +34,10 @@ namespace AudioCore {
|
||||
* This is only used by audio in and audio out.
|
||||
*/
|
||||
class AudioManager {
|
||||
using BufferEventFunc = void (*)(void *data, Core::System& system) noexcept;
|
||||
using BufferEventFunc = std::function<void()>;
|
||||
|
||||
public:
|
||||
explicit AudioManager(Core::System& system);
|
||||
explicit AudioManager();
|
||||
|
||||
/**
|
||||
* Shutdown the audio manager.
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
|
||||
namespace AudioCore::AudioOut {
|
||||
|
||||
Manager::Manager(Core::System& system) {
|
||||
Manager::Manager(Core::System& system_) : system{system_} {
|
||||
std::iota(session_ids.begin(), session_ids.end(), 0);
|
||||
num_free_sessions = MaxOutSessions;
|
||||
}
|
||||
|
||||
Result Manager::AcquireSessionId(Core::System& system, size_t& session_id) {
|
||||
Result Manager::AcquireSessionId(size_t& session_id) {
|
||||
if (num_free_sessions == 0) {
|
||||
LOG_ERROR(Service_Audio, "All 12 Audio Out sessions are in use, cannot create any more");
|
||||
return Service::Audio::ResultOutOfSessions;
|
||||
@@ -30,7 +30,7 @@ Result Manager::AcquireSessionId(Core::System& system, size_t& session_id) {
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void Manager::ReleaseSessionId(Core::System& system, const size_t session_id) {
|
||||
void Manager::ReleaseSessionId(const size_t session_id) {
|
||||
std::scoped_lock l{mutex};
|
||||
LOG_DEBUG(Service_Audio, "Freeing AudioOut session {}", session_id);
|
||||
session_ids[free_session_id] = session_id;
|
||||
@@ -40,17 +40,17 @@ void Manager::ReleaseSessionId(Core::System& system, const size_t session_id) {
|
||||
applet_resource_user_ids[session_id] = 0;
|
||||
}
|
||||
|
||||
Result Manager::LinkToManager(Core::System& system) {
|
||||
Result Manager::LinkToManager() {
|
||||
std::scoped_lock l{mutex};
|
||||
if (!linked_to_manager) {
|
||||
system.AudioCore().GetAudioManager().SetOutManager(&Manager::BufferReleaseAndRegister);
|
||||
system.AudioCore().GetAudioManager().SetOutManager(std::bind(&Manager::BufferReleaseAndRegister, this));
|
||||
linked_to_manager = true;
|
||||
}
|
||||
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void Manager::Start(Core::System& system) {
|
||||
void Manager::Start() {
|
||||
if (sessions_started) {
|
||||
return;
|
||||
}
|
||||
@@ -65,14 +65,19 @@ void Manager::Start(Core::System& system) {
|
||||
sessions_started = true;
|
||||
}
|
||||
|
||||
void Manager::BufferReleaseAndRegister(void *data, Core::System& system) noexcept {
|
||||
Manager* this_ = (Manager*)data;
|
||||
std::scoped_lock l{this_->mutex};
|
||||
for (auto& session : this_->sessions) {
|
||||
void Manager::BufferReleaseAndRegister() {
|
||||
std::scoped_lock l{mutex};
|
||||
for (auto& session : sessions) {
|
||||
if (session != nullptr) {
|
||||
session->ReleaseAndRegisterBuffers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 Manager::GetAudioOutDeviceNames(
|
||||
std::vector<Renderer::AudioDevice::AudioDeviceName>& names) const {
|
||||
names.emplace_back("DeviceOut");
|
||||
return 1;
|
||||
}
|
||||
|
||||
} // namespace AudioCore::AudioOut
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -32,32 +29,42 @@ public:
|
||||
* @param session_id - Output session_id.
|
||||
* @return Result code.
|
||||
*/
|
||||
Result AcquireSessionId(Core::System& system, size_t& session_id);
|
||||
Result AcquireSessionId(size_t& session_id);
|
||||
|
||||
/**
|
||||
* Release a session id on close.
|
||||
*
|
||||
* @param session_id - Session id to free.
|
||||
*/
|
||||
void ReleaseSessionId(Core::System& system, const size_t session_id);
|
||||
void ReleaseSessionId(size_t session_id);
|
||||
|
||||
/**
|
||||
* Link this manager to the main audio manager.
|
||||
*
|
||||
* @return Result code.
|
||||
*/
|
||||
Result LinkToManager(Core::System& system);
|
||||
Result LinkToManager();
|
||||
|
||||
/**
|
||||
* Start the audio out manager.
|
||||
*/
|
||||
void Start(Core::System& system);
|
||||
void Start();
|
||||
|
||||
/**
|
||||
* Callback function, called by the audio manager when the audio out event is signalled.
|
||||
*/
|
||||
static void BufferReleaseAndRegister(void* data, Core::System& system) noexcept;
|
||||
void BufferReleaseAndRegister();
|
||||
|
||||
/**
|
||||
* Get a list of audio out device names.
|
||||
*
|
||||
* @param names - Output container to write names to.
|
||||
* @return Number of names written.
|
||||
*/
|
||||
u32 GetAudioOutDeviceNames(std::vector<Renderer::AudioDevice::AudioDeviceName>& names) const;
|
||||
|
||||
/// Core system
|
||||
Core::System& system;
|
||||
/// Array of session ids
|
||||
std::array<size_t, MaxOutSessions> session_ids{};
|
||||
/// Array of resource user ids
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "audio_core/audio_render_manager.h"
|
||||
#include "audio_core/common/audio_renderer_parameter.h"
|
||||
#include "audio_core/renderer/system_manager.h"
|
||||
#include "audio_core/common/feature_support.h"
|
||||
#include "core/core.h"
|
||||
|
||||
namespace AudioCore::Renderer {
|
||||
|
||||
Manager::Manager(Core::System& system_)
|
||||
: system_manager{std::make_unique<SystemManager>(system_)}
|
||||
{
|
||||
: system{system_}, system_manager{std::make_unique<SystemManager>(system)} {
|
||||
std::iota(session_ids.begin(), session_ids.end(), 0);
|
||||
}
|
||||
|
||||
@@ -64,11 +59,11 @@ u32 Manager::GetSessionCount() const {
|
||||
return session_count;
|
||||
}
|
||||
|
||||
bool Manager::AddSystem(Renderer::System& system_) {
|
||||
bool Manager::AddSystem(System& system_) {
|
||||
return system_manager->Add(system_);
|
||||
}
|
||||
|
||||
bool Manager::RemoveSystem(Renderer::System& system_) {
|
||||
bool Manager::RemoveSystem(System& system_) {
|
||||
return system_manager->Remove(system_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -74,7 +71,7 @@ public:
|
||||
* @param system - The system to add.
|
||||
* @return True if the system was successfully added, otherwise false.
|
||||
*/
|
||||
bool AddSystem(Renderer::System& system);
|
||||
bool AddSystem(System& system);
|
||||
|
||||
/**
|
||||
* Remove a renderer system from the manager.
|
||||
@@ -82,7 +79,7 @@ public:
|
||||
* @param system - The system to remove.
|
||||
* @return True if the system was successfully removed, otherwise false.
|
||||
*/
|
||||
bool RemoveSystem(Renderer::System& system);
|
||||
bool RemoveSystem(System& system);
|
||||
|
||||
/**
|
||||
* Free a session id when the system wants to shut down.
|
||||
@@ -92,6 +89,8 @@ public:
|
||||
void ReleaseSessionId(s32 session_id);
|
||||
|
||||
private:
|
||||
/// Core system
|
||||
Core::System& system;
|
||||
/// Session ids, -1 when in use
|
||||
std::array<s32, MaxRendererSessions> session_ids{};
|
||||
/// Number of active renderers
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -19,9 +16,8 @@ namespace AudioCore {
|
||||
*/
|
||||
class WorkbufferAllocator {
|
||||
public:
|
||||
explicit WorkbufferAllocator(std::span<u8> buffer_)
|
||||
: buffer{buffer_}
|
||||
{}
|
||||
explicit WorkbufferAllocator(std::span<u8> buffer_, u64 size_)
|
||||
: buffer{reinterpret_cast<u64>(buffer_.data())}, size{size_} {}
|
||||
|
||||
/**
|
||||
* Allocate the given count of T elements, aligned to alignment.
|
||||
@@ -33,31 +29,36 @@ public:
|
||||
template <typename T>
|
||||
std::span<T> Allocate(u64 count, u64 alignment) {
|
||||
u64 out{0};
|
||||
u64 byte_size = count * sizeof(T);
|
||||
u64 byte_size{count * sizeof(T)};
|
||||
|
||||
if (byte_size > 0) {
|
||||
auto current{uintptr_t(buffer.data()) + offset};
|
||||
auto current{buffer + offset};
|
||||
auto aligned_buffer{Common::AlignUp(current, alignment)};
|
||||
if (aligned_buffer + byte_size <= uintptr_t(buffer.data()) + buffer.size()) {
|
||||
if (aligned_buffer + byte_size <= buffer + size) {
|
||||
out = aligned_buffer;
|
||||
offset = byte_size - uintptr_t(buffer.data()) + aligned_buffer;
|
||||
offset = byte_size - buffer + aligned_buffer;
|
||||
} else {
|
||||
LOG_ERROR(
|
||||
Service_Audio,
|
||||
"Allocated buffer was too small to hold new alloc.\nAllocator size={:08X}, "
|
||||
"offset={:08X}.\nAttempting to allocate {:08X} with alignment={:02X}",
|
||||
buffer.size(), offset, byte_size, alignment);
|
||||
size, offset, byte_size, alignment);
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return std::span<T>(reinterpret_cast<T*>(out), count);
|
||||
}
|
||||
|
||||
/// @brief Align the current offset to the given alignment.
|
||||
/// @param alignment - The required starting alignment.
|
||||
/**
|
||||
* Align the current offset to the given alignment.
|
||||
*
|
||||
* @param alignment - The required starting alignment.
|
||||
*/
|
||||
void Align(u64 alignment) {
|
||||
auto current{uintptr_t(buffer.data()) + offset};
|
||||
auto current{buffer + offset};
|
||||
auto aligned_buffer{Common::AlignUp(current, alignment)};
|
||||
offset = 0 - uintptr_t(buffer.data()) + aligned_buffer;
|
||||
offset = 0 - buffer + aligned_buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,7 +76,7 @@ public:
|
||||
* @return The size of the current buffer.
|
||||
*/
|
||||
u64 GetSize() const {
|
||||
return buffer.size();
|
||||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,11 +85,14 @@ public:
|
||||
* @return The remaining size left in the buffer.
|
||||
*/
|
||||
u64 GetRemainingSize() const {
|
||||
return buffer.size() - offset;
|
||||
return size - offset;
|
||||
}
|
||||
|
||||
private:
|
||||
const std::span<u8> buffer;
|
||||
/// The buffer into which we are allocating.
|
||||
u64 buffer;
|
||||
/// Size of the buffer we're allocating to.
|
||||
u64 size;
|
||||
/// Current offset into the buffer, an error will be thrown if it exceeds size.
|
||||
u64 offset{};
|
||||
};
|
||||
|
||||
@@ -11,43 +11,42 @@
|
||||
namespace AudioCore::AudioIn {
|
||||
|
||||
In::In(Core::System& system_, Manager& manager_, Kernel::KEvent* event_, size_t session_id_)
|
||||
: manager{manager_}, parent_mutex{manager.mutex}, event{event_}
|
||||
, audio_system{system_, event, session_id_}
|
||||
{}
|
||||
: manager{manager_}, parent_mutex{manager.mutex}, event{event_}, system{system_, event,
|
||||
session_id_} {}
|
||||
|
||||
void In::Free(Core::System& system) {
|
||||
void In::Free() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
manager.ReleaseSessionId(system, audio_system.GetSessionId());
|
||||
manager.ReleaseSessionId(system.GetSessionId());
|
||||
}
|
||||
|
||||
System& In::GetSystem() {
|
||||
return audio_system;
|
||||
return system;
|
||||
}
|
||||
|
||||
AudioIn::State In::GetState() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetState();
|
||||
return system.GetState();
|
||||
}
|
||||
|
||||
Result In::StartSystem() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.Start();
|
||||
return system.Start();
|
||||
}
|
||||
|
||||
void In::StartSession() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
audio_system.StartSession();
|
||||
system.StartSession();
|
||||
}
|
||||
|
||||
Result In::StopSystem() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.Stop();
|
||||
return system.Stop();
|
||||
}
|
||||
|
||||
Result In::AppendBuffer(const AudioInBuffer& buffer, u64 tag) {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
|
||||
if (audio_system.AppendBuffer(buffer, tag)) {
|
||||
if (system.AppendBuffer(buffer, tag)) {
|
||||
return ResultSuccess;
|
||||
}
|
||||
return Service::Audio::ResultBufferCountReached;
|
||||
@@ -55,20 +54,20 @@ Result In::AppendBuffer(const AudioInBuffer& buffer, u64 tag) {
|
||||
|
||||
void In::ReleaseAndRegisterBuffers() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
if (audio_system.GetState() == State::Started) {
|
||||
audio_system.ReleaseBuffers();
|
||||
audio_system.RegisterBuffers();
|
||||
if (system.GetState() == State::Started) {
|
||||
system.ReleaseBuffers();
|
||||
system.RegisterBuffers();
|
||||
}
|
||||
}
|
||||
|
||||
bool In::FlushAudioInBuffers() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.FlushAudioInBuffers();
|
||||
return system.FlushAudioInBuffers();
|
||||
}
|
||||
|
||||
u32 In::GetReleasedBuffers(std::span<u64> tags) {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetReleasedBuffers(tags);
|
||||
return system.GetReleasedBuffers(tags);
|
||||
}
|
||||
|
||||
Kernel::KReadableEvent& In::GetBufferEvent() {
|
||||
@@ -78,27 +77,27 @@ Kernel::KReadableEvent& In::GetBufferEvent() {
|
||||
|
||||
f32 In::GetVolume() const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetVolume();
|
||||
return system.GetVolume();
|
||||
}
|
||||
|
||||
void In::SetVolume(f32 volume) {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
audio_system.SetVolume(volume);
|
||||
system.SetVolume(volume);
|
||||
}
|
||||
|
||||
bool In::ContainsAudioBuffer(u64 tag) const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.ContainsAudioBuffer(tag);
|
||||
return system.ContainsAudioBuffer(tag);
|
||||
}
|
||||
|
||||
u32 In::GetBufferCount() const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetBufferCount();
|
||||
return system.GetBufferCount();
|
||||
}
|
||||
|
||||
u64 In::GetPlayedSampleCount() const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetPlayedSampleCount();
|
||||
return system.GetPlayedSampleCount();
|
||||
}
|
||||
|
||||
} // namespace AudioCore::AudioIn
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -33,7 +30,7 @@ public:
|
||||
/**
|
||||
* Free this audio in from the audio in manager.
|
||||
*/
|
||||
void Free(Core::System& system);
|
||||
void Free();
|
||||
|
||||
/**
|
||||
* Get this audio in's system.
|
||||
@@ -144,7 +141,7 @@ private:
|
||||
/// Buffer event, signalled when buffers are ready to be released
|
||||
Kernel::KEvent* event;
|
||||
/// Main audio in system
|
||||
System audio_system;
|
||||
System system;
|
||||
};
|
||||
|
||||
} // namespace AudioCore::AudioIn
|
||||
|
||||
@@ -14,14 +14,16 @@
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/kernel/k_event.h"
|
||||
|
||||
namespace AudioCore::AudioIn {
|
||||
|
||||
// See texture_cache/util.h
|
||||
template<typename T, size_t N>
|
||||
#if BOOST_VERSION >= 108100 || __GNUC__ > 12
|
||||
[[nodiscard]] boost::container::static_vector<T, N> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
[[nodiscard]] static inline boost::container::static_vector<T, N> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
return v;
|
||||
}
|
||||
#else
|
||||
[[nodiscard]] std::vector<T> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
[[nodiscard]] static inline std::vector<T> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
std::vector<T> u;
|
||||
for (auto const& e : v)
|
||||
u.push_back(e);
|
||||
@@ -29,8 +31,6 @@ template<typename T, size_t N>
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace AudioCore::AudioIn {
|
||||
|
||||
System::System(Core::System& system_, Kernel::KEvent* event_, const size_t session_id_)
|
||||
: system{system_}, buffer_event{event_},
|
||||
session_id{session_id_}, session{std::make_unique<DeviceSession>(system_)} {}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -11,43 +8,42 @@
|
||||
namespace AudioCore::AudioOut {
|
||||
|
||||
Out::Out(Core::System& system_, Manager& manager_, Kernel::KEvent* event_, size_t session_id_)
|
||||
: manager{manager_}, parent_mutex{manager.mutex}, event{event_}
|
||||
, audio_system{system_, event, session_id_}
|
||||
{}
|
||||
: manager{manager_}, parent_mutex{manager.mutex}, event{event_}, system{system_, event,
|
||||
session_id_} {}
|
||||
|
||||
void Out::Free(Core::System& system) {
|
||||
void Out::Free() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
manager.ReleaseSessionId(system, audio_system.GetSessionId());
|
||||
manager.ReleaseSessionId(system.GetSessionId());
|
||||
}
|
||||
|
||||
System& Out::GetSystem() {
|
||||
return audio_system;
|
||||
return system;
|
||||
}
|
||||
|
||||
AudioOut::State Out::GetState() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetState();
|
||||
return system.GetState();
|
||||
}
|
||||
|
||||
Result Out::StartSystem() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.Start();
|
||||
return system.Start();
|
||||
}
|
||||
|
||||
void Out::StartSession() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
audio_system.StartSession();
|
||||
system.StartSession();
|
||||
}
|
||||
|
||||
Result Out::StopSystem() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.Stop();
|
||||
return system.Stop();
|
||||
}
|
||||
|
||||
Result Out::AppendBuffer(const AudioOutBuffer& buffer, const u64 tag) {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
|
||||
if (audio_system.AppendBuffer(buffer, tag)) {
|
||||
if (system.AppendBuffer(buffer, tag)) {
|
||||
return ResultSuccess;
|
||||
}
|
||||
return Service::Audio::ResultBufferCountReached;
|
||||
@@ -55,20 +51,20 @@ Result Out::AppendBuffer(const AudioOutBuffer& buffer, const u64 tag) {
|
||||
|
||||
void Out::ReleaseAndRegisterBuffers() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
if (audio_system.GetState() == State::Started) {
|
||||
audio_system.ReleaseBuffers();
|
||||
audio_system.RegisterBuffers();
|
||||
if (system.GetState() == State::Started) {
|
||||
system.ReleaseBuffers();
|
||||
system.RegisterBuffers();
|
||||
}
|
||||
}
|
||||
|
||||
bool Out::FlushAudioOutBuffers() {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.FlushAudioOutBuffers();
|
||||
return system.FlushAudioOutBuffers();
|
||||
}
|
||||
|
||||
u32 Out::GetReleasedBuffers(std::span<u64> tags) {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetReleasedBuffers(tags);
|
||||
return system.GetReleasedBuffers(tags);
|
||||
}
|
||||
|
||||
Kernel::KReadableEvent& Out::GetBufferEvent() {
|
||||
@@ -78,27 +74,27 @@ Kernel::KReadableEvent& Out::GetBufferEvent() {
|
||||
|
||||
f32 Out::GetVolume() const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetVolume();
|
||||
return system.GetVolume();
|
||||
}
|
||||
|
||||
void Out::SetVolume(const f32 volume) {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
audio_system.SetVolume(volume);
|
||||
system.SetVolume(volume);
|
||||
}
|
||||
|
||||
bool Out::ContainsAudioBuffer(const u64 tag) const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.ContainsAudioBuffer(tag);
|
||||
return system.ContainsAudioBuffer(tag);
|
||||
}
|
||||
|
||||
u32 Out::GetBufferCount() const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetBufferCount();
|
||||
return system.GetBufferCount();
|
||||
}
|
||||
|
||||
u64 Out::GetPlayedSampleCount() const {
|
||||
std::scoped_lock l{parent_mutex};
|
||||
return audio_system.GetPlayedSampleCount();
|
||||
return system.GetPlayedSampleCount();
|
||||
}
|
||||
|
||||
} // namespace AudioCore::AudioOut
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -33,7 +30,7 @@ public:
|
||||
/**
|
||||
* Free this audio out from the audio out manager.
|
||||
*/
|
||||
void Free(Core::System& system);
|
||||
void Free();
|
||||
|
||||
/**
|
||||
* Get this audio out's system.
|
||||
@@ -144,7 +141,7 @@ private:
|
||||
/// Buffer event, signalled when buffers are ready to be released
|
||||
Kernel::KEvent* event;
|
||||
/// Main audio out system
|
||||
System audio_system;
|
||||
System system;
|
||||
};
|
||||
|
||||
} // namespace AudioCore::AudioOut
|
||||
|
||||
@@ -14,14 +14,15 @@
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/kernel/k_event.h"
|
||||
|
||||
namespace AudioCore::AudioOut {
|
||||
// See texture_cache/util.h
|
||||
template<typename T, size_t N>
|
||||
#if BOOST_VERSION >= 108100 || __GNUC__ > 12
|
||||
[[nodiscard]] boost::container::static_vector<T, N> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
[[nodiscard]] static inline boost::container::static_vector<T, N> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
return v;
|
||||
}
|
||||
#else
|
||||
[[nodiscard]] std::vector<T> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
[[nodiscard]] static inline std::vector<T> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) {
|
||||
std::vector<T> u;
|
||||
for (auto const& e : v)
|
||||
u.push_back(e);
|
||||
@@ -29,8 +30,6 @@ template<typename T, size_t N>
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace AudioCore::AudioOut {
|
||||
|
||||
System::System(Core::System& system_, Kernel::KEvent* event_, size_t session_id_)
|
||||
: system{system_}, buffer_event{event_},
|
||||
session_id{session_id_}, session{std::make_unique<DeviceSession>(system_)} {}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -16,48 +13,56 @@
|
||||
namespace AudioCore::Renderer {
|
||||
|
||||
Renderer::Renderer(Core::System& system_, Manager& manager_, Kernel::KEvent* rendered_event)
|
||||
: system{system_}, manager{manager_}
|
||||
, audio_system{system_, rendered_event}
|
||||
{}
|
||||
: core{system_}, manager{manager_}, system{system_, rendered_event} {}
|
||||
|
||||
Result Renderer::Initialize(const AudioRendererParameterInternal& params, Kernel::KTransferMemory* transfer_memory, const u64 transfer_memory_size, Kernel::KProcess* process_handle, const u64 applet_resource_user_id, const s32 session_id) {
|
||||
Result Renderer::Initialize(const AudioRendererParameterInternal& params,
|
||||
Kernel::KTransferMemory* transfer_memory,
|
||||
const u64 transfer_memory_size, Kernel::KProcess* process_handle,
|
||||
const u64 applet_resource_user_id, const s32 session_id) {
|
||||
if (params.execution_mode == ExecutionMode::Auto) {
|
||||
if (!manager.AddSystem(audio_system)) {
|
||||
LOG_ERROR(Service_Audio, "Both Audio Render sessions are in use, cannot create any more");
|
||||
if (!manager.AddSystem(system)) {
|
||||
LOG_ERROR(Service_Audio,
|
||||
"Both Audio Render sessions are in use, cannot create any more");
|
||||
return Service::Audio::ResultOutOfSessions;
|
||||
}
|
||||
system_registered = true;
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
audio_system.Initialize(params, transfer_memory, transfer_memory_size, process_handle, applet_resource_user_id, session_id);
|
||||
system.Initialize(params, transfer_memory, transfer_memory_size, process_handle,
|
||||
applet_resource_user_id, session_id);
|
||||
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void Renderer::Finalize() {
|
||||
auto const session_id{audio_system.GetSessionId()};
|
||||
audio_system.Finalize();
|
||||
auto session_id{system.GetSessionId()};
|
||||
|
||||
system.Finalize();
|
||||
|
||||
if (system_registered) {
|
||||
manager.RemoveSystem(audio_system);
|
||||
manager.RemoveSystem(system);
|
||||
system_registered = false;
|
||||
}
|
||||
|
||||
manager.ReleaseSessionId(session_id);
|
||||
}
|
||||
|
||||
System& Renderer::GetSystem() {
|
||||
return audio_system;
|
||||
return system;
|
||||
}
|
||||
|
||||
void Renderer::Start() {
|
||||
audio_system.Start();
|
||||
system.Start();
|
||||
}
|
||||
|
||||
void Renderer::Stop() {
|
||||
audio_system.Stop();
|
||||
system.Stop();
|
||||
}
|
||||
|
||||
Result Renderer::RequestUpdate(std::span<const u8> input, std::span<u8> performance, std::span<u8> output) {
|
||||
return audio_system.Update(input, performance, output);
|
||||
Result Renderer::RequestUpdate(std::span<const u8> input, std::span<u8> performance,
|
||||
std::span<u8> output) {
|
||||
return system.Update(input, performance, output);
|
||||
}
|
||||
|
||||
} // namespace AudioCore::Renderer
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -87,7 +84,7 @@ public:
|
||||
|
||||
private:
|
||||
/// System core
|
||||
Core::System& system;
|
||||
Core::System& core;
|
||||
/// Manager this renderer is registered with
|
||||
Manager& manager;
|
||||
/// Is the audio renderer initialized?
|
||||
@@ -95,7 +92,7 @@ private:
|
||||
/// Is the system registered with the manager?
|
||||
bool system_registered{};
|
||||
/// Audio render system, main driver of audio rendering
|
||||
System audio_system;
|
||||
System system;
|
||||
};
|
||||
|
||||
} // namespace Renderer
|
||||
|
||||
@@ -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 2022 yuzu Emulator Project
|
||||
@@ -16,7 +16,7 @@ namespace AudioCore::Renderer {
|
||||
* @param memory - Core memory for writing.
|
||||
* @param aux_info - Memory address pointing to the AuxInfo to reset.
|
||||
*/
|
||||
static void ResetAuxBufferDsp(Core::Memory::Memory& memory, const CpuAddr aux_info) {
|
||||
static void CaptureResetAuxBufferDsp(Core::Memory::Memory& memory, const CpuAddr aux_info) {
|
||||
if (aux_info == 0) {
|
||||
LOG_ERROR(Service_Audio, "Aux info is 0!");
|
||||
return;
|
||||
@@ -134,7 +134,7 @@ void CaptureCommand::Process(const AudioRenderer::CommandListProcessor& processo
|
||||
WriteAuxBufferDsp(*processor.memory, send_buffer_info, send_buffer, count_max, input_buffer,
|
||||
processor.sample_count, write_offset, update_count);
|
||||
} else {
|
||||
ResetAuxBufferDsp(*processor.memory, send_buffer_info);
|
||||
CaptureResetAuxBufferDsp(*processor.memory, send_buffer_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ Result System::Initialize(const AudioRendererParameterInternal& params,
|
||||
PoolMapper pool_mapper(process_handle, false);
|
||||
pool_mapper.InitializeSystemPool(memory_pool_info, workbuffer.get(), workbuffer_size);
|
||||
|
||||
WorkbufferAllocator allocator({workbuffer.get(), workbuffer_size});
|
||||
WorkbufferAllocator allocator({workbuffer.get(), workbuffer_size}, workbuffer_size);
|
||||
|
||||
samples_workbuffer =
|
||||
allocator.Allocate<s32>((voice_channels + mix_buffer_count) * sample_count, 0x10);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2011 Google, Inc.
|
||||
// SPDX-FileContributor: Geoff Pike
|
||||
// SPDX-FileContributor: Jyrki Alakuijala
|
||||
@@ -27,8 +30,6 @@
|
||||
#define WORDS_BIGENDIAN 1
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Common {
|
||||
|
||||
static u64 unaligned_load64(const char* p) {
|
||||
@@ -135,18 +136,18 @@ static u64 HashLen17to32(const char* s, size_t len) {
|
||||
|
||||
// Return a 16-byte hash for 48 bytes. Quick and dirty.
|
||||
// Callers do best to use "random-looking" values for a and b.
|
||||
static pair<u64, u64> WeakHashLen32WithSeeds(u64 w, u64 x, u64 y, u64 z, u64 a, u64 b) {
|
||||
static std::pair<u64, u64> WeakHashLen32WithSeeds(u64 w, u64 x, u64 y, u64 z, u64 a, u64 b) {
|
||||
a += w;
|
||||
b = Rotate(b + a + z, 21);
|
||||
u64 c = a;
|
||||
a += x;
|
||||
a += y;
|
||||
b += Rotate(a, 44);
|
||||
return make_pair(a + z, b + c);
|
||||
return std::make_pair(a + z, b + c);
|
||||
}
|
||||
|
||||
// Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty.
|
||||
static pair<u64, u64> WeakHashLen32WithSeeds(const char* s, u64 a, u64 b) {
|
||||
static std::pair<u64, u64> WeakHashLen32WithSeeds(const char* s, u64 a, u64 b) {
|
||||
return WeakHashLen32WithSeeds(Fetch64(s), Fetch64(s + 8), Fetch64(s + 16), Fetch64(s + 24), a,
|
||||
b);
|
||||
}
|
||||
@@ -189,8 +190,8 @@ u64 CityHash64(const char* s, size_t len) {
|
||||
u64 x = Fetch64(s + len - 40);
|
||||
u64 y = Fetch64(s + len - 16) + Fetch64(s + len - 56);
|
||||
u64 z = HashLen16(Fetch64(s + len - 48) + len, Fetch64(s + len - 24));
|
||||
pair<u64, u64> v = WeakHashLen32WithSeeds(s + len - 64, len, z);
|
||||
pair<u64, u64> w = WeakHashLen32WithSeeds(s + len - 32, y + k1, x);
|
||||
std::pair<u64, u64> v = WeakHashLen32WithSeeds(s + len - 64, len, z);
|
||||
std::pair<u64, u64> w = WeakHashLen32WithSeeds(s + len - 32, y + k1, x);
|
||||
x = x * k1 + Fetch64(s);
|
||||
|
||||
// Decrease len to the nearest multiple of 64, and operate on 64-byte chunks.
|
||||
@@ -258,7 +259,7 @@ u128 CityHash128WithSeed(const char* s, size_t len, u128 seed) {
|
||||
|
||||
// We expect len >= 128 to be the common case. Keep 56 bytes of state:
|
||||
// v, w, x, y, and z.
|
||||
pair<u64, u64> v, w;
|
||||
std::pair<u64, u64> v, w;
|
||||
u64 x = seed[0];
|
||||
u64 y = seed[1];
|
||||
u64 z = len * k1;
|
||||
|
||||
@@ -16,3 +16,5 @@
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#undef INVALID_SOCKET
|
||||
|
||||
+8
-16
@@ -156,6 +156,14 @@ 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;
|
||||
}
|
||||
@@ -168,22 +176,6 @@ 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);
|
||||
|
||||
+11
-17
@@ -420,7 +420,7 @@ struct Values {
|
||||
#ifdef __ANDROID__
|
||||
GpuAccuracy::Low,
|
||||
#else
|
||||
GpuAccuracy::High,
|
||||
GpuAccuracy::Medium,
|
||||
#endif
|
||||
"gpu_accuracy",
|
||||
Category::RendererAdvanced,
|
||||
@@ -428,7 +428,7 @@ struct Values {
|
||||
true,
|
||||
true};
|
||||
|
||||
GpuAccuracy current_gpu_accuracy{GpuAccuracy::High};
|
||||
GpuAccuracy current_gpu_accuracy{GpuAccuracy::Medium};
|
||||
|
||||
SwitchableSetting<DmaAccuracy, true> dma_accuracy{linkage,
|
||||
DmaAccuracy::Default,
|
||||
@@ -438,16 +438,6 @@ 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",
|
||||
@@ -555,6 +545,13 @@ 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,
|
||||
@@ -874,16 +871,13 @@ 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,9 +135,8 @@ 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, High);
|
||||
ENUM(GpuAccuracy, Low, Medium, 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)
|
||||
|
||||
@@ -7,19 +7,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <dynarmic/interface/halt_reason.h>
|
||||
|
||||
#include "core/arm/arm_interface.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
constexpr Dynarmic::HaltReason StepThread = Dynarmic::HaltReason::Step;
|
||||
constexpr Dynarmic::HaltReason DataAbort = Dynarmic::HaltReason::MemoryAbort;
|
||||
constexpr Dynarmic::HaltReason BreakLoop = Dynarmic::HaltReason::UserDefined2;
|
||||
constexpr Dynarmic::HaltReason SupervisorCall = Dynarmic::HaltReason::UserDefined3;
|
||||
constexpr Dynarmic::HaltReason InstructionBreakpoint = Dynarmic::HaltReason::UserDefined4;
|
||||
constexpr Dynarmic::HaltReason PrefetchAbort = Dynarmic::HaltReason::UserDefined6;
|
||||
inline constexpr Dynarmic::HaltReason StepThread = Dynarmic::HaltReason::Step;
|
||||
inline constexpr Dynarmic::HaltReason DataAbort = Dynarmic::HaltReason::MemoryAbort;
|
||||
inline constexpr Dynarmic::HaltReason BreakLoop = Dynarmic::HaltReason::UserDefined2;
|
||||
inline constexpr Dynarmic::HaltReason SupervisorCall = Dynarmic::HaltReason::UserDefined3;
|
||||
inline constexpr Dynarmic::HaltReason InstructionBreakpoint = Dynarmic::HaltReason::UserDefined4;
|
||||
inline constexpr Dynarmic::HaltReason PrefetchAbort = Dynarmic::HaltReason::UserDefined6;
|
||||
|
||||
constexpr HaltReason TranslateHaltReason(Dynarmic::HaltReason hr) {
|
||||
[[nodiscard]] inline constexpr HaltReason TranslateHaltReason(Dynarmic::HaltReason hr) {
|
||||
static_assert(u64(HaltReason::StepThread) == u64(StepThread));
|
||||
static_assert(u64(HaltReason::DataAbort) == u64(DataAbort));
|
||||
static_assert(u64(HaltReason::BreakLoop) == u64(BreakLoop));
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Core::Timing {
|
||||
|
||||
constexpr s64 MAX_SLICE_LENGTH = 10000;
|
||||
|
||||
#undef CreateEvent
|
||||
std::shared_ptr<EventType> CreateEvent(std::string name, TimedCallback&& callback) {
|
||||
return std::make_shared<EventType>(std::move(callback), std::move(name));
|
||||
}
|
||||
|
||||
@@ -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 2024 yuzu Emulator Project
|
||||
@@ -185,13 +185,13 @@ static_assert(sizeof(SaveDataFilter) == 0x48, "SaveDataFilter has invalid size."
|
||||
static_assert(std::is_trivially_copyable_v<SaveDataFilter>,
|
||||
"Data type must be trivially copyable.");
|
||||
|
||||
struct HashSalt {
|
||||
struct SaveDataHashSalt {
|
||||
static constexpr size_t Size = 32;
|
||||
|
||||
std::array<u8, Size> value;
|
||||
};
|
||||
static_assert(std::is_trivially_copyable_v<HashSalt>, "Data type must be trivially copyable.");
|
||||
static_assert(sizeof(HashSalt) == HashSalt::Size);
|
||||
static_assert(std::is_trivially_copyable_v<SaveDataHashSalt>, "Data type must be trivially copyable.");
|
||||
static_assert(sizeof(SaveDataHashSalt) == SaveDataHashSalt::Size);
|
||||
|
||||
struct SaveDataCreationInfo2 {
|
||||
|
||||
@@ -210,7 +210,7 @@ struct SaveDataCreationInfo2 {
|
||||
u8 reserved1;
|
||||
bool is_hash_salt_enabled;
|
||||
u8 reserved2;
|
||||
HashSalt hash_salt;
|
||||
SaveDataHashSalt hash_salt;
|
||||
SaveDataMetaType meta_type;
|
||||
u8 reserved3;
|
||||
s32 meta_size;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -11,7 +14,7 @@
|
||||
#include "core/file_sys/vfs/vfs.h"
|
||||
#include "core/file_sys/vfs/vfs_vector.h"
|
||||
|
||||
namespace FileSys {
|
||||
namespace FileSys::RomFSBuilder {
|
||||
|
||||
constexpr u64 FS_MAX_PATH = 0x301;
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -9,7 +12,7 @@
|
||||
#include "common/common_types.h"
|
||||
#include "core/file_sys/vfs/vfs.h"
|
||||
|
||||
namespace FileSys {
|
||||
namespace FileSys::RomFSBuilder {
|
||||
|
||||
struct RomFSBuildDirectoryContext;
|
||||
struct RomFSBuildFileContext;
|
||||
|
||||
@@ -140,7 +140,7 @@ void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address
|
||||
}
|
||||
|
||||
bool ProgramMetadata::Is64BitProgram() const {
|
||||
return bool(npdm_header.has_64_bit_instructions);
|
||||
return npdm_header.has_64_bit_instructions;
|
||||
}
|
||||
|
||||
ProgramAddressSpaceType ProgramMetadata::GetAddressSpaceType() const {
|
||||
|
||||
+10
-10
@@ -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 2018 yuzu Emulator Project
|
||||
@@ -38,7 +38,7 @@ struct RomFSHeader {
|
||||
};
|
||||
static_assert(sizeof(RomFSHeader) == 0x50, "RomFSHeader has incorrect size.");
|
||||
|
||||
struct DirectoryEntry {
|
||||
struct RomFSDirectoryEntry {
|
||||
u32_le parent;
|
||||
u32_le sibling;
|
||||
u32_le child_dir;
|
||||
@@ -46,9 +46,9 @@ struct DirectoryEntry {
|
||||
u32_le hash;
|
||||
u32_le name_length;
|
||||
};
|
||||
static_assert(sizeof(DirectoryEntry) == 0x18, "DirectoryEntry has incorrect size.");
|
||||
static_assert(sizeof(RomFSDirectoryEntry) == 0x18, "RomFSDirectoryEntry has incorrect size.");
|
||||
|
||||
struct FileEntry {
|
||||
struct RomFSFileEntry {
|
||||
u32_le parent;
|
||||
u32_le sibling;
|
||||
u64_le offset;
|
||||
@@ -56,7 +56,7 @@ struct FileEntry {
|
||||
u32_le hash;
|
||||
u32_le name_length;
|
||||
};
|
||||
static_assert(sizeof(FileEntry) == 0x20, "FileEntry has incorrect size.");
|
||||
static_assert(sizeof(RomFSFileEntry) == 0x20, "RomFSFileEntry has incorrect size.");
|
||||
|
||||
struct RomFSTraversalContext {
|
||||
RomFSHeader header;
|
||||
@@ -84,14 +84,14 @@ std::pair<EntryType, std::string> GetEntry(const RomFSTraversalContext& ctx, siz
|
||||
return {entry, std::move(name)};
|
||||
}
|
||||
|
||||
std::pair<DirectoryEntry, std::string> GetDirectoryEntry(const RomFSTraversalContext& ctx,
|
||||
std::pair<RomFSDirectoryEntry, std::string> GetDirectoryEntry(const RomFSTraversalContext& ctx,
|
||||
size_t directory_offset) {
|
||||
return GetEntry<DirectoryEntry, &RomFSTraversalContext::directory_meta>(ctx, directory_offset);
|
||||
return GetEntry<RomFSDirectoryEntry, &RomFSTraversalContext::directory_meta>(ctx, directory_offset);
|
||||
}
|
||||
|
||||
std::pair<FileEntry, std::string> GetFileEntry(const RomFSTraversalContext& ctx,
|
||||
std::pair<RomFSFileEntry, std::string> GetFileEntry(const RomFSTraversalContext& ctx,
|
||||
size_t file_offset) {
|
||||
return GetEntry<FileEntry, &RomFSTraversalContext::file_meta>(ctx, file_offset);
|
||||
return GetEntry<RomFSFileEntry, &RomFSTraversalContext::file_meta>(ctx, file_offset);
|
||||
}
|
||||
|
||||
void ProcessFile(const RomFSTraversalContext& ctx, u32 this_file_offset,
|
||||
@@ -163,7 +163,7 @@ VirtualFile CreateRomFS(VirtualDir dir, VirtualDir ext) {
|
||||
if (dir == nullptr)
|
||||
return nullptr;
|
||||
|
||||
RomFSBuildContext ctx{dir, ext};
|
||||
RomFSBuilder::RomFSBuildContext ctx{dir, ext};
|
||||
return ConcatenatedVfsFile::MakeConcatenatedFile(0, dir->GetName(), ctx.Build());
|
||||
}
|
||||
|
||||
|
||||
@@ -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 2018 yuzu Emulator Project
|
||||
@@ -10,6 +10,12 @@
|
||||
#include "common/fs/path_util.h"
|
||||
#include "core/file_sys/vfs/vfs.h"
|
||||
|
||||
#undef CreateFile
|
||||
#undef DeleteFile
|
||||
#undef CreateDirectory
|
||||
#undef CopyFile
|
||||
#undef MoveFile
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
VfsFilesystem::VfsFilesystem(VirtualDir root_) : root(std::move(root_)) {}
|
||||
|
||||
@@ -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 2018 yuzu Emulator Project
|
||||
@@ -99,6 +99,10 @@ private:
|
||||
std::string name;
|
||||
};
|
||||
|
||||
#undef CreateFile
|
||||
#undef DeleteFile
|
||||
#undef CreateDirectory
|
||||
|
||||
// An implementation of VfsDirectory that maintains two vectors for subdirectories and files.
|
||||
// Vector data is supplied upon construction.
|
||||
class VectorVfsDirectory : public VfsDirectory {
|
||||
|
||||
@@ -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
|
||||
// SPDX-License-Identifier: GPL-2.0-or-late
|
||||
@@ -13,6 +13,10 @@
|
||||
#include "core/hle/kernel/k_process.h"
|
||||
#include "core/hle/kernel/svc.h"
|
||||
|
||||
#undef OutputDebugString
|
||||
#undef GetObject
|
||||
#undef CreateProcess
|
||||
|
||||
namespace Kernel::Svc {
|
||||
|
||||
static uint32_t GetArg32(std::span<uint64_t, 8> args, int n) {
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
namespace Kernel::Svc {
|
||||
namespace {
|
||||
|
||||
constexpr bool IsValidSetMemoryPermission(MemoryPermission perm) {
|
||||
[[nodiscard]] inline constexpr bool IsValidSetAddressRange(u64 address, u64 size) {
|
||||
return address + size > address;
|
||||
}
|
||||
|
||||
[[nodiscard]] inline constexpr bool IsValidSetMemoryPermission(MemoryPermission perm) {
|
||||
switch (perm) {
|
||||
case MemoryPermission::None:
|
||||
case MemoryPermission::Read:
|
||||
@@ -22,13 +26,6 @@ constexpr bool IsValidSetMemoryPermission(MemoryPermission perm) {
|
||||
}
|
||||
}
|
||||
|
||||
// Checks if address + size is greater than the given address
|
||||
// This can return false if the size causes an overflow of a 64-bit type
|
||||
// or if the given size is zero.
|
||||
constexpr bool IsValidAddressRange(u64 address, u64 size) {
|
||||
return address + size > address;
|
||||
}
|
||||
|
||||
// Helper function that performs the common sanity checks for svcMapMemory
|
||||
// and svcUnmapMemory. This is doable, as both functions perform their sanitizing
|
||||
// in the same order.
|
||||
@@ -53,14 +50,17 @@ Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(dst_addr, size)) {
|
||||
// Checks if address + size is greater than the given address
|
||||
// This can return false if the size causes an overflow of a 64-bit type
|
||||
// or if the given size is zero.
|
||||
if (!IsValidSetAddressRange(dst_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Destination is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
|
||||
dst_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(src_addr, size)) {
|
||||
if (!IsValidSetAddressRange(src_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC, "Source is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
|
||||
src_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
namespace Kernel::Svc {
|
||||
namespace {
|
||||
|
||||
constexpr bool IsValidAddressRange(u64 address, u64 size) {
|
||||
[[nodiscard]] inline constexpr bool IsValidAddressRange(u64 address, u64 size) {
|
||||
return address + size > address;
|
||||
}
|
||||
|
||||
constexpr bool IsValidProcessMemoryPermission(Svc::MemoryPermission perm) {
|
||||
[[nodiscard]] inline constexpr bool IsValidProcessMemoryPermission(Svc::MemoryPermission perm) {
|
||||
switch (perm) {
|
||||
case Svc::MemoryPermission::None:
|
||||
case Svc::MemoryPermission::Read:
|
||||
|
||||
@@ -9,13 +9,12 @@
|
||||
#include "core/hle/service/ipc_helpers.h"
|
||||
|
||||
namespace Service::Audio {
|
||||
using namespace AudioCore::AudioIn;
|
||||
|
||||
IAudioIn::IAudioIn(Core::System& system_, Manager& manager, size_t session_id,
|
||||
const std::string& device_name, const AudioInParameter& in_params,
|
||||
IAudioIn::IAudioIn(Core::System& system_, AudioCore::AudioIn::Manager& manager, size_t session_id,
|
||||
const std::string& device_name, const AudioCore::AudioIn::AudioInParameter& in_params,
|
||||
Kernel::KProcess* handle, u64 applet_resource_user_id)
|
||||
: ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"},
|
||||
event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared<In>(system_,
|
||||
event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared<AudioCore::AudioIn::In>(system_,
|
||||
manager, event,
|
||||
session_id)} {
|
||||
// clang-format off
|
||||
@@ -50,7 +49,7 @@ IAudioIn::IAudioIn(Core::System& system_, Manager& manager, size_t session_id,
|
||||
}
|
||||
|
||||
IAudioIn::~IAudioIn() {
|
||||
impl->Free(system);
|
||||
impl->Free();
|
||||
service_context.CloseEvent(event);
|
||||
process->Close(system.Kernel());
|
||||
}
|
||||
@@ -71,12 +70,12 @@ Result IAudioIn::Stop() {
|
||||
R_RETURN(impl->StopSystem());
|
||||
}
|
||||
|
||||
Result IAudioIn::AppendAudioInBuffer(InArray<AudioInBuffer, BufferAttr_HipcMapAlias> buffer,
|
||||
Result IAudioIn::AppendAudioInBuffer(InArray<AudioCore::AudioIn::AudioInBuffer, BufferAttr_HipcMapAlias> buffer,
|
||||
u64 buffer_client_ptr) {
|
||||
R_RETURN(this->AppendAudioInBufferAuto(buffer, buffer_client_ptr));
|
||||
}
|
||||
|
||||
Result IAudioIn::AppendAudioInBufferAuto(InArray<AudioInBuffer, BufferAttr_HipcAutoSelect> buffer,
|
||||
Result IAudioIn::AppendAudioInBufferAuto(InArray<AudioCore::AudioIn::AudioInBuffer, BufferAttr_HipcAutoSelect> buffer,
|
||||
u64 buffer_client_ptr) {
|
||||
if (buffer.empty()) {
|
||||
LOG_ERROR(Service_Audio, "Input buffer is too small for an AudioInBuffer!");
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "core/hle/service/cmif_serialization.h"
|
||||
|
||||
namespace Service::Audio {
|
||||
using namespace AudioCore::AudioIn;
|
||||
|
||||
IAudioInManager::IAudioInManager(Core::System& system_)
|
||||
: ServiceFramework{system_, "audin:u"}, impl{std::make_unique<AudioCore::AudioIn::Manager>(
|
||||
@@ -37,11 +36,11 @@ Result IAudioInManager::ListAudioIns(
|
||||
R_RETURN(this->ListAudioInsAutoFiltered(out_audio_ins, out_count));
|
||||
}
|
||||
|
||||
Result IAudioInManager::OpenAudioIn(Out<AudioInParameterInternal> out_parameter_internal,
|
||||
Result IAudioInManager::OpenAudioIn(Out<AudioCore::AudioIn::AudioInParameterInternal> out_parameter_internal,
|
||||
Out<SharedPointer<IAudioIn>> out_audio_in,
|
||||
OutArray<AudioDeviceName, BufferAttr_HipcMapAlias> out_name,
|
||||
InArray<AudioDeviceName, BufferAttr_HipcMapAlias> name,
|
||||
AudioInParameter parameter,
|
||||
AudioCore::AudioIn::AudioInParameter parameter,
|
||||
InCopyHandle<Kernel::KProcess> process_handle,
|
||||
ClientAppletResourceUserId aruid) {
|
||||
LOG_DEBUG(Service_Audio, "called");
|
||||
@@ -56,9 +55,9 @@ Result IAudioInManager::ListAudioInsAuto(
|
||||
}
|
||||
|
||||
Result IAudioInManager::OpenAudioInAuto(
|
||||
Out<AudioInParameterInternal> out_parameter_internal, Out<SharedPointer<IAudioIn>> out_audio_in,
|
||||
Out<AudioCore::AudioIn::AudioInParameterInternal> out_parameter_internal, Out<SharedPointer<IAudioIn>> out_audio_in,
|
||||
OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_name,
|
||||
InArray<AudioDeviceName, BufferAttr_HipcAutoSelect> name, AudioInParameter parameter,
|
||||
InArray<AudioDeviceName, BufferAttr_HipcAutoSelect> name, AudioCore::AudioIn::AudioInParameter parameter,
|
||||
InCopyHandle<Kernel::KProcess> process_handle, ClientAppletResourceUserId aruid) {
|
||||
LOG_DEBUG(Service_Audio, "called");
|
||||
R_RETURN(this->OpenAudioInProtocolSpecified(out_parameter_internal, out_audio_in, out_name,
|
||||
@@ -68,15 +67,15 @@ Result IAudioInManager::OpenAudioInAuto(
|
||||
Result IAudioInManager::ListAudioInsAutoFiltered(
|
||||
OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_audio_ins, Out<u32> out_count) {
|
||||
LOG_DEBUG(Service_Audio, "called");
|
||||
*out_count = impl->GetDeviceNames(system, out_audio_ins, true);
|
||||
*out_count = impl->GetDeviceNames(out_audio_ins, true);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result IAudioInManager::OpenAudioInProtocolSpecified(
|
||||
Out<AudioInParameterInternal> out_parameter_internal, Out<SharedPointer<IAudioIn>> out_audio_in,
|
||||
Out<AudioCore::AudioIn::AudioInParameterInternal> out_parameter_internal, Out<SharedPointer<IAudioIn>> out_audio_in,
|
||||
OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_name,
|
||||
InArray<AudioDeviceName, BufferAttr_HipcAutoSelect> name, Protocol protocol,
|
||||
AudioInParameter parameter, InCopyHandle<Kernel::KProcess> process_handle,
|
||||
AudioCore::AudioIn::AudioInParameter parameter, InCopyHandle<Kernel::KProcess> process_handle,
|
||||
ClientAppletResourceUserId aruid) {
|
||||
LOG_DEBUG(Service_Audio, "called");
|
||||
|
||||
@@ -93,8 +92,8 @@ Result IAudioInManager::OpenAudioInProtocolSpecified(
|
||||
|
||||
size_t new_session_id{};
|
||||
|
||||
R_TRY(impl->LinkToManager(system));
|
||||
R_TRY(impl->AcquireSessionId(system, new_session_id));
|
||||
R_TRY(impl->LinkToManager());
|
||||
R_TRY(impl->AcquireSessionId(new_session_id));
|
||||
|
||||
LOG_DEBUG(Service_Audio, "Opening new AudioIn, session_id={}, free sessions={}", new_session_id,
|
||||
impl->num_free_sessions);
|
||||
@@ -107,7 +106,7 @@ Result IAudioInManager::OpenAudioInProtocolSpecified(
|
||||
|
||||
auto& out_system = impl->sessions[new_session_id]->GetSystem();
|
||||
*out_parameter_internal =
|
||||
AudioInParameterInternal{.sample_rate = out_system.GetSampleRate(),
|
||||
AudioCore::AudioIn::AudioInParameterInternal{.sample_rate = out_system.GetSampleRate(),
|
||||
.channel_count = out_system.GetChannelCount(),
|
||||
.sample_format = static_cast<u32>(out_system.GetSampleFormat()),
|
||||
.state = static_cast<u32>(out_system.GetState())};
|
||||
|
||||
@@ -13,10 +13,9 @@
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service::Audio {
|
||||
using namespace AudioCore::AudioOut;
|
||||
|
||||
IAudioOut::IAudioOut(Core::System& system_, Manager& manager, size_t session_id,
|
||||
const std::string& device_name, const AudioOutParameter& in_params,
|
||||
IAudioOut::IAudioOut(Core::System& system_, AudioCore::AudioOut::Manager& manager, size_t session_id,
|
||||
const std::string& device_name, const AudioCore::AudioOut::AudioOutParameter& in_params,
|
||||
Kernel::KProcess* handle, u64 applet_resource_user_id)
|
||||
: ServiceFramework{system_, "IAudioOut"}, service_context{system_, "IAudioOut"},
|
||||
event{service_context.CreateEvent("AudioOutEvent")}, process{handle},
|
||||
@@ -46,7 +45,7 @@ IAudioOut::IAudioOut(Core::System& system_, Manager& manager, size_t session_id,
|
||||
}
|
||||
|
||||
IAudioOut::~IAudioOut() {
|
||||
impl->Free(system);
|
||||
impl->Free();
|
||||
service_context.CloseEvent(event);
|
||||
process->Close(system.Kernel());
|
||||
}
|
||||
@@ -68,12 +67,12 @@ Result IAudioOut::Stop() {
|
||||
}
|
||||
|
||||
Result IAudioOut::AppendAudioOutBuffer(
|
||||
InArray<AudioOutBuffer, BufferAttr_HipcMapAlias> audio_out_buffer, u64 buffer_client_ptr) {
|
||||
InArray<AudioCore::AudioOut::AudioOutBuffer, BufferAttr_HipcMapAlias> audio_out_buffer, u64 buffer_client_ptr) {
|
||||
R_RETURN(this->AppendAudioOutBufferAuto(audio_out_buffer, buffer_client_ptr));
|
||||
}
|
||||
|
||||
Result IAudioOut::AppendAudioOutBufferAuto(
|
||||
InArray<AudioOutBuffer, BufferAttr_HipcAutoSelect> audio_out_buffer, u64 buffer_client_ptr) {
|
||||
InArray<AudioCore::AudioOut::AudioOutBuffer, BufferAttr_HipcAutoSelect> audio_out_buffer, u64 buffer_client_ptr) {
|
||||
if (audio_out_buffer.empty()) {
|
||||
LOG_ERROR(Service_Audio, "Input buffer is too small for an AudioOutBuffer!");
|
||||
R_THROW(Audio::ResultInsufficientBuffer);
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "core/memory.h"
|
||||
|
||||
namespace Service::Audio {
|
||||
using namespace AudioCore::AudioOut;
|
||||
|
||||
IAudioOutManager::IAudioOutManager(Core::System& system_)
|
||||
: ServiceFramework{system_, "audout:u"}
|
||||
@@ -36,11 +35,11 @@ Result IAudioOutManager::ListAudioOuts(
|
||||
R_RETURN(this->ListAudioOutsAuto(out_audio_outs, out_count));
|
||||
}
|
||||
|
||||
Result IAudioOutManager::OpenAudioOut(Out<AudioOutParameterInternal> out_parameter_internal,
|
||||
Result IAudioOutManager::OpenAudioOut(Out<AudioCore::AudioOut::AudioOutParameterInternal> out_parameter_internal,
|
||||
Out<SharedPointer<IAudioOut>> out_audio_out,
|
||||
OutArray<AudioDeviceName, BufferAttr_HipcMapAlias> out_name,
|
||||
InArray<AudioDeviceName, BufferAttr_HipcMapAlias> name,
|
||||
AudioOutParameter parameter,
|
||||
AudioCore::AudioOut::AudioOutParameter parameter,
|
||||
InCopyHandle<Kernel::KProcess> process_handle,
|
||||
ClientAppletResourceUserId aruid) {
|
||||
R_RETURN(this->OpenAudioOutAuto(out_parameter_internal, out_audio_out, out_name, name,
|
||||
@@ -62,10 +61,10 @@ Result IAudioOutManager::ListAudioOutsAuto(
|
||||
}
|
||||
|
||||
Result IAudioOutManager::OpenAudioOutAuto(
|
||||
Out<AudioOutParameterInternal> out_parameter_internal,
|
||||
Out<AudioCore::AudioOut::AudioOutParameterInternal> out_parameter_internal,
|
||||
Out<SharedPointer<IAudioOut>> out_audio_out,
|
||||
OutArray<AudioDeviceName, BufferAttr_HipcAutoSelect> out_name,
|
||||
InArray<AudioDeviceName, BufferAttr_HipcAutoSelect> name, AudioOutParameter parameter,
|
||||
InArray<AudioDeviceName, BufferAttr_HipcAutoSelect> name, AudioCore::AudioOut::AudioOutParameter parameter,
|
||||
InCopyHandle<Kernel::KProcess> process_handle, ClientAppletResourceUserId aruid) {
|
||||
if (!process_handle) {
|
||||
LOG_ERROR(Service_Audio, "Failed to get process handle");
|
||||
@@ -77,8 +76,8 @@ Result IAudioOutManager::OpenAudioOutAuto(
|
||||
}
|
||||
|
||||
size_t new_session_id{};
|
||||
R_TRY(impl->LinkToManager(system));
|
||||
R_TRY(impl->AcquireSessionId(system, new_session_id));
|
||||
R_TRY(impl->LinkToManager());
|
||||
R_TRY(impl->AcquireSessionId(new_session_id));
|
||||
|
||||
const auto device_name = Common::StringFromBuffer(name[0].name);
|
||||
LOG_DEBUG(Service_Audio, "Opening new AudioOut, sessionid={}, free sessions={}", new_session_id,
|
||||
@@ -95,7 +94,7 @@ Result IAudioOutManager::OpenAudioOutAuto(
|
||||
|
||||
auto& out_system = impl->sessions[new_session_id]->GetSystem();
|
||||
*out_parameter_internal =
|
||||
AudioOutParameterInternal{.sample_rate = out_system.GetSampleRate(),
|
||||
AudioCore::AudioOut::AudioOutParameterInternal{.sample_rate = out_system.GetSampleRate(),
|
||||
.channel_count = out_system.GetChannelCount(),
|
||||
.sample_format = static_cast<u32>(out_system.GetSampleFormat()),
|
||||
.state = static_cast<u32>(out_system.GetState())};
|
||||
|
||||
@@ -4,21 +4,20 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "audio_core/renderer/audio_renderer.h"
|
||||
#include "core/hle/service/audio/audio_renderer.h"
|
||||
#include "core/hle/service/cmif_serialization.h"
|
||||
|
||||
namespace Service::Audio {
|
||||
using namespace AudioCore::Renderer;
|
||||
|
||||
IAudioRenderer::IAudioRenderer(Core::System& system_, Manager& manager_,
|
||||
IAudioRenderer::IAudioRenderer(Core::System& system_, AudioCore::Renderer::Manager& manager_,
|
||||
AudioCore::AudioRendererParameterInternal& params,
|
||||
Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size,
|
||||
Kernel::KProcess* process_handle_, u64 applet_resource_user_id,
|
||||
s32 session_id)
|
||||
: ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"},
|
||||
rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_},
|
||||
impl{std::make_unique<Renderer>(system_, manager, rendered_event)}, process_handle{
|
||||
process_handle_} {
|
||||
impl{std::make_unique<AudioCore::Renderer::Renderer>(system_, manager, rendered_event)}, process_handle{process_handle_} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"},
|
||||
|
||||
@@ -14,16 +14,13 @@
|
||||
#include <cstring>
|
||||
|
||||
namespace Service::News {
|
||||
namespace {
|
||||
|
||||
std::string_view ToStringView(std::span<const char> buf) {
|
||||
[[nodiscard]] inline std::string_view ToStringViewNDS(std::span<const char> buf) {
|
||||
const std::string_view sv{buf.data(), buf.size()};
|
||||
const auto nul = sv.find('\0');
|
||||
return nul == std::string_view::npos ? sv : sv.substr(0, nul);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
INewsDataService::INewsDataService(Core::System& system_)
|
||||
: ServiceFramework{system_, "INewsDataService"} {
|
||||
static const FunctionInfo functions[] = {
|
||||
@@ -55,7 +52,7 @@ bool INewsDataService::TryOpen(std::string_view key, std::string_view user) {
|
||||
|
||||
const auto list = NewsStorage::Instance().ListAll();
|
||||
if (!list.empty()) {
|
||||
if (auto found = NewsStorage::Instance().FindByNewsId(ToStringView(list.front().news_id))) {
|
||||
if (auto found = NewsStorage::Instance().FindByNewsId(ToStringViewNDS(list.front().news_id))) {
|
||||
opened_payload = std::move(found->payload);
|
||||
return true;
|
||||
}
|
||||
@@ -67,7 +64,7 @@ bool INewsDataService::TryOpen(std::string_view key, std::string_view user) {
|
||||
Result INewsDataService::Open(InBuffer<BufferAttr_HipcMapAlias> name) {
|
||||
EnsureBuiltinNewsLoaded();
|
||||
|
||||
const auto key = ToStringView({reinterpret_cast<const char*>(name.data()), name.size()});
|
||||
const auto key = ToStringViewNDS({reinterpret_cast<const char*>(name.data()), name.size()});
|
||||
|
||||
if (TryOpen(key, {})) {
|
||||
R_SUCCEED();
|
||||
@@ -79,8 +76,8 @@ Result INewsDataService::Open(InBuffer<BufferAttr_HipcMapAlias> name) {
|
||||
Result INewsDataService::OpenWithNewsRecordV1(NewsRecordV1 record) {
|
||||
EnsureBuiltinNewsLoaded();
|
||||
|
||||
const auto key = ToStringView(record.news_id);
|
||||
const auto user = ToStringView(record.user_id);
|
||||
const auto key = ToStringViewNDS(record.news_id);
|
||||
const auto user = ToStringViewNDS(record.user_id);
|
||||
|
||||
if (TryOpen(key, user)) {
|
||||
R_SUCCEED();
|
||||
@@ -92,8 +89,8 @@ Result INewsDataService::OpenWithNewsRecordV1(NewsRecordV1 record) {
|
||||
Result INewsDataService::OpenWithNewsRecord(NewsRecord record) {
|
||||
EnsureBuiltinNewsLoaded();
|
||||
|
||||
const auto key = ToStringView(record.news_id);
|
||||
const auto user = ToStringView(record.user_id);
|
||||
const auto key = ToStringViewNDS(record.news_id);
|
||||
const auto user = ToStringViewNDS(record.user_id);
|
||||
|
||||
if (TryOpen(key, user)) {
|
||||
R_SUCCEED();
|
||||
|
||||
@@ -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 2024 yuzu Emulator Project
|
||||
@@ -15,13 +15,13 @@
|
||||
namespace Service::News {
|
||||
namespace {
|
||||
|
||||
std::string_view ToStringView(std::span<const u8> buf) {
|
||||
[[nodiscard]] inline std::string_view ToStringView(std::span<const u8> buf) {
|
||||
if (buf.empty()) return {};
|
||||
auto data = reinterpret_cast<const char*>(buf.data());
|
||||
return {data, strnlen(data, buf.size())};
|
||||
}
|
||||
|
||||
std::string_view ToStringView(std::span<const char> buf) {
|
||||
[[nodiscard]] inline std::string_view ToStringView(std::span<const char> buf) {
|
||||
if (buf.empty()) return {};
|
||||
return {buf.data(), strnlen(buf.data(), buf.size())};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -6,6 +9,8 @@
|
||||
|
||||
namespace Service::News {
|
||||
|
||||
#undef CreateEvent
|
||||
|
||||
IOverwriteEventHolder::IOverwriteEventHolder(Core::System& system_)
|
||||
: ServiceFramework{system_, "IOverwriteEventHolder"}, service_context{system_,
|
||||
"IOverwriteEventHolder"} {
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
|
||||
#undef GetCurrentTime
|
||||
|
||||
namespace Service::Capture {
|
||||
|
||||
AlbumManager::AlbumManager(Core::System& system_) : system{system_} {}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "core/hle/service/server_manager.h"
|
||||
#include "core/reporter.h"
|
||||
|
||||
#undef far
|
||||
|
||||
namespace Service::Fatal {
|
||||
|
||||
Module::Interface::Interface(std::shared_ptr<Module> module_, Core::System& system_,
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "core/hle/service/server_manager.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
||||
#undef CreateFile
|
||||
#undef DeleteFile
|
||||
#undef CreateDirectory
|
||||
|
||||
namespace Service::FileSystem {
|
||||
|
||||
static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base,
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "core/hle/service/ipc_helpers.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
#undef SendMessage
|
||||
|
||||
namespace Service {
|
||||
|
||||
SessionRequestHandler::SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_)
|
||||
|
||||
@@ -212,8 +212,9 @@ struct NifmNetworkProfileData {
|
||||
NifmWirelessSettingData wireless_setting_data{};
|
||||
IpSettingData ip_setting_data{};
|
||||
};
|
||||
static_assert(sizeof(NifmNetworkProfileData) == 0x18E,
|
||||
"NifmNetworkProfileData has incorrect size.");
|
||||
#pragma pack(pop)
|
||||
static_assert(sizeof(NifmNetworkProfileData) == 0x18E, "NifmNetworkProfileData has incorrect size.");
|
||||
|
||||
struct PendingProfile {
|
||||
std::array<char, 0x21> ssid{};
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -10,6 +13,8 @@
|
||||
namespace Service::PSC::Time {
|
||||
class ContextWriter;
|
||||
|
||||
#undef GetCurrentTime
|
||||
|
||||
class SystemClockCore {
|
||||
public:
|
||||
explicit SystemClockCore(SteadyClockCore& steady_clock) : m_steady_clock{steady_clock} {}
|
||||
|
||||
@@ -19,6 +19,8 @@ class System;
|
||||
|
||||
namespace Service::PSC::Time {
|
||||
|
||||
#undef GetCurrentTime
|
||||
|
||||
class SystemClock final : public ServiceFramework<SystemClock> {
|
||||
public:
|
||||
explicit SystemClock(Core::System& system, SystemClockCore& system_clock_core, bool can_write_clock, bool can_write_uninitialized_clock);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user