From a84ad180e8e16ed04de5551b2f72349e2ec4d215 Mon Sep 17 00:00:00 2001 From: EBADBEEF Date: Sun, 22 Jan 2023 23:36:40 -0800 Subject: [PATCH 01/91] qt: add option to disable controller applet - add checkbox to disable the controller applet UI - when controller applet is disabled, use the yuzu-cmd fallback controller applet that applies controller config based on rules - See https://github.com/yuzu-emu/yuzu/issues/8552 for some discussion --- src/yuzu/configuration/config.cpp | 2 ++ src/yuzu/configuration/configure_general.cpp | 4 ++++ src/yuzu/configuration/configure_general.ui | 7 +++++++ src/yuzu/main.cpp | 1 + src/yuzu/uisettings.h | 2 ++ 5 files changed, 16 insertions(+) diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index fd3bb30e1..1f1ef658c 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -836,6 +836,7 @@ void Config::ReadUIValues() { ReadBasicSetting(UISettings::values.pause_when_in_background); ReadBasicSetting(UISettings::values.mute_when_in_background); ReadBasicSetting(UISettings::values.hide_mouse); + ReadBasicSetting(UISettings::values.controller_applet_disabled); ReadBasicSetting(UISettings::values.disable_web_applet); qt_config->endGroup(); @@ -1456,6 +1457,7 @@ void Config::SaveUIValues() { WriteBasicSetting(UISettings::values.pause_when_in_background); WriteBasicSetting(UISettings::values.mute_when_in_background); WriteBasicSetting(UISettings::values.hide_mouse); + WriteBasicSetting(UISettings::values.controller_applet_disabled); WriteBasicSetting(UISettings::values.disable_web_applet); qt_config->endGroup(); diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 7ade01ba6..7783f362a 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -44,6 +44,8 @@ void ConfigureGeneral::SetConfiguration() { ui->toggle_background_pause->setChecked(UISettings::values.pause_when_in_background.GetValue()); ui->toggle_background_mute->setChecked(UISettings::values.mute_when_in_background.GetValue()); ui->toggle_hide_mouse->setChecked(UISettings::values.hide_mouse.GetValue()); + ui->toggle_controller_applet_disabled->setEnabled(runtime_lock); + ui->toggle_controller_applet_disabled->setChecked(UISettings::values.controller_applet_disabled.GetValue()); ui->toggle_speed_limit->setChecked(Settings::values.use_speed_limit.GetValue()); ui->speed_limit->setValue(Settings::values.speed_limit.GetValue()); @@ -90,6 +92,7 @@ void ConfigureGeneral::ApplyConfiguration() { UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked(); UISettings::values.mute_when_in_background = ui->toggle_background_mute->isChecked(); UISettings::values.hide_mouse = ui->toggle_hide_mouse->isChecked(); + UISettings::values.controller_applet_disabled = ui->toggle_controller_applet_disabled->isChecked(); // Guard if during game and set to game-specific value if (Settings::values.use_speed_limit.UsingGlobal()) { @@ -136,6 +139,7 @@ void ConfigureGeneral::SetupPerGameUI() { ui->toggle_user_on_boot->setVisible(false); ui->toggle_background_pause->setVisible(false); ui->toggle_hide_mouse->setVisible(false); + ui->toggle_controller_applet_disabled->setVisible(false); ui->button_reset_defaults->setVisible(false); diff --git a/src/yuzu/configuration/configure_general.ui b/src/yuzu/configuration/configure_general.ui index 5b90b1109..2fa8324fb 100644 --- a/src/yuzu/configuration/configure_general.ui +++ b/src/yuzu/configuration/configure_general.ui @@ -103,6 +103,13 @@ + + + + Disable controller applet + + + diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 571eacf9f..e57e02652 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1562,6 +1562,7 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p system->SetAppletFrontendSet({ std::make_unique(*this), // Amiibo Settings + (UISettings::values.controller_applet_disabled.GetValue() == true) ? nullptr : std::make_unique(*this), // Controller Selector std::make_unique(*this), // Error Display nullptr, // Mii Editor diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h index db43b7033..20a517d34 100644 --- a/src/yuzu/uisettings.h +++ b/src/yuzu/uisettings.h @@ -77,6 +77,8 @@ struct Values { Settings::Setting pause_when_in_background{false, "pauseWhenInBackground"}; Settings::Setting mute_when_in_background{false, "muteWhenInBackground"}; Settings::Setting hide_mouse{true, "hideInactiveMouse"}; + Settings::Setting controller_applet_disabled{false, "disableControllerApplet"}; + // Set when Vulkan is known to crash the application bool has_broken_vulkan = false; From dd12dd4c67dd4bc6e7a7d071b925afc38e687f8b Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 22 Apr 2023 22:55:03 -0400 Subject: [PATCH 02/91] x64: Deduplicate RDTSC usage --- src/common/CMakeLists.txt | 2 ++ src/common/x64/cpu_detect.cpp | 3 +++ src/common/x64/cpu_wait.cpp | 20 +----------------- src/common/x64/rdtsc.cpp | 39 +++++++++++++++++++++++++++++++++++ src/common/x64/rdtsc.h | 37 +++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 19 deletions(-) create mode 100644 src/common/x64/rdtsc.cpp create mode 100644 src/common/x64/rdtsc.h diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index efc4a9fe9..3adf13a3f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -172,6 +172,8 @@ if(ARCHITECTURE_x86_64) x64/cpu_wait.h x64/native_clock.cpp x64/native_clock.h + x64/rdtsc.cpp + x64/rdtsc.h x64/xbyak_abi.h x64/xbyak_util.h ) diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index 72ed6e96c..c998b1197 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -14,6 +14,7 @@ #include "common/common_types.h" #include "common/logging/log.h" #include "common/x64/cpu_detect.h" +#include "common/x64/rdtsc.h" #ifdef _WIN32 #include @@ -187,6 +188,8 @@ static CPUCaps Detect() { caps.tsc_frequency = static_cast(caps.crystal_frequency) * caps.tsc_crystal_ratio_numerator / caps.tsc_crystal_ratio_denominator; + } else { + caps.tsc_frequency = X64::EstimateRDTSCFrequency(); } } diff --git a/src/common/x64/cpu_wait.cpp b/src/common/x64/cpu_wait.cpp index cfeef6a3d..c53dd4945 100644 --- a/src/common/x64/cpu_wait.cpp +++ b/src/common/x64/cpu_wait.cpp @@ -9,19 +9,11 @@ #include "common/x64/cpu_detect.h" #include "common/x64/cpu_wait.h" +#include "common/x64/rdtsc.h" namespace Common::X64 { #ifdef _MSC_VER -__forceinline static u64 FencedRDTSC() { - _mm_lfence(); - _ReadWriteBarrier(); - const u64 result = __rdtsc(); - _mm_lfence(); - _ReadWriteBarrier(); - return result; -} - __forceinline static void TPAUSE() { // 100,000 cycles is a reasonable amount of time to wait to save on CPU resources. // For reference: @@ -32,16 +24,6 @@ __forceinline static void TPAUSE() { _tpause(0, FencedRDTSC() + PauseCycles); } #else -static u64 FencedRDTSC() { - u64 eax; - u64 edx; - asm volatile("lfence\n\t" - "rdtsc\n\t" - "lfence\n\t" - : "=a"(eax), "=d"(edx)); - return (edx << 32) | eax; -} - static void TPAUSE() { // 100,000 cycles is a reasonable amount of time to wait to save on CPU resources. // For reference: diff --git a/src/common/x64/rdtsc.cpp b/src/common/x64/rdtsc.cpp new file mode 100644 index 000000000..9273274a3 --- /dev/null +++ b/src/common/x64/rdtsc.cpp @@ -0,0 +1,39 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include + +#include "common/steady_clock.h" +#include "common/uint128.h" +#include "common/x64/rdtsc.h" + +namespace Common::X64 { + +template +static u64 RoundToNearest(u64 value) { + const auto mod = value % Nearest; + return mod >= (Nearest / 2) ? (value - mod + Nearest) : (value - mod); +} + +u64 EstimateRDTSCFrequency() { + // Discard the first result measuring the rdtsc. + FencedRDTSC(); + std::this_thread::sleep_for(std::chrono::milliseconds{1}); + FencedRDTSC(); + + // Get the current time. + const auto start_time = RealTimeClock::Now(); + const u64 tsc_start = FencedRDTSC(); + // Wait for 100 milliseconds. + std::this_thread::sleep_for(std::chrono::milliseconds{100}); + const auto end_time = RealTimeClock::Now(); + const u64 tsc_end = FencedRDTSC(); + // Calculate differences. + const u64 timer_diff = static_cast( + std::chrono::duration_cast(end_time - start_time).count()); + const u64 tsc_diff = tsc_end - tsc_start; + const u64 tsc_freq = MultiplyAndDivide64(tsc_diff, 1000000000ULL, timer_diff); + return RoundToNearest<100'000>(tsc_freq); +} + +} // namespace Common::X64 diff --git a/src/common/x64/rdtsc.h b/src/common/x64/rdtsc.h new file mode 100644 index 000000000..0ec4f52f9 --- /dev/null +++ b/src/common/x64/rdtsc.h @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifdef _MSC_VER +#include +#endif + +#include "common/common_types.h" + +namespace Common::X64 { + +#ifdef _MSC_VER +__forceinline static u64 FencedRDTSC() { + _mm_lfence(); + _ReadWriteBarrier(); + const u64 result = __rdtsc(); + _mm_lfence(); + _ReadWriteBarrier(); + return result; +} +#else +static inline u64 FencedRDTSC() { + u64 eax; + u64 edx; + asm volatile("lfence\n\t" + "rdtsc\n\t" + "lfence\n\t" + : "=a"(eax), "=d"(edx)); + return (edx << 32) | eax; +} +#endif + +u64 EstimateRDTSCFrequency(); + +} // namespace Common::X64 From 1492a65454d6a03f641b136cc61e68870be00218 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 22 Apr 2023 23:08:28 -0400 Subject: [PATCH 03/91] (wall, native)_clock: Rework NativeClock --- src/common/steady_clock.cpp | 5 +- src/common/wall_clock.cpp | 73 ++++++-------- src/common/wall_clock.h | 54 +++++------ src/common/x64/native_clock.cpp | 165 +++++--------------------------- src/common/x64/native_clock.h | 56 ++++------- 5 files changed, 94 insertions(+), 259 deletions(-) diff --git a/src/common/steady_clock.cpp b/src/common/steady_clock.cpp index 782859196..9415eed29 100644 --- a/src/common/steady_clock.cpp +++ b/src/common/steady_clock.cpp @@ -28,13 +28,12 @@ static s64 GetSystemTimeNS() { // GetSystemTimePreciseAsFileTime returns the file time in 100ns units. static constexpr s64 Multiplier = 100; // Convert Windows epoch to Unix epoch. - static constexpr s64 WindowsEpochToUnixEpochNS = 0x19DB1DED53E8000LL; + static constexpr s64 WindowsEpochToUnixEpoch = 0x19DB1DED53E8000LL; FILETIME filetime; GetSystemTimePreciseAsFileTime(&filetime); return Multiplier * ((static_cast(filetime.dwHighDateTime) << 32) + - static_cast(filetime.dwLowDateTime)) - - WindowsEpochToUnixEpochNS; + static_cast(filetime.dwLowDateTime) - WindowsEpochToUnixEpoch); } #endif diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp index 817e71d52..ad8db06b0 100644 --- a/src/common/wall_clock.cpp +++ b/src/common/wall_clock.cpp @@ -2,88 +2,71 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common/steady_clock.h" -#include "common/uint128.h" #include "common/wall_clock.h" #ifdef ARCHITECTURE_x86_64 #include "common/x64/cpu_detect.h" #include "common/x64/native_clock.h" +#include "common/x64/rdtsc.h" #endif namespace Common { class StandardWallClock final : public WallClock { public: - explicit StandardWallClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_) - : WallClock{emulated_cpu_frequency_, emulated_clock_frequency_, false}, - start_time{SteadyClock::Now()} {} + explicit StandardWallClock() : start_time{SteadyClock::Now()} {} - std::chrono::nanoseconds GetTimeNS() override { + std::chrono::nanoseconds GetTimeNS() const override { return SteadyClock::Now() - start_time; } - std::chrono::microseconds GetTimeUS() override { - return std::chrono::duration_cast(GetTimeNS()); + std::chrono::microseconds GetTimeUS() const override { + return static_cast(GetHostTicksElapsed() / NsToUsRatio::den); } - std::chrono::milliseconds GetTimeMS() override { - return std::chrono::duration_cast(GetTimeNS()); + std::chrono::milliseconds GetTimeMS() const override { + return static_cast(GetHostTicksElapsed() / NsToMsRatio::den); } - u64 GetClockCycles() override { - const u128 temp = Common::Multiply64Into128(GetTimeNS().count(), emulated_clock_frequency); - return Common::Divide128On32(temp, NS_RATIO).first; + u64 GetCNTPCT() const override { + return GetHostTicksElapsed() * NsToCNTPCTRatio::num / NsToCNTPCTRatio::den; } - u64 GetCPUCycles() override { - const u128 temp = Common::Multiply64Into128(GetTimeNS().count(), emulated_cpu_frequency); - return Common::Divide128On32(temp, NS_RATIO).first; + u64 GetHostTicksNow() const override { + return static_cast(SteadyClock::Now().time_since_epoch().count()); } - void Pause([[maybe_unused]] bool is_paused) override { - // Do nothing in this clock type. + u64 GetHostTicksElapsed() const override { + return static_cast(GetTimeNS().count()); + } + + bool IsNative() const override { + return false; } private: SteadyClock::time_point start_time; }; +std::unique_ptr CreateOptimalClock() { #ifdef ARCHITECTURE_x86_64 - -std::unique_ptr CreateBestMatchingClock(u64 emulated_cpu_frequency, - u64 emulated_clock_frequency) { const auto& caps = GetCPUCaps(); - u64 rtsc_frequency = 0; - if (caps.invariant_tsc) { - rtsc_frequency = caps.tsc_frequency ? caps.tsc_frequency : EstimateRDTSCFrequency(); - } - // Fallback to StandardWallClock if the hardware TSC does not have the precision greater than: - // - A nanosecond - // - The emulated CPU frequency - // - The emulated clock counter frequency (CNTFRQ) - if (rtsc_frequency <= WallClock::NS_RATIO || rtsc_frequency <= emulated_cpu_frequency || - rtsc_frequency <= emulated_clock_frequency) { - return std::make_unique(emulated_cpu_frequency, - emulated_clock_frequency); + if (caps.invariant_tsc && caps.tsc_frequency >= WallClock::CNTFRQ) { + return std::make_unique(caps.tsc_frequency); } else { - return std::make_unique(emulated_cpu_frequency, emulated_clock_frequency, - rtsc_frequency); + // Fallback to StandardWallClock if the hardware TSC + // - Is not invariant + // - Is not more precise than CNTFRQ + return std::make_unique(); } -} - #else - -std::unique_ptr CreateBestMatchingClock(u64 emulated_cpu_frequency, - u64 emulated_clock_frequency) { - return std::make_unique(emulated_cpu_frequency, emulated_clock_frequency); + return std::make_unique(); +#endif } -#endif - -std::unique_ptr CreateStandardWallClock(u64 emulated_cpu_frequency, - u64 emulated_clock_frequency) { - return std::make_unique(emulated_cpu_frequency, emulated_clock_frequency); +std::unique_ptr CreateStandardWallClock() { + return std::make_unique(); } } // namespace Common diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h index 157ec5eae..a73e6e644 100644 --- a/src/common/wall_clock.h +++ b/src/common/wall_clock.h @@ -5,6 +5,7 @@ #include #include +#include #include "common/common_types.h" @@ -12,50 +13,43 @@ namespace Common { class WallClock { public: - static constexpr u64 NS_RATIO = 1'000'000'000; - static constexpr u64 US_RATIO = 1'000'000; - static constexpr u64 MS_RATIO = 1'000; + static constexpr u64 CNTFRQ = 19'200'000; // CNTPCT_EL0 Frequency = 19.2 MHz virtual ~WallClock() = default; - /// Returns current wall time in nanoseconds - [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0; + /// @returns The time in nanoseconds since the construction of this clock. + virtual std::chrono::nanoseconds GetTimeNS() const = 0; - /// Returns current wall time in microseconds - [[nodiscard]] virtual std::chrono::microseconds GetTimeUS() = 0; + /// @returns The time in microseconds since the construction of this clock. + virtual std::chrono::microseconds GetTimeUS() const = 0; - /// Returns current wall time in milliseconds - [[nodiscard]] virtual std::chrono::milliseconds GetTimeMS() = 0; + /// @returns The time in milliseconds since the construction of this clock. + virtual std::chrono::milliseconds GetTimeMS() const = 0; - /// Returns current wall time in emulated clock cycles - [[nodiscard]] virtual u64 GetClockCycles() = 0; + /// @returns The guest CNTPCT ticks since the construction of this clock. + virtual u64 GetCNTPCT() const = 0; - /// Returns current wall time in emulated cpu cycles - [[nodiscard]] virtual u64 GetCPUCycles() = 0; + /// @returns The raw host timer ticks since an indeterminate epoch. + virtual u64 GetHostTicksNow() const = 0; - virtual void Pause(bool is_paused) = 0; + /// @returns The raw host timer ticks since the construction of this clock. + virtual u64 GetHostTicksElapsed() const = 0; - /// Tells if the wall clock, uses the host CPU's hardware clock - [[nodiscard]] bool IsNative() const { - return is_native; - } + /// @returns Whether the clock directly uses the host's hardware clock. + virtual bool IsNative() const = 0; protected: - explicit WallClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_, bool is_native_) - : emulated_cpu_frequency{emulated_cpu_frequency_}, - emulated_clock_frequency{emulated_clock_frequency_}, is_native{is_native_} {} + using NsRatio = std::nano; + using UsRatio = std::micro; + using MsRatio = std::milli; - u64 emulated_cpu_frequency; - u64 emulated_clock_frequency; - -private: - bool is_native; + using NsToUsRatio = std::ratio_divide; + using NsToMsRatio = std::ratio_divide; + using NsToCNTPCTRatio = std::ratio; }; -[[nodiscard]] std::unique_ptr CreateBestMatchingClock(u64 emulated_cpu_frequency, - u64 emulated_clock_frequency); +std::unique_ptr CreateOptimalClock(); -[[nodiscard]] std::unique_ptr CreateStandardWallClock(u64 emulated_cpu_frequency, - u64 emulated_clock_frequency); +std::unique_ptr CreateStandardWallClock(); } // namespace Common diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 277b00662..5d1eb0590 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp @@ -1,164 +1,45 @@ // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include -#include - -#include "common/atomic_ops.h" -#include "common/steady_clock.h" #include "common/uint128.h" #include "common/x64/native_clock.h" +#include "common/x64/rdtsc.h" -#ifdef _MSC_VER -#include -#endif +namespace Common::X64 { -namespace Common { +NativeClock::NativeClock(u64 rdtsc_frequency_) + : start_ticks{FencedRDTSC()}, rdtsc_frequency{rdtsc_frequency_}, + ns_rdtsc_factor{GetFixedPoint64Factor(NsRatio::den, rdtsc_frequency)}, + us_rdtsc_factor{GetFixedPoint64Factor(UsRatio::den, rdtsc_frequency)}, + ms_rdtsc_factor{GetFixedPoint64Factor(MsRatio::den, rdtsc_frequency)}, + cntpct_rdtsc_factor{GetFixedPoint64Factor(CNTFRQ, rdtsc_frequency)} {} -#ifdef _MSC_VER -__forceinline static u64 FencedRDTSC() { - _mm_lfence(); - _ReadWriteBarrier(); - const u64 result = __rdtsc(); - _mm_lfence(); - _ReadWriteBarrier(); - return result; -} -#else -static u64 FencedRDTSC() { - u64 eax; - u64 edx; - asm volatile("lfence\n\t" - "rdtsc\n\t" - "lfence\n\t" - : "=a"(eax), "=d"(edx)); - return (edx << 32) | eax; -} -#endif - -template -static u64 RoundToNearest(u64 value) { - const auto mod = value % Nearest; - return mod >= (Nearest / 2) ? (value - mod + Nearest) : (value - mod); +std::chrono::nanoseconds NativeClock::GetTimeNS() const { + return std::chrono::nanoseconds{MultiplyHigh(GetHostTicksElapsed(), ns_rdtsc_factor)}; } -u64 EstimateRDTSCFrequency() { - // Discard the first result measuring the rdtsc. - FencedRDTSC(); - std::this_thread::sleep_for(std::chrono::milliseconds{1}); - FencedRDTSC(); - - // Get the current time. - const auto start_time = Common::RealTimeClock::Now(); - const u64 tsc_start = FencedRDTSC(); - // Wait for 250 milliseconds. - std::this_thread::sleep_for(std::chrono::milliseconds{250}); - const auto end_time = Common::RealTimeClock::Now(); - const u64 tsc_end = FencedRDTSC(); - // Calculate differences. - const u64 timer_diff = static_cast( - std::chrono::duration_cast(end_time - start_time).count()); - const u64 tsc_diff = tsc_end - tsc_start; - const u64 tsc_freq = MultiplyAndDivide64(tsc_diff, 1000000000ULL, timer_diff); - return RoundToNearest<1000>(tsc_freq); +std::chrono::microseconds NativeClock::GetTimeUS() const { + return std::chrono::microseconds{MultiplyHigh(GetHostTicksElapsed(), us_rdtsc_factor)}; } -namespace X64 { -NativeClock::NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_, - u64 rtsc_frequency_) - : WallClock(emulated_cpu_frequency_, emulated_clock_frequency_, true), rtsc_frequency{ - rtsc_frequency_} { - // Thread to re-adjust the RDTSC frequency after 10 seconds has elapsed. - time_sync_thread = std::jthread{[this](std::stop_token token) { - // Get the current time. - const auto start_time = Common::RealTimeClock::Now(); - const u64 tsc_start = FencedRDTSC(); - // Wait for 10 seconds. - if (!Common::StoppableTimedWait(token, std::chrono::seconds{10})) { - return; - } - const auto end_time = Common::RealTimeClock::Now(); - const u64 tsc_end = FencedRDTSC(); - // Calculate differences. - const u64 timer_diff = static_cast( - std::chrono::duration_cast(end_time - start_time).count()); - const u64 tsc_diff = tsc_end - tsc_start; - const u64 tsc_freq = MultiplyAndDivide64(tsc_diff, 1000000000ULL, timer_diff); - rtsc_frequency = tsc_freq; - CalculateAndSetFactors(); - }}; - - time_point.inner.last_measure = FencedRDTSC(); - time_point.inner.accumulated_ticks = 0U; - CalculateAndSetFactors(); +std::chrono::milliseconds NativeClock::GetTimeMS() const { + return std::chrono::milliseconds{MultiplyHigh(GetHostTicksElapsed(), ms_rdtsc_factor)}; } -u64 NativeClock::GetRTSC() { - TimePoint new_time_point{}; - TimePoint current_time_point{}; - - current_time_point.pack = Common::AtomicLoad128(time_point.pack.data()); - do { - const u64 current_measure = FencedRDTSC(); - u64 diff = current_measure - current_time_point.inner.last_measure; - diff = diff & ~static_cast(static_cast(diff) >> 63); // max(diff, 0) - new_time_point.inner.last_measure = current_measure > current_time_point.inner.last_measure - ? current_measure - : current_time_point.inner.last_measure; - new_time_point.inner.accumulated_ticks = current_time_point.inner.accumulated_ticks + diff; - } while (!Common::AtomicCompareAndSwap(time_point.pack.data(), new_time_point.pack, - current_time_point.pack, current_time_point.pack)); - return new_time_point.inner.accumulated_ticks; +u64 NativeClock::GetCNTPCT() const { + return MultiplyHigh(GetHostTicksElapsed(), cntpct_rdtsc_factor); } -void NativeClock::Pause(bool is_paused) { - if (!is_paused) { - TimePoint current_time_point{}; - TimePoint new_time_point{}; - - current_time_point.pack = Common::AtomicLoad128(time_point.pack.data()); - do { - new_time_point.pack = current_time_point.pack; - new_time_point.inner.last_measure = FencedRDTSC(); - } while (!Common::AtomicCompareAndSwap(time_point.pack.data(), new_time_point.pack, - current_time_point.pack, current_time_point.pack)); - } +u64 NativeClock::GetHostTicksNow() const { + return FencedRDTSC(); } -std::chrono::nanoseconds NativeClock::GetTimeNS() { - const u64 rtsc_value = GetRTSC(); - return std::chrono::nanoseconds{MultiplyHigh(rtsc_value, ns_rtsc_factor)}; +u64 NativeClock::GetHostTicksElapsed() const { + return FencedRDTSC() - start_ticks; } -std::chrono::microseconds NativeClock::GetTimeUS() { - const u64 rtsc_value = GetRTSC(); - return std::chrono::microseconds{MultiplyHigh(rtsc_value, us_rtsc_factor)}; +bool NativeClock::IsNative() const { + return true; } -std::chrono::milliseconds NativeClock::GetTimeMS() { - const u64 rtsc_value = GetRTSC(); - return std::chrono::milliseconds{MultiplyHigh(rtsc_value, ms_rtsc_factor)}; -} - -u64 NativeClock::GetClockCycles() { - const u64 rtsc_value = GetRTSC(); - return MultiplyHigh(rtsc_value, clock_rtsc_factor); -} - -u64 NativeClock::GetCPUCycles() { - const u64 rtsc_value = GetRTSC(); - return MultiplyHigh(rtsc_value, cpu_rtsc_factor); -} - -void NativeClock::CalculateAndSetFactors() { - ns_rtsc_factor = GetFixedPoint64Factor(NS_RATIO, rtsc_frequency); - us_rtsc_factor = GetFixedPoint64Factor(US_RATIO, rtsc_frequency); - ms_rtsc_factor = GetFixedPoint64Factor(MS_RATIO, rtsc_frequency); - clock_rtsc_factor = GetFixedPoint64Factor(emulated_clock_frequency, rtsc_frequency); - cpu_rtsc_factor = GetFixedPoint64Factor(emulated_cpu_frequency, rtsc_frequency); -} - -} // namespace X64 - -} // namespace Common +} // namespace Common::X64 diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h index 03ca291d8..d6f8626c1 100644 --- a/src/common/x64/native_clock.h +++ b/src/common/x64/native_clock.h @@ -3,58 +3,36 @@ #pragma once -#include "common/polyfill_thread.h" #include "common/wall_clock.h" -namespace Common { +namespace Common::X64 { -namespace X64 { class NativeClock final : public WallClock { public: - explicit NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_, - u64 rtsc_frequency_); + explicit NativeClock(u64 rdtsc_frequency_); - std::chrono::nanoseconds GetTimeNS() override; + std::chrono::nanoseconds GetTimeNS() const override; - std::chrono::microseconds GetTimeUS() override; + std::chrono::microseconds GetTimeUS() const override; - std::chrono::milliseconds GetTimeMS() override; + std::chrono::milliseconds GetTimeMS() const override; - u64 GetClockCycles() override; + u64 GetCNTPCT() const override; - u64 GetCPUCycles() override; + u64 GetHostTicksNow() const override; - void Pause(bool is_paused) override; + u64 GetHostTicksElapsed() const override; + + bool IsNative() const override; private: - u64 GetRTSC(); + u64 start_ticks; + u64 rdtsc_frequency; - void CalculateAndSetFactors(); - - union alignas(16) TimePoint { - TimePoint() : pack{} {} - u128 pack{}; - struct Inner { - u64 last_measure{}; - u64 accumulated_ticks{}; - } inner; - }; - - TimePoint time_point; - - // factors - u64 clock_rtsc_factor{}; - u64 cpu_rtsc_factor{}; - u64 ns_rtsc_factor{}; - u64 us_rtsc_factor{}; - u64 ms_rtsc_factor{}; - - u64 rtsc_frequency; - - std::jthread time_sync_thread; + u64 ns_rdtsc_factor; + u64 us_rdtsc_factor; + u64 ms_rdtsc_factor; + u64 cntpct_rdtsc_factor; }; -} // namespace X64 -u64 EstimateRDTSCFrequency(); - -} // namespace Common +} // namespace Common::X64 From bbd502f67adb17b00b33f1b7158cfff2b2fa8a3e Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 22 Apr 2023 23:58:27 -0400 Subject: [PATCH 04/91] nvnflinger: Acquire lock prior to signaling the vsync variable --- src/core/hle/service/nvnflinger/nvnflinger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp index 4988e6e17..aa3356611 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.cpp +++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp @@ -70,7 +70,8 @@ Nvnflinger::Nvnflinger(Core::System& system_, HosBinderDriverServer& hos_binder_ [this](std::uintptr_t, s64 time, std::chrono::nanoseconds ns_late) -> std::optional { vsync_signal.store(true); - vsync_signal.notify_all(); + { const auto lock_guard = Lock(); } + vsync_signal.notify_one(); return std::chrono::nanoseconds(GetNextTicks()); }); From 8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sun, 23 Apr 2023 00:01:08 -0400 Subject: [PATCH 05/91] core_timing: Use CNTPCT as the guest CPU tick Previously, we were mixing the raw CPU frequency and CNTFRQ. The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available. --- src/audio_core/renderer/adsp/adsp.cpp | 1 - .../renderer/adsp/audio_renderer.cpp | 5 +- .../renderer/adsp/command_list_processor.cpp | 1 - .../command/performance/performance.cpp | 15 ++--- src/audio_core/sink/sink_stream.cpp | 1 - src/common/wall_clock.h | 17 ++++++ src/core/CMakeLists.txt | 1 - src/core/core_timing.cpp | 35 +++-------- src/core/core_timing.h | 11 +--- src/core/core_timing_util.h | 58 ------------------- src/core/hle/kernel/k_scheduler.cpp | 5 +- src/core/hle/kernel/svc/svc_info.cpp | 4 +- src/core/hle/service/hid/hidbus.cpp | 1 - src/video_core/gpu.cpp | 14 ++--- 14 files changed, 47 insertions(+), 122 deletions(-) delete mode 100644 src/core/core_timing_util.h diff --git a/src/audio_core/renderer/adsp/adsp.cpp b/src/audio_core/renderer/adsp/adsp.cpp index 74772fc50..b1db31e93 100644 --- a/src/audio_core/renderer/adsp/adsp.cpp +++ b/src/audio_core/renderer/adsp/adsp.cpp @@ -7,7 +7,6 @@ #include "common/logging/log.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" #include "core/memory.h" namespace AudioCore::AudioRenderer::ADSP { diff --git a/src/audio_core/renderer/adsp/audio_renderer.cpp b/src/audio_core/renderer/adsp/audio_renderer.cpp index 8bc39f9f9..9ca716b60 100644 --- a/src/audio_core/renderer/adsp/audio_renderer.cpp +++ b/src/audio_core/renderer/adsp/audio_renderer.cpp @@ -13,7 +13,6 @@ #include "common/thread.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" MICROPROFILE_DEFINE(Audio_Renderer, "Audio", "DSP", MP_RGB(60, 19, 97)); @@ -144,6 +143,7 @@ void AudioRenderer::ThreadFunc(std::stop_token stop_token) { mailbox->ADSPSendMessage(RenderMessage::AudioRenderer_InitializeOK); + // 0.12 seconds (2304000 / 19200000) constexpr u64 max_process_time{2'304'000ULL}; while (!stop_token.stop_requested()) { @@ -184,8 +184,7 @@ void AudioRenderer::ThreadFunc(std::stop_token stop_token) { u64 max_time{max_process_time}; if (index == 1 && command_buffer.applet_resource_user_id == mailbox->GetCommandBuffer(0).applet_resource_user_id) { - max_time = max_process_time - - Core::Timing::CyclesToNs(render_times_taken[0]).count(); + max_time = max_process_time - render_times_taken[0]; if (render_times_taken[0] > max_process_time) { max_time = 0; } diff --git a/src/audio_core/renderer/adsp/command_list_processor.cpp b/src/audio_core/renderer/adsp/command_list_processor.cpp index 7a300d216..3a0f1ae38 100644 --- a/src/audio_core/renderer/adsp/command_list_processor.cpp +++ b/src/audio_core/renderer/adsp/command_list_processor.cpp @@ -9,7 +9,6 @@ #include "common/settings.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" #include "core/memory.h" namespace AudioCore::AudioRenderer::ADSP { diff --git a/src/audio_core/renderer/command/performance/performance.cpp b/src/audio_core/renderer/command/performance/performance.cpp index 985958b03..4a881547f 100644 --- a/src/audio_core/renderer/command/performance/performance.cpp +++ b/src/audio_core/renderer/command/performance/performance.cpp @@ -5,7 +5,6 @@ #include "audio_core/renderer/command/performance/performance.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" namespace AudioCore::AudioRenderer { @@ -18,20 +17,18 @@ void PerformanceCommand::Process(const ADSP::CommandListProcessor& processor) { auto base{entry_address.translated_address}; if (state == PerformanceState::Start) { auto start_time_ptr{reinterpret_cast(base + entry_address.entry_start_time_offset)}; - *start_time_ptr = static_cast( - Core::Timing::CyclesToUs(processor.system->CoreTiming().GetClockTicks() - - processor.start_time - processor.current_processing_time) - .count()); + *start_time_ptr = + static_cast(processor.system->CoreTiming().GetClockTicks() - processor.start_time - + processor.current_processing_time); } else if (state == PerformanceState::Stop) { auto processed_time_ptr{ reinterpret_cast(base + entry_address.entry_processed_time_offset)}; auto entry_count_ptr{ reinterpret_cast(base + entry_address.header_entry_count_offset)}; - *processed_time_ptr = static_cast( - Core::Timing::CyclesToUs(processor.system->CoreTiming().GetClockTicks() - - processor.start_time - processor.current_processing_time) - .count()); + *processed_time_ptr = + static_cast(processor.system->CoreTiming().GetClockTicks() - processor.start_time - + processor.current_processing_time); (*entry_count_ptr)++; } } diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp index f44fedfd5..9a718a9cc 100644 --- a/src/audio_core/sink/sink_stream.cpp +++ b/src/audio_core/sink/sink_stream.cpp @@ -15,7 +15,6 @@ #include "common/settings.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" namespace AudioCore::Sink { diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h index a73e6e644..56c18ca25 100644 --- a/src/common/wall_clock.h +++ b/src/common/wall_clock.h @@ -38,6 +38,22 @@ public: /// @returns Whether the clock directly uses the host's hardware clock. virtual bool IsNative() const = 0; + static inline u64 NSToCNTPCT(u64 ns) { + return ns * NsToCNTPCTRatio::num / NsToCNTPCTRatio::den; + } + + static inline u64 USToCNTPCT(u64 us) { + return us * UsToCNTPCTRatio::num / UsToCNTPCTRatio::den; + } + + static inline u64 CNTPCTToNS(u64 cntpct) { + return cntpct * NsToCNTPCTRatio::den / NsToCNTPCTRatio::num; + } + + static inline u64 CNTPCTToUS(u64 cntpct) { + return cntpct * UsToCNTPCTRatio::den / UsToCNTPCTRatio::num; + } + protected: using NsRatio = std::nano; using UsRatio = std::micro; @@ -46,6 +62,7 @@ protected: using NsToUsRatio = std::ratio_divide; using NsToMsRatio = std::ratio_divide; using NsToCNTPCTRatio = std::ratio; + using UsToCNTPCTRatio = std::ratio; }; std::unique_ptr CreateOptimalClock(); diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 99602699a..3df4094a7 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -16,7 +16,6 @@ add_library(core STATIC core.h core_timing.cpp core_timing.h - core_timing_util.h cpu_manager.cpp cpu_manager.h crypto/aes_util.cpp diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 4f2692b05..9a1d5a69a 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -16,7 +16,6 @@ #include "common/microprofile.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" #include "core/hardware_properties.h" namespace Core::Timing { @@ -45,9 +44,7 @@ struct CoreTiming::Event { } }; -CoreTiming::CoreTiming() - : cpu_clock{Common::CreateBestMatchingClock(Hardware::BASE_CLOCK_RATE, Hardware::CNTFREQ)}, - event_clock{Common::CreateStandardWallClock(Hardware::BASE_CLOCK_RATE, Hardware::CNTFREQ)} {} +CoreTiming::CoreTiming() : clock{Common::CreateOptimalClock()} {} CoreTiming::~CoreTiming() { Reset(); @@ -180,7 +177,7 @@ void CoreTiming::AddTicks(u64 ticks_to_add) { void CoreTiming::Idle() { if (!event_queue.empty()) { const u64 next_event_time = event_queue.front().time; - const u64 next_ticks = nsToCycles(std::chrono::nanoseconds(next_event_time)) + 10U; + const u64 next_ticks = Common::WallClock::NSToCNTPCT(next_event_time) + 10U; if (next_ticks > ticks) { ticks = next_ticks; } @@ -193,18 +190,11 @@ void CoreTiming::ResetTicks() { downcount = MAX_SLICE_LENGTH; } -u64 CoreTiming::GetCPUTicks() const { - if (is_multicore) [[likely]] { - return cpu_clock->GetCPUCycles(); - } - return ticks; -} - u64 CoreTiming::GetClockTicks() const { if (is_multicore) [[likely]] { - return cpu_clock->GetClockCycles(); + return clock->GetCNTPCT(); } - return CpuCyclesToClockCycles(ticks); + return ticks; } std::optional CoreTiming::Advance() { @@ -297,9 +287,7 @@ void CoreTiming::ThreadLoop() { } paused_set = true; - event_clock->Pause(true); pause_event.Wait(); - event_clock->Pause(false); } } @@ -315,25 +303,18 @@ void CoreTiming::Reset() { has_started = false; } -std::chrono::nanoseconds CoreTiming::GetCPUTimeNs() const { - if (is_multicore) [[likely]] { - return cpu_clock->GetTimeNS(); - } - return CyclesToNs(ticks); -} - std::chrono::nanoseconds CoreTiming::GetGlobalTimeNs() const { if (is_multicore) [[likely]] { - return event_clock->GetTimeNS(); + return clock->GetTimeNS(); } - return CyclesToNs(ticks); + return std::chrono::nanoseconds{Common::WallClock::CNTPCTToNS(ticks)}; } std::chrono::microseconds CoreTiming::GetGlobalTimeUs() const { if (is_multicore) [[likely]] { - return event_clock->GetTimeUS(); + return clock->GetTimeUS(); } - return CyclesToUs(ticks); + return std::chrono::microseconds{Common::WallClock::CNTPCTToUS(ticks)}; } } // namespace Core::Timing diff --git a/src/core/core_timing.h b/src/core/core_timing.h index e7c4a949f..fdacdd94a 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -116,15 +116,9 @@ public: return downcount; } - /// Returns current time in emulated CPU cycles - u64 GetCPUTicks() const; - - /// Returns current time in emulated in Clock cycles + /// Returns the current CNTPCT tick value. u64 GetClockTicks() const; - /// Returns current time in nanoseconds. - std::chrono::nanoseconds GetCPUTimeNs() const; - /// Returns current time in microseconds. std::chrono::microseconds GetGlobalTimeUs() const; @@ -142,8 +136,7 @@ private: void Reset(); - std::unique_ptr cpu_clock; - std::unique_ptr event_clock; + std::unique_ptr clock; s64 global_timer = 0; diff --git a/src/core/core_timing_util.h b/src/core/core_timing_util.h deleted file mode 100644 index fe5aaefc7..000000000 --- a/src/core/core_timing_util.h +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include - -#include "common/common_types.h" -#include "core/hardware_properties.h" - -namespace Core::Timing { - -namespace detail { -constexpr u64 CNTFREQ_ADJUSTED = Hardware::CNTFREQ / 1000; -constexpr u64 BASE_CLOCK_RATE_ADJUSTED = Hardware::BASE_CLOCK_RATE / 1000; -} // namespace detail - -[[nodiscard]] constexpr s64 msToCycles(std::chrono::milliseconds ms) { - return ms.count() * detail::BASE_CLOCK_RATE_ADJUSTED; -} - -[[nodiscard]] constexpr s64 usToCycles(std::chrono::microseconds us) { - return us.count() * detail::BASE_CLOCK_RATE_ADJUSTED / 1000; -} - -[[nodiscard]] constexpr s64 nsToCycles(std::chrono::nanoseconds ns) { - return ns.count() * detail::BASE_CLOCK_RATE_ADJUSTED / 1000000; -} - -[[nodiscard]] constexpr u64 msToClockCycles(std::chrono::milliseconds ms) { - return static_cast(ms.count()) * detail::CNTFREQ_ADJUSTED; -} - -[[nodiscard]] constexpr u64 usToClockCycles(std::chrono::microseconds us) { - return us.count() * detail::CNTFREQ_ADJUSTED / 1000; -} - -[[nodiscard]] constexpr u64 nsToClockCycles(std::chrono::nanoseconds ns) { - return ns.count() * detail::CNTFREQ_ADJUSTED / 1000000; -} - -[[nodiscard]] constexpr u64 CpuCyclesToClockCycles(u64 ticks) { - return ticks * detail::CNTFREQ_ADJUSTED / detail::BASE_CLOCK_RATE_ADJUSTED; -} - -[[nodiscard]] constexpr std::chrono::milliseconds CyclesToMs(s64 cycles) { - return std::chrono::milliseconds(cycles / detail::BASE_CLOCK_RATE_ADJUSTED); -} - -[[nodiscard]] constexpr std::chrono::nanoseconds CyclesToNs(s64 cycles) { - return std::chrono::nanoseconds(cycles * 1000000 / detail::BASE_CLOCK_RATE_ADJUSTED); -} - -[[nodiscard]] constexpr std::chrono::microseconds CyclesToUs(s64 cycles) { - return std::chrono::microseconds(cycles * 1000 / detail::BASE_CLOCK_RATE_ADJUSTED); -} - -} // namespace Core::Timing diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index faa12b4f0..75ce5a23c 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -184,7 +184,8 @@ u64 KScheduler::UpdateHighestPriorityThread(KThread* highest_thread) { prev_highest_thread != highest_thread) [[likely]] { if (prev_highest_thread != nullptr) [[likely]] { IncrementScheduledCount(prev_highest_thread); - prev_highest_thread->SetLastScheduledTick(m_kernel.System().CoreTiming().GetCPUTicks()); + prev_highest_thread->SetLastScheduledTick( + m_kernel.System().CoreTiming().GetClockTicks()); } if (m_state.should_count_idle) { if (highest_thread != nullptr) [[likely]] { @@ -351,7 +352,7 @@ void KScheduler::SwitchThread(KThread* next_thread) { // Update the CPU time tracking variables. const s64 prev_tick = m_last_context_switch_time; - const s64 cur_tick = m_kernel.System().CoreTiming().GetCPUTicks(); + const s64 cur_tick = m_kernel.System().CoreTiming().GetClockTicks(); const s64 tick_diff = cur_tick - prev_tick; cur_thread->AddCpuTime(m_core_id, tick_diff); if (cur_process != nullptr) { diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index 2b2c878b5..445cdd87b 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp @@ -199,9 +199,9 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle if (same_thread && info_sub_id == 0xFFFFFFFFFFFFFFFF) { const u64 thread_ticks = current_thread->GetCpuTime(); - out_ticks = thread_ticks + (core_timing.GetCPUTicks() - prev_ctx_ticks); + out_ticks = thread_ticks + (core_timing.GetClockTicks() - prev_ctx_ticks); } else if (same_thread && info_sub_id == system.Kernel().CurrentPhysicalCoreIndex()) { - out_ticks = core_timing.GetCPUTicks() - prev_ctx_ticks; + out_ticks = core_timing.GetClockTicks() - prev_ctx_ticks; } *result = out_ticks; diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp index 5604a6fda..80aac221b 100644 --- a/src/core/hle/service/hid/hidbus.cpp +++ b/src/core/hle/service/hid/hidbus.cpp @@ -5,7 +5,6 @@ #include "common/settings.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" #include "core/hid/hid_types.h" #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_readable_event.h" diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 456f733cf..70762c51a 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -194,17 +194,17 @@ struct GPU::Impl { [[nodiscard]] u64 GetTicks() const { // This values were reversed engineered by fincs from NVN - // The gpu clock is reported in units of 385/625 nanoseconds - constexpr u64 gpu_ticks_num = 384; - constexpr u64 gpu_ticks_den = 625; + // The GPU clock is 614.4 MHz + using NsToGPUTickRatio = std::ratio<614'400'000, std::nano::den>; + static_assert(NsToGPUTickRatio::num == 384 && NsToGPUTickRatio::den == 625); + + u64 nanoseconds = system.CoreTiming().GetGlobalTimeNs().count(); - u64 nanoseconds = system.CoreTiming().GetCPUTimeNs().count(); if (Settings::values.use_fast_gpu_time.GetValue()) { nanoseconds /= 256; } - const u64 nanoseconds_num = nanoseconds / gpu_ticks_den; - const u64 nanoseconds_rem = nanoseconds % gpu_ticks_den; - return nanoseconds_num * gpu_ticks_num + (nanoseconds_rem * gpu_ticks_num) / gpu_ticks_den; + + return nanoseconds * NsToGPUTickRatio::num / NsToGPUTickRatio::den; } [[nodiscard]] bool IsAsync() const { From 9dcc7bde8bb05dbc62fa196bcbe1484762e66917 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sun, 23 Apr 2023 00:09:49 -0400 Subject: [PATCH 06/91] time: Use compile time division for TimeSpanType conversion --- src/core/hle/service/time/clock_types.h | 13 ++++++++----- .../hle/service/time/standard_steady_clock_core.cpp | 2 +- .../service/time/tick_based_steady_clock_core.cpp | 2 +- src/core/hle/service/time/time.cpp | 4 ++-- src/core/hle/service/time/time_sharedmemory.cpp | 5 +++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/core/hle/service/time/clock_types.h b/src/core/hle/service/time/clock_types.h index e6293ffb9..9fc01ea90 100644 --- a/src/core/hle/service/time/clock_types.h +++ b/src/core/hle/service/time/clock_types.h @@ -3,6 +3,8 @@ #pragma once +#include + #include "common/common_funcs.h" #include "common/common_types.h" #include "common/uuid.h" @@ -74,18 +76,19 @@ static_assert(std::is_trivially_copyable_v, /// https://switchbrew.org/wiki/Glue_services#TimeSpanType struct TimeSpanType { s64 nanoseconds{}; - static constexpr s64 ns_per_second{1000000000ULL}; s64 ToSeconds() const { - return nanoseconds / ns_per_second; + return nanoseconds / std::nano::den; } static TimeSpanType FromSeconds(s64 seconds) { - return {seconds * ns_per_second}; + return {seconds * std::nano::den}; } - static TimeSpanType FromTicks(u64 ticks, u64 frequency) { - return FromSeconds(static_cast(ticks) / static_cast(frequency)); + template + static TimeSpanType FromTicks(u64 ticks) { + using TicksToNSRatio = std::ratio; + return {static_cast(ticks * TicksToNSRatio::num / TicksToNSRatio::den)}; } }; static_assert(sizeof(TimeSpanType) == 8, "TimeSpanType is incorrect size"); diff --git a/src/core/hle/service/time/standard_steady_clock_core.cpp b/src/core/hle/service/time/standard_steady_clock_core.cpp index 3dbbb9850..5627b7003 100644 --- a/src/core/hle/service/time/standard_steady_clock_core.cpp +++ b/src/core/hle/service/time/standard_steady_clock_core.cpp @@ -10,7 +10,7 @@ namespace Service::Time::Clock { TimeSpanType StandardSteadyClockCore::GetCurrentRawTimePoint(Core::System& system) { const TimeSpanType ticks_time_span{ - TimeSpanType::FromTicks(system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)}; + TimeSpanType::FromTicks(system.CoreTiming().GetClockTicks())}; TimeSpanType raw_time_point{setup_value.nanoseconds + ticks_time_span.nanoseconds}; if (raw_time_point.nanoseconds < cached_raw_time_point.nanoseconds) { diff --git a/src/core/hle/service/time/tick_based_steady_clock_core.cpp b/src/core/hle/service/time/tick_based_steady_clock_core.cpp index 27600413e..0d9fb3143 100644 --- a/src/core/hle/service/time/tick_based_steady_clock_core.cpp +++ b/src/core/hle/service/time/tick_based_steady_clock_core.cpp @@ -10,7 +10,7 @@ namespace Service::Time::Clock { SteadyClockTimePoint TickBasedSteadyClockCore::GetTimePoint(Core::System& system) { const TimeSpanType ticks_time_span{ - TimeSpanType::FromTicks(system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)}; + TimeSpanType::FromTicks(system.CoreTiming().GetClockTicks())}; return {ticks_time_span.ToSeconds(), GetClockSourceId()}; } diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 868be60c5..7197ca30f 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp @@ -240,8 +240,8 @@ void Module::Interface::CalculateMonotonicSystemClockBaseTimePoint(HLERequestCon const auto current_time_point{steady_clock_core.GetCurrentTimePoint(system)}; if (current_time_point.clock_source_id == context.steady_time_point.clock_source_id) { - const auto ticks{Clock::TimeSpanType::FromTicks(system.CoreTiming().GetClockTicks(), - Core::Hardware::CNTFREQ)}; + const auto ticks{Clock::TimeSpanType::FromTicks( + system.CoreTiming().GetClockTicks())}; const s64 base_time_point{context.offset + current_time_point.time_point - ticks.ToSeconds()}; IPC::ResponseBuilder rb{ctx, (sizeof(s64) / 4) + 2}; diff --git a/src/core/hle/service/time/time_sharedmemory.cpp b/src/core/hle/service/time/time_sharedmemory.cpp index ce1c85bcc..a00676669 100644 --- a/src/core/hle/service/time/time_sharedmemory.cpp +++ b/src/core/hle/service/time/time_sharedmemory.cpp @@ -21,8 +21,9 @@ SharedMemory::~SharedMemory() = default; void SharedMemory::SetupStandardSteadyClock(const Common::UUID& clock_source_id, Clock::TimeSpanType current_time_point) { - const Clock::TimeSpanType ticks_time_span{Clock::TimeSpanType::FromTicks( - system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)}; + const Clock::TimeSpanType ticks_time_span{ + Clock::TimeSpanType::FromTicks( + system.CoreTiming().GetClockTicks())}; const Clock::SteadyClockContext context{ static_cast(current_time_point.nanoseconds - ticks_time_span.nanoseconds), clock_source_id}; From 907507886d755fa56099713c4b8f05bb640a8b7d Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sun, 28 May 2023 17:45:47 -0400 Subject: [PATCH 07/91] (wall, native)_clock: Add GetGPUTick Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick. --- src/common/wall_clock.cpp | 8 ++++++-- src/common/wall_clock.h | 20 +++++++++++++++++++- src/common/x64/native_clock.cpp | 7 ++++++- src/common/x64/native_clock.h | 3 +++ src/core/core_timing.cpp | 7 +++++++ src/core/core_timing.h | 3 +++ src/video_core/gpu.cpp | 11 +++-------- 7 files changed, 47 insertions(+), 12 deletions(-) diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp index ad8db06b0..dc0dcbd68 100644 --- a/src/common/wall_clock.cpp +++ b/src/common/wall_clock.cpp @@ -32,6 +32,10 @@ public: return GetHostTicksElapsed() * NsToCNTPCTRatio::num / NsToCNTPCTRatio::den; } + u64 GetGPUTick() const override { + return GetHostTicksElapsed() * NsToGPUTickRatio::num / NsToGPUTickRatio::den; + } + u64 GetHostTicksNow() const override { return static_cast(SteadyClock::Now().time_since_epoch().count()); } @@ -52,12 +56,12 @@ std::unique_ptr CreateOptimalClock() { #ifdef ARCHITECTURE_x86_64 const auto& caps = GetCPUCaps(); - if (caps.invariant_tsc && caps.tsc_frequency >= WallClock::CNTFRQ) { + if (caps.invariant_tsc && caps.tsc_frequency >= WallClock::GPUTickFreq) { return std::make_unique(caps.tsc_frequency); } else { // Fallback to StandardWallClock if the hardware TSC // - Is not invariant - // - Is not more precise than CNTFRQ + // - Is not more precise than GPUTickFreq return std::make_unique(); } #else diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h index 56c18ca25..fcfdd637c 100644 --- a/src/common/wall_clock.h +++ b/src/common/wall_clock.h @@ -13,7 +13,8 @@ namespace Common { class WallClock { public: - static constexpr u64 CNTFRQ = 19'200'000; // CNTPCT_EL0 Frequency = 19.2 MHz + static constexpr u64 CNTFRQ = 19'200'000; // CNTPCT_EL0 Frequency = 19.2 MHz + static constexpr u64 GPUTickFreq = 614'400'000; // GM20B GPU Tick Frequency = 614.4 MHz virtual ~WallClock() = default; @@ -29,6 +30,9 @@ public: /// @returns The guest CNTPCT ticks since the construction of this clock. virtual u64 GetCNTPCT() const = 0; + /// @returns The guest GPU ticks since the construction of this clock. + virtual u64 GetGPUTick() const = 0; + /// @returns The raw host timer ticks since an indeterminate epoch. virtual u64 GetHostTicksNow() const = 0; @@ -46,6 +50,10 @@ public: return us * UsToCNTPCTRatio::num / UsToCNTPCTRatio::den; } + static inline u64 NSToGPUTick(u64 ns) { + return ns * NsToGPUTickRatio::num / NsToGPUTickRatio::den; + } + static inline u64 CNTPCTToNS(u64 cntpct) { return cntpct * NsToCNTPCTRatio::den / NsToCNTPCTRatio::num; } @@ -54,6 +62,14 @@ public: return cntpct * UsToCNTPCTRatio::den / UsToCNTPCTRatio::num; } + static inline u64 GPUTickToNS(u64 gpu_tick) { + return gpu_tick * NsToGPUTickRatio::den / NsToGPUTickRatio::num; + } + + static inline u64 CNTPCTToGPUTick(u64 cntpct) { + return cntpct * CNTPCTToGPUTickRatio::num / CNTPCTToGPUTickRatio::den; + } + protected: using NsRatio = std::nano; using UsRatio = std::micro; @@ -63,6 +79,8 @@ protected: using NsToMsRatio = std::ratio_divide; using NsToCNTPCTRatio = std::ratio; using UsToCNTPCTRatio = std::ratio; + using NsToGPUTickRatio = std::ratio; + using CNTPCTToGPUTickRatio = std::ratio; }; std::unique_ptr CreateOptimalClock(); diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 5d1eb0590..7d2a26bd9 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp @@ -12,7 +12,8 @@ NativeClock::NativeClock(u64 rdtsc_frequency_) ns_rdtsc_factor{GetFixedPoint64Factor(NsRatio::den, rdtsc_frequency)}, us_rdtsc_factor{GetFixedPoint64Factor(UsRatio::den, rdtsc_frequency)}, ms_rdtsc_factor{GetFixedPoint64Factor(MsRatio::den, rdtsc_frequency)}, - cntpct_rdtsc_factor{GetFixedPoint64Factor(CNTFRQ, rdtsc_frequency)} {} + cntpct_rdtsc_factor{GetFixedPoint64Factor(CNTFRQ, rdtsc_frequency)}, + gputick_rdtsc_factor{GetFixedPoint64Factor(GPUTickFreq, rdtsc_frequency)} {} std::chrono::nanoseconds NativeClock::GetTimeNS() const { return std::chrono::nanoseconds{MultiplyHigh(GetHostTicksElapsed(), ns_rdtsc_factor)}; @@ -30,6 +31,10 @@ u64 NativeClock::GetCNTPCT() const { return MultiplyHigh(GetHostTicksElapsed(), cntpct_rdtsc_factor); } +u64 NativeClock::GetGPUTick() const { + return MultiplyHigh(GetHostTicksElapsed(), gputick_rdtsc_factor); +} + u64 NativeClock::GetHostTicksNow() const { return FencedRDTSC(); } diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h index d6f8626c1..334415eff 100644 --- a/src/common/x64/native_clock.h +++ b/src/common/x64/native_clock.h @@ -19,6 +19,8 @@ public: u64 GetCNTPCT() const override; + u64 GetGPUTick() const override; + u64 GetHostTicksNow() const override; u64 GetHostTicksElapsed() const override; @@ -33,6 +35,7 @@ private: u64 us_rdtsc_factor; u64 ms_rdtsc_factor; u64 cntpct_rdtsc_factor; + u64 gputick_rdtsc_factor; }; } // namespace Common::X64 diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 9a1d5a69a..e57bca70a 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -197,6 +197,13 @@ u64 CoreTiming::GetClockTicks() const { return ticks; } +u64 CoreTiming::GetGPUTicks() const { + if (is_multicore) [[likely]] { + return clock->GetGPUTick(); + } + return Common::WallClock::CNTPCTToGPUTick(ticks); +} + std::optional CoreTiming::Advance() { std::scoped_lock lock{advance_lock, basic_lock}; global_timer = GetGlobalTimeNs().count(); diff --git a/src/core/core_timing.h b/src/core/core_timing.h index fdacdd94a..1873852c4 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -119,6 +119,9 @@ public: /// Returns the current CNTPCT tick value. u64 GetClockTicks() const; + /// Returns the current GPU tick value. + u64 GetGPUTicks() const; + /// Returns current time in microseconds. std::chrono::microseconds GetGlobalTimeUs() const; diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 70762c51a..db385076d 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -193,18 +193,13 @@ struct GPU::Impl { } [[nodiscard]] u64 GetTicks() const { - // This values were reversed engineered by fincs from NVN - // The GPU clock is 614.4 MHz - using NsToGPUTickRatio = std::ratio<614'400'000, std::nano::den>; - static_assert(NsToGPUTickRatio::num == 384 && NsToGPUTickRatio::den == 625); - - u64 nanoseconds = system.CoreTiming().GetGlobalTimeNs().count(); + u64 gpu_tick = system.CoreTiming().GetGPUTicks(); if (Settings::values.use_fast_gpu_time.GetValue()) { - nanoseconds /= 256; + gpu_tick /= 256; } - return nanoseconds * NsToGPUTickRatio::num / NsToGPUTickRatio::den; + return gpu_tick; } [[nodiscard]] bool IsAsync() const { From 2e1e7254436b032f133372c76d9484aa756d56df Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 7 Jun 2023 21:38:28 -0400 Subject: [PATCH 08/91] core_timing: Fix SingleCore cycle timer --- src/common/wall_clock.h | 36 +++++++++++++++------------- src/core/core_timing.cpp | 26 +++++++------------- src/core/core_timing.h | 2 +- src/core/hle/kernel/svc/svc_tick.cpp | 10 +------- 4 files changed, 31 insertions(+), 43 deletions(-) diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h index fcfdd637c..f45d3d8c5 100644 --- a/src/common/wall_clock.h +++ b/src/common/wall_clock.h @@ -13,8 +13,9 @@ namespace Common { class WallClock { public: - static constexpr u64 CNTFRQ = 19'200'000; // CNTPCT_EL0 Frequency = 19.2 MHz - static constexpr u64 GPUTickFreq = 614'400'000; // GM20B GPU Tick Frequency = 614.4 MHz + static constexpr u64 CNTFRQ = 19'200'000; // CNTPCT_EL0 Frequency = 19.2 MHz + static constexpr u64 GPUTickFreq = 614'400'000; // GM20B GPU Tick Frequency = 614.4 MHz + static constexpr u64 CPUTickFreq = 1'020'000'000; // T210/4 A57 CPU Tick Frequency = 1020.0 MHz virtual ~WallClock() = default; @@ -46,28 +47,26 @@ public: return ns * NsToCNTPCTRatio::num / NsToCNTPCTRatio::den; } - static inline u64 USToCNTPCT(u64 us) { - return us * UsToCNTPCTRatio::num / UsToCNTPCTRatio::den; - } - static inline u64 NSToGPUTick(u64 ns) { return ns * NsToGPUTickRatio::num / NsToGPUTickRatio::den; } - static inline u64 CNTPCTToNS(u64 cntpct) { - return cntpct * NsToCNTPCTRatio::den / NsToCNTPCTRatio::num; + // Cycle Timing + + static inline u64 CPUTickToNS(u64 cpu_tick) { + return cpu_tick * CPUTickToNsRatio::num / CPUTickToNsRatio::den; } - static inline u64 CNTPCTToUS(u64 cntpct) { - return cntpct * UsToCNTPCTRatio::den / UsToCNTPCTRatio::num; + static inline u64 CPUTickToUS(u64 cpu_tick) { + return cpu_tick * CPUTickToUsRatio::num / CPUTickToUsRatio::den; } - static inline u64 GPUTickToNS(u64 gpu_tick) { - return gpu_tick * NsToGPUTickRatio::den / NsToGPUTickRatio::num; + static inline u64 CPUTickToCNTPCT(u64 cpu_tick) { + return cpu_tick * CPUTickToCNTPCTRatio::num / CPUTickToCNTPCTRatio::den; } - static inline u64 CNTPCTToGPUTick(u64 cntpct) { - return cntpct * CNTPCTToGPUTickRatio::num / CNTPCTToGPUTickRatio::den; + static inline u64 CPUTickToGPUTick(u64 cpu_tick) { + return cpu_tick * CPUTickToGPUTickRatio::num / CPUTickToGPUTickRatio::den; } protected: @@ -78,9 +77,14 @@ protected: using NsToUsRatio = std::ratio_divide; using NsToMsRatio = std::ratio_divide; using NsToCNTPCTRatio = std::ratio; - using UsToCNTPCTRatio = std::ratio; using NsToGPUTickRatio = std::ratio; - using CNTPCTToGPUTickRatio = std::ratio; + + // Cycle Timing + + using CPUTickToNsRatio = std::ratio; + using CPUTickToUsRatio = std::ratio; + using CPUTickToCNTPCTRatio = std::ratio; + using CPUTickToGPUTickRatio = std::ratio; }; std::unique_ptr CreateOptimalClock(); diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index e57bca70a..4f0a3f8ea 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -20,7 +20,7 @@ namespace Core::Timing { -constexpr s64 MAX_SLICE_LENGTH = 4000; +constexpr s64 MAX_SLICE_LENGTH = 10000; std::shared_ptr CreateEvent(std::string name, TimedCallback&& callback) { return std::make_shared(std::move(callback), std::move(name)); @@ -65,7 +65,7 @@ void CoreTiming::Initialize(std::function&& on_thread_init_) { on_thread_init = std::move(on_thread_init_); event_fifo_id = 0; shutting_down = false; - ticks = 0; + cpu_ticks = 0; const auto empty_timed_callback = [](std::uintptr_t, u64, std::chrono::nanoseconds) -> std::optional { return std::nullopt; }; ev_lost = CreateEvent("_lost_event", empty_timed_callback); @@ -170,20 +170,12 @@ void CoreTiming::UnscheduleEvent(const std::shared_ptr& event_type, } void CoreTiming::AddTicks(u64 ticks_to_add) { - ticks += ticks_to_add; - downcount -= static_cast(ticks); + cpu_ticks += ticks_to_add; + downcount -= static_cast(cpu_ticks); } void CoreTiming::Idle() { - if (!event_queue.empty()) { - const u64 next_event_time = event_queue.front().time; - const u64 next_ticks = Common::WallClock::NSToCNTPCT(next_event_time) + 10U; - if (next_ticks > ticks) { - ticks = next_ticks; - } - return; - } - ticks += 1000U; + cpu_ticks += 1000U; } void CoreTiming::ResetTicks() { @@ -194,14 +186,14 @@ u64 CoreTiming::GetClockTicks() const { if (is_multicore) [[likely]] { return clock->GetCNTPCT(); } - return ticks; + return Common::WallClock::CPUTickToCNTPCT(cpu_ticks); } u64 CoreTiming::GetGPUTicks() const { if (is_multicore) [[likely]] { return clock->GetGPUTick(); } - return Common::WallClock::CNTPCTToGPUTick(ticks); + return Common::WallClock::CPUTickToGPUTick(cpu_ticks); } std::optional CoreTiming::Advance() { @@ -314,14 +306,14 @@ std::chrono::nanoseconds CoreTiming::GetGlobalTimeNs() const { if (is_multicore) [[likely]] { return clock->GetTimeNS(); } - return std::chrono::nanoseconds{Common::WallClock::CNTPCTToNS(ticks)}; + return std::chrono::nanoseconds{Common::WallClock::CPUTickToNS(cpu_ticks)}; } std::chrono::microseconds CoreTiming::GetGlobalTimeUs() const { if (is_multicore) [[likely]] { return clock->GetTimeUS(); } - return std::chrono::microseconds{Common::WallClock::CNTPCTToUS(ticks)}; + return std::chrono::microseconds{Common::WallClock::CPUTickToUS(cpu_ticks)}; } } // namespace Core::Timing diff --git a/src/core/core_timing.h b/src/core/core_timing.h index 1873852c4..10db1de55 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -167,7 +167,7 @@ private: s64 pause_end_time{}; /// Cycle timing - u64 ticks{}; + u64 cpu_ticks{}; s64 downcount{}; }; diff --git a/src/core/hle/kernel/svc/svc_tick.cpp b/src/core/hle/kernel/svc/svc_tick.cpp index 561336482..7dd7c6e51 100644 --- a/src/core/hle/kernel/svc/svc_tick.cpp +++ b/src/core/hle/kernel/svc/svc_tick.cpp @@ -12,16 +12,8 @@ namespace Kernel::Svc { int64_t GetSystemTick(Core::System& system) { LOG_TRACE(Kernel_SVC, "called"); - auto& core_timing = system.CoreTiming(); - // Returns the value of cntpct_el0 (https://switchbrew.org/wiki/SVC#svcGetSystemTick) - const u64 result{core_timing.GetClockTicks()}; - - if (!system.Kernel().IsMulticore()) { - core_timing.AddTicks(400U); - } - - return static_cast(result); + return static_cast(system.CoreTiming().GetClockTicks()); } int64_t GetSystemTick64(Core::System& system) { From 3e6d81a00899f7f488bfedd849edb64f927b124d Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 7 Jun 2023 22:04:02 -0400 Subject: [PATCH 09/91] nvdisp: Fix SingleCore frametime reporting --- src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index 5a5b2e305..0fe242e9d 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp @@ -51,8 +51,8 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, android::PixelFormat form stride, format, transform, crop_rect}; system.GPU().RequestSwapBuffers(&framebuffer, fences, num_fences); - system.GetPerfStats().EndSystemFrame(); system.SpeedLimiter().DoSpeedLimiting(system.CoreTiming().GetGlobalTimeUs()); + system.GetPerfStats().EndSystemFrame(); system.GetPerfStats().BeginSystemFrame(); } From 8e3d4e33961ef7276247ee03ac5c342d4055ac3a Mon Sep 17 00:00:00 2001 From: Baptiste Marie Date: Mon, 29 May 2023 14:51:56 +0200 Subject: [PATCH 10/91] input_common: Redesign mouse panning --- src/common/settings.h | 11 +- src/input_common/drivers/mouse.cpp | 99 ++++---- src/input_common/drivers/mouse.h | 2 - src/yuzu/CMakeLists.txt | 3 + src/yuzu/configuration/config.cpp | 33 ++- src/yuzu/configuration/config.h | 2 + .../configure_input_advanced.cpp | 7 - .../configuration/configure_input_advanced.ui | 37 +-- .../configuration/configure_input_player.cpp | 16 ++ .../configuration/configure_input_player.ui | 96 +++++++ .../configuration/configure_mouse_panning.cpp | 79 ++++++ .../configuration/configure_mouse_panning.h | 35 +++ .../configuration/configure_mouse_panning.ui | 238 ++++++++++++++++++ src/yuzu_cmd/default_ini.h | 26 +- 14 files changed, 581 insertions(+), 103 deletions(-) create mode 100644 src/yuzu/configuration/configure_mouse_panning.cpp create mode 100644 src/yuzu/configuration/configure_mouse_panning.h create mode 100644 src/yuzu/configuration/configure_mouse_panning.ui diff --git a/src/common/settings.h b/src/common/settings.h index 9682281b0..3c775d3d2 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -524,9 +524,16 @@ struct Values { Setting tas_loop{false, "tas_loop"}; Setting mouse_panning{false, "mouse_panning"}; - Setting mouse_panning_sensitivity{50, 1, 100, "mouse_panning_sensitivity"}; - Setting mouse_enabled{false, "mouse_enabled"}; + Setting mouse_panning_x_sensitivity{50, 1, 100, "mouse_panning_x_sensitivity"}; + Setting mouse_panning_y_sensitivity{50, 1, 100, "mouse_panning_y_sensitivity"}; + Setting mouse_panning_deadzone_x_counterweight{ + 0, 0, 100, "mouse_panning_deadzone_x_counterweight"}; + Setting mouse_panning_deadzone_y_counterweight{ + 0, 0, 100, "mouse_panning_deadzone_y_counterweight"}; + Setting mouse_panning_decay_strength{22, 0, 100, "mouse_panning_decay_strength"}; + Setting mouse_panning_min_decay{5, 0, 100, "mouse_panning_min_decay"}; + Setting mouse_enabled{false, "mouse_enabled"}; Setting emulate_analog_keyboard{false, "emulate_analog_keyboard"}; Setting keyboard_enabled{false, "keyboard_enabled"}; diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp index 0c9f642bb..f07cf8a0e 100644 --- a/src/input_common/drivers/mouse.cpp +++ b/src/input_common/drivers/mouse.cpp @@ -76,9 +76,6 @@ void Mouse::UpdateThread(std::stop_token stop_token) { UpdateStickInput(); UpdateMotionInput(); - if (mouse_panning_timeout++ > 20) { - StopPanning(); - } std::this_thread::sleep_for(std::chrono::milliseconds(update_time)); } } @@ -88,18 +85,45 @@ void Mouse::UpdateStickInput() { return; } - const float sensitivity = - Settings::values.mouse_panning_sensitivity.GetValue() * default_stick_sensitivity; + const float length = last_mouse_change.Length(); - // Slow movement by 4% - last_mouse_change *= 0.96f; - SetAxis(identifier, mouse_axis_x, last_mouse_change.x * sensitivity); - SetAxis(identifier, mouse_axis_y, -last_mouse_change.y * sensitivity); + // Prevent input from exceeding the max range (1.0f) too much, + // but allow some room to make it easier to sustain + if (length > 1.2f) { + last_mouse_change /= length; + last_mouse_change *= 1.2f; + } + + auto mouse_change = last_mouse_change; + + // Bind the mouse change to [0 <= deadzone_counterweight <= 1,1] + if (length < 1.0f) { + const float deadzone_h_counterweight = + Settings::values.mouse_panning_deadzone_x_counterweight.GetValue(); + const float deadzone_v_counterweight = + Settings::values.mouse_panning_deadzone_y_counterweight.GetValue(); + mouse_change /= length; + mouse_change.x *= length + (1 - length) * deadzone_h_counterweight * 0.01f; + mouse_change.y *= length + (1 - length) * deadzone_v_counterweight * 0.01f; + } + + SetAxis(identifier, mouse_axis_x, mouse_change.x); + SetAxis(identifier, mouse_axis_y, -mouse_change.y); + + // Decay input over time + const float clamped_length = std::min(1.0f, length); + const float decay_strength = Settings::values.mouse_panning_decay_strength.GetValue(); + const float decay = 1 - clamped_length * clamped_length * decay_strength * 0.01f; + const float min_decay = Settings::values.mouse_panning_min_decay.GetValue(); + const float clamped_decay = std::min(1 - min_decay / 100.0f, decay); + last_mouse_change *= clamped_decay; } void Mouse::UpdateMotionInput() { - const float sensitivity = - Settings::values.mouse_panning_sensitivity.GetValue() * default_motion_sensitivity; + // This may need its own sensitivity instead of using the average + const float sensitivity = (Settings::values.mouse_panning_x_sensitivity.GetValue() + + Settings::values.mouse_panning_y_sensitivity.GetValue()) / + 2.0f * default_motion_sensitivity; const float rotation_velocity = std::sqrt(last_motion_change.x * last_motion_change.x + last_motion_change.y * last_motion_change.y); @@ -131,49 +155,28 @@ void Mouse::UpdateMotionInput() { void Mouse::Move(int x, int y, int center_x, int center_y) { if (Settings::values.mouse_panning) { - mouse_panning_timeout = 0; - - auto mouse_change = + const auto mouse_change = (Common::MakeVec(x, y) - Common::MakeVec(center_x, center_y)).Cast(); + const float x_sensitivity = + Settings::values.mouse_panning_x_sensitivity.GetValue() * default_stick_sensitivity; + const float y_sensitivity = + Settings::values.mouse_panning_y_sensitivity.GetValue() * default_stick_sensitivity; + last_motion_change += {-mouse_change.y, -mouse_change.x, 0}; - - const auto move_distance = mouse_change.Length(); - if (move_distance == 0) { - return; - } - - // Make slow movements at least 3 units on length - if (move_distance < 3.0f) { - // Normalize value - mouse_change /= move_distance; - mouse_change *= 3.0f; - } - - // Average mouse movements - last_mouse_change = (last_mouse_change * 0.91f) + (mouse_change * 0.09f); - - const auto last_move_distance = last_mouse_change.Length(); - - // Make fast movements clamp to 8 units on length - if (last_move_distance > 8.0f) { - // Normalize value - last_mouse_change /= last_move_distance; - last_mouse_change *= 8.0f; - } - - // Ignore average if it's less than 1 unit and use current movement value - if (last_move_distance < 1.0f) { - last_mouse_change = mouse_change / mouse_change.Length(); - } + last_mouse_change.x += mouse_change.x * x_sensitivity * 0.09f; + last_mouse_change.y += mouse_change.y * y_sensitivity * 0.09f; return; } if (button_pressed) { const auto mouse_move = Common::MakeVec(x, y) - mouse_origin; - const float sensitivity = Settings::values.mouse_panning_sensitivity.GetValue() * 0.0012f; - SetAxis(identifier, mouse_axis_x, static_cast(mouse_move.x) * sensitivity); - SetAxis(identifier, mouse_axis_y, static_cast(-mouse_move.y) * sensitivity); + const float x_sensitivity = Settings::values.mouse_panning_x_sensitivity.GetValue(); + const float y_sensitivity = Settings::values.mouse_panning_y_sensitivity.GetValue(); + SetAxis(identifier, mouse_axis_x, + static_cast(mouse_move.x) * x_sensitivity * 0.0012f); + SetAxis(identifier, mouse_axis_y, + static_cast(-mouse_move.y) * y_sensitivity * 0.0012f); last_motion_change = { static_cast(-mouse_move.y) / 50.0f, @@ -241,10 +244,6 @@ void Mouse::ReleaseAllButtons() { button_pressed = false; } -void Mouse::StopPanning() { - last_mouse_change = {}; -} - std::vector Mouse::GetInputDevices() const { std::vector devices; devices.emplace_back(Common::ParamPackage{ diff --git a/src/input_common/drivers/mouse.h b/src/input_common/drivers/mouse.h index b872c7a0f..0e8edcce1 100644 --- a/src/input_common/drivers/mouse.h +++ b/src/input_common/drivers/mouse.h @@ -98,7 +98,6 @@ private: void UpdateThread(std::stop_token stop_token); void UpdateStickInput(); void UpdateMotionInput(); - void StopPanning(); Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const; @@ -108,7 +107,6 @@ private: Common::Vec3 last_motion_change; Common::Vec2 wheel_position; bool button_pressed; - int mouse_panning_timeout{}; std::jthread update_thread; }; diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 84d9ca796..8676bfd8a 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -98,6 +98,9 @@ add_executable(yuzu configuration/configure_input_profile_dialog.cpp configuration/configure_input_profile_dialog.h configuration/configure_input_profile_dialog.ui + configuration/configure_mouse_panning.cpp + configuration/configure_mouse_panning.h + configuration/configure_mouse_panning.ui configuration/configure_motion_touch.cpp configuration/configure_motion_touch.h configuration/configure_motion_touch.ui diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index bac9dff90..b58a1e9d1 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -351,6 +351,10 @@ void Config::ReadPlayerValue(std::size_t player_index) { player_motions = default_param; } } + + if (player_index == 0) { + ReadMousePanningValues(); + } } void Config::ReadDebugValues() { @@ -471,6 +475,7 @@ void Config::ReadControlValues() { ReadKeyboardValues(); ReadMouseValues(); ReadTouchscreenValues(); + ReadMousePanningValues(); ReadMotionTouchValues(); ReadHidbusValues(); ReadIrCameraValues(); @@ -481,8 +486,6 @@ void Config::ReadControlValues() { Settings::values.enable_raw_input = false; #endif ReadBasicSetting(Settings::values.emulate_analog_keyboard); - Settings::values.mouse_panning = false; - ReadBasicSetting(Settings::values.mouse_panning_sensitivity); ReadBasicSetting(Settings::values.enable_joycon_driver); ReadBasicSetting(Settings::values.enable_procon_driver); ReadBasicSetting(Settings::values.random_amiibo_id); @@ -496,6 +499,16 @@ void Config::ReadControlValues() { qt_config->endGroup(); } +void Config::ReadMousePanningValues() { + ReadBasicSetting(Settings::values.mouse_panning); + ReadBasicSetting(Settings::values.mouse_panning_x_sensitivity); + ReadBasicSetting(Settings::values.mouse_panning_y_sensitivity); + ReadBasicSetting(Settings::values.mouse_panning_deadzone_x_counterweight); + ReadBasicSetting(Settings::values.mouse_panning_deadzone_y_counterweight); + ReadBasicSetting(Settings::values.mouse_panning_decay_strength); + ReadBasicSetting(Settings::values.mouse_panning_min_decay); +} + void Config::ReadMotionTouchValues() { int num_touch_from_button_maps = qt_config->beginReadArray(QStringLiteral("touch_from_button_maps")); @@ -1063,6 +1076,10 @@ void Config::SavePlayerValue(std::size_t player_index) { QString::fromStdString(player.motions[i]), QString::fromStdString(default_param)); } + + if (player_index == 0) { + SaveMousePanningValues(); + } } void Config::SaveDebugValues() { @@ -1099,6 +1116,16 @@ void Config::SaveTouchscreenValues() { WriteSetting(QStringLiteral("touchscreen_diameter_y"), touchscreen.diameter_y, 15); } +void Config::SaveMousePanningValues() { + // Don't overwrite values.mouse_panning + WriteBasicSetting(Settings::values.mouse_panning_x_sensitivity); + WriteBasicSetting(Settings::values.mouse_panning_y_sensitivity); + WriteBasicSetting(Settings::values.mouse_panning_deadzone_x_counterweight); + WriteBasicSetting(Settings::values.mouse_panning_deadzone_y_counterweight); + WriteBasicSetting(Settings::values.mouse_panning_decay_strength); + WriteBasicSetting(Settings::values.mouse_panning_min_decay); +} + void Config::SaveMotionTouchValues() { WriteBasicSetting(Settings::values.touch_device); WriteBasicSetting(Settings::values.touch_from_button_map_index); @@ -1185,6 +1212,7 @@ void Config::SaveControlValues() { SaveDebugValues(); SaveMouseValues(); SaveTouchscreenValues(); + SaveMousePanningValues(); SaveMotionTouchValues(); SaveHidbusValues(); SaveIrCameraValues(); @@ -1199,7 +1227,6 @@ void Config::SaveControlValues() { WriteBasicSetting(Settings::values.random_amiibo_id); WriteBasicSetting(Settings::values.keyboard_enabled); WriteBasicSetting(Settings::values.emulate_analog_keyboard); - WriteBasicSetting(Settings::values.mouse_panning_sensitivity); WriteBasicSetting(Settings::values.controller_navigation); WriteBasicSetting(Settings::values.tas_enable); diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h index 0fd4baf6b..1211389d2 100644 --- a/src/yuzu/configuration/config.h +++ b/src/yuzu/configuration/config.h @@ -74,6 +74,7 @@ private: void ReadKeyboardValues(); void ReadMouseValues(); void ReadTouchscreenValues(); + void ReadMousePanningValues(); void ReadMotionTouchValues(); void ReadHidbusValues(); void ReadIrCameraValues(); @@ -104,6 +105,7 @@ private: void SaveDebugValues(); void SaveMouseValues(); void SaveTouchscreenValues(); + void SaveMousePanningValues(); void SaveMotionTouchValues(); void SaveHidbusValues(); void SaveIrCameraValues(); diff --git a/src/yuzu/configuration/configure_input_advanced.cpp b/src/yuzu/configuration/configure_input_advanced.cpp index f13156434..3cfd5d439 100644 --- a/src/yuzu/configuration/configure_input_advanced.cpp +++ b/src/yuzu/configuration/configure_input_advanced.cpp @@ -129,9 +129,6 @@ void ConfigureInputAdvanced::ApplyConfiguration() { Settings::values.mouse_enabled = ui->mouse_enabled->isChecked(); Settings::values.keyboard_enabled = ui->keyboard_enabled->isChecked(); Settings::values.emulate_analog_keyboard = ui->emulate_analog_keyboard->isChecked(); - Settings::values.mouse_panning = ui->mouse_panning->isChecked(); - Settings::values.mouse_panning_sensitivity = - static_cast(ui->mouse_panning_sensitivity->value()); Settings::values.touchscreen.enabled = ui->touchscreen_enabled->isChecked(); Settings::values.enable_raw_input = ui->enable_raw_input->isChecked(); Settings::values.enable_udp_controller = ui->enable_udp_controller->isChecked(); @@ -167,8 +164,6 @@ void ConfigureInputAdvanced::LoadConfiguration() { ui->mouse_enabled->setChecked(Settings::values.mouse_enabled.GetValue()); ui->keyboard_enabled->setChecked(Settings::values.keyboard_enabled.GetValue()); ui->emulate_analog_keyboard->setChecked(Settings::values.emulate_analog_keyboard.GetValue()); - ui->mouse_panning->setChecked(Settings::values.mouse_panning.GetValue()); - ui->mouse_panning_sensitivity->setValue(Settings::values.mouse_panning_sensitivity.GetValue()); ui->touchscreen_enabled->setChecked(Settings::values.touchscreen.enabled); ui->enable_raw_input->setChecked(Settings::values.enable_raw_input.GetValue()); ui->enable_udp_controller->setChecked(Settings::values.enable_udp_controller.GetValue()); @@ -197,8 +192,6 @@ void ConfigureInputAdvanced::RetranslateUI() { void ConfigureInputAdvanced::UpdateUIEnabled() { ui->debug_configure->setEnabled(ui->debug_enabled->isChecked()); ui->touchscreen_advanced->setEnabled(ui->touchscreen_enabled->isChecked()); - ui->mouse_panning->setEnabled(!ui->mouse_enabled->isChecked()); - ui->mouse_panning_sensitivity->setEnabled(!ui->mouse_enabled->isChecked()); ui->ring_controller_configure->setEnabled(ui->enable_ring_controller->isChecked()); #if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) || !defined(YUZU_USE_QT_MULTIMEDIA) ui->enable_ir_sensor->setEnabled(false); diff --git a/src/yuzu/configuration/configure_input_advanced.ui b/src/yuzu/configuration/configure_input_advanced.ui index 2e8b13660..2994d0ab4 100644 --- a/src/yuzu/configuration/configure_input_advanced.ui +++ b/src/yuzu/configuration/configure_input_advanced.ui @@ -2744,48 +2744,13 @@ - - - - 0 - 23 - - - - Enable mouse panning - - - - - - - Mouse sensitivity - - - Qt::AlignCenter - - - % - - - 1 - - - 100 - - - 100 - - - - Motion / Touch - + Configure diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 2c2e7e47b..576f5b571 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -23,6 +23,7 @@ #include "yuzu/configuration/config.h" #include "yuzu/configuration/configure_input_player.h" #include "yuzu/configuration/configure_input_player_widget.h" +#include "yuzu/configuration/configure_mouse_panning.h" #include "yuzu/configuration/input_profiles.h" #include "yuzu/util/limitable_input_dialog.h" @@ -711,6 +712,21 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i }); } + if (player_index_ == 0) { + connect(ui->mousePanningButton, &QPushButton::clicked, [this, input_subsystem_] { + const auto right_stick_param = + emulated_controller->GetStickParam(Settings::NativeAnalog::RStick); + ConfigureMousePanning dialog(this, input_subsystem_, + right_stick_param.Get("deadzone", 0.0f), + right_stick_param.Get("range", 1.0f)); + if (dialog.exec() == QDialog::Accepted) { + dialog.ApplyConfiguration(); + } + }); + } else { + ui->mousePanningWidget->hide(); + } + // Player Connected checkbox connect(ui->groupConnectedController, &QGroupBox::toggled, [this](bool checked) { emit Connected(checked); }); diff --git a/src/yuzu/configuration/configure_input_player.ui b/src/yuzu/configuration/configure_input_player.ui index a9567c6ee..43f6c7b50 100644 --- a/src/yuzu/configuration/configure_input_player.ui +++ b/src/yuzu/configuration/configure_input_player.ui @@ -3048,6 +3048,102 @@ + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 3 + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + Mouse panning + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 68 + 0 + + + + + 68 + 16777215 + + + + min-width: 68px; + + + Configure + + + + + + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + diff --git a/src/yuzu/configuration/configure_mouse_panning.cpp b/src/yuzu/configuration/configure_mouse_panning.cpp new file mode 100644 index 000000000..f183d2740 --- /dev/null +++ b/src/yuzu/configuration/configure_mouse_panning.cpp @@ -0,0 +1,79 @@ +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include + +#include "common/settings.h" +#include "ui_configure_mouse_panning.h" +#include "yuzu/configuration/configure_mouse_panning.h" + +ConfigureMousePanning::ConfigureMousePanning(QWidget* parent, + InputCommon::InputSubsystem* input_subsystem_, + float right_stick_deadzone, float right_stick_range) + : QDialog(parent), input_subsystem{input_subsystem_}, + ui(std::make_unique()) { + ui->setupUi(this); + SetConfiguration(right_stick_deadzone, right_stick_range); + ConnectEvents(); +} + +ConfigureMousePanning::~ConfigureMousePanning() = default; + +void ConfigureMousePanning::closeEvent(QCloseEvent* event) { + event->accept(); +} + +void ConfigureMousePanning::SetConfiguration(float right_stick_deadzone, float right_stick_range) { + ui->enable->setChecked(Settings::values.mouse_panning.GetValue()); + ui->x_sensitivity->setValue(Settings::values.mouse_panning_x_sensitivity.GetValue()); + ui->y_sensitivity->setValue(Settings::values.mouse_panning_y_sensitivity.GetValue()); + ui->deadzone_x_counterweight->setValue( + Settings::values.mouse_panning_deadzone_x_counterweight.GetValue()); + ui->deadzone_y_counterweight->setValue( + Settings::values.mouse_panning_deadzone_y_counterweight.GetValue()); + ui->decay_strength->setValue(Settings::values.mouse_panning_decay_strength.GetValue()); + ui->min_decay->setValue(Settings::values.mouse_panning_min_decay.GetValue()); + + if (right_stick_deadzone > 0.0f || right_stick_range != 1.0f) { + ui->warning_label->setText(QString::fromStdString( + "Mouse panning works better with a deadzone of 0% and a range of 100%.\n" + "Current values are " + + std::to_string(static_cast(right_stick_deadzone * 100.0f)) + "% and " + + std::to_string(static_cast(right_stick_range * 100.0f)) + "% respectively.")); + } else { + ui->warning_label->hide(); + } +} + +void ConfigureMousePanning::SetDefaultConfiguration() { + ui->x_sensitivity->setValue(Settings::values.mouse_panning_x_sensitivity.GetDefault()); + ui->y_sensitivity->setValue(Settings::values.mouse_panning_y_sensitivity.GetDefault()); + ui->deadzone_x_counterweight->setValue( + Settings::values.mouse_panning_deadzone_x_counterweight.GetDefault()); + ui->deadzone_y_counterweight->setValue( + Settings::values.mouse_panning_deadzone_y_counterweight.GetDefault()); + ui->decay_strength->setValue(Settings::values.mouse_panning_decay_strength.GetDefault()); + ui->min_decay->setValue(Settings::values.mouse_panning_min_decay.GetDefault()); +} + +void ConfigureMousePanning::ConnectEvents() { + connect(ui->default_button, &QPushButton::clicked, this, + &ConfigureMousePanning::SetDefaultConfiguration); + connect(ui->button_box, &QDialogButtonBox::accepted, this, + &ConfigureMousePanning::ApplyConfiguration); + connect(ui->button_box, &QDialogButtonBox::rejected, this, [this] { reject(); }); +} + +void ConfigureMousePanning::ApplyConfiguration() { + Settings::values.mouse_panning = ui->enable->isChecked(); + Settings::values.mouse_panning_x_sensitivity = static_cast(ui->x_sensitivity->value()); + Settings::values.mouse_panning_y_sensitivity = static_cast(ui->y_sensitivity->value()); + Settings::values.mouse_panning_deadzone_x_counterweight = + static_cast(ui->deadzone_x_counterweight->value()); + Settings::values.mouse_panning_deadzone_y_counterweight = + static_cast(ui->deadzone_y_counterweight->value()); + Settings::values.mouse_panning_decay_strength = static_cast(ui->decay_strength->value()); + Settings::values.mouse_panning_min_decay = static_cast(ui->min_decay->value()); + + accept(); +} diff --git a/src/yuzu/configuration/configure_mouse_panning.h b/src/yuzu/configuration/configure_mouse_panning.h new file mode 100644 index 000000000..08c6e1f62 --- /dev/null +++ b/src/yuzu/configuration/configure_mouse_panning.h @@ -0,0 +1,35 @@ +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include + +namespace InputCommon { +class InputSubsystem; +} + +namespace Ui { +class ConfigureMousePanning; +} + +class ConfigureMousePanning : public QDialog { + Q_OBJECT +public: + explicit ConfigureMousePanning(QWidget* parent, InputCommon::InputSubsystem* input_subsystem_, + float right_stick_deadzone, float right_stick_range); + ~ConfigureMousePanning() override; + +public slots: + void ApplyConfiguration(); + +private: + void closeEvent(QCloseEvent* event) override; + void SetConfiguration(float right_stick_deadzone, float right_stick_range); + void SetDefaultConfiguration(); + void ConnectEvents(); + + InputCommon::InputSubsystem* input_subsystem; + std::unique_ptr ui; +}; diff --git a/src/yuzu/configuration/configure_mouse_panning.ui b/src/yuzu/configuration/configure_mouse_panning.ui new file mode 100644 index 000000000..75795b727 --- /dev/null +++ b/src/yuzu/configuration/configure_mouse_panning.ui @@ -0,0 +1,238 @@ + + + ConfigureMousePanning + + + Configure mouse panning + + + + + + Enable + + + Can be toggled via a hotkey + + + + + + + + + Sensitivity + + + + + + Horizontal + + + + + + + Qt::AlignCenter + + + % + + + 1 + + + 100 + + + 50 + + + + + + + Vertical + + + + + + + Qt::AlignCenter + + + % + + + 1 + + + 100 + + + 50 + + + + + + + + + + Deadzone counterweight + + + Counteracts a game's built-in deadzone + + + + + + Horizontal + + + + + + + Qt::AlignCenter + + + % + + + 0 + + + 100 + + + 0 + + + + + + + Vertical + + + + + + + Qt::AlignCenter + + + % + + + 0 + + + 100 + + + 0 + + + + + + + + + + Stick decay + + + + + + Strength + + + + + + + Qt::AlignCenter + + + % + + + 0 + + + 100 + + + 22 + + + + + + + Minimum + + + + + + + Qt::AlignCenter + + + % + + + 0 + + + 100 + + + 5 + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 911d461e4..119e22183 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -140,9 +140,29 @@ udp_input_servers = # 0 (default): Off, 1: On mouse_panning = -# Set mouse sensitivity. -# Default: 1.0 -mouse_panning_sensitivity = +# Set mouse panning horizontal sensitivity. +# Default: 50.0 +mouse_panning_x_sensitivity = + +# Set mouse panning vertical sensitivity. +# Default: 50.0 +mouse_panning_y_sensitivity = + +# Set mouse panning deadzone horizontal counterweight. +# Default: 0.0 +mouse_panning_deadzone_x_counterweight = + +# Set mouse panning deadzone vertical counterweight. +# Default: 0.0 +mouse_panning_deadzone_y_counterweight = + +# Set mouse panning stick decay strength. +# Default: 22.0 +mouse_panning_decay_strength = + +# Set mouse panning stick minimum decay. +# Default: 5.0 +mouse_panning_minimum_decay = # Emulate an analog control stick from keyboard inputs. # 0 (default): Disabled, 1: Enabled From 8d6aefdcc452b602d94a84d13bbbc15f806b689c Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 14 Jun 2023 14:11:46 -0400 Subject: [PATCH 11/91] video_core: optionally skip barriers on feedback loops --- src/common/settings.h | 1 + src/video_core/texture_cache/texture_cache.h | 4 ++++ src/yuzu/configuration/config.cpp | 2 ++ src/yuzu/configuration/configure_graphics_advanced.cpp | 10 ++++++++++ src/yuzu/configuration/configure_graphics_advanced.h | 1 + src/yuzu/configuration/configure_graphics_advanced.ui | 10 ++++++++++ 6 files changed, 28 insertions(+) diff --git a/src/common/settings.h b/src/common/settings.h index 9682281b0..3aedf3850 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -483,6 +483,7 @@ struct Values { AstcRecompression::Uncompressed, AstcRecompression::Uncompressed, AstcRecompression::Bc3, "astc_recompression"}; SwitchableSetting use_video_framerate{false, "use_video_framerate"}; + SwitchableSetting barrier_feedback_loops{true, "barrier_feedback_loops"}; SwitchableSetting bg_red{0, "bg_red"}; SwitchableSetting bg_green{0, "bg_green"}; diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index c7f7448e9..43b7ac0a6 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -186,6 +186,10 @@ void TextureCache

::FillComputeImageViews(std::span views) { template void TextureCache

::CheckFeedbackLoop(std::span views) { + if (!Settings::values.barrier_feedback_loops.GetValue()) { + return; + } + const bool requires_barrier = [&] { for (const auto& view : views) { if (!view.id) { diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index bac9dff90..edc206a25 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -761,6 +761,7 @@ void Config::ReadRendererValues() { ReadGlobalSetting(Settings::values.use_vulkan_driver_pipeline_cache); ReadGlobalSetting(Settings::values.enable_compute_pipelines); ReadGlobalSetting(Settings::values.use_video_framerate); + ReadGlobalSetting(Settings::values.barrier_feedback_loops); ReadGlobalSetting(Settings::values.bg_red); ReadGlobalSetting(Settings::values.bg_green); ReadGlobalSetting(Settings::values.bg_blue); @@ -1417,6 +1418,7 @@ void Config::SaveRendererValues() { WriteGlobalSetting(Settings::values.use_vulkan_driver_pipeline_cache); WriteGlobalSetting(Settings::values.enable_compute_pipelines); WriteGlobalSetting(Settings::values.use_video_framerate); + WriteGlobalSetting(Settings::values.barrier_feedback_loops); WriteGlobalSetting(Settings::values.bg_red); WriteGlobalSetting(Settings::values.bg_green); WriteGlobalSetting(Settings::values.bg_blue); diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index 0463ac8b9..c0a044767 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp @@ -43,6 +43,8 @@ void ConfigureGraphicsAdvanced::SetConfiguration() { ui->enable_compute_pipelines_checkbox->setChecked( Settings::values.enable_compute_pipelines.GetValue()); ui->use_video_framerate_checkbox->setChecked(Settings::values.use_video_framerate.GetValue()); + ui->barrier_feedback_loops_checkbox->setChecked( + Settings::values.barrier_feedback_loops.GetValue()); if (Settings::IsConfiguringGlobal()) { ui->gpu_accuracy->setCurrentIndex( @@ -94,6 +96,9 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() { enable_compute_pipelines); ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_video_framerate, ui->use_video_framerate_checkbox, use_video_framerate); + ConfigurationShared::ApplyPerGameSetting(&Settings::values.barrier_feedback_loops, + ui->barrier_feedback_loops_checkbox, + barrier_feedback_loops); } void ConfigureGraphicsAdvanced::changeEvent(QEvent* event) { @@ -130,6 +135,8 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() { Settings::values.enable_compute_pipelines.UsingGlobal()); ui->use_video_framerate_checkbox->setEnabled( Settings::values.use_video_framerate.UsingGlobal()); + ui->barrier_feedback_loops_checkbox->setEnabled( + Settings::values.barrier_feedback_loops.UsingGlobal()); return; } @@ -157,6 +164,9 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() { ConfigurationShared::SetColoredTristate(ui->use_video_framerate_checkbox, Settings::values.use_video_framerate, use_video_framerate); + ConfigurationShared::SetColoredTristate(ui->barrier_feedback_loops_checkbox, + Settings::values.barrier_feedback_loops, + barrier_feedback_loops); ConfigurationShared::SetColoredComboBox( ui->gpu_accuracy, ui->label_gpu_accuracy, static_cast(Settings::values.gpu_accuracy.GetValue(true))); diff --git a/src/yuzu/configuration/configure_graphics_advanced.h b/src/yuzu/configuration/configure_graphics_advanced.h index a4dc8ceb0..369a7c83e 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.h +++ b/src/yuzu/configuration/configure_graphics_advanced.h @@ -48,6 +48,7 @@ private: ConfigurationShared::CheckState use_vulkan_driver_pipeline_cache; ConfigurationShared::CheckState enable_compute_pipelines; ConfigurationShared::CheckState use_video_framerate; + ConfigurationShared::CheckState barrier_feedback_loops; const Core::System& system; }; diff --git a/src/yuzu/configuration/configure_graphics_advanced.ui b/src/yuzu/configuration/configure_graphics_advanced.ui index e7f0ef6be..d527a6f38 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.ui +++ b/src/yuzu/configuration/configure_graphics_advanced.ui @@ -201,6 +201,16 @@ Compute pipelines are always enabled on all other drivers. + + + + Improves rendering of transparency effects in specific games. + + + Barrier feedback loops + + + From 734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 16 Jun 2023 15:12:46 -0400 Subject: [PATCH 12/91] vfs_real: misc optimizations --- src/common/fs/fs.cpp | 8 +++---- src/common/fs/fs_types.h | 2 +- src/core/file_sys/vfs_real.cpp | 44 ++++++++++++++++++++-------------- src/core/file_sys/vfs_real.h | 11 ++++++++- 4 files changed, 41 insertions(+), 24 deletions(-) diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cpp index 6d66c926d..1baf6d746 100644 --- a/src/common/fs/fs.cpp +++ b/src/common/fs/fs.cpp @@ -436,7 +436,7 @@ void IterateDirEntries(const std::filesystem::path& path, const DirEntryCallable if (True(filter & DirEntryFilter::File) && entry.status().type() == fs::file_type::regular) { - if (!callback(entry.path())) { + if (!callback(entry)) { callback_error = true; break; } @@ -444,7 +444,7 @@ void IterateDirEntries(const std::filesystem::path& path, const DirEntryCallable if (True(filter & DirEntryFilter::Directory) && entry.status().type() == fs::file_type::directory) { - if (!callback(entry.path())) { + if (!callback(entry)) { callback_error = true; break; } @@ -493,7 +493,7 @@ void IterateDirEntriesRecursively(const std::filesystem::path& path, if (True(filter & DirEntryFilter::File) && entry.status().type() == fs::file_type::regular) { - if (!callback(entry.path())) { + if (!callback(entry)) { callback_error = true; break; } @@ -501,7 +501,7 @@ void IterateDirEntriesRecursively(const std::filesystem::path& path, if (True(filter & DirEntryFilter::Directory) && entry.status().type() == fs::file_type::directory) { - if (!callback(entry.path())) { + if (!callback(entry)) { callback_error = true; break; } diff --git a/src/common/fs/fs_types.h b/src/common/fs/fs_types.h index 5a4090c19..900f85d24 100644 --- a/src/common/fs/fs_types.h +++ b/src/common/fs/fs_types.h @@ -66,6 +66,6 @@ DECLARE_ENUM_FLAG_OPERATORS(DirEntryFilter); * @returns A boolean value. * Return true to indicate whether the callback is successful, false otherwise. */ -using DirEntryCallable = std::function; +using DirEntryCallable = std::function; } // namespace Common::FS diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp index 7a15d8438..a8fdc8f3e 100644 --- a/src/core/file_sys/vfs_real.cpp +++ b/src/core/file_sys/vfs_real.cpp @@ -10,6 +10,7 @@ #include "common/fs/fs.h" #include "common/fs/path_util.h" #include "common/logging/log.h" +#include "core/file_sys/vfs.h" #include "core/file_sys/vfs_real.h" // For FileTimeStampRaw @@ -72,7 +73,8 @@ VfsEntryType RealVfsFilesystem::GetEntryType(std::string_view path_) const { return VfsEntryType::File; } -VirtualFile RealVfsFilesystem::OpenFile(std::string_view path_, Mode perms) { +VirtualFile RealVfsFilesystem::OpenFileFromEntry(std::string_view path_, std::optional size, + Mode perms) { const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault); if (auto it = cache.find(path); it != cache.end()) { @@ -81,20 +83,24 @@ VirtualFile RealVfsFilesystem::OpenFile(std::string_view path_, Mode perms) { } } - if (!FS::Exists(path) || !FS::IsFile(path)) { + if (!size && !FS::IsFile(path)) { return nullptr; } auto reference = std::make_unique(); this->InsertReferenceIntoList(*reference); - auto file = - std::shared_ptr(new RealVfsFile(*this, std::move(reference), path, perms)); + auto file = std::shared_ptr( + new RealVfsFile(*this, std::move(reference), path, perms, size)); cache[path] = file; return file; } +VirtualFile RealVfsFilesystem::OpenFile(std::string_view path_, Mode perms) { + return OpenFileFromEntry(path_, {}, perms); +} + VirtualFile RealVfsFilesystem::CreateFile(std::string_view path_, Mode perms) { const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault); cache.erase(path); @@ -243,10 +249,10 @@ void RealVfsFilesystem::RemoveReferenceFromList(FileReference& reference) { } RealVfsFile::RealVfsFile(RealVfsFilesystem& base_, std::unique_ptr reference_, - const std::string& path_, Mode perms_) + const std::string& path_, Mode perms_, std::optional size_) : base(base_), reference(std::move(reference_)), path(path_), parent_path(FS::GetParentPath(path_)), path_components(FS::SplitPathComponents(path_)), - perms(perms_) {} + size(size_), perms(perms_) {} RealVfsFile::~RealVfsFile() { base.DropReference(std::move(reference)); @@ -257,8 +263,10 @@ std::string RealVfsFile::GetName() const { } std::size_t RealVfsFile::GetSize() const { - base.RefreshReference(path, perms, *reference); - return reference->file ? reference->file->GetSize() : 0; + if (size) { + return *size; + } + return FS::GetSize(path); } bool RealVfsFile::Resize(std::size_t new_size) { @@ -309,10 +317,11 @@ std::vector RealVfsDirectory::IterateEntries( std::vector out; - const FS::DirEntryCallable callback = [this, &out](const std::filesystem::path& full_path) { - const auto full_path_string = FS::PathToUTF8String(full_path); + const FS::DirEntryCallable callback = [this, + &out](const std::filesystem::directory_entry& entry) { + const auto full_path_string = FS::PathToUTF8String(entry.path()); - out.emplace_back(base.OpenFile(full_path_string, perms)); + out.emplace_back(base.OpenFileFromEntry(full_path_string, entry.file_size(), perms)); return true; }; @@ -330,8 +339,9 @@ std::vector RealVfsDirectory::IterateEntries out; - const FS::DirEntryCallable callback = [this, &out](const std::filesystem::path& full_path) { - const auto full_path_string = FS::PathToUTF8String(full_path); + const FS::DirEntryCallable callback = [this, + &out](const std::filesystem::directory_entry& entry) { + const auto full_path_string = FS::PathToUTF8String(entry.path()); out.emplace_back(base.OpenDirectory(full_path_string, perms)); @@ -483,12 +493,10 @@ std::map> RealVfsDirectory::GetEntries() std::map> out; - const FS::DirEntryCallable callback = [&out](const std::filesystem::path& full_path) { - const auto filename = FS::PathToUTF8String(full_path.filename()); - + const FS::DirEntryCallable callback = [&out](const std::filesystem::directory_entry& entry) { + const auto filename = FS::PathToUTF8String(entry.path().filename()); out.insert_or_assign(filename, - FS::IsDir(full_path) ? VfsEntryType::Directory : VfsEntryType::File); - + entry.is_directory() ? VfsEntryType::Directory : VfsEntryType::File); return true; }; diff --git a/src/core/file_sys/vfs_real.h b/src/core/file_sys/vfs_real.h index d8c900e33..67f4c4422 100644 --- a/src/core/file_sys/vfs_real.h +++ b/src/core/file_sys/vfs_real.h @@ -4,6 +4,7 @@ #pragma once #include +#include #include #include "common/intrusive_list.h" #include "core/file_sys/mode.h" @@ -20,6 +21,8 @@ struct FileReference : public Common::IntrusiveListBaseNode { }; class RealVfsFile; +class RealVfsDirectory; + class RealVfsFilesystem : public VfsFilesystem { public: RealVfsFilesystem(); @@ -56,6 +59,11 @@ private: private: void InsertReferenceIntoList(FileReference& reference); void RemoveReferenceFromList(FileReference& reference); + +private: + friend class RealVfsDirectory; + VirtualFile OpenFileFromEntry(std::string_view path, std::optional size, + Mode perms = Mode::Read); }; // An implementation of VfsFile that represents a file on the user's computer. @@ -78,13 +86,14 @@ public: private: RealVfsFile(RealVfsFilesystem& base, std::unique_ptr reference, - const std::string& path, Mode perms = Mode::Read); + const std::string& path, Mode perms = Mode::Read, std::optional size = {}); RealVfsFilesystem& base; std::unique_ptr reference; std::string path; std::string parent_path; std::vector path_components; + std::optional size; Mode perms; }; From bf47f777b1f55e0c88fc26afbbc5dd3c6d1eb0ca Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 16 Jun 2023 15:16:38 -0400 Subject: [PATCH 13/91] patch_manager: remove unnecessary GetSize calls --- src/core/file_sys/patch_manager.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 4e61d4335..d3286b352 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -153,7 +153,7 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { const auto sdmc_load_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); std::vector patch_dirs = {sdmc_load_dir}; - if (load_dir != nullptr && load_dir->GetSize() > 0) { + if (load_dir != nullptr) { const auto load_patch_dirs = load_dir->GetSubdirectories(); patch_dirs.insert(patch_dirs.end(), load_patch_dirs.begin(), load_patch_dirs.end()); } @@ -354,8 +354,7 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t const auto load_dir = fs_controller.GetModificationLoadRoot(title_id); const auto sdmc_load_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); if ((type != ContentRecordType::Program && type != ContentRecordType::Data) || - ((load_dir == nullptr || load_dir->GetSize() <= 0) && - (sdmc_load_dir == nullptr || sdmc_load_dir->GetSize() <= 0))) { + (load_dir == nullptr && sdmc_load_dir == nullptr)) { return; } @@ -496,7 +495,7 @@ PatchManager::PatchVersionNames PatchManager::GetPatchVersionNames(VirtualFile u // General Mods (LayeredFS and IPS) const auto mod_dir = fs_controller.GetModificationLoadRoot(title_id); - if (mod_dir != nullptr && mod_dir->GetSize() > 0) { + if (mod_dir != nullptr) { for (const auto& mod : mod_dir->GetSubdirectories()) { std::string types; @@ -540,7 +539,7 @@ PatchManager::PatchVersionNames PatchManager::GetPatchVersionNames(VirtualFile u // SDMC mod directory (RomFS LayeredFS) const auto sdmc_mod_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); - if (sdmc_mod_dir != nullptr && sdmc_mod_dir->GetSize() > 0) { + if (sdmc_mod_dir != nullptr) { std::string types; if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "exefs"))) { AppendCommaIfNotEmpty(types, "LayeredExeFS"); From 94e7cb05da68a59fcaa3e5b51fc15cdbf5577299 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 16 Jun 2023 16:43:14 -0400 Subject: [PATCH 14/91] vfs_real: ensure size cache is reset on write --- src/core/file_sys/vfs_real.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp index a8fdc8f3e..fcc81a664 100644 --- a/src/core/file_sys/vfs_real.cpp +++ b/src/core/file_sys/vfs_real.cpp @@ -270,6 +270,7 @@ std::size_t RealVfsFile::GetSize() const { } bool RealVfsFile::Resize(std::size_t new_size) { + size.reset(); base.RefreshReference(path, perms, *reference); return reference->file ? reference->file->SetSize(new_size) : false; } @@ -295,6 +296,7 @@ std::size_t RealVfsFile::Read(u8* data, std::size_t length, std::size_t offset) } std::size_t RealVfsFile::Write(const u8* data, std::size_t length, std::size_t offset) { + size.reset(); base.RefreshReference(path, perms, *reference); if (!reference->file || !reference->file->Seek(static_cast(offset))) { return 0; From 76a676883a17523fb12eeac6f2b9702e4916b2c2 Mon Sep 17 00:00:00 2001 From: FengChen Date: Sat, 17 Jun 2023 23:26:39 +0800 Subject: [PATCH 15/91] video_core: add samples check when find render target --- src/video_core/texture_cache/texture_cache.h | 22 +++++++++---------- .../texture_cache/texture_cache_base.h | 10 ++++----- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index c7f7448e9..f11998e20 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -280,7 +280,7 @@ void TextureCache

::SynchronizeComputeDescriptors() { } template -bool TextureCache

::RescaleRenderTargets(bool is_clear) { +bool TextureCache

::RescaleRenderTargets() { auto& flags = maxwell3d->dirty.flags; u32 scale_rating = 0; bool rescaled = false; @@ -318,13 +318,13 @@ bool TextureCache

::RescaleRenderTargets(bool is_clear) { ImageViewId& color_buffer_id = render_targets.color_buffer_ids[index]; if (flags[Dirty::ColorBuffer0 + index] || force) { flags[Dirty::ColorBuffer0 + index] = false; - BindRenderTarget(&color_buffer_id, FindColorBuffer(index, is_clear)); + BindRenderTarget(&color_buffer_id, FindColorBuffer(index)); } check_rescale(color_buffer_id, tmp_color_images[index]); } if (flags[Dirty::ZetaBuffer] || force) { flags[Dirty::ZetaBuffer] = false; - BindRenderTarget(&render_targets.depth_buffer_id, FindDepthBuffer(is_clear)); + BindRenderTarget(&render_targets.depth_buffer_id, FindDepthBuffer()); } check_rescale(render_targets.depth_buffer_id, tmp_depth_image); @@ -389,7 +389,7 @@ void TextureCache

::UpdateRenderTargets(bool is_clear) { return; } - const bool rescaled = RescaleRenderTargets(is_clear); + const bool rescaled = RescaleRenderTargets(); if (is_rescaling != rescaled) { flags[Dirty::RescaleViewports] = true; flags[Dirty::RescaleScissors] = true; @@ -1658,7 +1658,7 @@ SamplerId TextureCache

::FindSampler(const TSCEntry& config) { } template -ImageViewId TextureCache

::FindColorBuffer(size_t index, bool is_clear) { +ImageViewId TextureCache

::FindColorBuffer(size_t index) { const auto& regs = maxwell3d->regs; if (index >= regs.rt_control.count) { return ImageViewId{}; @@ -1672,11 +1672,11 @@ ImageViewId TextureCache

::FindColorBuffer(size_t index, bool is_clear) { return ImageViewId{}; } const ImageInfo info(regs.rt[index], regs.anti_alias_samples_mode); - return FindRenderTargetView(info, gpu_addr, is_clear); + return FindRenderTargetView(info, gpu_addr); } template -ImageViewId TextureCache

::FindDepthBuffer(bool is_clear) { +ImageViewId TextureCache

::FindDepthBuffer() { const auto& regs = maxwell3d->regs; if (!regs.zeta_enable) { return ImageViewId{}; @@ -1686,18 +1686,16 @@ ImageViewId TextureCache

::FindDepthBuffer(bool is_clear) { return ImageViewId{}; } const ImageInfo info(regs.zeta, regs.zeta_size, regs.anti_alias_samples_mode); - return FindRenderTargetView(info, gpu_addr, is_clear); + return FindRenderTargetView(info, gpu_addr); } template -ImageViewId TextureCache

::FindRenderTargetView(const ImageInfo& info, GPUVAddr gpu_addr, - bool is_clear) { - const auto options = is_clear ? RelaxedOptions::Samples : RelaxedOptions{}; +ImageViewId TextureCache

::FindRenderTargetView(const ImageInfo& info, GPUVAddr gpu_addr) { ImageId image_id{}; bool delete_state = has_deleted_images; do { has_deleted_images = false; - image_id = FindOrInsertImage(info, gpu_addr, options); + image_id = FindOrInsertImage(info, gpu_addr); delete_state |= has_deleted_images; } while (has_deleted_images); has_deleted_images = delete_state; diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h index 3bfa92154..c347eccd6 100644 --- a/src/video_core/texture_cache/texture_cache_base.h +++ b/src/video_core/texture_cache/texture_cache_base.h @@ -166,9 +166,8 @@ public: void SynchronizeComputeDescriptors(); /// Updates the Render Targets if they can be rescaled - /// @param is_clear True when the render targets are being used for clears /// @retval True if the Render Targets have been rescaled. - bool RescaleRenderTargets(bool is_clear); + bool RescaleRenderTargets(); /// Update bound render targets and upload memory if necessary /// @param is_clear True when the render targets are being used for clears @@ -324,14 +323,13 @@ private: [[nodiscard]] SamplerId FindSampler(const TSCEntry& config); /// Find or create an image view for the given color buffer index - [[nodiscard]] ImageViewId FindColorBuffer(size_t index, bool is_clear); + [[nodiscard]] ImageViewId FindColorBuffer(size_t index); /// Find or create an image view for the depth buffer - [[nodiscard]] ImageViewId FindDepthBuffer(bool is_clear); + [[nodiscard]] ImageViewId FindDepthBuffer(); /// Find or create a view for a render target with the given image parameters - [[nodiscard]] ImageViewId FindRenderTargetView(const ImageInfo& info, GPUVAddr gpu_addr, - bool is_clear); + [[nodiscard]] ImageViewId FindRenderTargetView(const ImageInfo& info, GPUVAddr gpu_addr); /// Iterates over all the images in a region calling func template From 6448eade2ef126a88068cde66b77e7788c3fab08 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 18 Jun 2023 04:59:12 -0400 Subject: [PATCH 16/91] externals: Add vma and initialize it video_core: Move vma implementation to library --- .gitmodules | 3 +++ externals/CMakeLists.txt | 5 ++++ externals/vma/vma | 1 + externals/vma/vma.cpp | 5 ++++ src/video_core/CMakeLists.txt | 2 +- .../vulkan_common/vulkan_device.cpp | 23 ++++++++++++++++++- src/video_core/vulkan_common/vulkan_device.h | 3 +++ 7 files changed, 40 insertions(+), 2 deletions(-) create mode 160000 externals/vma/vma create mode 100644 externals/vma/vma.cpp diff --git a/.gitmodules b/.gitmodules index 89f2ad924..cc0e97a85 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,3 +55,6 @@ [submodule "tzdb_to_nx"] path = externals/nx_tzdb/tzdb_to_nx url = https://github.com/lat9nq/tzdb_to_nx.git +[submodule "externals/vma/vma"] + path = externals/vma/vma + url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 7cce27d51..ca4ebe4b9 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -143,6 +143,11 @@ endif() # TZDB (Time Zone Database) add_subdirectory(nx_tzdb) +# VMA +add_library(vma vma/vma.cpp) +target_include_directories(vma PUBLIC ./vma/vma/include) +target_link_libraries(vma PRIVATE Vulkan::Headers) + if (NOT TARGET LLVM::Demangle) add_library(demangle demangle/ItaniumDemangle.cpp) target_include_directories(demangle PUBLIC ./demangle) diff --git a/externals/vma/vma b/externals/vma/vma new file mode 160000 index 000000000..0aa3989b8 --- /dev/null +++ b/externals/vma/vma @@ -0,0 +1 @@ +Subproject commit 0aa3989b8f382f185fdf646cc83a1d16fa31d6ab diff --git a/externals/vma/vma.cpp b/externals/vma/vma.cpp new file mode 100644 index 000000000..7f7df9cff --- /dev/null +++ b/externals/vma/vma.cpp @@ -0,0 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#define VMA_IMPLEMENTATION +#include \ No newline at end of file diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index bf6439530..e9e6f278d 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -291,7 +291,7 @@ target_link_options(video_core PRIVATE ${FFmpeg_LDFLAGS}) add_dependencies(video_core host_shaders) target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE}) -target_link_libraries(video_core PRIVATE sirit Vulkan::Headers) +target_link_libraries(video_core PRIVATE sirit Vulkan::Headers vma) if (ENABLE_NSIGHT_AFTERMATH) if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK}) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 3d2e9a16a..631d5e378 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -22,6 +22,10 @@ #include #endif +#define VMA_STATIC_VULKAN_FUNCTIONS 0 +#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 +#include + namespace Vulkan { using namespace Common::Literals; namespace { @@ -592,9 +596,26 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR graphics_queue = logical.GetQueue(graphics_family); present_queue = logical.GetQueue(present_family); + + const VmaVulkanFunctions functions = { + .vkGetInstanceProcAddr = dld.vkGetInstanceProcAddr, + .vkGetDeviceProcAddr = dld.vkGetDeviceProcAddr, + }; + + const VmaAllocatorCreateInfo allocator_info = { + .physicalDevice = physical, + .device = *logical, + .pVulkanFunctions = &functions, + .instance = instance, + .vulkanApiVersion = VK_API_VERSION_1_1, + }; + + vk::Check(vmaCreateAllocator(&allocator_info, &allocator)); } -Device::~Device() = default; +Device::~Device() { + vmaDestroyAllocator(allocator); +} VkFormat Device::GetSupportedFormat(VkFormat wanted_format, VkFormatFeatureFlags wanted_usage, FormatType format_type) const { diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index f314d0ffe..123d3b1c4 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -13,6 +13,8 @@ #include "common/settings.h" #include "video_core/vulkan_common/vulkan_wrapper.h" +VK_DEFINE_HANDLE(VmaAllocator) + // Define all features which may be used by the implementation here. // Vulkan version in the macro describes the minimum version required for feature availability. // If the Vulkan version is lower than the required version, the named extension is required. @@ -618,6 +620,7 @@ private: private: VkInstance instance; ///< Vulkan instance. + VmaAllocator allocator; ///< VMA allocator. vk::DeviceDispatch dld; ///< Device function pointers. vk::PhysicalDevice physical; ///< Physical device. vk::Device logical; ///< Logical device. From c60eed36b7439a7921ea5e86e1300e96e30c8f8a Mon Sep 17 00:00:00 2001 From: GPUCode Date: Wed, 24 May 2023 20:32:12 +0300 Subject: [PATCH 17/91] memory_allocator: Remove OpenGL interop * Appears to be unused atm --- .../renderer_vulkan/renderer_vulkan.cpp | 4 +- .../renderer_vulkan/vk_turbo_mode.cpp | 2 +- .../vulkan_common/vulkan_memory_allocator.cpp | 58 +------------------ .../vulkan_common/vulkan_memory_allocator.h | 11 +--- 4 files changed, 8 insertions(+), 67 deletions(-) diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 77128c6e2..5bae8d24f 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -89,8 +89,8 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_, Settings::values.renderer_debug.GetValue())), debug_callback(Settings::values.renderer_debug ? CreateDebugCallback(instance) : nullptr), surface(CreateSurface(instance, render_window.GetWindowInfo())), - device(CreateDevice(instance, dld, *surface)), memory_allocator(device, false), - state_tracker(), scheduler(device, state_tracker), + device(CreateDevice(instance, dld, *surface)), memory_allocator(device), state_tracker(), + scheduler(device, state_tracker), swapchain(*surface, device, scheduler, render_window.GetFramebufferLayout().width, render_window.GetFramebufferLayout().height, false), present_manager(instance, render_window, device, memory_allocator, scheduler, swapchain, diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp index a802d3c49..6417d7e31 100644 --- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp +++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp @@ -18,7 +18,7 @@ using namespace Common::Literals; TurboMode::TurboMode(const vk::Instance& instance, const vk::InstanceDispatch& dld) #ifndef ANDROID - : m_device{CreateDevice(instance, dld, VK_NULL_HANDLE)}, m_allocator{m_device, false} + : m_device{CreateDevice(instance, dld, VK_NULL_HANDLE)}, m_allocator{m_device} #endif { { diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index e28a556f8..f87c99603 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -6,8 +6,6 @@ #include #include -#include - #include "common/alignment.h" #include "common/assert.h" #include "common/common_types.h" @@ -54,17 +52,6 @@ struct Range { return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; } -constexpr VkExportMemoryAllocateInfo EXPORT_ALLOCATE_INFO{ - .sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, - .pNext = nullptr, -#ifdef _WIN32 - .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, -#elif __unix__ - .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, -#else - .handleTypes = 0, -#endif -}; } // Anonymous namespace class MemoryAllocation { @@ -74,14 +61,6 @@ public: : allocator{allocator_}, memory{std::move(memory_)}, allocation_size{allocation_size_}, property_flags{properties}, shifted_memory_type{1U << type} {} -#if defined(_WIN32) || defined(__unix__) - ~MemoryAllocation() { - if (owning_opengl_handle != 0) { - glDeleteMemoryObjectsEXT(1, &owning_opengl_handle); - } - } -#endif - MemoryAllocation& operator=(const MemoryAllocation&) = delete; MemoryAllocation(const MemoryAllocation&) = delete; @@ -120,31 +99,6 @@ public: return memory_mapped_span; } -#ifdef _WIN32 - [[nodiscard]] u32 ExportOpenGLHandle() { - if (!owning_opengl_handle) { - glCreateMemoryObjectsEXT(1, &owning_opengl_handle); - glImportMemoryWin32HandleEXT(owning_opengl_handle, allocation_size, - GL_HANDLE_TYPE_OPAQUE_WIN32_EXT, - memory.GetMemoryWin32HandleKHR()); - } - return owning_opengl_handle; - } -#elif __unix__ - [[nodiscard]] u32 ExportOpenGLHandle() { - if (!owning_opengl_handle) { - glCreateMemoryObjectsEXT(1, &owning_opengl_handle); - glImportMemoryFdEXT(owning_opengl_handle, allocation_size, GL_HANDLE_TYPE_OPAQUE_FD_EXT, - memory.GetMemoryFdKHR()); - } - return owning_opengl_handle; - } -#else - [[nodiscard]] u32 ExportOpenGLHandle() { - return 0; - } -#endif - /// Returns whether this allocation is compatible with the arguments. [[nodiscard]] bool IsCompatible(VkMemoryPropertyFlags flags, u32 type_mask) const { return (flags & property_flags) == flags && (type_mask & shifted_memory_type) != 0; @@ -182,9 +136,6 @@ private: const u32 shifted_memory_type; ///< Shifted Vulkan memory type. std::vector commits; ///< All commit ranges done from this allocation. std::span memory_mapped_span; ///< Memory mapped span. Empty if not queried before. -#if defined(_WIN32) || defined(__unix__) - u32 owning_opengl_handle{}; ///< Owning OpenGL memory object handle. -#endif }; MemoryCommit::MemoryCommit(MemoryAllocation* allocation_, VkDeviceMemory memory_, u64 begin_, @@ -216,19 +167,14 @@ std::span MemoryCommit::Map() { return span; } -u32 MemoryCommit::ExportOpenGLHandle() const { - return allocation->ExportOpenGLHandle(); -} - void MemoryCommit::Release() { if (allocation) { allocation->Free(begin); } } -MemoryAllocator::MemoryAllocator(const Device& device_, bool export_allocations_) +MemoryAllocator::MemoryAllocator(const Device& device_) : device{device_}, properties{device_.GetPhysical().GetMemoryProperties().memoryProperties}, - export_allocations{export_allocations_}, buffer_image_granularity{ device_.GetPhysical().GetProperties().limits.bufferImageGranularity} {} @@ -271,7 +217,7 @@ bool MemoryAllocator::TryAllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, const u32 type = FindType(flags, type_mask).value(); vk::DeviceMemory memory = device.GetLogical().TryAllocateMemory({ .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, - .pNext = export_allocations ? &EXPORT_ALLOCATE_INFO : nullptr, + .pNext = nullptr, .allocationSize = size, .memoryTypeIndex = type, }); diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.h b/src/video_core/vulkan_common/vulkan_memory_allocator.h index a5bff03fe..494f30f51 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.h +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.h @@ -41,9 +41,6 @@ public: /// It will map the backing allocation if it hasn't been mapped before. std::span Map(); - /// Returns an non-owning OpenGL handle, creating one if it doesn't exist. - u32 ExportOpenGLHandle() const; - /// Returns the Vulkan memory handler. VkDeviceMemory Memory() const { return memory; @@ -74,11 +71,10 @@ public: * Construct memory allocator * * @param device_ Device to allocate from - * @param export_allocations_ True when allocations have to be exported * * @throw vk::Exception on failure */ - explicit MemoryAllocator(const Device& device_, bool export_allocations_); + explicit MemoryAllocator(const Device& device_); ~MemoryAllocator(); MemoryAllocator& operator=(const MemoryAllocator&) = delete; @@ -117,9 +113,8 @@ private: /// Returns index to the fastest memory type compatible with the passed requirements. std::optional FindType(VkMemoryPropertyFlags flags, u32 type_mask) const; - const Device& device; ///< Device handle. - const VkPhysicalDeviceMemoryProperties properties; ///< Physical device properties. - const bool export_allocations; ///< True when memory allocations have to be exported. + const Device& device; ///< Device handle. + const VkPhysicalDeviceMemoryProperties properties; ///< Physical device properties. std::vector> allocations; ///< Current allocations. VkDeviceSize buffer_image_granularity; // The granularity for adjacent offsets between buffers // and optimal images From 48e39756f1ec6e6b0ef48f2444ce38a4e861e898 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Wed, 24 May 2023 22:39:58 +0300 Subject: [PATCH 18/91] renderer_vulkan: Use VMA for images --- .../renderer_vulkan/renderer_vulkan.cpp | 3 +- .../renderer_vulkan/vk_blit_screen.cpp | 12 +--- .../renderer_vulkan/vk_blit_screen.h | 2 - src/video_core/renderer_vulkan/vk_fsr.cpp | 4 +- src/video_core/renderer_vulkan/vk_fsr.h | 1 - .../renderer_vulkan/vk_present_manager.cpp | 4 +- .../renderer_vulkan/vk_present_manager.h | 1 - src/video_core/renderer_vulkan/vk_smaa.cpp | 27 +++---- src/video_core/renderer_vulkan/vk_smaa.h | 2 - .../renderer_vulkan/vk_texture_cache.cpp | 14 ++-- .../renderer_vulkan/vk_texture_cache.h | 2 - src/video_core/vulkan_common/vulkan_device.h | 5 ++ .../vulkan_common/vulkan_memory_allocator.cpp | 30 +++++--- .../vulkan_common/vulkan_memory_allocator.h | 5 +- .../vulkan_common/vulkan_wrapper.cpp | 28 ++++---- src/video_core/vulkan_common/vulkan_wrapper.h | 70 +++++++++++++++---- 16 files changed, 119 insertions(+), 91 deletions(-) diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 5bae8d24f..e569523b6 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -173,7 +173,7 @@ void Vulkan::RendererVulkan::RenderScreenshot(const Tegra::FramebufferConfig& fr return; } const Layout::FramebufferLayout layout{renderer_settings.screenshot_framebuffer_layout}; - vk::Image staging_image = device.GetLogical().CreateImage(VkImageCreateInfo{ + vk::Image staging_image = memory_allocator.CreateImage(VkImageCreateInfo{ .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = nullptr, .flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, @@ -196,7 +196,6 @@ void Vulkan::RendererVulkan::RenderScreenshot(const Tegra::FramebufferConfig& fr .pQueueFamilyIndices = nullptr, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, }); - const auto image_commit = memory_allocator.Commit(staging_image, MemoryUsage::DeviceLocal); const vk::ImageView dst_view = device.GetLogical().CreateImageView(VkImageViewCreateInfo{ .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index acb143fc7..82ca81c7e 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -1071,12 +1071,8 @@ void BlitScreen::ReleaseRawImages() { scheduler.Wait(tick); } raw_images.clear(); - raw_buffer_commits.clear(); - aa_image_view.reset(); aa_image.reset(); - aa_commit = MemoryCommit{}; - buffer.reset(); buffer_commit = MemoryCommit{}; } @@ -1101,13 +1097,12 @@ void BlitScreen::CreateStagingBuffer(const Tegra::FramebufferConfig& framebuffer void BlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) { raw_images.resize(image_count); raw_image_views.resize(image_count); - raw_buffer_commits.resize(image_count); const auto create_image = [&](bool used_on_framebuffer = false, u32 up_scale = 1, u32 down_shift = 0) { u32 extra_usages = used_on_framebuffer ? VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT : VK_IMAGE_USAGE_TRANSFER_DST_BIT; - return device.GetLogical().CreateImage(VkImageCreateInfo{ + return memory_allocator.CreateImage(VkImageCreateInfo{ .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -1130,9 +1125,6 @@ void BlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) { .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, }); }; - const auto create_commit = [&](vk::Image& image) { - return memory_allocator.Commit(image, MemoryUsage::DeviceLocal); - }; const auto create_image_view = [&](vk::Image& image, bool used_on_framebuffer = false) { return device.GetLogical().CreateImageView(VkImageViewCreateInfo{ .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, @@ -1161,7 +1153,6 @@ void BlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) { for (size_t i = 0; i < image_count; ++i) { raw_images[i] = create_image(); - raw_buffer_commits[i] = create_commit(raw_images[i]); raw_image_views[i] = create_image_view(raw_images[i]); } @@ -1169,7 +1160,6 @@ void BlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) { const u32 up_scale = Settings::values.resolution_info.up_scale; const u32 down_shift = Settings::values.resolution_info.down_shift; aa_image = create_image(true, up_scale, down_shift); - aa_commit = create_commit(aa_image); aa_image_view = create_image_view(aa_image, true); VkExtent2D size{ .width = (up_scale * framebuffer.width) >> down_shift, diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.h b/src/video_core/renderer_vulkan/vk_blit_screen.h index 68ec20253..7fcfa9976 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.h +++ b/src/video_core/renderer_vulkan/vk_blit_screen.h @@ -148,7 +148,6 @@ private: std::vector raw_images; std::vector raw_image_views; - std::vector raw_buffer_commits; vk::DescriptorPool aa_descriptor_pool; vk::DescriptorSetLayout aa_descriptor_set_layout; @@ -159,7 +158,6 @@ private: vk::DescriptorSets aa_descriptor_sets; vk::Image aa_image; vk::ImageView aa_image_view; - MemoryCommit aa_commit; u32 raw_width = 0; u32 raw_height = 0; diff --git a/src/video_core/renderer_vulkan/vk_fsr.cpp b/src/video_core/renderer_vulkan/vk_fsr.cpp index df972cd54..9bcdca2fb 100644 --- a/src/video_core/renderer_vulkan/vk_fsr.cpp +++ b/src/video_core/renderer_vulkan/vk_fsr.cpp @@ -205,10 +205,9 @@ void FSR::CreateDescriptorSets() { void FSR::CreateImages() { images.resize(image_count * 2); image_views.resize(image_count * 2); - buffer_commits.resize(image_count * 2); for (size_t i = 0; i < image_count * 2; ++i) { - images[i] = device.GetLogical().CreateImage(VkImageCreateInfo{ + images[i] = memory_allocator.CreateImage(VkImageCreateInfo{ .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -231,7 +230,6 @@ void FSR::CreateImages() { .pQueueFamilyIndices = nullptr, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, }); - buffer_commits[i] = memory_allocator.Commit(images[i], MemoryUsage::DeviceLocal); image_views[i] = device.GetLogical().CreateImageView(VkImageViewCreateInfo{ .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .pNext = nullptr, diff --git a/src/video_core/renderer_vulkan/vk_fsr.h b/src/video_core/renderer_vulkan/vk_fsr.h index 5d872861f..8bb9fc23a 100644 --- a/src/video_core/renderer_vulkan/vk_fsr.h +++ b/src/video_core/renderer_vulkan/vk_fsr.h @@ -47,7 +47,6 @@ private: vk::Sampler sampler; std::vector images; std::vector image_views; - std::vector buffer_commits; }; } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_present_manager.cpp b/src/video_core/renderer_vulkan/vk_present_manager.cpp index 10ace0420..d681bd22a 100644 --- a/src/video_core/renderer_vulkan/vk_present_manager.cpp +++ b/src/video_core/renderer_vulkan/vk_present_manager.cpp @@ -181,7 +181,7 @@ void PresentManager::RecreateFrame(Frame* frame, u32 width, u32 height, bool is_ frame->height = height; frame->is_srgb = is_srgb; - frame->image = dld.CreateImage({ + frame->image = memory_allocator.CreateImage({ .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = nullptr, .flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, @@ -204,8 +204,6 @@ void PresentManager::RecreateFrame(Frame* frame, u32 width, u32 height, bool is_ .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, }); - frame->image_commit = memory_allocator.Commit(frame->image, MemoryUsage::DeviceLocal); - frame->image_view = dld.CreateImageView({ .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .pNext = nullptr, diff --git a/src/video_core/renderer_vulkan/vk_present_manager.h b/src/video_core/renderer_vulkan/vk_present_manager.h index 4ac2e2395..83e859416 100644 --- a/src/video_core/renderer_vulkan/vk_present_manager.h +++ b/src/video_core/renderer_vulkan/vk_present_manager.h @@ -29,7 +29,6 @@ struct Frame { vk::Image image; vk::ImageView image_view; vk::Framebuffer framebuffer; - MemoryCommit image_commit; vk::CommandBuffer cmdbuf; vk::Semaphore render_ready; vk::Fence present_done; diff --git a/src/video_core/renderer_vulkan/vk_smaa.cpp b/src/video_core/renderer_vulkan/vk_smaa.cpp index f8735189d..ff7c3a419 100644 --- a/src/video_core/renderer_vulkan/vk_smaa.cpp +++ b/src/video_core/renderer_vulkan/vk_smaa.cpp @@ -25,9 +25,7 @@ namespace { #define ARRAY_TO_SPAN(a) std::span(a, (sizeof(a) / sizeof(a[0]))) -std::pair CreateWrappedImage(const Device& device, - MemoryAllocator& allocator, - VkExtent2D dimensions, VkFormat format) { +vk::Image CreateWrappedImage(MemoryAllocator& allocator, VkExtent2D dimensions, VkFormat format) { const VkImageCreateInfo image_ci{ .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .pNext = nullptr, @@ -46,11 +44,7 @@ std::pair CreateWrappedImage(const Device& device, .pQueueFamilyIndices = nullptr, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, }; - - auto image = device.GetLogical().CreateImage(image_ci); - auto commit = allocator.Commit(image, Vulkan::MemoryUsage::DeviceLocal); - - return std::make_pair(std::move(image), std::move(commit)); + return allocator.CreateImage(image_ci); } void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayout target_layout, @@ -531,10 +525,8 @@ void SMAA::CreateImages() { static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; - std::tie(m_static_images[Area], m_static_buffer_commits[Area]) = - CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); - std::tie(m_static_images[Search], m_static_buffer_commits[Search]) = - CreateWrappedImage(m_device, m_allocator, search_extent, VK_FORMAT_R8_UNORM); + m_static_images[Area] = CreateWrappedImage(m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); + m_static_images[Search] = CreateWrappedImage(m_allocator, search_extent, VK_FORMAT_R8_UNORM); m_static_image_views[Area] = CreateWrappedImageView(m_device, m_static_images[Area], VK_FORMAT_R8G8_UNORM); @@ -544,12 +536,11 @@ void SMAA::CreateImages() { for (u32 i = 0; i < m_image_count; i++) { Images& images = m_dynamic_images.emplace_back(); - std::tie(images.images[Blend], images.buffer_commits[Blend]) = - CreateWrappedImage(m_device, m_allocator, m_extent, VK_FORMAT_R16G16B16A16_SFLOAT); - std::tie(images.images[Edges], images.buffer_commits[Edges]) = - CreateWrappedImage(m_device, m_allocator, m_extent, VK_FORMAT_R16G16_SFLOAT); - std::tie(images.images[Output], images.buffer_commits[Output]) = - CreateWrappedImage(m_device, m_allocator, m_extent, VK_FORMAT_R16G16B16A16_SFLOAT); + images.images[Blend] = + CreateWrappedImage(m_allocator, m_extent, VK_FORMAT_R16G16B16A16_SFLOAT); + images.images[Edges] = CreateWrappedImage(m_allocator, m_extent, VK_FORMAT_R16G16_SFLOAT); + images.images[Output] = + CreateWrappedImage(m_allocator, m_extent, VK_FORMAT_R16G16B16A16_SFLOAT); images.image_views[Blend] = CreateWrappedImageView(m_device, images.images[Blend], VK_FORMAT_R16G16B16A16_SFLOAT); diff --git a/src/video_core/renderer_vulkan/vk_smaa.h b/src/video_core/renderer_vulkan/vk_smaa.h index 99a369148..0e214258a 100644 --- a/src/video_core/renderer_vulkan/vk_smaa.h +++ b/src/video_core/renderer_vulkan/vk_smaa.h @@ -66,13 +66,11 @@ private: std::array m_pipelines{}; std::array m_renderpasses{}; - std::array m_static_buffer_commits; std::array m_static_images{}; std::array m_static_image_views{}; struct Images { vk::DescriptorSets descriptor_sets{}; - std::array buffer_commits; std::array images{}; std::array image_views{}; std::array framebuffers{}; diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index f025f618b..10defe6cb 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -15,7 +15,6 @@ #include "video_core/renderer_vulkan/blit_image.h" #include "video_core/renderer_vulkan/maxwell_to_vk.h" #include "video_core/renderer_vulkan/vk_compute_pass.h" -#include "video_core/renderer_vulkan/vk_rasterizer.h" #include "video_core/renderer_vulkan/vk_render_pass_cache.h" #include "video_core/renderer_vulkan/vk_scheduler.h" #include "video_core/renderer_vulkan/vk_staging_buffer_pool.h" @@ -163,11 +162,12 @@ constexpr VkBorderColor ConvertBorderColor(const std::array& color) { }; } -[[nodiscard]] vk::Image MakeImage(const Device& device, const ImageInfo& info) { +[[nodiscard]] vk::Image MakeImage(const Device& device, const MemoryAllocator& allocator, + const ImageInfo& info) { if (info.type == ImageType::Buffer) { return vk::Image{}; } - return device.GetLogical().CreateImage(MakeImageCreateInfo(device, info)); + return allocator.CreateImage(MakeImageCreateInfo(device, info)); } [[nodiscard]] VkImageAspectFlags ImageAspectMask(PixelFormat format) { @@ -1266,8 +1266,8 @@ void TextureCacheRuntime::TickFrame() {} Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu_addr_, VAddr cpu_addr_) : VideoCommon::ImageBase(info_, gpu_addr_, cpu_addr_), scheduler{&runtime_.scheduler}, - runtime{&runtime_}, original_image(MakeImage(runtime_.device, info)), - commit(runtime_.memory_allocator.Commit(original_image, MemoryUsage::DeviceLocal)), + runtime{&runtime_}, + original_image(MakeImage(runtime_.device, runtime_.memory_allocator, info)), aspect_mask(ImageAspectMask(info.format)) { if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported()) { if (Settings::values.async_astc.GetValue()) { @@ -1467,9 +1467,7 @@ bool Image::ScaleUp(bool ignore) { auto scaled_info = info; scaled_info.size.width = scaled_width; scaled_info.size.height = scaled_height; - scaled_image = MakeImage(runtime->device, scaled_info); - auto& allocator = runtime->memory_allocator; - scaled_commit = MemoryCommit(allocator.Commit(scaled_image, MemoryUsage::DeviceLocal)); + scaled_image = MakeImage(runtime->device, runtime->memory_allocator, scaled_info); ignore = false; } current_image = *scaled_image; diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index f14525dcb..9481f2531 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -180,12 +180,10 @@ private: TextureCacheRuntime* runtime{}; vk::Image original_image; - MemoryCommit commit; std::vector storage_image_views; VkImageAspectFlags aspect_mask = 0; bool initialized = false; vk::Image scaled_image{}; - MemoryCommit scaled_commit{}; VkImage current_image{}; std::unique_ptr scale_framebuffer; diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 123d3b1c4..9936f5658 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -210,6 +210,11 @@ public: return dld; } + /// Returns the VMA allocator. + VmaAllocator GetAllocator() const { + return allocator; + } + /// Returns the logical device. const vk::Device& GetLogical() const { return logical; diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index f87c99603..7f860cccd 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -15,6 +15,10 @@ #include "video_core/vulkan_common/vulkan_memory_allocator.h" #include "video_core/vulkan_common/vulkan_wrapper.h" +#define VMA_STATIC_VULKAN_FUNCTIONS 0 +#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 +#include + namespace Vulkan { namespace { struct Range { @@ -180,6 +184,24 @@ MemoryAllocator::MemoryAllocator(const Device& device_) MemoryAllocator::~MemoryAllocator() = default; +vk::Image MemoryAllocator::CreateImage(const VkImageCreateInfo& ci) const { + const VmaAllocationCreateInfo alloc_info = { + .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT, + .usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE, + .requiredFlags = 0, + .preferredFlags = 0, + .pool = VK_NULL_HANDLE, + .pUserData = nullptr, + }; + + VkImage handle{}; + VmaAllocation allocation{}; + vk::Check( + vmaCreateImage(device.GetAllocator(), &ci, &alloc_info, &handle, &allocation, nullptr)); + return vk::Image(handle, *device.GetLogical(), device.GetAllocator(), allocation, + device.GetDispatchLoader()); +} + MemoryCommit MemoryAllocator::Commit(const VkMemoryRequirements& requirements, MemoryUsage usage) { // Find the fastest memory flags we can afford with the current requirements const u32 type_mask = requirements.memoryTypeBits; @@ -205,14 +227,6 @@ MemoryCommit MemoryAllocator::Commit(const vk::Buffer& buffer, MemoryUsage usage return commit; } -MemoryCommit MemoryAllocator::Commit(const vk::Image& image, MemoryUsage usage) { - VkMemoryRequirements requirements = device.GetLogical().GetImageMemoryRequirements(*image); - requirements.size = Common::AlignUp(requirements.size, buffer_image_granularity); - auto commit = Commit(requirements, usage); - image.BindMemory(commit.Memory(), commit.Offset()); - return commit; -} - bool MemoryAllocator::TryAllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u64 size) { const u32 type = FindType(flags, type_mask).value(); vk::DeviceMemory memory = device.GetLogical().TryAllocateMemory({ diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.h b/src/video_core/vulkan_common/vulkan_memory_allocator.h index 494f30f51..f9ee53cfb 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.h +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.h @@ -80,6 +80,8 @@ public: MemoryAllocator& operator=(const MemoryAllocator&) = delete; MemoryAllocator(const MemoryAllocator&) = delete; + vk::Image CreateImage(const VkImageCreateInfo& ci) const; + /** * Commits a memory with the specified requirements. * @@ -93,9 +95,6 @@ public: /// Commits memory required by the buffer and binds it. MemoryCommit Commit(const vk::Buffer& buffer, MemoryUsage usage); - /// Commits memory required by the image and binds it. - MemoryCommit Commit(const vk::Image& image, MemoryUsage usage); - private: /// Tries to allocate a chunk of memory. bool TryAllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u64 size); diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index 336f53700..5d088dc58 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -12,6 +12,10 @@ #include "video_core/vulkan_common/vulkan_wrapper.h" +#define VMA_STATIC_VULKAN_FUNCTIONS 0 +#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 +#include + namespace Vulkan::vk { namespace { @@ -547,6 +551,16 @@ DebugUtilsMessenger Instance::CreateDebugUtilsMessenger( return DebugUtilsMessenger(object, handle, *dld); } +void Image::SetObjectNameEXT(const char* name) const { + SetObjectName(dld, owner, handle, VK_OBJECT_TYPE_IMAGE, name); +} + +void Image::Release() const noexcept { + if (handle) { + vmaDestroyImage(allocator, handle, allocation); + } +} + void Buffer::BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const { Check(dld->vkBindBufferMemory(owner, handle, memory, offset)); } @@ -559,14 +573,6 @@ void BufferView::SetObjectNameEXT(const char* name) const { SetObjectName(dld, owner, handle, VK_OBJECT_TYPE_BUFFER_VIEW, name); } -void Image::BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const { - Check(dld->vkBindImageMemory(owner, handle, memory, offset)); -} - -void Image::SetObjectNameEXT(const char* name) const { - SetObjectName(dld, owner, handle, VK_OBJECT_TYPE_IMAGE, name); -} - void ImageView::SetObjectNameEXT(const char* name) const { SetObjectName(dld, owner, handle, VK_OBJECT_TYPE_IMAGE_VIEW, name); } @@ -713,12 +719,6 @@ BufferView Device::CreateBufferView(const VkBufferViewCreateInfo& ci) const { return BufferView(object, handle, *dld); } -Image Device::CreateImage(const VkImageCreateInfo& ci) const { - VkImage object; - Check(dld->vkCreateImage(handle, &ci, nullptr, &object)); - return Image(object, handle, *dld); -} - ImageView Device::CreateImageView(const VkImageViewCreateInfo& ci) const { VkImageView object; Check(dld->vkCreateImageView(handle, &ci, nullptr, &object)); diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 4ff328a21..8ec708774 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -32,6 +32,9 @@ #pragma warning(disable : 26812) // Disable prefer enum class over enum #endif +VK_DEFINE_HANDLE(VmaAllocator) +VK_DEFINE_HANDLE(VmaAllocation) + namespace Vulkan::vk { /** @@ -616,6 +619,60 @@ public: } }; +class Image { +public: + explicit Image(VkImage handle_, VkDevice owner_, VmaAllocator allocator_, + VmaAllocation allocation_, const DeviceDispatch& dld_) noexcept + : handle{handle_}, owner{owner_}, allocator{allocator_}, + allocation{allocation_}, dld{&dld_} {} + Image() = default; + + Image(const Image&) = delete; + Image& operator=(const Image&) = delete; + + Image(Image&& rhs) noexcept + : handle{std::exchange(rhs.handle, nullptr)}, owner{rhs.owner}, allocator{rhs.allocator}, + allocation{rhs.allocation}, dld{rhs.dld} {} + + Image& operator=(Image&& rhs) noexcept { + Release(); + handle = std::exchange(rhs.handle, nullptr); + owner = rhs.owner; + allocator = rhs.allocator; + allocation = rhs.allocation; + dld = rhs.dld; + return *this; + } + + ~Image() noexcept { + Release(); + } + + VkImage operator*() const noexcept { + return handle; + } + + void reset() noexcept { + Release(); + handle = nullptr; + } + + explicit operator bool() const noexcept { + return handle != nullptr; + } + + void SetObjectNameEXT(const char* name) const; + +private: + void Release() const noexcept; + + VkImage handle = nullptr; + VkDevice owner = nullptr; + VmaAllocator allocator = nullptr; + VmaAllocation allocation = nullptr; + const DeviceDispatch* dld = nullptr; +}; + class Queue { public: /// Construct an empty queue handle. @@ -658,17 +715,6 @@ public: void SetObjectNameEXT(const char* name) const; }; -class Image : public Handle { - using Handle::Handle; - -public: - /// Attaches a memory allocation. - void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const; - - /// Set object name. - void SetObjectNameEXT(const char* name) const; -}; - class ImageView : public Handle { using Handle::Handle; @@ -844,8 +890,6 @@ public: BufferView CreateBufferView(const VkBufferViewCreateInfo& ci) const; - Image CreateImage(const VkImageCreateInfo& ci) const; - ImageView CreateImageView(const VkImageViewCreateInfo& ci) const; Semaphore CreateSemaphore() const; From 7b2f680468bbac206f96b26a1300939be90f5f1b Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sat, 27 May 2023 17:09:17 +0300 Subject: [PATCH 19/91] renderer_vulkan: Use VMA for buffers --- .../renderer_vulkan/renderer_vulkan.cpp | 9 +- .../renderer_vulkan/vk_blit_screen.cpp | 6 +- .../renderer_vulkan/vk_blit_screen.h | 1 - .../renderer_vulkan/vk_buffer_cache.cpp | 81 +++++++------ .../renderer_vulkan/vk_buffer_cache.h | 2 - src/video_core/renderer_vulkan/vk_smaa.cpp | 12 +- .../vk_staging_buffer_pool.cpp | 105 ++--------------- .../renderer_vulkan/vk_staging_buffer_pool.h | 4 +- .../renderer_vulkan/vk_texture_cache.cpp | 9 +- .../renderer_vulkan/vk_texture_cache.h | 1 - .../renderer_vulkan/vk_turbo_mode.cpp | 8 +- .../vulkan_common/vulkan_device.cpp | 1 + .../vulkan_common/vulkan_memory_allocator.cpp | 107 ++++++++++++++---- .../vulkan_common/vulkan_memory_allocator.h | 12 +- .../vulkan_common/vulkan_wrapper.cpp | 24 ++-- src/video_core/vulkan_common/vulkan_wrapper.h | 91 ++++++++++++--- 16 files changed, 262 insertions(+), 211 deletions(-) diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index e569523b6..ddf28ca28 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -233,8 +233,8 @@ void Vulkan::RendererVulkan::RenderScreenshot(const Tegra::FramebufferConfig& fr .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, }; - const vk::Buffer dst_buffer = device.GetLogical().CreateBuffer(dst_buffer_info); - MemoryCommit dst_buffer_memory = memory_allocator.Commit(dst_buffer, MemoryUsage::Download); + const vk::Buffer dst_buffer = + memory_allocator.CreateBuffer(dst_buffer_info, MemoryUsage::Download); scheduler.RequestOutsideRenderPassOperationContext(); scheduler.Record([&](vk::CommandBuffer cmdbuf) { @@ -308,8 +308,9 @@ void Vulkan::RendererVulkan::RenderScreenshot(const Tegra::FramebufferConfig& fr scheduler.Finish(); // Copy backing image data to the QImage screenshot buffer - const auto dst_memory_map = dst_buffer_memory.Map(); - std::memcpy(renderer_settings.screenshot_bits, dst_memory_map.data(), dst_memory_map.size()); + dst_buffer.Invalidate(); + std::memcpy(renderer_settings.screenshot_bits, dst_buffer.Mapped().data(), + dst_buffer.Mapped().size()); renderer_settings.screenshot_complete_callback(false); renderer_settings.screenshot_requested = false; } diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 82ca81c7e..ad3b29f0e 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -162,7 +162,7 @@ void BlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, SetUniformData(data, layout); SetVertexData(data, framebuffer, layout); - const std::span mapped_span = buffer_commit.Map(); + const std::span mapped_span = buffer.Mapped(); std::memcpy(mapped_span.data(), &data, sizeof(data)); if (!use_accelerated) { @@ -1074,7 +1074,6 @@ void BlitScreen::ReleaseRawImages() { aa_image_view.reset(); aa_image.reset(); buffer.reset(); - buffer_commit = MemoryCommit{}; } void BlitScreen::CreateStagingBuffer(const Tegra::FramebufferConfig& framebuffer) { @@ -1090,8 +1089,7 @@ void BlitScreen::CreateStagingBuffer(const Tegra::FramebufferConfig& framebuffer .pQueueFamilyIndices = nullptr, }; - buffer = device.GetLogical().CreateBuffer(ci); - buffer_commit = memory_allocator.Commit(buffer, MemoryUsage::Upload); + buffer = memory_allocator.CreateBuffer(ci, MemoryUsage::Upload); } void BlitScreen::CreateRawImages(const Tegra::FramebufferConfig& framebuffer) { diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.h b/src/video_core/renderer_vulkan/vk_blit_screen.h index 7fcfa9976..8365b5668 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.h +++ b/src/video_core/renderer_vulkan/vk_blit_screen.h @@ -142,7 +142,6 @@ private: vk::Sampler sampler; vk::Buffer buffer; - MemoryCommit buffer_commit; std::vector resource_ticks; diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 8c33722d3..67356c679 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -50,7 +50,7 @@ size_t BytesPerIndex(VkIndexType index_type) { } } -vk::Buffer CreateBuffer(const Device& device, u64 size) { +vk::Buffer CreateBuffer(const Device& device, const MemoryAllocator& memory_allocator, u64 size) { VkBufferUsageFlags flags = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT | @@ -60,7 +60,7 @@ vk::Buffer CreateBuffer(const Device& device, u64 size) { if (device.IsExtTransformFeedbackSupported()) { flags |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT; } - return device.GetLogical().CreateBuffer({ + const VkBufferCreateInfo buffer_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -69,7 +69,8 @@ vk::Buffer CreateBuffer(const Device& device, u64 size) { .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); + }; + return memory_allocator.CreateBuffer(buffer_ci, MemoryUsage::DeviceLocal); } } // Anonymous namespace @@ -79,8 +80,8 @@ Buffer::Buffer(BufferCacheRuntime&, VideoCommon::NullBufferParams null_params) Buffer::Buffer(BufferCacheRuntime& runtime, VideoCore::RasterizerInterface& rasterizer_, VAddr cpu_addr_, u64 size_bytes_) : VideoCommon::BufferBase(rasterizer_, cpu_addr_, size_bytes_), - device{&runtime.device}, buffer{CreateBuffer(*device, SizeBytes())}, - commit{runtime.memory_allocator.Commit(buffer, MemoryUsage::DeviceLocal)} { + device{&runtime.device}, buffer{ + CreateBuffer(*device, runtime.memory_allocator, SizeBytes())} { if (runtime.device.HasDebuggingToolAttached()) { buffer.SetObjectNameEXT(fmt::format("Buffer 0x{:x}", CpuAddr()).c_str()); } @@ -138,7 +139,7 @@ public: const u32 num_first_offset_copies = 4; const size_t bytes_per_index = BytesPerIndex(index_type); const size_t size_bytes = num_triangle_indices * bytes_per_index * num_first_offset_copies; - buffer = device.GetLogical().CreateBuffer(VkBufferCreateInfo{ + const VkBufferCreateInfo buffer_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -147,14 +148,21 @@ public: .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); + }; + buffer = memory_allocator.CreateBuffer(buffer_ci, MemoryUsage::DeviceLocal); if (device.HasDebuggingToolAttached()) { buffer.SetObjectNameEXT("Quad LUT"); } - memory_commit = memory_allocator.Commit(buffer, MemoryUsage::DeviceLocal); - const StagingBufferRef staging = staging_pool.Request(size_bytes, MemoryUsage::Upload); - u8* staging_data = staging.mapped_span.data(); + const bool host_visible = buffer.IsHostVisible(); + const StagingBufferRef staging = [&] { + if (host_visible) { + return StagingBufferRef{}; + } + return staging_pool.Request(size_bytes, MemoryUsage::Upload); + }(); + + u8* staging_data = host_visible ? buffer.Mapped().data() : staging.mapped_span.data(); const size_t quad_size = bytes_per_index * 6; for (u32 first = 0; first < num_first_offset_copies; ++first) { @@ -164,29 +172,33 @@ public: } } - scheduler.RequestOutsideRenderPassOperationContext(); - scheduler.Record([src_buffer = staging.buffer, src_offset = staging.offset, - dst_buffer = *buffer, size_bytes](vk::CommandBuffer cmdbuf) { - const VkBufferCopy copy{ - .srcOffset = src_offset, - .dstOffset = 0, - .size = size_bytes, - }; - const VkBufferMemoryBarrier write_barrier{ - .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, - .dstAccessMask = VK_ACCESS_INDEX_READ_BIT, - .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .buffer = dst_buffer, - .offset = 0, - .size = size_bytes, - }; - cmdbuf.CopyBuffer(src_buffer, dst_buffer, copy); - cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, 0, write_barrier); - }); + if (!host_visible) { + scheduler.RequestOutsideRenderPassOperationContext(); + scheduler.Record([src_buffer = staging.buffer, src_offset = staging.offset, + dst_buffer = *buffer, size_bytes](vk::CommandBuffer cmdbuf) { + const VkBufferCopy copy{ + .srcOffset = src_offset, + .dstOffset = 0, + .size = size_bytes, + }; + const VkBufferMemoryBarrier write_barrier{ + .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, + .dstAccessMask = VK_ACCESS_INDEX_READ_BIT, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .buffer = dst_buffer, + .offset = 0, + .size = size_bytes, + }; + cmdbuf.CopyBuffer(src_buffer, dst_buffer, copy); + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, 0, write_barrier); + }); + } else { + buffer.Flush(); + } } void BindBuffer(u32 first) { @@ -587,11 +599,10 @@ void BufferCacheRuntime::ReserveNullBuffer() { create_info.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT; } create_info.usage |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT; - null_buffer = device.GetLogical().CreateBuffer(create_info); + null_buffer = memory_allocator.CreateBuffer(create_info, MemoryUsage::DeviceLocal); if (device.HasDebuggingToolAttached()) { null_buffer.SetObjectNameEXT("Null buffer"); } - null_buffer_commit = memory_allocator.Commit(null_buffer, MemoryUsage::DeviceLocal); scheduler.RequestOutsideRenderPassOperationContext(); scheduler.Record([buffer = *null_buffer](vk::CommandBuffer cmdbuf) { diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index cdeef8846..95446c732 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h @@ -48,7 +48,6 @@ private: const Device* device{}; vk::Buffer buffer; - MemoryCommit commit; std::vector views; }; @@ -142,7 +141,6 @@ private: std::shared_ptr quad_strip_index_buffer; vk::Buffer null_buffer; - MemoryCommit null_buffer_commit; std::unique_ptr uint8_pass; QuadIndexedPass quad_index_pass; diff --git a/src/video_core/renderer_vulkan/vk_smaa.cpp b/src/video_core/renderer_vulkan/vk_smaa.cpp index ff7c3a419..5efd7d66e 100644 --- a/src/video_core/renderer_vulkan/vk_smaa.cpp +++ b/src/video_core/renderer_vulkan/vk_smaa.cpp @@ -76,7 +76,7 @@ void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayo void UploadImage(const Device& device, MemoryAllocator& allocator, Scheduler& scheduler, vk::Image& image, VkExtent2D dimensions, VkFormat format, std::span initial_contents = {}) { - auto upload_buffer = device.GetLogical().CreateBuffer(VkBufferCreateInfo{ + const VkBufferCreateInfo upload_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -85,9 +85,10 @@ void UploadImage(const Device& device, MemoryAllocator& allocator, Scheduler& sc .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); - auto upload_commit = allocator.Commit(upload_buffer, MemoryUsage::Upload); - std::ranges::copy(initial_contents, upload_commit.Map().begin()); + }; + auto upload_buffer = allocator.CreateBuffer(upload_ci, MemoryUsage::Upload); + std::ranges::copy(initial_contents, upload_buffer.Mapped().begin()); + upload_buffer.Flush(); const std::array regions{{{ .bufferOffset = 0, @@ -111,9 +112,6 @@ void UploadImage(const Device& device, MemoryAllocator& allocator, Scheduler& sc VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); }); scheduler.Finish(); - - // This should go out of scope before the commit - auto upload_buffer2 = std::move(upload_buffer); } vk::ImageView CreateWrappedImageView(const Device& device, vk::Image& image, VkFormat format) { diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp index 74ca77216..62b251a9b 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp @@ -30,55 +30,6 @@ constexpr VkDeviceSize MAX_STREAM_BUFFER_REQUEST_SIZE = 8_MiB; constexpr VkDeviceSize STREAM_BUFFER_SIZE = 128_MiB; constexpr VkDeviceSize REGION_SIZE = STREAM_BUFFER_SIZE / StagingBufferPool::NUM_SYNCS; -constexpr VkMemoryPropertyFlags HOST_FLAGS = - VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; -constexpr VkMemoryPropertyFlags STREAM_FLAGS = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | HOST_FLAGS; - -bool IsStreamHeap(VkMemoryHeap heap) noexcept { - return STREAM_BUFFER_SIZE < (heap.size * 2) / 3; -} - -std::optional FindMemoryTypeIndex(const VkPhysicalDeviceMemoryProperties& props, u32 type_mask, - VkMemoryPropertyFlags flags) noexcept { - for (u32 type_index = 0; type_index < props.memoryTypeCount; ++type_index) { - if (((type_mask >> type_index) & 1) == 0) { - // Memory type is incompatible - continue; - } - const VkMemoryType& memory_type = props.memoryTypes[type_index]; - if ((memory_type.propertyFlags & flags) != flags) { - // Memory type doesn't have the flags we want - continue; - } - if (!IsStreamHeap(props.memoryHeaps[memory_type.heapIndex])) { - // Memory heap is not suitable for streaming - continue; - } - // Success! - return type_index; - } - return std::nullopt; -} - -u32 FindMemoryTypeIndex(const VkPhysicalDeviceMemoryProperties& props, u32 type_mask, - bool try_device_local) { - std::optional type; - if (try_device_local) { - // Try to find a DEVICE_LOCAL_BIT type, Nvidia and AMD have a dedicated heap for this - type = FindMemoryTypeIndex(props, type_mask, STREAM_FLAGS); - if (type) { - return *type; - } - } - // Otherwise try without the DEVICE_LOCAL_BIT - type = FindMemoryTypeIndex(props, type_mask, HOST_FLAGS); - if (type) { - return *type; - } - // This should never happen, and in case it does, signal it as an out of memory situation - throw vk::Exception(VK_ERROR_OUT_OF_DEVICE_MEMORY); -} - size_t Region(size_t iterator) noexcept { return iterator / REGION_SIZE; } @@ -87,8 +38,7 @@ size_t Region(size_t iterator) noexcept { StagingBufferPool::StagingBufferPool(const Device& device_, MemoryAllocator& memory_allocator_, Scheduler& scheduler_) : device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_} { - const vk::Device& dev = device.GetLogical(); - stream_buffer = dev.CreateBuffer(VkBufferCreateInfo{ + const VkBufferCreateInfo stream_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -99,46 +49,13 @@ StagingBufferPool::StagingBufferPool(const Device& device_, MemoryAllocator& mem .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); + }; + stream_buffer = memory_allocator.CreateBuffer(stream_ci, MemoryUsage::Stream); if (device.HasDebuggingToolAttached()) { stream_buffer.SetObjectNameEXT("Stream Buffer"); } - VkMemoryDedicatedRequirements dedicated_reqs{ - .sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, - .pNext = nullptr, - .prefersDedicatedAllocation = VK_FALSE, - .requiresDedicatedAllocation = VK_FALSE, - }; - const auto requirements = dev.GetBufferMemoryRequirements(*stream_buffer, &dedicated_reqs); - const bool make_dedicated = dedicated_reqs.prefersDedicatedAllocation == VK_TRUE || - dedicated_reqs.requiresDedicatedAllocation == VK_TRUE; - const VkMemoryDedicatedAllocateInfo dedicated_info{ - .sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, - .pNext = nullptr, - .image = nullptr, - .buffer = *stream_buffer, - }; - const auto memory_properties = device.GetPhysical().GetMemoryProperties().memoryProperties; - VkMemoryAllocateInfo stream_memory_info{ - .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, - .pNext = make_dedicated ? &dedicated_info : nullptr, - .allocationSize = requirements.size, - .memoryTypeIndex = - FindMemoryTypeIndex(memory_properties, requirements.memoryTypeBits, true), - }; - stream_memory = dev.TryAllocateMemory(stream_memory_info); - if (!stream_memory) { - LOG_INFO(Render_Vulkan, "Dynamic memory allocation failed, trying with system memory"); - stream_memory_info.memoryTypeIndex = - FindMemoryTypeIndex(memory_properties, requirements.memoryTypeBits, false); - stream_memory = dev.AllocateMemory(stream_memory_info); - } - - if (device.HasDebuggingToolAttached()) { - stream_memory.SetObjectNameEXT("Stream Buffer Memory"); - } - stream_buffer.BindMemory(*stream_memory, 0); - stream_pointer = stream_memory.Map(0, STREAM_BUFFER_SIZE); + stream_pointer = stream_buffer.Mapped(); + ASSERT_MSG(!stream_pointer.empty(), "Stream buffer must be host visible!"); } StagingBufferPool::~StagingBufferPool() = default; @@ -199,7 +116,7 @@ StagingBufferRef StagingBufferPool::GetStreamBuffer(size_t size) { return StagingBufferRef{ .buffer = *stream_buffer, .offset = static_cast(offset), - .mapped_span = std::span(stream_pointer + offset, size), + .mapped_span = stream_pointer.subspan(offset, size), .usage{}, .log2_level{}, .index{}, @@ -247,7 +164,7 @@ std::optional StagingBufferPool::TryGetReservedBuffer(size_t s StagingBufferRef StagingBufferPool::CreateStagingBuffer(size_t size, MemoryUsage usage, bool deferred) { const u32 log2 = Common::Log2Ceil64(size); - vk::Buffer buffer = device.GetLogical().CreateBuffer({ + const VkBufferCreateInfo buffer_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -259,17 +176,15 @@ StagingBufferRef StagingBufferPool::CreateStagingBuffer(size_t size, MemoryUsage .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); + }; + vk::Buffer buffer = memory_allocator.CreateBuffer(buffer_ci, usage); if (device.HasDebuggingToolAttached()) { ++buffer_index; buffer.SetObjectNameEXT(fmt::format("Staging Buffer {}", buffer_index).c_str()); } - MemoryCommit commit = memory_allocator.Commit(buffer, usage); - const std::span mapped_span = IsHostVisible(usage) ? commit.Map() : std::span{}; - + const std::span mapped_span = buffer.Mapped(); StagingBuffer& entry = GetCache(usage)[log2].entries.emplace_back(StagingBuffer{ .buffer = std::move(buffer), - .commit = std::move(commit), .mapped_span = mapped_span, .usage = usage, .log2_level = log2, diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.h b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.h index 4fd15f11a..5f69f08b1 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.h +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.h @@ -46,7 +46,6 @@ private: struct StagingBuffer { vk::Buffer buffer; - MemoryCommit commit; std::span mapped_span; MemoryUsage usage; u32 log2_level; @@ -97,8 +96,7 @@ private: Scheduler& scheduler; vk::Buffer stream_buffer; - vk::DeviceMemory stream_memory; - u8* stream_pointer = nullptr; + std::span stream_pointer; size_t iterator = 0; size_t used_iterator = 0; diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 10defe6cb..28985b6fe 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -839,14 +839,14 @@ bool TextureCacheRuntime::ShouldReinterpret(Image& dst, Image& src) { VkBuffer TextureCacheRuntime::GetTemporaryBuffer(size_t needed_size) { const auto level = (8 * sizeof(size_t)) - std::countl_zero(needed_size - 1ULL); - if (buffer_commits[level]) { + if (buffers[level]) { return *buffers[level]; } const auto new_size = Common::NextPow2(needed_size); static constexpr VkBufferUsageFlags flags = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT; - buffers[level] = device.GetLogical().CreateBuffer({ + const VkBufferCreateInfo temp_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -855,9 +855,8 @@ VkBuffer TextureCacheRuntime::GetTemporaryBuffer(size_t needed_size) { .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); - buffer_commits[level] = std::make_unique( - memory_allocator.Commit(buffers[level], MemoryUsage::DeviceLocal)); + }; + buffers[level] = memory_allocator.CreateBuffer(temp_ci, MemoryUsage::DeviceLocal); return *buffers[level]; } diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index 9481f2531..220943116 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -116,7 +116,6 @@ public: static constexpr size_t indexing_slots = 8 * sizeof(size_t); std::array buffers{}; - std::array, indexing_slots> buffer_commits{}; }; class Image : public VideoCommon::ImageBase { diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp index 6417d7e31..460d8d59d 100644 --- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp +++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp @@ -41,7 +41,7 @@ void TurboMode::Run(std::stop_token stop_token) { auto& dld = m_device.GetLogical(); // Allocate buffer. 2MiB should be sufficient. - auto buffer = dld.CreateBuffer(VkBufferCreateInfo{ + const VkBufferCreateInfo buffer_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, @@ -50,10 +50,8 @@ void TurboMode::Run(std::stop_token stop_token) { .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, - }); - - // Commit some device local memory for the buffer. - auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal); + }; + vk::Buffer buffer = m_allocator.CreateBuffer(buffer_ci, MemoryUsage::DeviceLocal); // Create the descriptor pool to contain our descriptor. static constexpr VkDescriptorPoolSize pool_size{ diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 631d5e378..541f0c1da 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -603,6 +603,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; const VmaAllocatorCreateInfo allocator_info = { + .flags = VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, .physicalDevice = physical, .device = *logical, .pVulkanFunctions = &functions, diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 7f860cccd..d2e1ef58e 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -51,11 +51,59 @@ struct Range { case MemoryUsage::Download: return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; + case MemoryUsage::Stream: + return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; } ASSERT_MSG(false, "Invalid memory usage={}", usage); return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; } +[[nodiscard]] VkMemoryPropertyFlags MemoryUsageRequiredVmaFlags(MemoryUsage usage) { + switch (usage) { + case MemoryUsage::DeviceLocal: + return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; + case MemoryUsage::Upload: + case MemoryUsage::Stream: + return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; + case MemoryUsage::Download: + return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; + } + ASSERT_MSG(false, "Invalid memory usage={}", usage); + return {}; +} + +[[nodiscard]] VkMemoryPropertyFlags MemoryUsagePreferedVmaFlags(MemoryUsage usage) { + return usage != MemoryUsage::DeviceLocal ? VK_MEMORY_PROPERTY_HOST_COHERENT_BIT + : VkMemoryPropertyFlags{}; +} + +[[nodiscard]] VmaAllocationCreateFlags MemoryUsageVmaFlags(MemoryUsage usage) { + switch (usage) { + case MemoryUsage::Upload: + case MemoryUsage::Stream: + return VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT; + case MemoryUsage::Download: + return VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT; + case MemoryUsage::DeviceLocal: + return VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | + VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT; + } + return {}; +} + +[[nodiscard]] VmaMemoryUsage MemoryUsageVma(MemoryUsage usage) { + switch (usage) { + case MemoryUsage::DeviceLocal: + case MemoryUsage::Stream: + return VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE; + case MemoryUsage::Upload: + case MemoryUsage::Download: + return VMA_MEMORY_USAGE_AUTO_PREFER_HOST; + } + return VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE; +} + } // Anonymous namespace class MemoryAllocation { @@ -178,17 +226,18 @@ void MemoryCommit::Release() { } MemoryAllocator::MemoryAllocator(const Device& device_) - : device{device_}, properties{device_.GetPhysical().GetMemoryProperties().memoryProperties}, + : device{device_}, allocator{device.GetAllocator()}, + properties{device_.GetPhysical().GetMemoryProperties().memoryProperties}, buffer_image_granularity{ device_.GetPhysical().GetProperties().limits.bufferImageGranularity} {} MemoryAllocator::~MemoryAllocator() = default; vk::Image MemoryAllocator::CreateImage(const VkImageCreateInfo& ci) const { - const VmaAllocationCreateInfo alloc_info = { + const VmaAllocationCreateInfo alloc_ci = { .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT, .usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE, - .requiredFlags = 0, + .requiredFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, .preferredFlags = 0, .pool = VK_NULL_HANDLE, .pUserData = nullptr, @@ -196,12 +245,40 @@ vk::Image MemoryAllocator::CreateImage(const VkImageCreateInfo& ci) const { VkImage handle{}; VmaAllocation allocation{}; - vk::Check( - vmaCreateImage(device.GetAllocator(), &ci, &alloc_info, &handle, &allocation, nullptr)); - return vk::Image(handle, *device.GetLogical(), device.GetAllocator(), allocation, + + vk::Check(vmaCreateImage(allocator, &ci, &alloc_ci, &handle, &allocation, nullptr)); + + return vk::Image(handle, *device.GetLogical(), allocator, allocation, device.GetDispatchLoader()); } +vk::Buffer MemoryAllocator::CreateBuffer(const VkBufferCreateInfo& ci, MemoryUsage usage) const { + const VmaAllocationCreateInfo alloc_ci = { + .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT | + MemoryUsageVmaFlags(usage), + .usage = MemoryUsageVma(usage), + .requiredFlags = MemoryUsageRequiredVmaFlags(usage), + .preferredFlags = MemoryUsagePreferedVmaFlags(usage), + .pool = VK_NULL_HANDLE, + .pUserData = nullptr, + }; + + VkBuffer handle{}; + VmaAllocationInfo alloc_info{}; + VmaAllocation allocation{}; + VkMemoryPropertyFlags property_flags{}; + + vk::Check(vmaCreateBuffer(allocator, &ci, &alloc_ci, &handle, &allocation, &alloc_info)); + vmaGetAllocationMemoryProperties(allocator, allocation, &property_flags); + + u8* data = reinterpret_cast(alloc_info.pMappedData); + const std::span mapped_data = data ? std::span{data, ci.size} : std::span{}; + const bool is_coherent = property_flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + + return vk::Buffer(handle, *device.GetLogical(), allocator, allocation, mapped_data, is_coherent, + device.GetDispatchLoader()); +} + MemoryCommit MemoryAllocator::Commit(const VkMemoryRequirements& requirements, MemoryUsage usage) { // Find the fastest memory flags we can afford with the current requirements const u32 type_mask = requirements.memoryTypeBits; @@ -221,12 +298,6 @@ MemoryCommit MemoryAllocator::Commit(const VkMemoryRequirements& requirements, M return TryCommit(requirements, flags).value(); } -MemoryCommit MemoryAllocator::Commit(const vk::Buffer& buffer, MemoryUsage usage) { - auto commit = Commit(device.GetLogical().GetBufferMemoryRequirements(*buffer), usage); - buffer.BindMemory(commit.Memory(), commit.Offset()); - return commit; -} - bool MemoryAllocator::TryAllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u64 size) { const u32 type = FindType(flags, type_mask).value(); vk::DeviceMemory memory = device.GetLogical().TryAllocateMemory({ @@ -302,16 +373,4 @@ std::optional MemoryAllocator::FindType(VkMemoryPropertyFlags flags, u32 ty return std::nullopt; } -bool IsHostVisible(MemoryUsage usage) noexcept { - switch (usage) { - case MemoryUsage::DeviceLocal: - return false; - case MemoryUsage::Upload: - case MemoryUsage::Download: - return true; - } - ASSERT_MSG(false, "Invalid memory usage={}", usage); - return false; -} - } // namespace Vulkan diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.h b/src/video_core/vulkan_common/vulkan_memory_allocator.h index f9ee53cfb..f449bc8d0 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.h +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.h @@ -9,6 +9,8 @@ #include "common/common_types.h" #include "video_core/vulkan_common/vulkan_wrapper.h" +VK_DEFINE_HANDLE(VmaAllocator) + namespace Vulkan { class Device; @@ -17,9 +19,11 @@ class MemoryAllocation; /// Hints and requirements for the backing memory type of a commit enum class MemoryUsage { - DeviceLocal, ///< Hints device local usages, fastest memory type to read and write from the GPU + DeviceLocal, ///< Requests device local host visible buffer, falling back to device local + ///< memory. Upload, ///< Requires a host visible memory type optimized for CPU to GPU uploads Download, ///< Requires a host visible memory type optimized for GPU to CPU readbacks + Stream, ///< Requests device local host visible buffer, falling back host memory. }; /// Ownership handle of a memory commitment. @@ -82,6 +86,8 @@ public: vk::Image CreateImage(const VkImageCreateInfo& ci) const; + vk::Buffer CreateBuffer(const VkBufferCreateInfo& ci, MemoryUsage usage) const; + /** * Commits a memory with the specified requirements. * @@ -113,13 +119,11 @@ private: std::optional FindType(VkMemoryPropertyFlags flags, u32 type_mask) const; const Device& device; ///< Device handle. + VmaAllocator allocator; ///< Vma allocator. const VkPhysicalDeviceMemoryProperties properties; ///< Physical device properties. std::vector> allocations; ///< Current allocations. VkDeviceSize buffer_image_granularity; // The granularity for adjacent offsets between buffers // and optimal images }; -/// Returns true when a memory usage is guaranteed to be host visible. -bool IsHostVisible(MemoryUsage usage) noexcept; - } // namespace Vulkan diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index 5d088dc58..c01a9478e 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -561,14 +561,28 @@ void Image::Release() const noexcept { } } -void Buffer::BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const { - Check(dld->vkBindBufferMemory(owner, handle, memory, offset)); +void Buffer::Flush() const { + if (!is_coherent) { + vmaFlushAllocation(allocator, allocation, 0, VK_WHOLE_SIZE); + } +} + +void Buffer::Invalidate() const { + if (!is_coherent) { + vmaInvalidateAllocation(allocator, allocation, 0, VK_WHOLE_SIZE); + } } void Buffer::SetObjectNameEXT(const char* name) const { SetObjectName(dld, owner, handle, VK_OBJECT_TYPE_BUFFER, name); } +void Buffer::Release() const noexcept { + if (handle) { + vmaDestroyBuffer(allocator, handle, allocation); + } +} + void BufferView::SetObjectNameEXT(const char* name) const { SetObjectName(dld, owner, handle, VK_OBJECT_TYPE_BUFFER_VIEW, name); } @@ -707,12 +721,6 @@ Queue Device::GetQueue(u32 family_index) const noexcept { return Queue(queue, *dld); } -Buffer Device::CreateBuffer(const VkBufferCreateInfo& ci) const { - VkBuffer object; - Check(dld->vkCreateBuffer(handle, &ci, nullptr, &object)); - return Buffer(object, handle, *dld); -} - BufferView Device::CreateBufferView(const VkBufferViewCreateInfo& ci) const { VkBufferView object; Check(dld->vkCreateBufferView(handle, &ci, nullptr, &object)); diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 8ec708774..44fce47a5 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -673,6 +673,84 @@ private: const DeviceDispatch* dld = nullptr; }; +class Buffer { +public: + explicit Buffer(VkBuffer handle_, VkDevice owner_, VmaAllocator allocator_, + VmaAllocation allocation_, std::span mapped_, bool is_coherent_, + const DeviceDispatch& dld_) noexcept + : handle{handle_}, owner{owner_}, allocator{allocator_}, + allocation{allocation_}, mapped{mapped_}, is_coherent{is_coherent_}, dld{&dld_} {} + Buffer() = default; + + Buffer(const Buffer&) = delete; + Buffer& operator=(const Buffer&) = delete; + + Buffer(Buffer&& rhs) noexcept + : handle{std::exchange(rhs.handle, nullptr)}, owner{rhs.owner}, allocator{rhs.allocator}, + allocation{rhs.allocation}, mapped{rhs.mapped}, + is_coherent{rhs.is_coherent}, dld{rhs.dld} {} + + Buffer& operator=(Buffer&& rhs) noexcept { + Release(); + handle = std::exchange(rhs.handle, nullptr); + owner = rhs.owner; + allocator = rhs.allocator; + allocation = rhs.allocation; + mapped = rhs.mapped; + is_coherent = rhs.is_coherent; + dld = rhs.dld; + return *this; + } + + ~Buffer() noexcept { + Release(); + } + + VkBuffer operator*() const noexcept { + return handle; + } + + void reset() noexcept { + Release(); + handle = nullptr; + } + + explicit operator bool() const noexcept { + return handle != nullptr; + } + + /// Returns the host mapped memory, an empty span otherwise. + std::span Mapped() noexcept { + return mapped; + } + + std::span Mapped() const noexcept { + return mapped; + } + + /// Returns true if the buffer is mapped to the host. + bool IsHostVisible() const noexcept { + return !mapped.empty(); + } + + void Flush() const; + + void Invalidate() const; + + void SetObjectNameEXT(const char* name) const; + +private: + void Release() const noexcept; + + VkBuffer handle = nullptr; + VkDevice owner = nullptr; + VmaAllocator allocator = nullptr; + VmaAllocation allocation = nullptr; + std::span mapped = {}; + bool is_coherent = false; + const DeviceDispatch* dld = nullptr; +}; + class Queue { public: /// Construct an empty queue handle. @@ -696,17 +774,6 @@ private: const DeviceDispatch* dld = nullptr; }; -class Buffer : public Handle { - using Handle::Handle; - -public: - /// Attaches a memory allocation. - void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const; - - /// Set object name. - void SetObjectNameEXT(const char* name) const; -}; - class BufferView : public Handle { using Handle::Handle; @@ -886,8 +953,6 @@ public: Queue GetQueue(u32 family_index) const noexcept; - Buffer CreateBuffer(const VkBufferCreateInfo& ci) const; - BufferView CreateBufferView(const VkBufferViewCreateInfo& ci) const; ImageView CreateImageView(const VkImageViewCreateInfo& ci) const; From ee0d68300e68a221d9930935f26d0c96be79357b Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sun, 18 Jun 2023 12:27:31 +0300 Subject: [PATCH 20/91] renderer_vulkan: Add missing initializers --- externals/vma/vma.cpp | 2 ++ src/video_core/vulkan_common/vulkan_device.cpp | 12 ++++++++---- .../vulkan_common/vulkan_memory_allocator.cpp | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/externals/vma/vma.cpp b/externals/vma/vma.cpp index 7f7df9cff..ff1acc320 100644 --- a/externals/vma/vma.cpp +++ b/externals/vma/vma.cpp @@ -2,4 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #define VMA_IMPLEMENTATION +#define VMA_STATIC_VULKAN_FUNCTIONS 0 +#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include \ No newline at end of file diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 541f0c1da..94dd1aa14 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -597,18 +597,22 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR graphics_queue = logical.GetQueue(graphics_family); present_queue = logical.GetQueue(present_family); - const VmaVulkanFunctions functions = { - .vkGetInstanceProcAddr = dld.vkGetInstanceProcAddr, - .vkGetDeviceProcAddr = dld.vkGetDeviceProcAddr, - }; + VmaVulkanFunctions functions{}; + functions.vkGetInstanceProcAddr = dld.vkGetInstanceProcAddr; + functions.vkGetDeviceProcAddr = dld.vkGetDeviceProcAddr; const VmaAllocatorCreateInfo allocator_info = { .flags = VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, .physicalDevice = physical, .device = *logical, + .preferredLargeHeapBlockSize = 0, + .pAllocationCallbacks = nullptr, + .pDeviceMemoryCallbacks = nullptr, + .pHeapSizeLimit = nullptr, .pVulkanFunctions = &functions, .instance = instance, .vulkanApiVersion = VK_API_VERSION_1_1, + .pTypeExternalMemoryHandleTypes = nullptr, }; vk::Check(vmaCreateAllocator(&allocator_info, &allocator)); diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index d2e1ef58e..20d36680c 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -75,7 +75,7 @@ struct Range { [[nodiscard]] VkMemoryPropertyFlags MemoryUsagePreferedVmaFlags(MemoryUsage usage) { return usage != MemoryUsage::DeviceLocal ? VK_MEMORY_PROPERTY_HOST_COHERENT_BIT - : VkMemoryPropertyFlags{}; + : VkMemoryPropertyFlagBits{}; } [[nodiscard]] VmaAllocationCreateFlags MemoryUsageVmaFlags(MemoryUsage usage) { @@ -239,8 +239,10 @@ vk::Image MemoryAllocator::CreateImage(const VkImageCreateInfo& ci) const { .usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE, .requiredFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, .preferredFlags = 0, + .memoryTypeBits = 0, .pool = VK_NULL_HANDLE, .pUserData = nullptr, + .priority = 0.f, }; VkImage handle{}; @@ -259,8 +261,10 @@ vk::Buffer MemoryAllocator::CreateBuffer(const VkBufferCreateInfo& ci, MemoryUsa .usage = MemoryUsageVma(usage), .requiredFlags = MemoryUsageRequiredVmaFlags(usage), .preferredFlags = MemoryUsagePreferedVmaFlags(usage), + .memoryTypeBits = 0, .pool = VK_NULL_HANDLE, .pUserData = nullptr, + .priority = 0.f, }; VkBuffer handle{}; From 346c253cd2397ac152fd10f6b99d6af79349a77f Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 15 Jun 2023 16:16:36 -0400 Subject: [PATCH 21/91] video_core: Formalize HasBrokenCompute Also limits it to only affected Intel proprietrary driver versions. vulkan_device: Move broken compute determination vk_device: Remove errant back quote --- .../renderer_vulkan/vk_pipeline_cache.cpp | 5 +--- .../vulkan_common/vulkan_device.cpp | 2 ++ src/video_core/vulkan_common/vulkan_device.h | 23 +++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 18e040a1b..ee2c33131 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -705,10 +705,7 @@ std::unique_ptr PipelineCache::CreateComputePipeline( std::unique_ptr PipelineCache::CreateComputePipeline( ShaderPools& pools, const ComputePipelineCacheKey& key, Shader::Environment& env, PipelineStatistics* statistics, bool build_in_parallel) try { - // TODO: Remove this when Intel fixes their shader compiler. - // https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/159 - if (device.GetDriverID() == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS && - !Settings::values.enable_compute_pipelines.GetValue()) { + if (device.HasBrokenCompute() && !Settings::values.enable_compute_pipelines.GetValue()) { LOG_ERROR(Render_Vulkan, "Skipping 0x{:016x}", key.Hash()); return nullptr; } diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index dcedf4425..e38e34bc8 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -562,6 +562,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR LOG_WARNING(Render_Vulkan, "Intel proprietary drivers do not support MSAA image blits"); cant_blit_msaa = true; } + has_broken_compute = + CheckBrokenCompute(properties.driver.driverID, properties.properties.driverVersion); if (is_intel_anv || (is_qualcomm && !is_s8gen2)) { LOG_WARNING(Render_Vulkan, "Driver does not support native BGR format"); must_emulate_bgr565 = true; diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 8c7e44fcb..e54828088 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -10,6 +10,7 @@ #include #include "common/common_types.h" +#include "common/logging/log.h" #include "common/settings.h" #include "video_core/vulkan_common/vulkan_wrapper.h" @@ -518,6 +519,11 @@ public: return has_renderdoc || has_nsight_graphics || Settings::values.renderer_debug.GetValue(); } + /// @returns True if compute pipelines can cause crashing. + bool HasBrokenCompute() const { + return has_broken_compute; + } + /// Returns true when the device does not properly support cube compatibility. bool HasBrokenCubeImageCompability() const { return has_broken_cube_compatibility; @@ -579,6 +585,22 @@ public: return supports_conditional_barriers; } + [[nodiscard]] static constexpr bool CheckBrokenCompute(VkDriverId driver_id, + u32 driver_version) { + if (driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) { + const u32 major = VK_API_VERSION_MAJOR(driver_version); + const u32 minor = VK_API_VERSION_MINOR(driver_version); + const u32 patch = VK_API_VERSION_PATCH(driver_version); + if (major == 0 && minor == 405 && patch < 286) { + LOG_WARNING( + Render_Vulkan, + "Intel proprietary drivers 0.405.0 until 0.405.286 have broken compute"); + return true; + } + } + return {}; + } + private: /// Checks if the physical device is suitable and configures the object state /// with all necessary info about its properties. @@ -672,6 +694,7 @@ private: bool is_integrated{}; ///< Is GPU an iGPU. bool is_virtual{}; ///< Is GPU a virtual GPU. bool is_non_gpu{}; ///< Is SoftwareRasterizer, FPGA, non-GPU device. + bool has_broken_compute{}; ///< Compute shaders can cause crashes bool has_broken_cube_compatibility{}; ///< Has broken cube compatibility bit bool has_renderdoc{}; ///< Has RenderDoc attached bool has_nsight_graphics{}; ///< Has Nsight Graphics attached From b9a86b040b7e310ad3b39540ce7b6249cb965536 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 15 Jun 2023 16:17:19 -0400 Subject: [PATCH 22/91] vk_device_info: Check only affected Intel drivers Renames is_intel_proprietary to has_broken_compute for accuracy. vk_device_info: Use vulkan::device to check compute --- src/yuzu/configuration/configure_graphics.cpp | 2 +- src/yuzu/vk_device_info.cpp | 13 ++++++++----- src/yuzu/vk_device_info.h | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 78b487494..a4965524a 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -508,7 +508,7 @@ void ConfigureGraphics::RetrieveVulkanDevices() { vulkan_devices.push_back(QString::fromStdString(record.name)); device_present_modes.push_back(record.vsync_support); - if (record.is_intel_proprietary) { + if (record.has_broken_compute) { expose_compute_option(); } } diff --git a/src/yuzu/vk_device_info.cpp b/src/yuzu/vk_device_info.cpp index 9bd1ec686..7c26a3dc7 100644 --- a/src/yuzu/vk_device_info.cpp +++ b/src/yuzu/vk_device_info.cpp @@ -5,10 +5,12 @@ #include #include "common/dynamic_library.h" #include "common/logging/log.h" +#include "video_core/vulkan_common/vulkan_device.h" #include "video_core/vulkan_common/vulkan_instance.h" #include "video_core/vulkan_common/vulkan_library.h" #include "video_core/vulkan_common/vulkan_surface.h" #include "video_core/vulkan_common/vulkan_wrapper.h" +#include "vulkan/vulkan_core.h" #include "yuzu/qt_common.h" #include "yuzu/vk_device_info.h" @@ -16,8 +18,8 @@ class QWindow; namespace VkDeviceInfo { Record::Record(std::string_view name_, const std::vector& vsync_modes_, - bool is_intel_proprietary_) - : name{name_}, vsync_support{vsync_modes_}, is_intel_proprietary{is_intel_proprietary_} {} + bool has_broken_compute_) + : name{name_}, vsync_support{vsync_modes_}, has_broken_compute{has_broken_compute_} {} Record::~Record() = default; @@ -48,9 +50,10 @@ void PopulateRecords(std::vector& records, QWindow* window) try { properties.pNext = &driver_properties; dld.vkGetPhysicalDeviceProperties2(physical_device, &properties); - records.push_back(VkDeviceInfo::Record(name, present_modes, - driver_properties.driverID == - VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS)); + bool has_broken_compute{Vulkan::Device::CheckBrokenCompute( + driver_properties.driverID, properties.properties.driverVersion)}; + + records.push_back(VkDeviceInfo::Record(name, present_modes, has_broken_compute)); } } catch (const Vulkan::vk::Exception& exception) { LOG_ERROR(Frontend, "Failed to enumerate devices with error: {}", exception.what()); diff --git a/src/yuzu/vk_device_info.h b/src/yuzu/vk_device_info.h index 5a6c64416..bda8262f4 100644 --- a/src/yuzu/vk_device_info.h +++ b/src/yuzu/vk_device_info.h @@ -24,12 +24,12 @@ namespace VkDeviceInfo { class Record { public: explicit Record(std::string_view name, const std::vector& vsync_modes, - bool is_intel_proprietary); + bool has_broken_compute); ~Record(); const std::string name; const std::vector vsync_support; - const bool is_intel_proprietary; + const bool has_broken_compute; }; void PopulateRecords(std::vector& records, QWindow* window); From 711190bb6708f822a3bdb7afd30168d2cc3ed0e4 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Mon, 19 Jun 2023 00:19:28 +0100 Subject: [PATCH 23/91] Use current GPU address when unmapping GPU pages, not the base --- src/video_core/memory_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 7b2cde7a7..b2f7e160a 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -111,7 +111,7 @@ GPUVAddr MemoryManager::PageTableOp(GPUVAddr gpu_addr, [[maybe_unused]] VAddr cp [[maybe_unused]] const auto current_entry_type = GetEntry(current_gpu_addr); SetEntry(current_gpu_addr, entry_type); if (current_entry_type != entry_type) { - rasterizer->ModifyGPUMemory(unique_identifier, gpu_addr, page_size); + rasterizer->ModifyGPUMemory(unique_identifier, current_gpu_addr, page_size); } if constexpr (entry_type == EntryType::Mapped) { const VAddr current_cpu_addr = cpu_addr + offset; @@ -134,7 +134,7 @@ GPUVAddr MemoryManager::BigPageTableOp(GPUVAddr gpu_addr, [[maybe_unused]] VAddr [[maybe_unused]] const auto current_entry_type = GetEntry(current_gpu_addr); SetEntry(current_gpu_addr, entry_type); if (current_entry_type != entry_type) { - rasterizer->ModifyGPUMemory(unique_identifier, gpu_addr, big_page_size); + rasterizer->ModifyGPUMemory(unique_identifier, current_gpu_addr, big_page_size); } if constexpr (entry_type == EntryType::Mapped) { const VAddr current_cpu_addr = cpu_addr + offset; From b0beca52a34bae1ac73731ab5a0a2504a471d23f Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 18 Jun 2023 22:21:29 -0400 Subject: [PATCH 24/91] vfs_concat: fix offset calculation when not aligned to file boundary --- src/core/file_sys/vfs_concat.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/file_sys/vfs_concat.cpp b/src/core/file_sys/vfs_concat.cpp index 853b893a1..5285467d2 100644 --- a/src/core/file_sys/vfs_concat.cpp +++ b/src/core/file_sys/vfs_concat.cpp @@ -150,18 +150,19 @@ std::size_t ConcatenatedVfsFile::Read(u8* data, std::size_t length, std::size_t while (cur_length > 0 && it != concatenation_map.end()) { // Check if we can read the file at this position. const auto& file = it->file; - const u64 file_offset = it->offset; + const u64 map_offset = it->offset; const u64 file_size = file->GetSize(); - if (cur_offset >= file_offset + file_size) { + if (cur_offset > map_offset + file_size) { // Entirely out of bounds read. break; } // Read the file at this position. - const u64 intended_read_size = std::min(cur_length, file_size); + const u64 file_seek = cur_offset - map_offset; + const u64 intended_read_size = std::min(cur_length, file_size - file_seek); const u64 actual_read_size = - file->Read(data + (cur_offset - offset), intended_read_size, cur_offset - file_offset); + file->Read(data + (cur_offset - offset), intended_read_size, file_seek); // Update tracking. cur_offset += actual_read_size; From e5f1b22e16b32f36ca3a7af24cbda4f39bc861aa Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 19 Jun 2023 09:47:05 -0400 Subject: [PATCH 25/91] vfs_concat: verify short read --- src/core/file_sys/vfs_concat.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/file_sys/vfs_concat.cpp b/src/core/file_sys/vfs_concat.cpp index 5285467d2..311a59e5f 100644 --- a/src/core/file_sys/vfs_concat.cpp +++ b/src/core/file_sys/vfs_concat.cpp @@ -168,6 +168,11 @@ std::size_t ConcatenatedVfsFile::Read(u8* data, std::size_t length, std::size_t cur_offset += actual_read_size; cur_length -= actual_read_size; it++; + + // If we encountered a short read, we're done. + if (actual_read_size < intended_read_size) { + break; + } } return cur_offset - offset; From 256c7ec0a729f3d57b95394d2af34c9dcf33c557 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 19 Jun 2023 15:26:54 -0400 Subject: [PATCH 26/91] externals: Update tzdb_to_nx Includes a fix for the Apple date utility. --- externals/nx_tzdb/tzdb_to_nx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/nx_tzdb/tzdb_to_nx b/externals/nx_tzdb/tzdb_to_nx index 34df65eff..8c272f21d 160000 --- a/externals/nx_tzdb/tzdb_to_nx +++ b/externals/nx_tzdb/tzdb_to_nx @@ -1 +1 @@ -Subproject commit 34df65eff295c2bd9ee9e6a077d662486d5cabb3 +Subproject commit 8c272f21d19c6e821345fd055f41b9640f9189d0 From bedb5135c0c9981dae2e12a6b0dcf06d9a73635f Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 19 Jun 2023 15:30:11 -0400 Subject: [PATCH 27/91] nx_tzdb: Rename GNU_DATE variable The repository can handle either GNU date or Apple date now. --- externals/nx_tzdb/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/nx_tzdb/CMakeLists.txt b/externals/nx_tzdb/CMakeLists.txt index d5a1c6317..593786250 100644 --- a/externals/nx_tzdb/CMakeLists.txt +++ b/externals/nx_tzdb/CMakeLists.txt @@ -7,7 +7,7 @@ add_library(nx_tzdb INTERFACE) find_program(GIT git) find_program(GNU_MAKE make) -find_program(GNU_DATE date) +find_program(DATE_PROG date) set(CAN_BUILD_NX_TZDB true) @@ -17,7 +17,7 @@ endif() if (NOT GNU_MAKE) set(CAN_BUILD_NX_TZDB false) endif() -if (NOT GNU_DATE) +if (NOT DATE_PROG) set(CAN_BUILD_NX_TZDB false) endif() if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR ANDROID) From 197e13d93d6740cda589d88804262d6bdd176a74 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:33:30 -0400 Subject: [PATCH 28/91] video_core: Check broken compute earlier Checks it as the system is determining what settings to enable. Reduces the need to check settings while the system is running. --- src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 2 +- src/video_core/vulkan_common/vulkan_device.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index ee2c33131..a2cfb2105 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -705,7 +705,7 @@ std::unique_ptr PipelineCache::CreateComputePipeline( std::unique_ptr PipelineCache::CreateComputePipeline( ShaderPools& pools, const ComputePipelineCacheKey& key, Shader::Environment& env, PipelineStatistics* statistics, bool build_in_parallel) try { - if (device.HasBrokenCompute() && !Settings::values.enable_compute_pipelines.GetValue()) { + if (device.HasBrokenCompute()) { LOG_ERROR(Render_Vulkan, "Skipping 0x{:016x}", key.Hash()); return nullptr; } diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index e38e34bc8..fa9cde75b 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -563,7 +563,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR cant_blit_msaa = true; } has_broken_compute = - CheckBrokenCompute(properties.driver.driverID, properties.properties.driverVersion); + CheckBrokenCompute(properties.driver.driverID, properties.properties.driverVersion) && + !Settings::values.enable_compute_pipelines.GetValue(); if (is_intel_anv || (is_qualcomm && !is_s8gen2)) { LOG_WARNING(Render_Vulkan, "Driver does not support native BGR format"); must_emulate_bgr565 = true; From 78ff2862f6a0785247d3aa64bdc210b545e4d82d Mon Sep 17 00:00:00 2001 From: toast2903 <22451773+lat9nq@users.noreply.github.com> Date: Sun, 18 Jun 2023 23:29:27 -0400 Subject: [PATCH 29/91] vulkan_device: Remove brace initializer Co-authored-by: Tobias --- src/video_core/vulkan_common/vulkan_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index e54828088..0b634a876 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -598,7 +598,7 @@ public: return true; } } - return {}; + return false; } private: From fd5d7947f614d837cb3b08e132a025c4e1536d37 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:49:47 -0400 Subject: [PATCH 30/91] time_zone_manager: Stop on comma This is a deviation from the reference time zone implementation. The actual code will set a pointer to the time zone name here, but for us we have a limited number of characters to work with, and the name of the time zone here could be larger than 8 characters. We can make the assumption that time zone names greater than five characters in length include a comma that denotes more data. Nintendo just truncates that data for the name, so we can do the same. time_zone_manager: Check for length of array Just to be double sure that we never break past the array length, directly compare against it. --- src/core/hle/service/time/time_zone_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index 63aacd19f..43d0a19b8 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp @@ -911,7 +911,9 @@ static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time, calendar_additional_info.is_dst = rules.ttis[tti_index].is_dst; const char* time_zone{&rules.chars[rules.ttis[tti_index].abbreviation_list_index]}; - for (int index{}; time_zone[index] != '\0'; ++index) { + for (u32 index{}; time_zone[index] != '\0' && time_zone[index] != ',' && + index < calendar_additional_info.timezone_name.size() - 1; + ++index) { calendar_additional_info.timezone_name[index] = time_zone[index]; } return ResultSuccess; From ae1a8a7dc7bbe656d9abac646472df2ccf1660db Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:52:17 -0400 Subject: [PATCH 31/91] time_zone_manager: Add null terminator We aren't null-terminating this string after the copy, and we need to. --- src/core/hle/service/time/time_zone_manager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index 43d0a19b8..205371a26 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp @@ -911,11 +911,13 @@ static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time, calendar_additional_info.is_dst = rules.ttis[tti_index].is_dst; const char* time_zone{&rules.chars[rules.ttis[tti_index].abbreviation_list_index]}; - for (u32 index{}; time_zone[index] != '\0' && time_zone[index] != ',' && - index < calendar_additional_info.timezone_name.size() - 1; + u32 index; + for (index = 0; time_zone[index] != '\0' && time_zone[index] != ',' && + index < calendar_additional_info.timezone_name.size() - 1; ++index) { calendar_additional_info.timezone_name[index] = time_zone[index]; } + calendar_additional_info.timezone_name[index] = '\0'; return ResultSuccess; } From e6845155782eb05b45c2574d6a363a8ccfbf9a38 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 20 Jun 2023 16:48:20 -0400 Subject: [PATCH 32/91] android: Don't show custom driver button on mali and x86 --- .../fragments/HomeSettingsFragment.kt | 172 ++++++++++-------- .../yuzu/yuzu_emu/utils/GpuDriverHelper.kt | 2 + src/android/app/src/main/jni/native.cpp | 20 ++ 3 files changed, 123 insertions(+), 71 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt index 6f8adbba5..5a36ffad4 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt @@ -68,79 +68,109 @@ class HomeSettingsFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { mainActivity = requireActivity() as MainActivity - val optionsList: MutableList = mutableListOf( - HomeSetting( - R.string.advanced_settings, - R.string.settings_description, - R.drawable.ic_settings - ) { SettingsActivity.launch(requireContext(), SettingsFile.FILE_NAME_CONFIG, "") }, - HomeSetting( - R.string.open_user_folder, - R.string.open_user_folder_description, - R.drawable.ic_folder_open - ) { openFileManager() }, - HomeSetting( - R.string.preferences_theme, - R.string.theme_and_color_description, - R.drawable.ic_palette - ) { SettingsActivity.launch(requireContext(), Settings.SECTION_THEME, "") }, - HomeSetting( - R.string.install_gpu_driver, - R.string.install_gpu_driver_description, - R.drawable.ic_exit - ) { driverInstaller() }, - HomeSetting( - R.string.install_amiibo_keys, - R.string.install_amiibo_keys_description, - R.drawable.ic_nfc - ) { mainActivity.getAmiiboKey.launch(arrayOf("*/*")) }, - HomeSetting( - R.string.install_game_content, - R.string.install_game_content_description, - R.drawable.ic_system_update_alt - ) { mainActivity.installGameUpdate.launch(arrayOf("*/*")) }, - HomeSetting( - R.string.select_games_folder, - R.string.select_games_folder_description, - R.drawable.ic_add - ) { - mainActivity.getGamesDirectory.launch(Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).data) - }, - HomeSetting( - R.string.manage_save_data, - R.string.import_export_saves_description, - R.drawable.ic_save - ) { - ImportExportSavesFragment().show( - parentFragmentManager, - ImportExportSavesFragment.TAG + val optionsList: MutableList = mutableListOf().apply { + add( + HomeSetting( + R.string.advanced_settings, + R.string.settings_description, + R.drawable.ic_settings + ) { SettingsActivity.launch(requireContext(), SettingsFile.FILE_NAME_CONFIG, "") } + ) + add( + HomeSetting( + R.string.open_user_folder, + R.string.open_user_folder_description, + R.drawable.ic_folder_open + ) { openFileManager() } + ) + add( + HomeSetting( + R.string.preferences_theme, + R.string.theme_and_color_description, + R.drawable.ic_palette + ) { SettingsActivity.launch(requireContext(), Settings.SECTION_THEME, "") } + ) + + if (GpuDriverHelper.supportsCustomDriverLoading()) { + add( + HomeSetting( + R.string.install_gpu_driver, + R.string.install_gpu_driver_description, + R.drawable.ic_exit + ) { driverInstaller() } ) - }, - HomeSetting( - R.string.install_prod_keys, - R.string.install_prod_keys_description, - R.drawable.ic_unlock - ) { mainActivity.getProdKey.launch(arrayOf("*/*")) }, - HomeSetting( - R.string.install_firmware, - R.string.install_firmware_description, - R.drawable.ic_firmware - ) { mainActivity.getFirmware.launch(arrayOf("application/zip")) }, - HomeSetting( - R.string.share_log, - R.string.share_log_description, - R.drawable.ic_log - ) { shareLog() }, - HomeSetting( - R.string.about, - R.string.about_description, - R.drawable.ic_info_outline - ) { - exitTransition = MaterialSharedAxis(MaterialSharedAxis.X, true) - parentFragmentManager.primaryNavigationFragment?.findNavController() - ?.navigate(R.id.action_homeSettingsFragment_to_aboutFragment) } - ) + + add( + HomeSetting( + R.string.install_amiibo_keys, + R.string.install_amiibo_keys_description, + R.drawable.ic_nfc + ) { mainActivity.getAmiiboKey.launch(arrayOf("*/*")) } + ) + add( + HomeSetting( + R.string.install_game_content, + R.string.install_game_content_description, + R.drawable.ic_system_update_alt + ) { mainActivity.installGameUpdate.launch(arrayOf("*/*")) } + ) + add( + HomeSetting( + R.string.select_games_folder, + R.string.select_games_folder_description, + R.drawable.ic_add + ) { + mainActivity.getGamesDirectory.launch( + Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).data + ) + } + ) + add( + HomeSetting( + R.string.manage_save_data, + R.string.import_export_saves_description, + R.drawable.ic_save + ) { + ImportExportSavesFragment().show( + parentFragmentManager, + ImportExportSavesFragment.TAG + ) + } + ) + add( + HomeSetting( + R.string.install_prod_keys, + R.string.install_prod_keys_description, + R.drawable.ic_unlock + ) { mainActivity.getProdKey.launch(arrayOf("*/*")) } + ) + add( + HomeSetting( + R.string.install_firmware, + R.string.install_firmware_description, + R.drawable.ic_firmware + ) { mainActivity.getFirmware.launch(arrayOf("application/zip")) } + ) + add( + HomeSetting( + R.string.share_log, + R.string.share_log_description, + R.drawable.ic_log + ) { shareLog() } + ) + add( + HomeSetting( + R.string.about, + R.string.about_description, + R.drawable.ic_info_outline + ) { + exitTransition = MaterialSharedAxis(MaterialSharedAxis.X, true) + parentFragmentManager.primaryNavigationFragment?.findNavController() + ?.navigate(R.id.action_homeSettingsFragment_to_aboutFragment) + } + ) + } if (!BuildConfig.PREMIUM) { optionsList.add( diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt index dad159481..1d4695a2a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt @@ -113,6 +113,8 @@ object GpuDriverHelper { initializeDriverParameters(context) } + external fun supportsCustomDriverLoading(): Boolean + // Parse the custom driver metadata to retrieve the name. val customDriverName: String? get() { diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index f9617202b..632aa50b3 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -560,6 +560,26 @@ void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeGpuDriver( GetJString(env, custom_driver_name), GetJString(env, file_redirect_dir)); } +[[maybe_unused]] static bool CheckKgslPresent() { + constexpr auto KgslPath{"/dev/kgsl-3d0"}; + + return access(KgslPath, F_OK) == 0; +} + +[[maybe_unused]] bool SupportsCustomDriver() { + return android_get_device_api_level() >= 28 && CheckKgslPresent(); +} + +jboolean JNICALL Java_org_yuzu_yuzu_1emu_utils_GpuDriverHelper_supportsCustomDriverLoading( + [[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject instance) { +#ifdef ARCHITECTURE_arm64 + // If the KGSL device exists custom drivers can be loaded using adrenotools + return SupportsCustomDriver(); +#else + return false; +#endif +} + jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadKeys(JNIEnv* env, [[maybe_unused]] jclass clazz) { Core::Crypto::KeyManager::Instance().ReloadKeys(); From e31152ee347c2dddeba847ca08bd101ef53d1cce Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Fri, 16 Jun 2023 18:50:36 -0400 Subject: [PATCH 33/91] android: Add a PiP interface to mute / unmute --- .../yuzu_emu/activities/EmulationActivity.kt | 48 +++++++++++++++++++ .../src/main/res/drawable/ic_pip_audio.xml | 9 ++++ .../app/src/main/res/drawable/ic_pip_mute.xml | 9 ++++ .../app/src/main/res/values/strings.xml | 2 + 4 files changed, 68 insertions(+) create mode 100644 src/android/app/src/main/res/drawable/ic_pip_audio.xml create mode 100644 src/android/app/src/main/res/drawable/ic_pip_mute.xml diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index f0a6753a9..8a071f4da 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -63,6 +63,10 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { private val actionPause = "ACTION_EMULATOR_PAUSE" private val actionPlay = "ACTION_EMULATOR_PLAY" + private val actionMute = "ACTION_EMULATOR_MUTE" + private val actionAudio = "ACTION_EMULATOR_AUDIO" + private var isAudioMuted = false + private var userAudio = IntSetting.AUDIO_VOLUME.int private val settingsViewModel: SettingsViewModel by viewModels() @@ -305,6 +309,38 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { pictureInPictureActions.add(pauseRemoteAction) } + if (isAudioMuted) { + val audioIcon = Icon.createWithResource(this@EmulationActivity, R.drawable.ic_pip_audio) + val audioPendingIntent = PendingIntent.getBroadcast( + this@EmulationActivity, + R.drawable.ic_pip_audio, + Intent(actionAudio), + pendingFlags + ) + val audioRemoteAction = RemoteAction( + audioIcon, + getString(R.string.audio), + getString(R.string.audio), + audioPendingIntent + ) + pictureInPictureActions.add(audioRemoteAction) + } else { + val muteIcon = Icon.createWithResource(this@EmulationActivity, R.drawable.ic_pip_mute) + val mutePendingIntent = PendingIntent.getBroadcast( + this@EmulationActivity, + R.drawable.ic_pip_mute, + Intent(actionMute), + pendingFlags + ) + val muteRemoteAction = RemoteAction( + muteIcon, + getString(R.string.mute), + getString(R.string.mute), + mutePendingIntent + ) + pictureInPictureActions.add(muteRemoteAction) + } + return this.apply { setActions(pictureInPictureActions) } } @@ -326,6 +362,18 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { } else if (intent.action == actionPause) { if (!NativeLibrary.isPaused()) NativeLibrary.pauseEmulation() } + if (intent.action == actionAudio) { + if (isAudioMuted) { + IntSetting.AUDIO_VOLUME.int = userAudio + isAudioMuted = false + } + } else if (intent.action == actionMute) { + if (!isAudioMuted) { + isAudioMuted = true + userAudio = IntSetting.AUDIO_VOLUME.int + IntSetting.AUDIO_VOLUME.int = 0 + } + } buildPictureInPictureParams() } } diff --git a/src/android/app/src/main/res/drawable/ic_pip_audio.xml b/src/android/app/src/main/res/drawable/ic_pip_audio.xml new file mode 100644 index 000000000..f7ed0862e --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_pip_audio.xml @@ -0,0 +1,9 @@ + + + diff --git a/src/android/app/src/main/res/drawable/ic_pip_mute.xml b/src/android/app/src/main/res/drawable/ic_pip_mute.xml new file mode 100644 index 000000000..a271c5fe8 --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_pip_mute.xml @@ -0,0 +1,9 @@ + + + diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index cc1d8c39d..d4f089c7f 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -387,6 +387,8 @@ Minimize window when placed in the background Pause Play + Mute + Audio Licenses From e35371e50c458abdca5c68fbae5c78869a6246e2 Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Fri, 16 Jun 2023 20:55:38 -0400 Subject: [PATCH 34/91] Fix JNI and expose mute settings to Android --- .../java/org/yuzu/yuzu_emu/NativeLibrary.kt | 15 ++ .../yuzu_emu/activities/EmulationActivity.kt | 43 ++--- src/android/app/src/main/jni/CMakeLists.txt | 1 - src/android/app/src/main/jni/native.cpp | 150 +++++++--------- src/android/app/src/main/jni/native.h | 165 ------------------ .../{ic_pip_audio.xml => ic_pip_sound.xml} | 0 .../app/src/main/res/values/strings.xml | 2 +- 7 files changed, 99 insertions(+), 277 deletions(-) delete mode 100644 src/android/app/src/main/jni/native.h rename src/android/app/src/main/res/drawable/{ic_pip_audio.xml => ic_pip_sound.xml} (100%) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index f860cdd4b..6a4e07046 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt @@ -313,6 +313,21 @@ object NativeLibrary { */ external fun isPaused(): Boolean + /** + * Mutes emulation sound + */ + external fun muteAudio(): Boolean + + /** + * Unmutes emulation sound + */ + external fun unMuteAudio(): Boolean + + /** + * Returns true if emulation audio is muted. + */ + external fun isMuted(): Boolean + /** * Returns the performance stats for the current game */ diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index 8a071f4da..b77c21380 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -64,9 +64,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { private val actionPause = "ACTION_EMULATOR_PAUSE" private val actionPlay = "ACTION_EMULATOR_PLAY" private val actionMute = "ACTION_EMULATOR_MUTE" - private val actionAudio = "ACTION_EMULATOR_AUDIO" - private var isAudioMuted = false - private var userAudio = IntSetting.AUDIO_VOLUME.int + private val actionSound = "ACTION_EMULATOR_SOUND" private val settingsViewModel: SettingsViewModel by viewModels() @@ -309,21 +307,21 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { pictureInPictureActions.add(pauseRemoteAction) } - if (isAudioMuted) { - val audioIcon = Icon.createWithResource(this@EmulationActivity, R.drawable.ic_pip_audio) - val audioPendingIntent = PendingIntent.getBroadcast( + if (NativeLibrary.isMuted()) { + val soundIcon = Icon.createWithResource(this@EmulationActivity, R.drawable.ic_pip_sound) + val soundPendingIntent = PendingIntent.getBroadcast( this@EmulationActivity, - R.drawable.ic_pip_audio, - Intent(actionAudio), + R.drawable.ic_pip_sound, + Intent(actionSound), pendingFlags ) - val audioRemoteAction = RemoteAction( - audioIcon, - getString(R.string.audio), - getString(R.string.audio), - audioPendingIntent + val soundRemoteAction = RemoteAction( + soundIcon, + getString(R.string.sound), + getString(R.string.sound), + soundPendingIntent ) - pictureInPictureActions.add(audioRemoteAction) + pictureInPictureActions.add(soundRemoteAction) } else { val muteIcon = Icon.createWithResource(this@EmulationActivity, R.drawable.ic_pip_mute) val mutePendingIntent = PendingIntent.getBroadcast( @@ -362,17 +360,10 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { } else if (intent.action == actionPause) { if (!NativeLibrary.isPaused()) NativeLibrary.pauseEmulation() } - if (intent.action == actionAudio) { - if (isAudioMuted) { - IntSetting.AUDIO_VOLUME.int = userAudio - isAudioMuted = false - } + if (intent.action == actionSound) { + if (NativeLibrary.isMuted()) NativeLibrary.unMuteAudio() } else if (intent.action == actionMute) { - if (!isAudioMuted) { - isAudioMuted = true - userAudio = IntSetting.AUDIO_VOLUME.int - IntSetting.AUDIO_VOLUME.int = 0 - } + if (!NativeLibrary.isMuted()) NativeLibrary.muteAudio() } buildPictureInPictureParams() } @@ -387,6 +378,8 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { IntentFilter().apply { addAction(actionPause) addAction(actionPlay) + addAction(actionMute) + addAction(actionSound) }.also { registerReceiver(pictureInPictureReceiver, it) } @@ -395,6 +388,8 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { unregisterReceiver(pictureInPictureReceiver) } catch (ignored: Exception) { } + // Always resume audio, since there is no UI button + if (NativeLibrary.isMuted()) NativeLibrary.unMuteAudio() } } diff --git a/src/android/app/src/main/jni/CMakeLists.txt b/src/android/app/src/main/jni/CMakeLists.txt index 041781577..e2ed08e9f 100644 --- a/src/android/app/src/main/jni/CMakeLists.txt +++ b/src/android/app/src/main/jni/CMakeLists.txt @@ -14,7 +14,6 @@ add_library(yuzu-android SHARED id_cache.cpp id_cache.h native.cpp - native.h ) set_property(TARGET yuzu-android PROPERTY IMPORTED_LOCATION ${FFmpeg_LIBRARY_DIR}) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 632aa50b3..07c2a7850 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include "common/detached_tasks.h" #include "common/dynamic_library.h" @@ -526,35 +527,32 @@ static Core::SystemResultStatus RunEmulation(const std::string& filepath) { extern "C" { -void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceChanged(JNIEnv* env, - [[maybe_unused]] jclass clazz, - jobject surf) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceChanged(JNIEnv* env, jclass clazz, jobject surf) { EmulationSession::GetInstance().SetNativeWindow(ANativeWindow_fromSurface(env, surf)); EmulationSession::GetInstance().SurfaceChanged(); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceDestroyed(JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceDestroyed(JNIEnv* env, jclass clazz) { ANativeWindow_release(EmulationSession::GetInstance().NativeWindow()); EmulationSession::GetInstance().SetNativeWindow(nullptr); EmulationSession::GetInstance().SurfaceChanged(); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_setAppDirectory(JNIEnv* env, - [[maybe_unused]] jclass clazz, +void Java_org_yuzu_yuzu_1emu_NativeLibrary_setAppDirectory(JNIEnv* env, jclass clazz, jstring j_directory) { Common::FS::SetAppDirectory(GetJString(env, j_directory)); } -int Java_org_yuzu_yuzu_1emu_NativeLibrary_installFileToNand(JNIEnv* env, - [[maybe_unused]] jclass clazz, +int Java_org_yuzu_yuzu_1emu_NativeLibrary_installFileToNand(JNIEnv* env, jclass clazz, jstring j_file) { return EmulationSession::GetInstance().InstallFileToNand(GetJString(env, j_file)); } -void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeGpuDriver( - JNIEnv* env, [[maybe_unused]] jclass clazz, jstring hook_lib_dir, jstring custom_driver_dir, - jstring custom_driver_name, jstring file_redirect_dir) { +void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeGpuDriver(JNIEnv* env, jclass clazz, + jstring hook_lib_dir, + jstring custom_driver_dir, + jstring custom_driver_name, + jstring file_redirect_dir) { EmulationSession::GetInstance().InitializeGpuDriver( GetJString(env, hook_lib_dir), GetJString(env, custom_driver_dir), GetJString(env, custom_driver_name), GetJString(env, file_redirect_dir)); @@ -571,7 +569,7 @@ void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeGpuDriver( } jboolean JNICALL Java_org_yuzu_yuzu_1emu_utils_GpuDriverHelper_supportsCustomDriverLoading( - [[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject instance) { + JNIEnv* env, [[maybe_unused]] jobject instance) { #ifdef ARCHITECTURE_arm64 // If the KGSL device exists custom drivers can be loaded using adrenotools return SupportsCustomDriver(); @@ -580,49 +578,52 @@ jboolean JNICALL Java_org_yuzu_yuzu_1emu_utils_GpuDriverHelper_supportsCustomDri #endif } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadKeys(JNIEnv* env, - [[maybe_unused]] jclass clazz) { +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadKeys(JNIEnv* env, jclass clazz) { Core::Crypto::KeyManager::Instance().ReloadKeys(); return static_cast(Core::Crypto::KeyManager::Instance().AreKeysLoaded()); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_unPauseEmulation([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_unPauseEmulation(JNIEnv* env, jclass clazz) { EmulationSession::GetInstance().UnPauseEmulation(); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_pauseEmulation([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_pauseEmulation(JNIEnv* env, jclass clazz) { EmulationSession::GetInstance().PauseEmulation(); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_stopEmulation([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_stopEmulation(JNIEnv* env, jclass clazz) { EmulationSession::GetInstance().HaltEmulation(); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_resetRomMetadata([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_resetRomMetadata(JNIEnv* env, jclass clazz) { EmulationSession::GetInstance().ResetRomMetadata(); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isRunning([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isRunning(JNIEnv* env, jclass clazz) { return static_cast(EmulationSession::GetInstance().IsRunning()); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isPaused([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isPaused(JNIEnv* env, jclass clazz) { return static_cast(EmulationSession::GetInstance().IsPaused()); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isHandheldOnly([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_muteAduio(JNIEnv* env, jclass clazz) { + Settings::values.audio_muted = true; +} + +void Java_org_yuzu_yuzu_1emu_NativeLibrary_unMuteAudio(JNIEnv* env, jclass clazz) { + Settings::values.audio_muted = false; +} + +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isMuted(JNIEnv* env, jclass clazz) { + return static_cast(Settings::values.audio_muted.GetValue()); +} + +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isHandheldOnly(JNIEnv* env, jclass clazz) { return EmulationSession::GetInstance().IsHandheldOnly(); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_setDeviceType([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_setDeviceType(JNIEnv* env, jclass clazz, jint j_device, jint j_type) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().SetDeviceType(j_device, j_type); @@ -630,8 +631,7 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_setDeviceType([[maybe_unused]] JN return static_cast(true); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadConnectEvent([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadConnectEvent(JNIEnv* env, jclass clazz, jint j_device) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().OnGamepadConnectEvent(j_device); @@ -639,15 +639,14 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadConnectEvent([[maybe_unu return static_cast(true); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadDisconnectEvent( - [[maybe_unused]] JNIEnv* env, [[maybe_unused]] jclass clazz, jint j_device) { +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadDisconnectEvent(JNIEnv* env, jclass clazz, + jint j_device) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().OnGamepadDisconnectEvent(j_device); } return static_cast(true); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadButtonEvent([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadButtonEvent(JNIEnv* env, jclass clazz, [[maybe_unused]] jint j_device, jint j_button, jint action) { if (EmulationSession::GetInstance().IsRunning()) { @@ -659,8 +658,7 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadButtonEvent([[maybe_unus return static_cast(true); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadJoystickEvent([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadJoystickEvent(JNIEnv* env, jclass clazz, jint j_device, jint stick_id, jfloat x, jfloat y) { if (EmulationSession::GetInstance().IsRunning()) { @@ -670,9 +668,8 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadJoystickEvent([[maybe_un } jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadMotionEvent( - [[maybe_unused]] JNIEnv* env, [[maybe_unused]] jclass clazz, jint j_device, - jlong delta_timestamp, jfloat gyro_x, jfloat gyro_y, jfloat gyro_z, jfloat accel_x, - jfloat accel_y, jfloat accel_z) { + JNIEnv* env, jclass clazz, jint j_device, jlong delta_timestamp, jfloat gyro_x, jfloat gyro_y, + jfloat gyro_z, jfloat accel_x, jfloat accel_y, jfloat accel_z) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().Window().OnGamepadMotionEvent( j_device, delta_timestamp, gyro_x, gyro_y, gyro_z, accel_x, accel_y, accel_z); @@ -680,8 +677,7 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadMotionEvent( return static_cast(true); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onReadNfcTag([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onReadNfcTag(JNIEnv* env, jclass clazz, jbyteArray j_data) { jboolean isCopy{false}; std::span data(reinterpret_cast(env->GetByteArrayElements(j_data, &isCopy)), @@ -693,39 +689,34 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onReadNfcTag([[maybe_unused]] JNI return static_cast(true); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onRemoveNfcTag([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onRemoveNfcTag(JNIEnv* env, jclass clazz) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().Window().OnRemoveNfcTag(); } return static_cast(true); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchPressed([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, jint id, +void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchPressed(JNIEnv* env, jclass clazz, jint id, jfloat x, jfloat y) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().Window().OnTouchPressed(id, x, y); } } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchMoved([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, jint id, +void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchMoved(JNIEnv* env, jclass clazz, jint id, jfloat x, jfloat y) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().Window().OnTouchMoved(id, x, y); } } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchReleased([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, jint id) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchReleased(JNIEnv* env, jclass clazz, jint id) { if (EmulationSession::GetInstance().IsRunning()) { EmulationSession::GetInstance().Window().OnTouchReleased(id); } } -jbyteArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getIcon([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jbyteArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getIcon(JNIEnv* env, jclass clazz, [[maybe_unused]] jstring j_filename) { auto icon_data = EmulationSession::GetInstance().GetRomIcon(GetJString(env, j_filename)); jbyteArray icon = env->NewByteArray(static_cast(icon_data.size())); @@ -734,67 +725,58 @@ jbyteArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getIcon([[maybe_unused]] JNIEnv return icon; } -jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getTitle([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getTitle(JNIEnv* env, jclass clazz, [[maybe_unused]] jstring j_filename) { auto title = EmulationSession::GetInstance().GetRomTitle(GetJString(env, j_filename)); return env->NewStringUTF(title.c_str()); } -jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getDescription([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getDescription(JNIEnv* env, jclass clazz, jstring j_filename) { return j_filename; } -jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getGameId([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getGameId(JNIEnv* env, jclass clazz, jstring j_filename) { return j_filename; } -jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getRegions([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getRegions(JNIEnv* env, jclass clazz, [[maybe_unused]] jstring j_filename) { return env->NewStringUTF(""); } -jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCompany([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCompany(JNIEnv* env, jclass clazz, [[maybe_unused]] jstring j_filename) { return env->NewStringUTF(""); } -jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isHomebrew([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isHomebrew(JNIEnv* env, jclass clazz, [[maybe_unused]] jstring j_filename) { return EmulationSession::GetInstance().GetIsHomebrew(GetJString(env, j_filename)); } void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmulation - [[maybe_unused]] (JNIEnv* env, [[maybe_unused]] jclass clazz) { + [[maybe_unused]] (JNIEnv* env, jclass clazz) { // Create the default config.ini. Config{}; // Initialize the emulated system. EmulationSession::GetInstance().System().Initialize(); } -jint Java_org_yuzu_yuzu_1emu_NativeLibrary_defaultCPUCore([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +jint Java_org_yuzu_yuzu_1emu_NativeLibrary_defaultCPUCore(JNIEnv* env, jclass clazz) { return {}; } void Java_org_yuzu_yuzu_1emu_NativeLibrary_run__Ljava_lang_String_2Ljava_lang_String_2Z( - [[maybe_unused]] JNIEnv* env, [[maybe_unused]] jclass clazz, [[maybe_unused]] jstring j_file, + JNIEnv* env, jclass clazz, [[maybe_unused]] jstring j_file, [[maybe_unused]] jstring j_savestate, [[maybe_unused]] jboolean j_delete_savestate) {} -void Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadSettings([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadSettings(JNIEnv* env, jclass clazz) { Config{}; } -jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getUserSetting([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getUserSetting(JNIEnv* env, jclass clazz, jstring j_game_id, jstring j_section, jstring j_key) { std::string_view game_id = env->GetStringUTFChars(j_game_id, 0); @@ -808,8 +790,7 @@ jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getUserSetting([[maybe_unused]] JN return env->NewStringUTF(""); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_setUserSetting([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +void Java_org_yuzu_yuzu_1emu_NativeLibrary_setUserSetting(JNIEnv* env, jclass clazz, jstring j_game_id, jstring j_section, jstring j_key, jstring j_value) { std::string_view game_id = env->GetStringUTFChars(j_game_id, 0); @@ -823,16 +804,14 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_setUserSetting([[maybe_unused]] JNIEn env->ReleaseStringUTFChars(j_value, value.data()); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_initGameIni([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +void Java_org_yuzu_yuzu_1emu_NativeLibrary_initGameIni(JNIEnv* env, jclass clazz, jstring j_game_id) { std::string_view game_id = env->GetStringUTFChars(j_game_id, 0); env->ReleaseStringUTFChars(j_game_id, game_id.data()); } -jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jclass clazz) { jdoubleArray j_stats = env->NewDoubleArray(4); if (EmulationSession::GetInstance().IsRunning()) { @@ -848,11 +827,11 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats([[maybe_unused]] return j_stats; } -void Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_setSysDirectory( - [[maybe_unused]] JNIEnv* env, [[maybe_unused]] jclass clazz, jstring j_path) {} +void Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_setSysDirectory(JNIEnv* env, + jclass clazz, + jstring j_path) {} -void Java_org_yuzu_yuzu_1emu_NativeLibrary_run__Ljava_lang_String_2([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz, +void Java_org_yuzu_yuzu_1emu_NativeLibrary_run__Ljava_lang_String_2(JNIEnv* env, jclass clazz, jstring j_path) { const std::string path = GetJString(env, j_path); @@ -863,8 +842,7 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_run__Ljava_lang_String_2([[maybe_unus } } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_logDeviceInfo([[maybe_unused]] JNIEnv* env, - [[maybe_unused]] jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_logDeviceInfo(JNIEnv* env, jclass clazz) { LOG_INFO(Frontend, "yuzu Version: {}-{}", Common::g_scm_branch, Common::g_scm_desc); LOG_INFO(Frontend, "Host OS: Android API level {}", android_get_device_api_level()); } diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h deleted file mode 100644 index 24dcbbcb8..000000000 --- a/src/android/app/src/main/jni/native.h +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include - -// Function calls from the Java side -#ifdef __cplusplus -extern "C" { -#endif - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_UnPauseEmulation(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_PauseEmulation(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_StopEmulation(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_ResetRomMetadata(JNIEnv* env, - jclass clazz); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_IsRunning(JNIEnv* env, - jclass clazz); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_isHandheldOnly(JNIEnv* env, - jclass clazz); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_setDeviceType(JNIEnv* env, - jclass clazz, - jstring j_device, - jstring j_type); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadConnectEvent( - JNIEnv* env, jclass clazz, jstring j_device); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadDisconnectEvent( - JNIEnv* env, jclass clazz, jstring j_device); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadEvent( - JNIEnv* env, jclass clazz, jstring j_device, jint j_button, jint action); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadMoveEvent( - JNIEnv* env, jclass clazz, jstring j_device, jint axis, jfloat x, jfloat y); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadAxisEvent( - JNIEnv* env, jclass clazz, jstring j_device, jint axis_id, jfloat axis_val); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onReadNfcTag(JNIEnv* env, - jclass clazz, - jbyteArray j_data); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onRemoveNfcTag(JNIEnv* env, - jclass clazz); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchEvent(JNIEnv* env, - jclass clazz, - jfloat x, jfloat y, - jboolean pressed); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchMoved(JNIEnv* env, jclass clazz, - jfloat x, jfloat y); - -JNIEXPORT jbyteArray JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetIcon(JNIEnv* env, - jclass clazz, - jstring j_file); - -JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetTitle(JNIEnv* env, jclass clazz, - jstring j_filename); - -JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetDescription(JNIEnv* env, - jclass clazz, - jstring j_filename); - -JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetGameId(JNIEnv* env, jclass clazz, - jstring j_filename); - -JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetRegions(JNIEnv* env, - jclass clazz, - jstring j_filename); - -JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetCompany(JNIEnv* env, - jclass clazz, - jstring j_filename); - -JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetGitRevision(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SetAppDirectory(JNIEnv* env, - jclass clazz, - jstring j_directory); - -JNIEXPORT void JNICALL -Java_org_yuzu_yuzu_1emu_NativeLibrary_Java_org_yuzu_yuzu_1emu_NativeLibrary_InitializeGpuDriver( - JNIEnv* env, jclass clazz, jstring hook_lib_dir, jstring custom_driver_dir, - jstring custom_driver_name, jstring file_redirect_dir); - -JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_ReloadKeys(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_SetSysDirectory( - JNIEnv* env, jclass clazz, jstring path_); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SetSysDirectory(JNIEnv* env, - jclass clazz, - jstring path); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_InitializeEmulation(JNIEnv* env, - jclass clazz); - -JNIEXPORT jint JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_DefaultCPUCore(JNIEnv* env, - jclass clazz); -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SetProfiling(JNIEnv* env, jclass clazz, - jboolean enable); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_WriteProfileResults(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_NotifyOrientationChange( - JNIEnv* env, jclass clazz, jint layout_option, jint rotation); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_Run__Ljava_lang_String_2( - JNIEnv* env, jclass clazz, jstring j_path); - -JNIEXPORT void JNICALL -Java_org_yuzu_yuzu_1emu_NativeLibrary_Run__Ljava_lang_String_2Ljava_lang_String_2Z( - JNIEnv* env, jclass clazz, jstring j_file, jstring j_savestate, jboolean j_delete_savestate); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SurfaceChanged(JNIEnv* env, - jclass clazz, - jobject surf); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SurfaceDestroyed(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_InitGameIni(JNIEnv* env, jclass clazz, - jstring j_game_id); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_ReloadSettings(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SetUserSetting( - JNIEnv* env, jclass clazz, jstring j_game_id, jstring j_section, jstring j_key, - jstring j_value); - -JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetUserSetting( - JNIEnv* env, jclass clazz, jstring game_id, jstring section, jstring key); - -JNIEXPORT jdoubleArray JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_GetPerfStats(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_LogDeviceInfo(JNIEnv* env, - jclass clazz); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SubmitInlineKeyboardText( - JNIEnv* env, jclass clazz, jstring j_text); - -JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SubmitInlineKeyboardInput( - JNIEnv* env, jclass clazz, jint j_key_code); - -#ifdef __cplusplus -} -#endif diff --git a/src/android/app/src/main/res/drawable/ic_pip_audio.xml b/src/android/app/src/main/res/drawable/ic_pip_sound.xml similarity index 100% rename from src/android/app/src/main/res/drawable/ic_pip_audio.xml rename to src/android/app/src/main/res/drawable/ic_pip_sound.xml diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index d4f089c7f..eb1d83693 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -388,7 +388,7 @@ Pause Play Mute - Audio + Sound Licenses From cfc6ef42d965ac9391080876fc25e5acb1d3af77 Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Sat, 17 Jun 2023 11:24:19 -0400 Subject: [PATCH 35/91] android: Refactor native and corresponding variables --- .../java/org/yuzu/yuzu_emu/NativeLibrary.kt | 4 +-- .../yuzu_emu/activities/EmulationActivity.kt | 35 ++++++++++--------- .../yuzu_emu/fragments/EmulationFragment.kt | 2 +- src/android/app/src/main/jni/native.cpp | 4 +-- .../{ic_pip_sound.xml => ic_pip_unmute.xml} | 0 .../app/src/main/res/values/strings.xml | 2 +- 6 files changed, 25 insertions(+), 22 deletions(-) rename src/android/app/src/main/res/drawable/{ic_pip_sound.xml => ic_pip_unmute.xml} (100%) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index 6a4e07046..9c32e044c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt @@ -286,7 +286,7 @@ object NativeLibrary { /** * Unpauses emulation from a paused state. */ - external fun unPauseEmulation() + external fun unpauseEmulation() /** * Pauses emulation. @@ -321,7 +321,7 @@ object NativeLibrary { /** * Unmutes emulation sound */ - external fun unMuteAudio(): Boolean + external fun unmuteAudio(): Boolean /** * Returns true if emulation audio is muted. diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index b77c21380..2b63388cc 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -64,7 +64,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { private val actionPause = "ACTION_EMULATOR_PAUSE" private val actionPlay = "ACTION_EMULATOR_PLAY" private val actionMute = "ACTION_EMULATOR_MUTE" - private val actionSound = "ACTION_EMULATOR_SOUND" + private val actionUnmute = "ACTION_EMULATOR_UNMUTE" private val settingsViewModel: SettingsViewModel by viewModels() @@ -308,20 +308,23 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { } if (NativeLibrary.isMuted()) { - val soundIcon = Icon.createWithResource(this@EmulationActivity, R.drawable.ic_pip_sound) - val soundPendingIntent = PendingIntent.getBroadcast( + val unmuteIcon = Icon.createWithResource( this@EmulationActivity, - R.drawable.ic_pip_sound, - Intent(actionSound), + R.drawable.ic_pip_unmute + ) + val unmutePendingIntent = PendingIntent.getBroadcast( + this@EmulationActivity, + R.drawable.ic_pip_unmute, + Intent(actionUnmute), pendingFlags ) - val soundRemoteAction = RemoteAction( - soundIcon, - getString(R.string.sound), - getString(R.string.sound), - soundPendingIntent + val unmuteRemoteAction = RemoteAction( + unmuteIcon, + getString(R.string.unmute), + getString(R.string.unmute), + unmutePendingIntent ) - pictureInPictureActions.add(soundRemoteAction) + pictureInPictureActions.add(unmuteRemoteAction) } else { val muteIcon = Icon.createWithResource(this@EmulationActivity, R.drawable.ic_pip_mute) val mutePendingIntent = PendingIntent.getBroadcast( @@ -356,12 +359,12 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { private var pictureInPictureReceiver = object : BroadcastReceiver() { override fun onReceive(context: Context?, intent: Intent) { if (intent.action == actionPlay) { - if (NativeLibrary.isPaused()) NativeLibrary.unPauseEmulation() + if (NativeLibrary.isPaused()) NativeLibrary.unpauseEmulation() } else if (intent.action == actionPause) { if (!NativeLibrary.isPaused()) NativeLibrary.pauseEmulation() } - if (intent.action == actionSound) { - if (NativeLibrary.isMuted()) NativeLibrary.unMuteAudio() + if (intent.action == actionUnmute) { + if (NativeLibrary.isMuted()) NativeLibrary.unmuteAudio() } else if (intent.action == actionMute) { if (!NativeLibrary.isMuted()) NativeLibrary.muteAudio() } @@ -379,7 +382,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { addAction(actionPause) addAction(actionPlay) addAction(actionMute) - addAction(actionSound) + addAction(actionUnmute) }.also { registerReceiver(pictureInPictureReceiver, it) } @@ -389,7 +392,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { } catch (ignored: Exception) { } // Always resume audio, since there is no UI button - if (NativeLibrary.isMuted()) NativeLibrary.unMuteAudio() + if (NativeLibrary.isMuted()) NativeLibrary.unmuteAudio() } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index 4643418c1..09976db62 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -714,7 +714,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { State.PAUSED -> { Log.debug("[EmulationFragment] Resuming emulation.") NativeLibrary.surfaceChanged(surface) - NativeLibrary.unPauseEmulation() + NativeLibrary.unpauseEmulation() } else -> Log.debug("[EmulationFragment] Bug, run called while already running.") diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 07c2a7850..6688416d6 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -583,7 +583,7 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadKeys(JNIEnv* env, jclass cl return static_cast(Core::Crypto::KeyManager::Instance().AreKeysLoaded()); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_unPauseEmulation(JNIEnv* env, jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_unpauseEmulation(JNIEnv* env, jclass clazz) { EmulationSession::GetInstance().UnPauseEmulation(); } @@ -611,7 +611,7 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_muteAduio(JNIEnv* env, jclass clazz) Settings::values.audio_muted = true; } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_unMuteAudio(JNIEnv* env, jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_unmuteAudio(JNIEnv* env, jclass clazz) { Settings::values.audio_muted = false; } diff --git a/src/android/app/src/main/res/drawable/ic_pip_sound.xml b/src/android/app/src/main/res/drawable/ic_pip_unmute.xml similarity index 100% rename from src/android/app/src/main/res/drawable/ic_pip_sound.xml rename to src/android/app/src/main/res/drawable/ic_pip_unmute.xml diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index eb1d83693..381dfbc3b 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -388,7 +388,7 @@ Pause Play Mute - Sound + Unmute Licenses From 699e78c666188a06ef218a54e0d85023f3fa93fc Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Fri, 16 Jun 2023 13:26:24 -0400 Subject: [PATCH 36/91] android: Add a notice when RAM inadequate --- .../yuzu_emu/activities/EmulationActivity.kt | 17 +++++- .../org/yuzu/yuzu_emu/utils/MemoryUtil.kt | 58 +++++++++++++++++++ .../app/src/main/res/values/strings.xml | 1 + 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index f0a6753a9..75d994c9c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -27,13 +27,13 @@ import android.view.MotionEvent import android.view.Surface import android.view.View import android.view.inputmethod.InputMethodManager +import android.widget.Toast import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.WindowInsetsControllerCompat import androidx.navigation.fragment.NavHostFragment -import kotlin.math.roundToInt import org.yuzu.yuzu_emu.NativeLibrary import org.yuzu.yuzu_emu.R import org.yuzu.yuzu_emu.databinding.ActivityEmulationBinding @@ -44,8 +44,10 @@ import org.yuzu.yuzu_emu.model.Game import org.yuzu.yuzu_emu.utils.ControllerMappingHelper import org.yuzu.yuzu_emu.utils.ForegroundService import org.yuzu.yuzu_emu.utils.InputHandler +import org.yuzu.yuzu_emu.utils.MemoryUtil import org.yuzu.yuzu_emu.utils.NfcReader import org.yuzu.yuzu_emu.utils.ThemeHelper +import kotlin.math.roundToInt class EmulationActivity : AppCompatActivity(), SensorEventListener { private lateinit var binding: ActivityEmulationBinding @@ -102,6 +104,19 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { inputHandler = InputHandler() inputHandler.initialize() + val memoryUtil = MemoryUtil(this) + if (memoryUtil.isLessThan(8, MemoryUtil.Gb)) { + Toast.makeText( + this, + getString( + R.string.device_memory_inadequate_description, + memoryUtil.getDeviceRAM(), + "8 GB" + ), + Toast.LENGTH_LONG + ).show() + } + // Start a foreground service to prevent the app from getting killed in the background val startIntent = Intent(this, ForegroundService::class.java) startForegroundService(startIntent) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt new file mode 100644 index 000000000..390767e47 --- /dev/null +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt @@ -0,0 +1,58 @@ +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +package org.yuzu.yuzu_emu.utils + +import android.app.ActivityManager +import android.content.Context +import java.util.Locale + +class MemoryUtil(context: Context) { + + private val Long.floatForm: String + get() = String.format(Locale.ROOT, "%.2f", this.toDouble()) + + private fun bytesToSizeUnit(size: Long): String { + return when { + size < Kb -> size.floatForm + " byte" + size < Mb -> (size / Kb).floatForm + " KB" + size < Gb -> (size / Mb).floatForm + " MB" + size < Tb -> (size / Gb).floatForm + " GB" + size < Pb -> (size / Tb).floatForm + " TB" + size < Eb -> (size / Pb).floatForm + " Pb" + else -> (size / Eb).floatForm + " Eb" + } + } + + private val totalMemory = + with(context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager) { + val memInfo = ActivityManager.MemoryInfo() + getMemoryInfo(memInfo) + memInfo.totalMem + } + + fun isLessThan(minimum: Int, size: Long): Boolean { + return when (size) { + Kb -> totalMemory < Mb && totalMemory < minimum + Mb -> totalMemory < Gb && (totalMemory / Mb) < minimum + Gb -> totalMemory < Tb && (totalMemory / Gb) < minimum + Tb -> totalMemory < Pb && (totalMemory / Tb) < minimum + Pb -> totalMemory < Eb && (totalMemory / Pb) < minimum + Eb -> totalMemory / Eb < minimum + else -> totalMemory < Kb && totalMemory < minimum + } + } + + fun getDeviceRAM(): String { + return bytesToSizeUnit(totalMemory) + } + + companion object { + const val Kb: Long = 1024 + const val Mb = Kb * 1024 + const val Gb = Mb * 1024 + const val Tb = Gb * 1024 + const val Pb = Tb * 1024 + const val Eb = Pb * 1024 + } +} diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index cc1d8c39d..7d37d2bee 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -270,6 +270,7 @@ Fatal Error A fatal error occurred. Check the log for details.\nContinuing emulation may result in crashes and bugs. Turning off this setting will significantly reduce emulation performance! For the best experience, it is recommended that you leave this setting enabled. + Device RAM: %1$s\nRecommended: %2$s Japan From 8b841aa7ba8b1bdcb6e631365c1bdc074867109c Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Wed, 21 Jun 2023 15:06:48 -0400 Subject: [PATCH 37/91] android: Convert memory sizes to resource --- .../yuzu_emu/activities/EmulationActivity.kt | 4 ++-- .../java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt | 17 +++++++++-------- src/android/app/src/main/res/values/strings.xml | 11 ++++++++++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index 75d994c9c..b1771b424 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -109,9 +109,9 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { Toast.makeText( this, getString( - R.string.device_memory_inadequate_description, + R.string.device_memory_inadequate, memoryUtil.getDeviceRAM(), - "8 GB" + "8 ${getString(R.string.memory_gigabyte)}" ), Toast.LENGTH_LONG ).show() diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt index 390767e47..18e5fa0b0 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt @@ -5,22 +5,23 @@ package org.yuzu.yuzu_emu.utils import android.app.ActivityManager import android.content.Context +import org.yuzu.yuzu_emu.R import java.util.Locale -class MemoryUtil(context: Context) { +class MemoryUtil(val context: Context) { private val Long.floatForm: String get() = String.format(Locale.ROOT, "%.2f", this.toDouble()) private fun bytesToSizeUnit(size: Long): String { return when { - size < Kb -> size.floatForm + " byte" - size < Mb -> (size / Kb).floatForm + " KB" - size < Gb -> (size / Mb).floatForm + " MB" - size < Tb -> (size / Gb).floatForm + " GB" - size < Pb -> (size / Tb).floatForm + " TB" - size < Eb -> (size / Pb).floatForm + " Pb" - else -> (size / Eb).floatForm + " Eb" + size < Kb -> "${size.floatForm} ${context.getString(R.string.memory_byte)}" + size < Mb -> "${(size / Kb).floatForm} ${context.getString(R.string.memory_kilobyte)}" + size < Gb -> "${(size / Mb).floatForm} ${context.getString(R.string.memory_megabyte)}" + size < Tb -> "${(size / Gb).floatForm} ${context.getString(R.string.memory_gigabyte)}" + size < Pb -> "${(size / Tb).floatForm} ${context.getString(R.string.memory_terabyte)}" + size < Eb -> "${(size / Pb).floatForm} ${context.getString(R.string.memory_petabyte)}" + else -> "${(size / Eb).floatForm} ${context.getString(R.string.memory_exabyte)}" } } diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 7d37d2bee..85fc682f2 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -270,7 +270,7 @@ Fatal Error A fatal error occurred. Check the log for details.\nContinuing emulation may result in crashes and bugs. Turning off this setting will significantly reduce emulation performance! For the best experience, it is recommended that you leave this setting enabled. - Device RAM: %1$s\nRecommended: %2$s + Device RAM: %1$s\nRecommended: %2$s Japan @@ -301,6 +301,15 @@ Traditional Chinese (正體中文) Brazilian Portuguese (Português do Brasil) + + Byte + KB + MB + GB + TB + PB + EB + Vulkan None From 6c7e284f64dd4f2f02014dd6488924a0343a3292 Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Thu, 15 Jun 2023 22:36:03 -0400 Subject: [PATCH 38/91] android: Add support for concurrent installs --- .../fragments/InstallDialogFragment.kt | 62 +++++++++ .../org/yuzu/yuzu_emu/ui/main/MainActivity.kt | 118 +++++++++++++----- .../app/src/main/res/values/strings.xml | 14 ++- 3 files changed, 154 insertions(+), 40 deletions(-) create mode 100644 src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallDialogFragment.kt diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallDialogFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallDialogFragment.kt new file mode 100644 index 000000000..d8850f941 --- /dev/null +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallDialogFragment.kt @@ -0,0 +1,62 @@ +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +package org.yuzu.yuzu_emu.fragments + +import android.app.Dialog +import android.content.Intent +import android.net.Uri +import android.os.Bundle +import androidx.fragment.app.DialogFragment +import com.google.android.material.dialog.MaterialAlertDialogBuilder +import org.yuzu.yuzu_emu.R + +class InstallDialogFragment : DialogFragment() { + override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { + val titleId = requireArguments().getInt(TITLE) + val description = requireArguments().getString(DESCRIPTION) + val helpLinkId = requireArguments().getInt(HELP_LINK) + + val dialog = MaterialAlertDialogBuilder(requireContext()) + .setPositiveButton(R.string.close, null) + .setTitle(titleId) + .setMessage(description) + + if (helpLinkId != 0) { + dialog.setNeutralButton(R.string.learn_more) { _, _ -> + openLink(getString(helpLinkId)) + } + } + + return dialog.show() + } + + private fun openLink(link: String) { + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(link)) + startActivity(intent) + } + + companion object { + const val TAG = "MessageDialogFragment" + + private const val TITLE = "Title" + private const val DESCRIPTION = "Description" + private const val HELP_LINK = "Link" + + fun newInstance( + titleId: Int, + description: String, + helpLinkId: Int = 0 + ): InstallDialogFragment { + val dialog = InstallDialogFragment() + val bundle = Bundle() + bundle.apply { + putInt(TITLE, titleId) + putString(DESCRIPTION, description) + putInt(HELP_LINK, helpLinkId) + } + dialog.arguments = bundle + return dialog + } + } +} diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index cc1d87f1b..5257d7b36 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt @@ -4,6 +4,7 @@ package org.yuzu.yuzu_emu.ui.main import android.content.Intent +import android.net.Uri import android.os.Bundle import android.view.View import android.view.ViewGroup.MarginLayoutParams @@ -42,6 +43,7 @@ import org.yuzu.yuzu_emu.features.settings.model.SettingsViewModel import org.yuzu.yuzu_emu.features.settings.ui.SettingsActivity import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile import org.yuzu.yuzu_emu.fragments.IndeterminateProgressDialogFragment +import org.yuzu.yuzu_emu.fragments.InstallDialogFragment import org.yuzu.yuzu_emu.fragments.MessageDialogFragment import org.yuzu.yuzu_emu.model.GamesViewModel import org.yuzu.yuzu_emu.model.HomeViewModel @@ -481,62 +483,110 @@ class MainActivity : AppCompatActivity(), ThemeProvider { } } - val installGameUpdate = - registerForActivityResult(ActivityResultContracts.OpenDocument()) { - if (it == null) { - return@registerForActivityResult - } - + val installGameUpdate = registerForActivityResult( + ActivityResultContracts.OpenMultipleDocuments() + ) { documents: List -> + if (documents.isNotEmpty()) { IndeterminateProgressDialogFragment.newInstance( this@MainActivity, R.string.install_game_content ) { - val result = NativeLibrary.installFileToNand(it.toString()) + var installSuccess = 0 + var installOverwrite = 0 + var errorBaseGame = 0 + var errorExtension = 0 + var errorOther = 0 + var errorTotal = 0 lifecycleScope.launch { - withContext(Dispatchers.Main) { - when (result) { + documents.forEach { + when (NativeLibrary.installFileToNand(it.toString())) { NativeLibrary.InstallFileToNandResult.Success -> { - Toast.makeText( - applicationContext, - R.string.install_game_content_success, - Toast.LENGTH_SHORT - ).show() + installSuccess += 1 } NativeLibrary.InstallFileToNandResult.SuccessFileOverwritten -> { - Toast.makeText( - applicationContext, - R.string.install_game_content_success_overwrite, - Toast.LENGTH_SHORT - ).show() + installOverwrite += 1 } NativeLibrary.InstallFileToNandResult.ErrorBaseGame -> { - MessageDialogFragment.newInstance( - R.string.install_game_content_failure, - R.string.install_game_content_failure_base - ).show(supportFragmentManager, MessageDialogFragment.TAG) + errorBaseGame += 1 } NativeLibrary.InstallFileToNandResult.ErrorFilenameExtension -> { - MessageDialogFragment.newInstance( - R.string.install_game_content_failure, - R.string.install_game_content_failure_file_extension, - R.string.install_game_content_help_link - ).show(supportFragmentManager, MessageDialogFragment.TAG) + errorExtension += 1 } else -> { - MessageDialogFragment.newInstance( - R.string.install_game_content_failure, - R.string.install_game_content_failure_description, - R.string.install_game_content_help_link - ).show(supportFragmentManager, MessageDialogFragment.TAG) + errorOther += 1 } } } + withContext(Dispatchers.Main) { + val separator = System.getProperty("line.separator") ?: "\n" + val installResult = StringBuilder() + if (installSuccess > 0) { + installResult.append( + getString( + R.string.install_game_content_success_install, + installSuccess + ) + ) + installResult.append(separator) + } + if (installOverwrite > 0) { + installResult.append( + getString( + R.string.install_game_content_success_overwrite, + installOverwrite + ) + ) + installResult.append(separator) + } + errorTotal = errorBaseGame + errorExtension + errorOther + if (errorTotal > 0) { + installResult.append(separator) + installResult.append( + getString( + R.string.install_game_content_failed_count, + + ) + ) + installResult.append(separator) + if (errorBaseGame > 0) { + installResult.append(separator) + installResult.append( + getString(R.string.install_game_content_failure_base) + ) + installResult.append(separator) + } + if (errorExtension > 0) { + installResult.append(separator) + installResult.append( + getString(R.string.install_game_content_failure_file_extension) + ) + installResult.append(separator) + } + if (errorOther > 0) { + installResult.append( + getString(R.string.install_game_content_failure_description) + ) + installResult.append(separator) + } + InstallDialogFragment.newInstance( + R.string.install_game_content_failure, + installResult.toString().trim(), + R.string.install_game_content_help_link + ).show(supportFragmentManager, MessageDialogFragment.TAG) + } else { + InstallDialogFragment.newInstance( + R.string.install_game_content_success, + installResult.toString().trim(), + ).show(supportFragmentManager, MessageDialogFragment.TAG) + } + } } - return@newInstance result + return@newInstance installSuccess + installOverwrite + errorTotal }.show(supportFragmentManager, IndeterminateProgressDialogFragment.TAG) } + } } diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index cc1d8c39d..75eca30a1 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -104,12 +104,14 @@ No log file found Install game content Install game updates or DLC - Error installing file to NAND - Game content installation failed. Please ensure content is valid and that the prod.keys file is installed. - Installation of base games isn\'t permitted in order to avoid possible conflicts. Please select an update or DLC instead. - The selected file type is not supported. Only NSP and XCI content is supported for this action. Please verify the game content is valid. - Game content installed successfully - Game content was overwritten successfully + Error installing file(s) to NAND + Please ensure content(s) are valid and that the prod.keys file is installed. + Installation of base games isn\'t permitted in order to avoid possible conflicts. + Only NSP and XCI content is supported. Please verify the game content(s) are valid. + %1$d installation error(s) + Game content(s) installed successfully + %1$d installed successfully + %1$d overwritten successfully https://yuzu-emu.org/help/quickstart/#dumping-installed-updates From 1a85d8804a044d689e53b2497be01b65c76c34d2 Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Fri, 16 Jun 2023 07:50:47 -0400 Subject: [PATCH 39/91] android: Generalize string message dialog --- ...logFragment.kt => LongMessageDialogFragment.kt} | 8 ++++---- .../java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) rename src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/{InstallDialogFragment.kt => LongMessageDialogFragment.kt} (89%) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallDialogFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/LongMessageDialogFragment.kt similarity index 89% rename from src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallDialogFragment.kt rename to src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/LongMessageDialogFragment.kt index d8850f941..b29b627e9 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallDialogFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/LongMessageDialogFragment.kt @@ -11,7 +11,7 @@ import androidx.fragment.app.DialogFragment import com.google.android.material.dialog.MaterialAlertDialogBuilder import org.yuzu.yuzu_emu.R -class InstallDialogFragment : DialogFragment() { +class LongMessageDialogFragment : DialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val titleId = requireArguments().getInt(TITLE) val description = requireArguments().getString(DESCRIPTION) @@ -37,7 +37,7 @@ class InstallDialogFragment : DialogFragment() { } companion object { - const val TAG = "MessageDialogFragment" + const val TAG = "LongMessageDialogFragment" private const val TITLE = "Title" private const val DESCRIPTION = "Description" @@ -47,8 +47,8 @@ class InstallDialogFragment : DialogFragment() { titleId: Int, description: String, helpLinkId: Int = 0 - ): InstallDialogFragment { - val dialog = InstallDialogFragment() + ): LongMessageDialogFragment { + val dialog = LongMessageDialogFragment() val bundle = Bundle() bundle.apply { putInt(TITLE, titleId) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index 5257d7b36..3086cfad3 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt @@ -43,7 +43,7 @@ import org.yuzu.yuzu_emu.features.settings.model.SettingsViewModel import org.yuzu.yuzu_emu.features.settings.ui.SettingsActivity import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile import org.yuzu.yuzu_emu.fragments.IndeterminateProgressDialogFragment -import org.yuzu.yuzu_emu.fragments.InstallDialogFragment +import org.yuzu.yuzu_emu.fragments.LongMessageDialogFragment import org.yuzu.yuzu_emu.fragments.MessageDialogFragment import org.yuzu.yuzu_emu.model.GamesViewModel import org.yuzu.yuzu_emu.model.HomeViewModel @@ -548,7 +548,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider { installResult.append( getString( R.string.install_game_content_failed_count, - + errorTotal ) ) installResult.append(separator) @@ -572,16 +572,16 @@ class MainActivity : AppCompatActivity(), ThemeProvider { ) installResult.append(separator) } - InstallDialogFragment.newInstance( + LongMessageDialogFragment.newInstance( R.string.install_game_content_failure, installResult.toString().trim(), R.string.install_game_content_help_link - ).show(supportFragmentManager, MessageDialogFragment.TAG) + ).show(supportFragmentManager, LongMessageDialogFragment.TAG) } else { - InstallDialogFragment.newInstance( + LongMessageDialogFragment.newInstance( R.string.install_game_content_success, - installResult.toString().trim(), - ).show(supportFragmentManager, MessageDialogFragment.TAG) + installResult.toString().trim() + ).show(supportFragmentManager, LongMessageDialogFragment.TAG) } } } From 106b61b1e0a435be883a780c8706854635e84acf Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Sat, 20 May 2023 12:42:37 -0600 Subject: [PATCH 40/91] externals: Update sdl to 2.28.0 --- CMakeLists.txt | 4 ++-- externals/SDL | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d3146c9e..f5ef0ef50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -489,7 +489,7 @@ if (ENABLE_SDL2) if (YUZU_USE_BUNDLED_SDL2) # Detect toolchain and platform if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) - set(SDL2_VER "SDL2-2.0.18") + set(SDL2_VER "SDL2-2.28.0") else() message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.") endif() @@ -509,7 +509,7 @@ if (ENABLE_SDL2) elseif (YUZU_USE_EXTERNAL_SDL2) message(STATUS "Using SDL2 from externals.") else() - find_package(SDL2 2.0.18 REQUIRED) + find_package(SDL2 2.26.4 REQUIRED) endif() endif() diff --git a/externals/SDL b/externals/SDL index f17058b56..ffa78e6be 160000 --- a/externals/SDL +++ b/externals/SDL @@ -1 +1 @@ -Subproject commit f17058b562c8a1090c0c996b42982721ace90903 +Subproject commit ffa78e6bead23e2ba3adf8ec2367ff2218d4343c From 84d43489c5df9f450efb0293cc58161d08e3b882 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Fri, 16 Jun 2023 21:57:21 -0600 Subject: [PATCH 41/91] input_common: Implement native mifare support --- src/common/input.h | 43 +- src/core/hid/emulated_controller.cpp | 82 +++- src/core/hid/emulated_controller.h | 28 +- src/core/hid/input_converter.cpp | 6 +- .../hle/service/am/applets/applet_cabinet.cpp | 2 +- src/core/hle/service/nfc/common/device.cpp | 182 ++++---- src/core/hle/service/nfc/common/device.h | 10 +- .../hle/service/nfc/common/device_manager.cpp | 11 +- .../hle/service/nfc/common/device_manager.h | 2 +- src/core/hle/service/nfc/mifare_types.h | 11 +- src/core/hle/service/nfc/nfc_interface.cpp | 7 +- src/input_common/drivers/joycon.cpp | 133 +++++- src/input_common/drivers/joycon.h | 18 +- src/input_common/drivers/virtual_amiibo.cpp | 130 +++++- src/input_common/drivers/virtual_amiibo.h | 16 +- src/input_common/helpers/joycon_driver.cpp | 122 +++++- src/input_common/helpers/joycon_driver.h | 6 + .../helpers/joycon_protocol/joycon_types.h | 59 ++- .../helpers/joycon_protocol/nfc.cpp | 396 +++++++++++++++++- .../helpers/joycon_protocol/nfc.h | 34 +- .../helpers/joycon_protocol/poller.cpp | 4 +- .../helpers/joycon_protocol/poller.h | 4 +- src/input_common/input_engine.h | 34 ++ src/input_common/input_poller.cpp | 24 +- src/yuzu/main.cpp | 4 +- 25 files changed, 1170 insertions(+), 198 deletions(-) diff --git a/src/common/input.h b/src/common/input.h index 66fb15f0a..ea30770ae 100644 --- a/src/common/input.h +++ b/src/common/input.h @@ -86,7 +86,7 @@ enum class NfcState { NewAmiibo, WaitingForAmiibo, AmiiboRemoved, - NotAnAmiibo, + InvalidTagType, NotSupported, WrongDeviceState, WriteFailed, @@ -218,8 +218,22 @@ struct CameraStatus { }; struct NfcStatus { - NfcState state{}; - std::vector data{}; + NfcState state{NfcState::Unknown}; + u8 uuid_length; + u8 protocol; + u8 tag_type; + std::array uuid; +}; + +struct MifareData { + u8 command; + u8 sector; + std::array key; + std::array data; +}; + +struct MifareRequest { + std::array data; }; // List of buttons to be passed to Qt that can be translated @@ -294,7 +308,7 @@ struct CallbackStatus { BatteryStatus battery_status{}; VibrationStatus vibration_status{}; CameraFormat camera_status{CameraFormat::None}; - NfcState nfc_status{NfcState::Unknown}; + NfcStatus nfc_status{}; std::vector raw_data{}; }; @@ -356,9 +370,30 @@ public: return NfcState::NotSupported; } + virtual NfcState StartNfcPolling() { + return NfcState::NotSupported; + } + + virtual NfcState StopNfcPolling() { + return NfcState::NotSupported; + } + + virtual NfcState ReadAmiiboData([[maybe_unused]] std::vector& out_data) { + return NfcState::NotSupported; + } + virtual NfcState WriteNfcData([[maybe_unused]] const std::vector& data) { return NfcState::NotSupported; } + + virtual NfcState ReadMifareData([[maybe_unused]] const MifareRequest& request, + [[maybe_unused]] MifareRequest& out_data) { + return NfcState::NotSupported; + } + + virtual NfcState WriteMifareData([[maybe_unused]] const MifareRequest& request) { + return NfcState::NotSupported; + } }; /// An abstract class template for a factory that can create input devices. diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 0a7777732..c937495f9 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -149,12 +149,16 @@ void EmulatedController::LoadDevices() { camera_params[0] = right_joycon; camera_params[0].Set("camera", true); - camera_params[1] = Common::ParamPackage{"engine:camera,camera:1"}; - ring_params[1] = Common::ParamPackage{"engine:joycon,axis_x:100,axis_y:101"}; - nfc_params[0] = Common::ParamPackage{"engine:virtual_amiibo,nfc:1"}; nfc_params[1] = right_joycon; nfc_params[1].Set("nfc", true); + // Only map virtual devices to the first controller + if (npad_id_type == NpadIdType::Player1 || npad_id_type == NpadIdType::Handheld) { + camera_params[1] = Common::ParamPackage{"engine:camera,camera:1"}; + ring_params[1] = Common::ParamPackage{"engine:joycon,axis_x:100,axis_y:101"}; + nfc_params[0] = Common::ParamPackage{"engine:virtual_amiibo,nfc:1"}; + } + output_params[LeftIndex] = left_joycon; output_params[RightIndex] = right_joycon; output_params[2] = camera_params[1]; @@ -1176,10 +1180,7 @@ void EmulatedController::SetNfc(const Common::Input::CallbackStatus& callback) { return; } - controller.nfc_state = { - controller.nfc_values.state, - controller.nfc_values.data, - }; + controller.nfc_state = controller.nfc_values; } bool EmulatedController::SetVibration(std::size_t device_index, VibrationValue vibration) { @@ -1308,6 +1309,73 @@ bool EmulatedController::HasNfc() const { return is_connected && (has_virtual_nfc && is_virtual_nfc_supported); } +bool EmulatedController::AddNfcHandle() { + nfc_handles++; + return SetPollingMode(EmulatedDeviceIndex::RightIndex, Common::Input::PollingMode::NFC) == + Common::Input::DriverResult::Success; +} + +bool EmulatedController::RemoveNfcHandle() { + nfc_handles--; + if (nfc_handles <= 0) { + return SetPollingMode(EmulatedDeviceIndex::RightIndex, + Common::Input::PollingMode::Active) == + Common::Input::DriverResult::Success; + } + return true; +} + +bool EmulatedController::StartNfcPolling() { + auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; + auto& nfc_virtual_output_device = output_devices[3]; + + return nfc_output_device->StartNfcPolling() == Common::Input::NfcState::Success || + nfc_virtual_output_device->StartNfcPolling() == Common::Input::NfcState::Success; +} + +bool EmulatedController::StopNfcPolling() { + auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; + auto& nfc_virtual_output_device = output_devices[3]; + + return nfc_output_device->StopNfcPolling() == Common::Input::NfcState::Success || + nfc_virtual_output_device->StopNfcPolling() == Common::Input::NfcState::Success; +} + +bool EmulatedController::ReadAmiiboData(std::vector& data) { + auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; + auto& nfc_virtual_output_device = output_devices[3]; + + if (nfc_output_device->ReadAmiiboData(data) == Common::Input::NfcState::Success) { + return true; + } + + return nfc_virtual_output_device->ReadAmiiboData(data) == Common::Input::NfcState::Success; +} + +bool EmulatedController::ReadMifareData(const Common::Input::MifareRequest& request, + Common::Input::MifareRequest& out_data) { + auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; + auto& nfc_virtual_output_device = output_devices[3]; + + if (nfc_output_device->ReadMifareData(request, out_data) == Common::Input::NfcState::Success) { + return true; + } + + return nfc_virtual_output_device->ReadMifareData(request, out_data) == + Common::Input::NfcState::Success; +} + +bool EmulatedController::WriteMifareData(const Common::Input::MifareRequest& request) { + auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; + auto& nfc_virtual_output_device = output_devices[3]; + + if (nfc_output_device->WriteMifareData(request) == Common::Input::NfcState::Success) { + return true; + } + + return nfc_virtual_output_device->WriteMifareData(request) == Common::Input::NfcState::Success; +} + bool EmulatedController::WriteNfc(const std::vector& data) { auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; auto& nfc_virtual_output_device = output_devices[3]; diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h index 09fe1a0ab..d511e5fac 100644 --- a/src/core/hid/emulated_controller.h +++ b/src/core/hid/emulated_controller.h @@ -97,10 +97,7 @@ struct RingSensorForce { f32 force; }; -struct NfcState { - Common::Input::NfcState state{}; - std::vector data{}; -}; +using NfcState = Common::Input::NfcStatus; struct ControllerMotion { Common::Vec3f accel{}; @@ -393,9 +390,31 @@ public: /// Returns true if the device has nfc support bool HasNfc() const; + /// Sets the joycon in nfc mode and increments the handle count + bool AddNfcHandle(); + + /// Decrements the handle count if zero sets the joycon in active mode + bool RemoveNfcHandle(); + + /// Start searching for nfc tags + bool StartNfcPolling(); + + /// Stop searching for nfc tags + bool StopNfcPolling(); + + /// Returns true if the nfc tag was readable + bool ReadAmiiboData(std::vector& data); + /// Returns true if the nfc tag was written bool WriteNfc(const std::vector& data); + /// Returns true if the nfc tag was readable + bool ReadMifareData(const Common::Input::MifareRequest& request, + Common::Input::MifareRequest& out_data); + + /// Returns true if the nfc tag was written + bool WriteMifareData(const Common::Input::MifareRequest& request); + /// Returns the led pattern corresponding to this emulated controller LedPattern GetLedPattern() const; @@ -532,6 +551,7 @@ private: bool system_buttons_enabled{true}; f32 motion_sensitivity{Core::HID::MotionInput::IsAtRestStandard}; u32 turbo_button_state{0}; + std::size_t nfc_handles{0}; // Temporary values to avoid doing changes while the controller is in configuring mode NpadStyleIndex tmp_npad_type{NpadStyleIndex::None}; diff --git a/src/core/hid/input_converter.cpp b/src/core/hid/input_converter.cpp index 4ccb1c596..a05716fd8 100644 --- a/src/core/hid/input_converter.cpp +++ b/src/core/hid/input_converter.cpp @@ -299,11 +299,7 @@ Common::Input::NfcStatus TransformToNfc(const Common::Input::CallbackStatus& cal Common::Input::NfcStatus nfc{}; switch (callback.type) { case Common::Input::InputType::Nfc: - nfc = { - .state = callback.nfc_status, - .data = callback.raw_data, - }; - break; + return callback.nfc_status; default: LOG_ERROR(Input, "Conversion from type {} to NFC not implemented", callback.type); break; diff --git a/src/core/hle/service/am/applets/applet_cabinet.cpp b/src/core/hle/service/am/applets/applet_cabinet.cpp index 8b754e9d4..19ed184e8 100644 --- a/src/core/hle/service/am/applets/applet_cabinet.cpp +++ b/src/core/hle/service/am/applets/applet_cabinet.cpp @@ -141,7 +141,7 @@ void Cabinet::DisplayCompleted(bool apply_changes, std::string_view amiibo_name) applet_output.device_handle = applet_input_common.device_handle; applet_output.result = CabinetResult::Cancel; const auto reg_result = nfp_device->GetRegisterInfo(applet_output.register_info); - const auto tag_result = nfp_device->GetTagInfo(applet_output.tag_info, false); + const auto tag_result = nfp_device->GetTagInfo(applet_output.tag_info); nfp_device->Finalize(); if (reg_result.IsSuccess()) { diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index f4b180b06..5bf289818 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -93,7 +93,8 @@ void NfcDevice::NpadUpdate(Core::HID::ControllerTriggerType type) { const auto nfc_status = npad_device->GetNfc(); switch (nfc_status.state) { case Common::Input::NfcState::NewAmiibo: - LoadNfcTag(nfc_status.data); + LoadNfcTag(nfc_status.protocol, nfc_status.tag_type, nfc_status.uuid_length, + nfc_status.uuid); break; case Common::Input::NfcState::AmiiboRemoved: if (device_state == DeviceState::Initialized || device_state == DeviceState::TagRemoved) { @@ -108,28 +109,46 @@ void NfcDevice::NpadUpdate(Core::HID::ControllerTriggerType type) { } } -bool NfcDevice::LoadNfcTag(std::span data) { +bool NfcDevice::LoadNfcTag(u8 protocol, u8 tag_type, u8 uuid_length, UniqueSerialNumber uuid) { if (device_state != DeviceState::SearchingForTag) { LOG_ERROR(Service_NFC, "Game is not looking for nfc tag, current state {}", device_state); return false; } + if ((protocol & static_cast(allowed_protocols)) == 0) { + LOG_ERROR(Service_NFC, "Protocol not supported {}", protocol); + return false; + } + + real_tag_info = { + .uuid = uuid, + .uuid_length = uuid_length, + .protocol = static_cast(protocol), + .tag_type = static_cast(tag_type), + }; + + device_state = DeviceState::TagFound; + deactivate_event->GetReadableEvent().Clear(); + activate_event->Signal(); + return true; +} + +bool NfcDevice::LoadAmiiboData() { + std::vector data{}; + + if (!npad_device->ReadAmiiboData(data)) { + return false; + } + if (data.size() < sizeof(NFP::EncryptedNTAG215File)) { LOG_ERROR(Service_NFC, "Not an amiibo, size={}", data.size()); return false; } - mifare_data.resize(data.size()); - memcpy(mifare_data.data(), data.data(), data.size()); - memcpy(&tag_data, data.data(), sizeof(NFP::EncryptedNTAG215File)); is_plain_amiibo = NFP::AmiiboCrypto::IsAmiiboValid(tag_data); is_write_protected = false; - device_state = DeviceState::TagFound; - deactivate_event->GetReadableEvent().Clear(); - activate_event->Signal(); - // Fallback for plain amiibos if (is_plain_amiibo) { LOG_INFO(Service_NFP, "Using plain amiibo"); @@ -147,6 +166,7 @@ bool NfcDevice::LoadNfcTag(std::span data) { return true; } + LOG_INFO(Service_NFP, "Using encrypted amiibo"); tag_data = {}; memcpy(&encrypted_tag_data, data.data(), sizeof(NFP::EncryptedNTAG215File)); return true; @@ -162,7 +182,6 @@ void NfcDevice::CloseNfcTag() { device_state = DeviceState::TagRemoved; encrypted_tag_data = {}; tag_data = {}; - mifare_data = {}; activate_event->GetReadableEvent().Clear(); deactivate_event->Signal(); } @@ -179,8 +198,12 @@ void NfcDevice::Initialize() { device_state = npad_device->HasNfc() ? DeviceState::Initialized : DeviceState::Unavailable; encrypted_tag_data = {}; tag_data = {}; - mifare_data = {}; - is_initalized = true; + + if (device_state != DeviceState::Initialized) { + return; + } + + is_initalized = npad_device->AddNfcHandle(); } void NfcDevice::Finalize() { @@ -190,6 +213,11 @@ void NfcDevice::Finalize() { if (device_state == DeviceState::SearchingForTag || device_state == DeviceState::TagRemoved) { StopDetection(); } + + if (device_state != DeviceState::Unavailable) { + npad_device->RemoveNfcHandle(); + } + device_state = DeviceState::Unavailable; is_initalized = false; } @@ -200,10 +228,8 @@ Result NfcDevice::StartDetection(NfcProtocol allowed_protocol) { return ResultWrongDeviceState; } - if (npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex, - Common::Input::PollingMode::NFC) != - Common::Input::DriverResult::Success) { - LOG_ERROR(Service_NFC, "Nfc not supported"); + if (!npad_device->StartNfcPolling()) { + LOG_ERROR(Service_NFC, "Nfc polling not supported"); return ResultNfcDisabled; } @@ -213,9 +239,6 @@ Result NfcDevice::StartDetection(NfcProtocol allowed_protocol) { } Result NfcDevice::StopDetection() { - npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex, - Common::Input::PollingMode::Active); - if (device_state == DeviceState::Initialized) { return ResultSuccess; } @@ -225,6 +248,7 @@ Result NfcDevice::StopDetection() { } if (device_state == DeviceState::SearchingForTag || device_state == DeviceState::TagRemoved) { + npad_device->StopNfcPolling(); device_state = DeviceState::Initialized; return ResultSuccess; } @@ -233,7 +257,7 @@ Result NfcDevice::StopDetection() { return ResultWrongDeviceState; } -Result NfcDevice::GetTagInfo(NFP::TagInfo& tag_info, bool is_mifare) const { +Result NfcDevice::GetTagInfo(NFP::TagInfo& tag_info) const { if (device_state != DeviceState::TagFound && device_state != DeviceState::TagMounted) { LOG_ERROR(Service_NFC, "Wrong device state {}", device_state); if (device_state == DeviceState::TagRemoved) { @@ -242,41 +266,15 @@ Result NfcDevice::GetTagInfo(NFP::TagInfo& tag_info, bool is_mifare) const { return ResultWrongDeviceState; } - UniqueSerialNumber uuid{}; - u8 uuid_length{}; - NfcProtocol protocol{NfcProtocol::TypeA}; - TagType tag_type{TagType::Type2}; + tag_info = real_tag_info; - if (is_mifare) { - tag_type = TagType::Mifare; - uuid_length = sizeof(NFP::NtagTagUuid); - memcpy(uuid.data(), mifare_data.data(), uuid_length); - } else { - tag_type = TagType::Type2; - uuid_length = sizeof(NFP::NtagTagUuid); - NFP::NtagTagUuid nUuid{ - .part1 = encrypted_tag_data.uuid.part1, - .part2 = encrypted_tag_data.uuid.part2, - .nintendo_id = encrypted_tag_data.uuid.nintendo_id, - }; - memcpy(uuid.data(), &nUuid, uuid_length); - - // Generate random UUID to bypass amiibo load limits - if (Settings::values.random_amiibo_id) { - Common::TinyMT rng{}; - rng.Initialize(static_cast(GetCurrentPosixTime())); - rng.GenerateRandomBytes(uuid.data(), uuid_length); - } + // Generate random UUID to bypass amiibo load limits + if (real_tag_info.tag_type == TagType::Type2 && Settings::values.random_amiibo_id) { + Common::TinyMT rng{}; + rng.Initialize(static_cast(GetCurrentPosixTime())); + rng.GenerateRandomBytes(tag_info.uuid.data(), tag_info.uuid_length); } - // Protocol and tag type may change here - tag_info = { - .uuid = uuid, - .uuid_length = uuid_length, - .protocol = protocol, - .tag_type = tag_type, - }; - return ResultSuccess; } @@ -293,7 +291,7 @@ Result NfcDevice::ReadMifare(std::span parameter Result result = ResultSuccess; TagInfo tag_info{}; - result = GetTagInfo(tag_info, true); + result = GetTagInfo(tag_info); if (result.IsError()) { return result; @@ -307,6 +305,8 @@ Result NfcDevice::ReadMifare(std::span parameter return ResultInvalidArgument; } + Common::Input::MifareRequest request{}; + Common::Input::MifareRequest out_data{}; const auto unknown = parameters[0].sector_key.unknown; for (std::size_t i = 0; i < parameters.size(); i++) { if (unknown != parameters[i].sector_key.unknown) { @@ -315,25 +315,29 @@ Result NfcDevice::ReadMifare(std::span parameter } for (std::size_t i = 0; i < parameters.size(); i++) { - result = ReadMifare(parameters[i], read_block_data[i]); - if (result.IsError()) { - break; + if (parameters[i].sector_key.command == MifareCmd::None) { + continue; } + request.data[i].command = static_cast(parameters[i].sector_key.command); + request.data[i].sector = parameters[i].sector_number; + memcpy(request.data[i].key.data(), parameters[i].sector_key.sector_key.data(), + sizeof(KeyData)); } - return result; -} - -Result NfcDevice::ReadMifare(const MifareReadBlockParameter& parameter, - MifareReadBlockData& read_block_data) const { - const std::size_t sector_index = parameter.sector_number * sizeof(DataBlock); - read_block_data.sector_number = parameter.sector_number; - if (mifare_data.size() < sector_index + sizeof(DataBlock)) { + if (!npad_device->ReadMifareData(request, out_data)) { return ResultMifareError288; } - // TODO: Use parameter.sector_key to read encrypted data - memcpy(read_block_data.data.data(), mifare_data.data() + sector_index, sizeof(DataBlock)); + for (std::size_t i = 0; i < read_block_data.size(); i++) { + if (static_cast(out_data.data[i].command) == MifareCmd::None) { + continue; + } + + read_block_data[i] = { + .data = out_data.data[i].data, + .sector_number = out_data.data[i].sector, + }; + } return ResultSuccess; } @@ -342,7 +346,7 @@ Result NfcDevice::WriteMifare(std::span paramet Result result = ResultSuccess; TagInfo tag_info{}; - result = GetTagInfo(tag_info, true); + result = GetTagInfo(tag_info); if (result.IsError()) { return result; @@ -363,42 +367,25 @@ Result NfcDevice::WriteMifare(std::span paramet } } + Common::Input::MifareRequest request{}; for (std::size_t i = 0; i < parameters.size(); i++) { - result = WriteMifare(parameters[i]); - if (result.IsError()) { - break; + if (parameters[i].sector_key.command == MifareCmd::None) { + continue; } + request.data[i].command = static_cast(parameters[i].sector_key.command); + request.data[i].sector = parameters[i].sector_number; + memcpy(request.data[i].key.data(), parameters[i].sector_key.sector_key.data(), + sizeof(KeyData)); + memcpy(request.data[i].data.data(), parameters[i].data.data(), sizeof(KeyData)); } - if (!npad_device->WriteNfc(mifare_data)) { - LOG_ERROR(Service_NFP, "Error writing to file"); + if (!npad_device->WriteMifareData(request)) { return ResultMifareError288; } return result; } -Result NfcDevice::WriteMifare(const MifareWriteBlockParameter& parameter) { - const std::size_t sector_index = parameter.sector_number * sizeof(DataBlock); - - if (device_state != DeviceState::TagFound && device_state != DeviceState::TagMounted) { - LOG_ERROR(Service_NFC, "Wrong device state {}", device_state); - if (device_state == DeviceState::TagRemoved) { - return ResultTagRemoved; - } - return ResultWrongDeviceState; - } - - if (mifare_data.size() < sector_index + sizeof(DataBlock)) { - return ResultMifareError288; - } - - // TODO: Use parameter.sector_key to encrypt the data - memcpy(mifare_data.data() + sector_index, parameter.data.data(), sizeof(DataBlock)); - - return ResultSuccess; -} - Result NfcDevice::SendCommandByPassThrough(const Time::Clock::TimeSpanType& timeout, std::span command_data, std::span out_data) { @@ -412,6 +399,11 @@ Result NfcDevice::Mount(NFP::ModelType model_type, NFP::MountTarget mount_target return ResultWrongDeviceState; } + if (!LoadAmiiboData()) { + LOG_ERROR(Service_NFP, "Not an amiibo"); + return ResultInvalidTagType; + } + if (!NFP::AmiiboCrypto::IsAmiiboValid(encrypted_tag_data)) { LOG_ERROR(Service_NFP, "Not an amiibo"); return ResultInvalidTagType; @@ -562,7 +554,7 @@ Result NfcDevice::Restore() { NFC::TagInfo tag_info{}; std::array data{}; - Result result = GetTagInfo(tag_info, false); + Result result = GetTagInfo(tag_info); if (result.IsError()) { return result; @@ -635,7 +627,7 @@ Result NfcDevice::GetCommonInfo(NFP::CommonInfo& common_info) const { // TODO: Validate this data common_info = { .last_write_date = settings.write_date.GetWriteDate(), - .write_counter = tag_data.write_counter, + .write_counter = tag_data.application_write_counter, .version = tag_data.amiibo_version, .application_area_size = sizeof(NFP::ApplicationArea), }; diff --git a/src/core/hle/service/nfc/common/device.h b/src/core/hle/service/nfc/common/device.h index 7560210d6..0ed1ff34c 100644 --- a/src/core/hle/service/nfc/common/device.h +++ b/src/core/hle/service/nfc/common/device.h @@ -42,15 +42,12 @@ public: Result StartDetection(NfcProtocol allowed_protocol); Result StopDetection(); - Result GetTagInfo(TagInfo& tag_info, bool is_mifare) const; + Result GetTagInfo(TagInfo& tag_info) const; Result ReadMifare(std::span parameters, std::span read_block_data) const; - Result ReadMifare(const MifareReadBlockParameter& parameter, - MifareReadBlockData& read_block_data) const; Result WriteMifare(std::span parameters); - Result WriteMifare(const MifareWriteBlockParameter& parameter); Result SendCommandByPassThrough(const Time::Clock::TimeSpanType& timeout, std::span command_data, std::span out_data); @@ -105,7 +102,8 @@ public: private: void NpadUpdate(Core::HID::ControllerTriggerType type); - bool LoadNfcTag(std::span data); + bool LoadNfcTag(u8 protocol, u8 tag_type, u8 uuid_length, UniqueSerialNumber uuid); + bool LoadAmiiboData(); void CloseNfcTag(); NFP::AmiiboName GetAmiiboName(const NFP::AmiiboSettings& settings) const; @@ -140,8 +138,8 @@ private: bool is_write_protected{}; NFP::MountTarget mount_target{NFP::MountTarget::None}; + TagInfo real_tag_info{}; NFP::NTAG215File tag_data{}; - std::vector mifare_data{}; NFP::EncryptedNTAG215File encrypted_tag_data{}; }; diff --git a/src/core/hle/service/nfc/common/device_manager.cpp b/src/core/hle/service/nfc/common/device_manager.cpp index b0456508e..562f3a28e 100644 --- a/src/core/hle/service/nfc/common/device_manager.cpp +++ b/src/core/hle/service/nfc/common/device_manager.cpp @@ -29,6 +29,9 @@ DeviceManager::DeviceManager(Core::System& system_, KernelHelpers::ServiceContex } DeviceManager ::~DeviceManager() { + if (is_initialized) { + Finalize(); + } service_context.CloseEvent(availability_change_event); } @@ -125,14 +128,14 @@ Result DeviceManager::StopDetection(u64 device_handle) { return result; } -Result DeviceManager::GetTagInfo(u64 device_handle, TagInfo& tag_info, bool is_mifare) const { +Result DeviceManager::GetTagInfo(u64 device_handle, TagInfo& tag_info) const { std::scoped_lock lock{mutex}; std::shared_ptr device = nullptr; auto result = GetDeviceHandle(device_handle, device); if (result.IsSuccess()) { - result = device->GetTagInfo(tag_info, is_mifare); + result = device->GetTagInfo(tag_info); result = VerifyDeviceResult(device, result); } @@ -546,7 +549,7 @@ Result DeviceManager::ReadBackupData(u64 device_handle, std::span data) cons NFC::TagInfo tag_info{}; if (result.IsSuccess()) { - result = device->GetTagInfo(tag_info, false); + result = device->GetTagInfo(tag_info); } if (result.IsSuccess()) { @@ -565,7 +568,7 @@ Result DeviceManager::WriteBackupData(u64 device_handle, std::span dat NFC::TagInfo tag_info{}; if (result.IsSuccess()) { - result = device->GetTagInfo(tag_info, false); + result = device->GetTagInfo(tag_info); } if (result.IsSuccess()) { diff --git a/src/core/hle/service/nfc/common/device_manager.h b/src/core/hle/service/nfc/common/device_manager.h index 2971e280f..c61ba0cf3 100644 --- a/src/core/hle/service/nfc/common/device_manager.h +++ b/src/core/hle/service/nfc/common/device_manager.h @@ -33,7 +33,7 @@ public: Kernel::KReadableEvent& AttachAvailabilityChangeEvent() const; Result StartDetection(u64 device_handle, NfcProtocol tag_protocol); Result StopDetection(u64 device_handle); - Result GetTagInfo(u64 device_handle, NFP::TagInfo& tag_info, bool is_mifare) const; + Result GetTagInfo(u64 device_handle, NFP::TagInfo& tag_info) const; Kernel::KReadableEvent& AttachActivateEvent(u64 device_handle) const; Kernel::KReadableEvent& AttachDeactivateEvent(u64 device_handle) const; Result ReadMifare(u64 device_handle, diff --git a/src/core/hle/service/nfc/mifare_types.h b/src/core/hle/service/nfc/mifare_types.h index 75b59f021..467937399 100644 --- a/src/core/hle/service/nfc/mifare_types.h +++ b/src/core/hle/service/nfc/mifare_types.h @@ -11,9 +11,10 @@ namespace Service::NFC { enum class MifareCmd : u8 { + None = 0x00, + Read = 0x30, AuthA = 0x60, AuthB = 0x61, - Read = 0x30, Write = 0xA0, Transfer = 0xB0, Decrement = 0xC0, @@ -35,17 +36,17 @@ static_assert(sizeof(SectorKey) == 0x10, "SectorKey is an invalid size"); // This is nn::nfc::MifareReadBlockParameter struct MifareReadBlockParameter { - u8 sector_number; + u8 sector_number{}; INSERT_PADDING_BYTES(0x7); - SectorKey sector_key; + SectorKey sector_key{}; }; static_assert(sizeof(MifareReadBlockParameter) == 0x18, "MifareReadBlockParameter is an invalid size"); // This is nn::nfc::MifareReadBlockData struct MifareReadBlockData { - DataBlock data; - u8 sector_number; + DataBlock data{}; + u8 sector_number{}; INSERT_PADDING_BYTES(0x7); }; static_assert(sizeof(MifareReadBlockData) == 0x18, "MifareReadBlockData is an invalid size"); diff --git a/src/core/hle/service/nfc/nfc_interface.cpp b/src/core/hle/service/nfc/nfc_interface.cpp index 130fb7f78..e7ca7582e 100644 --- a/src/core/hle/service/nfc/nfc_interface.cpp +++ b/src/core/hle/service/nfc/nfc_interface.cpp @@ -174,8 +174,7 @@ void NfcInterface::GetTagInfo(HLERequestContext& ctx) { LOG_INFO(Service_NFC, "called, device_handle={}", device_handle); TagInfo tag_info{}; - auto result = - GetManager()->GetTagInfo(device_handle, tag_info, backend_type == BackendType::Mifare); + auto result = GetManager()->GetTagInfo(device_handle, tag_info); result = TranslateResultToServiceError(result); if (result.IsSuccess()) { @@ -216,8 +215,8 @@ void NfcInterface::ReadMifare(HLERequestContext& ctx) { memcpy(read_commands.data(), buffer.data(), number_of_commands * sizeof(MifareReadBlockParameter)); - LOG_INFO(Service_NFC, "(STUBBED) called, device_handle={}, read_commands_size={}", - device_handle, number_of_commands); + LOG_INFO(Service_NFC, "called, device_handle={}, read_commands_size={}", device_handle, + number_of_commands); std::vector out_data(number_of_commands); auto result = GetManager()->ReadMifare(device_handle, read_commands, out_data); diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp index b2b5677c8..52494e0d9 100644 --- a/src/input_common/drivers/joycon.cpp +++ b/src/input_common/drivers/joycon.cpp @@ -195,8 +195,8 @@ void Joycons::RegisterNewDevice(SDL_hid_device_info* device_info) { OnMotionUpdate(port, type, id, value); }}, .on_ring_data = {[this](f32 ring_data) { OnRingConUpdate(ring_data); }}, - .on_amiibo_data = {[this, port, type](const std::vector& amiibo_data) { - OnAmiiboUpdate(port, type, amiibo_data); + .on_amiibo_data = {[this, port, type](const Joycon::TagInfo& tag_info) { + OnAmiiboUpdate(port, type, tag_info); }}, .on_camera_data = {[this, port](const std::vector& camera_data, Joycon::IrsResolution format) { @@ -291,13 +291,105 @@ Common::Input::NfcState Joycons::SupportsNfc(const PadIdentifier& identifier_) c return Common::Input::NfcState::Success; }; +Common::Input::NfcState Joycons::StartNfcPolling(const PadIdentifier& identifier) { + auto handle = GetHandle(identifier); + if (handle == nullptr) { + return Common::Input::NfcState::Unknown; + } + return TranslateDriverResult(handle->StartNfcPolling()); +}; + +Common::Input::NfcState Joycons::StopNfcPolling(const PadIdentifier& identifier) { + auto handle = GetHandle(identifier); + if (handle == nullptr) { + return Common::Input::NfcState::Unknown; + } + return TranslateDriverResult(handle->StopNfcPolling()); +}; + +Common::Input::NfcState Joycons::ReadAmiiboData(const PadIdentifier& identifier, + std::vector& out_data) { + auto handle = GetHandle(identifier); + if (handle == nullptr) { + return Common::Input::NfcState::Unknown; + } + return TranslateDriverResult(handle->ReadAmiiboData(out_data)); +} + Common::Input::NfcState Joycons::WriteNfcData(const PadIdentifier& identifier, const std::vector& data) { auto handle = GetHandle(identifier); - if (handle->WriteNfcData(data) != Joycon::DriverResult::Success) { - return Common::Input::NfcState::WriteFailed; + if (handle == nullptr) { + return Common::Input::NfcState::Unknown; } - return Common::Input::NfcState::Success; + return TranslateDriverResult(handle->WriteNfcData(data)); +}; + +Common::Input::NfcState Joycons::ReadMifareData(const PadIdentifier& identifier, + const Common::Input::MifareRequest& request, + Common::Input::MifareRequest& data) { + auto handle = GetHandle(identifier); + if (handle == nullptr) { + return Common::Input::NfcState::Unknown; + } + + const auto command = static_cast(request.data[0].command); + std::vector read_request{}; + for (const auto& request_data : request.data) { + if (request_data.command == 0) { + continue; + } + Joycon::MifareReadChunk chunk = { + .command = command, + .sector_key = {}, + .sector = request_data.sector, + }; + memcpy(chunk.sector_key.data(), request_data.key.data(), + sizeof(Joycon::MifareReadChunk::sector_key)); + read_request.emplace_back(chunk); + } + + std::vector read_data(read_request.size()); + const auto result = handle->ReadMifareData(read_request, read_data); + if (result == Joycon::DriverResult::Success) { + for (std::size_t i = 0; i < read_request.size(); i++) { + data.data[i] = { + .command = static_cast(command), + .sector = read_data[i].sector, + .key = {}, + .data = read_data[i].data, + }; + } + } + return TranslateDriverResult(result); +}; + +Common::Input::NfcState Joycons::WriteMifareData(const PadIdentifier& identifier, + const Common::Input::MifareRequest& request) { + auto handle = GetHandle(identifier); + if (handle == nullptr) { + return Common::Input::NfcState::Unknown; + } + + const auto command = static_cast(request.data[0].command); + std::vector write_request{}; + for (const auto& request_data : request.data) { + if (request_data.command == 0) { + continue; + } + Joycon::MifareWriteChunk chunk = { + .command = command, + .sector_key = {}, + .sector = request_data.sector, + .data = {}, + }; + memcpy(chunk.sector_key.data(), request_data.key.data(), + sizeof(Joycon::MifareReadChunk::sector_key)); + memcpy(chunk.data.data(), request_data.data.data(), sizeof(Joycon::MifareWriteChunk::data)); + write_request.emplace_back(chunk); + } + + return TranslateDriverResult(handle->WriteMifareData(write_request)); }; Common::Input::DriverResult Joycons::SetPollingMode(const PadIdentifier& identifier, @@ -403,11 +495,20 @@ void Joycons::OnRingConUpdate(f32 ring_data) { } void Joycons::OnAmiiboUpdate(std::size_t port, Joycon::ControllerType type, - const std::vector& amiibo_data) { + const Joycon::TagInfo& tag_info) { const auto identifier = GetIdentifier(port, type); - const auto nfc_state = amiibo_data.empty() ? Common::Input::NfcState::AmiiboRemoved - : Common::Input::NfcState::NewAmiibo; - SetNfc(identifier, {nfc_state, amiibo_data}); + const auto nfc_state = tag_info.uuid_length == 0 ? Common::Input::NfcState::AmiiboRemoved + : Common::Input::NfcState::NewAmiibo; + + const Common::Input::NfcStatus nfc_status{ + .state = nfc_state, + .uuid_length = tag_info.uuid_length, + .protocol = tag_info.protocol, + .tag_type = tag_info.tag_type, + .uuid = tag_info.uuid, + }; + + SetNfc(identifier, nfc_status); } void Joycons::OnCameraUpdate(std::size_t port, const std::vector& camera_data, @@ -726,4 +827,18 @@ std::string Joycons::JoyconName(Joycon::ControllerType type) const { return "Unknown Switch Controller"; } } + +Common::Input::NfcState Joycons::TranslateDriverResult(Joycon::DriverResult result) const { + switch (result) { + case Joycon::DriverResult::Success: + return Common::Input::NfcState::Success; + case Joycon::DriverResult::Disabled: + return Common::Input::NfcState::WrongDeviceState; + case Joycon::DriverResult::NotSupported: + return Common::Input::NfcState::NotSupported; + default: + return Common::Input::NfcState::Unknown; + } +} + } // namespace InputCommon diff --git a/src/input_common/drivers/joycon.h b/src/input_common/drivers/joycon.h index e3f0ad78f..4c323d7d6 100644 --- a/src/input_common/drivers/joycon.h +++ b/src/input_common/drivers/joycon.h @@ -15,6 +15,7 @@ using SerialNumber = std::array; struct Battery; struct Color; struct MotionData; +struct TagInfo; enum class ControllerType : u8; enum class DriverResult; enum class IrsResolution; @@ -39,9 +40,18 @@ public: Common::Input::DriverResult SetCameraFormat(const PadIdentifier& identifier, Common::Input::CameraFormat camera_format) override; - Common::Input::NfcState SupportsNfc(const PadIdentifier& identifier_) const override; - Common::Input::NfcState WriteNfcData(const PadIdentifier& identifier_, + Common::Input::NfcState SupportsNfc(const PadIdentifier& identifier) const override; + Common::Input::NfcState StartNfcPolling(const PadIdentifier& identifier) override; + Common::Input::NfcState StopNfcPolling(const PadIdentifier& identifier) override; + Common::Input::NfcState ReadAmiiboData(const PadIdentifier& identifier, + std::vector& out_data) override; + Common::Input::NfcState WriteNfcData(const PadIdentifier& identifier, const std::vector& data) override; + Common::Input::NfcState ReadMifareData(const PadIdentifier& identifier, + const Common::Input::MifareRequest& request, + Common::Input::MifareRequest& out_data) override; + Common::Input::NfcState WriteMifareData(const PadIdentifier& identifier, + const Common::Input::MifareRequest& request) override; Common::Input::DriverResult SetPollingMode( const PadIdentifier& identifier, const Common::Input::PollingMode polling_mode) override; @@ -82,7 +92,7 @@ private: const Joycon::MotionData& value); void OnRingConUpdate(f32 ring_data); void OnAmiiboUpdate(std::size_t port, Joycon::ControllerType type, - const std::vector& amiibo_data); + const Joycon::TagInfo& amiibo_data); void OnCameraUpdate(std::size_t port, const std::vector& camera_data, Joycon::IrsResolution format); @@ -102,6 +112,8 @@ private: /// Returns the name of the device in text format std::string JoyconName(Joycon::ControllerType type) const; + Common::Input::NfcState TranslateDriverResult(Joycon::DriverResult result) const; + std::jthread scan_thread; // Joycon types are split by type to ease supporting dualjoycon configurations diff --git a/src/input_common/drivers/virtual_amiibo.cpp b/src/input_common/drivers/virtual_amiibo.cpp index 6435b8af8..180eb53ef 100644 --- a/src/input_common/drivers/virtual_amiibo.cpp +++ b/src/input_common/drivers/virtual_amiibo.cpp @@ -29,14 +29,13 @@ Common::Input::DriverResult VirtualAmiibo::SetPollingMode( switch (polling_mode) { case Common::Input::PollingMode::NFC: - if (state == State::Initialized) { - state = State::WaitingForAmiibo; - } + state = State::Initialized; return Common::Input::DriverResult::Success; default: - if (state == State::AmiiboIsOpen) { + if (state == State::TagNearby) { CloseAmiibo(); } + state = State::Disabled; return Common::Input::DriverResult::NotSupported; } } @@ -45,6 +44,39 @@ Common::Input::NfcState VirtualAmiibo::SupportsNfc( [[maybe_unused]] const PadIdentifier& identifier_) const { return Common::Input::NfcState::Success; } +Common::Input::NfcState VirtualAmiibo::StartNfcPolling(const PadIdentifier& identifier_) { + if (state != State::Initialized) { + return Common::Input::NfcState::WrongDeviceState; + } + state = State::WaitingForAmiibo; + return Common::Input::NfcState::Success; +} + +Common::Input::NfcState VirtualAmiibo::StopNfcPolling(const PadIdentifier& identifier_) { + if (state == State::Disabled) { + return Common::Input::NfcState::WrongDeviceState; + } + if (state == State::TagNearby) { + CloseAmiibo(); + } + state = State::Initialized; + return Common::Input::NfcState::Success; +} + +Common::Input::NfcState VirtualAmiibo::ReadAmiiboData(const PadIdentifier& identifier_, + std::vector& out_data) { + if (state != State::TagNearby) { + return Common::Input::NfcState::WrongDeviceState; + } + + if (status.tag_type != 1U << 1) { + return Common::Input::NfcState::InvalidTagType; + } + + out_data.resize(nfc_data.size()); + memcpy(out_data.data(), nfc_data.data(), nfc_data.size()); + return Common::Input::NfcState::Success; +} Common::Input::NfcState VirtualAmiibo::WriteNfcData( [[maybe_unused]] const PadIdentifier& identifier_, const std::vector& data) { @@ -66,6 +98,69 @@ Common::Input::NfcState VirtualAmiibo::WriteNfcData( return Common::Input::NfcState::Success; } +Common::Input::NfcState VirtualAmiibo::ReadMifareData(const PadIdentifier& identifier_, + const Common::Input::MifareRequest& request, + Common::Input::MifareRequest& out_data) { + if (state != State::TagNearby) { + return Common::Input::NfcState::WrongDeviceState; + } + + if (status.tag_type != 1U << 6) { + return Common::Input::NfcState::InvalidTagType; + } + + for (std::size_t i = 0; i < request.data.size(); i++) { + if (request.data[i].command == 0) { + continue; + } + out_data.data[i].command = request.data[i].command; + out_data.data[i].sector = request.data[i].sector; + + const std::size_t sector_index = + request.data[i].sector * sizeof(Common::Input::MifareData::data); + + if (nfc_data.size() < sector_index + sizeof(Common::Input::MifareData::data)) { + return Common::Input::NfcState::WriteFailed; + } + + // Ignore the sector key as we don't support it + memcpy(out_data.data[i].data.data(), nfc_data.data() + sector_index, + sizeof(Common::Input::MifareData::data)); + } + + return Common::Input::NfcState::Success; +} + +Common::Input::NfcState VirtualAmiibo::WriteMifareData( + const PadIdentifier& identifier_, const Common::Input::MifareRequest& request) { + if (state != State::TagNearby) { + return Common::Input::NfcState::WrongDeviceState; + } + + if (status.tag_type != 1U << 6) { + return Common::Input::NfcState::InvalidTagType; + } + + for (std::size_t i = 0; i < request.data.size(); i++) { + if (request.data[i].command == 0) { + continue; + } + + const std::size_t sector_index = + request.data[i].sector * sizeof(Common::Input::MifareData::data); + + if (nfc_data.size() < sector_index + sizeof(Common::Input::MifareData::data)) { + return Common::Input::NfcState::WriteFailed; + } + + // Ignore the sector key as we don't support it + memcpy(nfc_data.data() + sector_index, request.data[i].data.data(), + sizeof(Common::Input::MifareData::data)); + } + + return Common::Input::NfcState::Success; +} + VirtualAmiibo::State VirtualAmiibo::GetCurrentState() const { return state; } @@ -112,23 +207,31 @@ VirtualAmiibo::Info VirtualAmiibo::LoadAmiibo(std::span data) { case AmiiboSizeWithoutPassword: case AmiiboSizeWithSignature: nfc_data.resize(AmiiboSize); + status.tag_type = 1U << 1; + status.uuid_length = 7; break; case MifareSize: nfc_data.resize(MifareSize); + status.tag_type = 1U << 6; + status.uuid_length = 4; break; default: return Info::NotAnAmiibo; } - state = State::AmiiboIsOpen; + status.uuid = {}; + status.protocol = 1; + state = State::TagNearby; + status.state = Common::Input::NfcState::NewAmiibo, memcpy(nfc_data.data(), data.data(), data.size_bytes()); - SetNfc(identifier, {Common::Input::NfcState::NewAmiibo, nfc_data}); + memcpy(status.uuid.data(), nfc_data.data(), status.uuid_length); + SetNfc(identifier, status); return Info::Success; } VirtualAmiibo::Info VirtualAmiibo::ReloadAmiibo() { - if (state == State::AmiiboIsOpen) { - SetNfc(identifier, {Common::Input::NfcState::NewAmiibo, nfc_data}); + if (state == State::TagNearby) { + SetNfc(identifier, status); return Info::Success; } @@ -136,9 +239,14 @@ VirtualAmiibo::Info VirtualAmiibo::ReloadAmiibo() { } VirtualAmiibo::Info VirtualAmiibo::CloseAmiibo() { - state = polling_mode == Common::Input::PollingMode::NFC ? State::WaitingForAmiibo - : State::Initialized; - SetNfc(identifier, {Common::Input::NfcState::AmiiboRemoved, {}}); + if (state != State::TagNearby) { + return Info::Success; + } + + state = State::WaitingForAmiibo; + status.state = Common::Input::NfcState::AmiiboRemoved; + SetNfc(identifier, status); + status.tag_type = 0; return Info::Success; } diff --git a/src/input_common/drivers/virtual_amiibo.h b/src/input_common/drivers/virtual_amiibo.h index 09ca09e68..490f38e05 100644 --- a/src/input_common/drivers/virtual_amiibo.h +++ b/src/input_common/drivers/virtual_amiibo.h @@ -20,9 +20,10 @@ namespace InputCommon { class VirtualAmiibo final : public InputEngine { public: enum class State { + Disabled, Initialized, WaitingForAmiibo, - AmiiboIsOpen, + TagNearby, }; enum class Info { @@ -41,9 +42,17 @@ public: const PadIdentifier& identifier_, const Common::Input::PollingMode polling_mode_) override; Common::Input::NfcState SupportsNfc(const PadIdentifier& identifier_) const override; - + Common::Input::NfcState StartNfcPolling(const PadIdentifier& identifier_) override; + Common::Input::NfcState StopNfcPolling(const PadIdentifier& identifier_) override; + Common::Input::NfcState ReadAmiiboData(const PadIdentifier& identifier_, + std::vector& out_data) override; Common::Input::NfcState WriteNfcData(const PadIdentifier& identifier_, const std::vector& data) override; + Common::Input::NfcState ReadMifareData(const PadIdentifier& identifier_, + const Common::Input::MifareRequest& data, + Common::Input::MifareRequest& out_data) override; + Common::Input::NfcState WriteMifareData(const PadIdentifier& identifier_, + const Common::Input::MifareRequest& data) override; State GetCurrentState() const; @@ -61,8 +70,9 @@ private: static constexpr std::size_t MifareSize = 0x400; std::string file_path{}; - State state{State::Initialized}; + State state{State::Disabled}; std::vector nfc_data; + Common::Input::NfcStatus status; Common::Input::PollingMode polling_mode{Common::Input::PollingMode::Passive}; }; } // namespace InputCommon diff --git a/src/input_common/helpers/joycon_driver.cpp b/src/input_common/helpers/joycon_driver.cpp index 95106f16d..2c8c66951 100644 --- a/src/input_common/helpers/joycon_driver.cpp +++ b/src/input_common/helpers/joycon_driver.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common/logging/log.h" +#include "common/scope_exit.h" #include "common/swap.h" #include "common/thread.h" #include "input_common/helpers/joycon_driver.h" @@ -112,7 +113,7 @@ DriverResult JoyconDriver::InitializeDevice() { joycon_poller = std::make_unique(device_type, left_stick_calibration, right_stick_calibration, motion_calibration); - // Start pooling for data + // Start polling for data is_connected = true; if (!input_thread_running) { input_thread = @@ -208,7 +209,7 @@ void JoyconDriver::OnNewData(std::span buffer) { joycon_poller->UpdateCamera(irs_protocol->GetImage(), irs_protocol->GetIrsFormat()); } - if (nfc_protocol->IsEnabled()) { + if (nfc_protocol->IsPolling()) { if (amiibo_detected) { if (!nfc_protocol->HasAmiibo()) { joycon_poller->UpdateAmiibo({}); @@ -218,10 +219,10 @@ void JoyconDriver::OnNewData(std::span buffer) { } if (!amiibo_detected) { - std::vector data(0x21C); - const auto result = nfc_protocol->ScanAmiibo(data); + Joycon::TagInfo tag_info; + const auto result = nfc_protocol->GetTagInfo(tag_info); if (result == DriverResult::Success) { - joycon_poller->UpdateAmiibo(data); + joycon_poller->UpdateAmiibo(tag_info); amiibo_detected = true; } } @@ -247,6 +248,7 @@ void JoyconDriver::OnNewData(std::span buffer) { } DriverResult JoyconDriver::SetPollingMode() { + SCOPE_EXIT({ disable_input_thread = false; }); disable_input_thread = true; rumble_protocol->EnableRumble(vibration_enabled && supported_features.vibration); @@ -276,7 +278,6 @@ DriverResult JoyconDriver::SetPollingMode() { if (irs_enabled && supported_features.irs) { auto result = irs_protocol->EnableIrs(); if (result == DriverResult::Success) { - disable_input_thread = false; return result; } irs_protocol->DisableIrs(); @@ -286,10 +287,6 @@ DriverResult JoyconDriver::SetPollingMode() { if (nfc_enabled && supported_features.nfc) { auto result = nfc_protocol->EnableNfc(); if (result == DriverResult::Success) { - result = nfc_protocol->StartNFCPollingMode(); - } - if (result == DriverResult::Success) { - disable_input_thread = false; return result; } nfc_protocol->DisableNfc(); @@ -303,7 +300,6 @@ DriverResult JoyconDriver::SetPollingMode() { } if (result == DriverResult::Success) { ring_connected = true; - disable_input_thread = false; return result; } ring_connected = false; @@ -314,7 +310,6 @@ DriverResult JoyconDriver::SetPollingMode() { if (passive_enabled && supported_features.passive) { const auto result = generic_protocol->EnablePassiveMode(); if (result == DriverResult::Success) { - disable_input_thread = false; return result; } LOG_ERROR(Input, "Error enabling passive mode"); @@ -328,7 +323,6 @@ DriverResult JoyconDriver::SetPollingMode() { // Switch calls this function after enabling active mode generic_protocol->TriggersElapsed(); - disable_input_thread = false; return result; } @@ -492,9 +486,42 @@ DriverResult JoyconDriver::SetRingConMode() { return result; } -DriverResult JoyconDriver::WriteNfcData(std::span data) { +DriverResult JoyconDriver::StartNfcPolling() { std::scoped_lock lock{mutex}; + + if (!supported_features.nfc) { + return DriverResult::NotSupported; + } + if (!nfc_protocol->IsEnabled()) { + return DriverResult::Disabled; + } + disable_input_thread = true; + const auto result = nfc_protocol->StartNFCPollingMode(); + disable_input_thread = false; + + return result; +} + +DriverResult JoyconDriver::StopNfcPolling() { + std::scoped_lock lock{mutex}; + + if (!supported_features.nfc) { + return DriverResult::NotSupported; + } + if (!nfc_protocol->IsEnabled()) { + return DriverResult::Disabled; + } + + disable_input_thread = true; + const auto result = nfc_protocol->StopNFCPollingMode(); + disable_input_thread = false; + + return result; +} + +DriverResult JoyconDriver::ReadAmiiboData(std::vector& out_data) { + std::scoped_lock lock{mutex}; if (!supported_features.nfc) { return DriverResult::NotSupported; @@ -506,9 +533,72 @@ DriverResult JoyconDriver::WriteNfcData(std::span data) { return DriverResult::ErrorWritingData; } - const auto result = nfc_protocol->WriteAmiibo(data); - + out_data.resize(0x21C); + disable_input_thread = true; + const auto result = nfc_protocol->ReadAmiibo(out_data); disable_input_thread = false; + + return result; +} + +DriverResult JoyconDriver::WriteNfcData(std::span data) { + std::scoped_lock lock{mutex}; + + if (!supported_features.nfc) { + return DriverResult::NotSupported; + } + if (!nfc_protocol->IsEnabled()) { + return DriverResult::Disabled; + } + if (!amiibo_detected) { + return DriverResult::ErrorWritingData; + } + + disable_input_thread = true; + const auto result = nfc_protocol->WriteAmiibo(data); + disable_input_thread = false; + + return result; +} + +DriverResult JoyconDriver::ReadMifareData(std::span data, + std::span out_data) { + std::scoped_lock lock{mutex}; + + if (!supported_features.nfc) { + return DriverResult::NotSupported; + } + if (!nfc_protocol->IsEnabled()) { + return DriverResult::Disabled; + } + if (!amiibo_detected) { + return DriverResult::ErrorWritingData; + } + + disable_input_thread = true; + const auto result = nfc_protocol->ReadMifare(data, out_data); + disable_input_thread = false; + + return result; +} + +DriverResult JoyconDriver::WriteMifareData(std::span data) { + std::scoped_lock lock{mutex}; + + if (!supported_features.nfc) { + return DriverResult::NotSupported; + } + if (!nfc_protocol->IsEnabled()) { + return DriverResult::Disabled; + } + if (!amiibo_detected) { + return DriverResult::ErrorWritingData; + } + + disable_input_thread = true; + const auto result = nfc_protocol->WriteMifare(data); + disable_input_thread = false; + return result; } diff --git a/src/input_common/helpers/joycon_driver.h b/src/input_common/helpers/joycon_driver.h index e9b2fccbb..bc7025a21 100644 --- a/src/input_common/helpers/joycon_driver.h +++ b/src/input_common/helpers/joycon_driver.h @@ -49,7 +49,13 @@ public: DriverResult SetIrMode(); DriverResult SetNfcMode(); DriverResult SetRingConMode(); + DriverResult StartNfcPolling(); + DriverResult StopNfcPolling(); + DriverResult ReadAmiiboData(std::vector& out_data); DriverResult WriteNfcData(std::span data); + DriverResult ReadMifareData(std::span request, + std::span out_data); + DriverResult WriteMifareData(std::span request); void SetCallbacks(const JoyconCallbacks& callbacks); diff --git a/src/input_common/helpers/joycon_protocol/joycon_types.h b/src/input_common/helpers/joycon_protocol/joycon_types.h index 5007b0e18..e0e431156 100644 --- a/src/input_common/helpers/joycon_protocol/joycon_types.h +++ b/src/input_common/helpers/joycon_protocol/joycon_types.h @@ -24,6 +24,7 @@ constexpr std::array DefaultVibrationBuffer{0x0, 0x1, 0x40, 0x40, 0x0, 0x using MacAddress = std::array; using SerialNumber = std::array; using TagUUID = std::array; +using MifareUUID = std::array; enum class ControllerType : u8 { None = 0x00, @@ -307,6 +308,19 @@ enum class NFCStatus : u8 { WriteDone = 0x05, TagLost = 0x07, WriteReady = 0x09, + MifareDone = 0x10, +}; + +enum class MifareCmd : u8 { + None = 0x00, + Read = 0x30, + AuthA = 0x60, + AuthB = 0x61, + Write = 0xA0, + Transfer = 0xB0, + Decrement = 0xC0, + Increment = 0xC1, + Store = 0xC2 }; enum class IrsMode : u8 { @@ -592,6 +606,14 @@ struct NFCWriteCommandData { static_assert(sizeof(NFCWriteCommandData) == 0x15, "NFCWriteCommandData is an invalid size"); #pragma pack(pop) +struct MifareCommandData { + u8 unknown1; + u8 unknown2; + u8 number_of_short_bytes; + MifareUUID uid; +}; +static_assert(sizeof(MifareCommandData) == 0x7, "MifareCommandData is an invalid size"); + struct NFCPollingCommandData { u8 enable_mifare; u8 unknown_1; @@ -629,6 +651,41 @@ struct NFCWritePackage { std::array data_chunks; }; +struct MifareReadChunk { + MifareCmd command; + std::array sector_key; + u8 sector; +}; + +struct MifareWriteChunk { + MifareCmd command; + std::array sector_key; + u8 sector; + std::array data; +}; + +struct MifareReadData { + u8 sector; + std::array data; +}; + +struct MifareReadPackage { + MifareCommandData command_data; + std::array data_chunks; +}; + +struct MifareWritePackage { + MifareCommandData command_data; + std::array data_chunks; +}; + +struct TagInfo { + u8 uuid_length; + u8 protocol; + u8 tag_type; + std::array uuid; +}; + struct IrsConfigure { MCUCommand command; MCUSubCommand sub_command; @@ -744,7 +801,7 @@ struct JoyconCallbacks { std::function on_stick_data; std::function on_motion_data; std::function on_ring_data; - std::function&)> on_amiibo_data; + std::function on_amiibo_data; std::function&, IrsResolution)> on_camera_data; }; diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp index f7058c4a7..261f46255 100644 --- a/src/input_common/helpers/joycon_protocol/nfc.cpp +++ b/src/input_common/helpers/joycon_protocol/nfc.cpp @@ -40,6 +40,16 @@ DriverResult NfcProtocol::EnableNfc() { if (result == DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::Ready); } + if (result == DriverResult::Success) { + MCUCommandResponse output{}; + result = SendStopPollingRequest(output); + } + if (result == DriverResult::Success) { + result = WaitUntilNfcIs(NFCStatus::Ready); + } + if (result == DriverResult::Success) { + is_enabled = true; + } return result; } @@ -54,22 +64,16 @@ DriverResult NfcProtocol::DisableNfc() { } is_enabled = false; + is_polling = false; return result; } DriverResult NfcProtocol::StartNFCPollingMode() { - LOG_DEBUG(Input, "Start NFC pooling Mode"); + LOG_DEBUG(Input, "Start NFC polling Mode"); ScopedSetBlocking sb(this); DriverResult result{DriverResult::Success}; - if (result == DriverResult::Success) { - MCUCommandResponse output{}; - result = SendStopPollingRequest(output); - } - if (result == DriverResult::Success) { - result = WaitUntilNfcIs(NFCStatus::Ready); - } if (result == DriverResult::Success) { MCUCommandResponse output{}; result = SendStartPollingRequest(output); @@ -78,13 +82,32 @@ DriverResult NfcProtocol::StartNFCPollingMode() { result = WaitUntilNfcIs(NFCStatus::Polling); } if (result == DriverResult::Success) { - is_enabled = true; + is_polling = true; } return result; } -DriverResult NfcProtocol::ScanAmiibo(std::vector& data) { +DriverResult NfcProtocol::StopNFCPollingMode() { + LOG_DEBUG(Input, "Stop NFC polling Mode"); + ScopedSetBlocking sb(this); + DriverResult result{DriverResult::Success}; + + if (result == DriverResult::Success) { + MCUCommandResponse output{}; + result = SendStopPollingRequest(output); + } + if (result == DriverResult::Success) { + result = WaitUntilNfcIs(NFCStatus::WriteReady); + } + if (result == DriverResult::Success) { + is_polling = false; + } + + return result; +} + +DriverResult NfcProtocol::GetTagInfo(Joycon::TagInfo& tag_info) { if (update_counter++ < AMIIBO_UPDATE_DELAY) { return DriverResult::Delayed; } @@ -100,11 +123,41 @@ DriverResult NfcProtocol::ScanAmiibo(std::vector& data) { } if (result == DriverResult::Success) { + tag_info = { + .uuid_length = tag_data.uuid_size, + .protocol = 1, + .tag_type = tag_data.type, + .uuid = {}, + }; + + memcpy(tag_info.uuid.data(), tag_data.uuid.data(), tag_data.uuid_size); + + // Investigate why mifare type is not correct + if (tag_info.tag_type == 144) { + tag_info.tag_type = 1U << 6; + } + std::string uuid_string; for (auto& content : tag_data.uuid) { uuid_string += fmt::format(" {:02x}", content); } LOG_INFO(Input, "Tag detected, type={}, uuid={}", tag_data.type, uuid_string); + } + + return result; +} + +DriverResult NfcProtocol::ReadAmiibo(std::vector& data) { + LOG_DEBUG(Input, "Scan for amiibos"); + ScopedSetBlocking sb(this); + DriverResult result{DriverResult::Success}; + TagFoundData tag_data{}; + + if (result == DriverResult::Success) { + result = IsTagInRange(tag_data, 7); + } + + if (result == DriverResult::Success) { result = GetAmiiboData(data); } @@ -154,6 +207,69 @@ DriverResult NfcProtocol::WriteAmiibo(std::span data) { return result; } +DriverResult NfcProtocol::ReadMifare(std::span read_request, + std::span out_data) { + LOG_DEBUG(Input, "Read mifare"); + ScopedSetBlocking sb(this); + DriverResult result{DriverResult::Success}; + TagFoundData tag_data{}; + MifareUUID tag_uuid{}; + + if (result == DriverResult::Success) { + result = IsTagInRange(tag_data, 7); + } + if (result == DriverResult::Success) { + memcpy(tag_uuid.data(), tag_data.uuid.data(), sizeof(MifareUUID)); + result = GetMifareData(tag_uuid, read_request, out_data); + } + if (result == DriverResult::Success) { + MCUCommandResponse output{}; + result = SendStopPollingRequest(output); + } + if (result == DriverResult::Success) { + result = WaitUntilNfcIs(NFCStatus::Ready); + } + if (result == DriverResult::Success) { + MCUCommandResponse output{}; + result = SendStartPollingRequest(output, true); + } + if (result == DriverResult::Success) { + result = WaitUntilNfcIs(NFCStatus::WriteReady); + } + return result; +} + +DriverResult NfcProtocol::WriteMifare(std::span write_request) { + LOG_DEBUG(Input, "Write mifare"); + ScopedSetBlocking sb(this); + DriverResult result{DriverResult::Success}; + TagFoundData tag_data{}; + MifareUUID tag_uuid{}; + + if (result == DriverResult::Success) { + result = IsTagInRange(tag_data, 7); + } + if (result == DriverResult::Success) { + memcpy(tag_uuid.data(), tag_data.uuid.data(), sizeof(MifareUUID)); + result = WriteMifareData(tag_uuid, write_request); + } + if (result == DriverResult::Success) { + MCUCommandResponse output{}; + result = SendStopPollingRequest(output); + } + if (result == DriverResult::Success) { + result = WaitUntilNfcIs(NFCStatus::Ready); + } + if (result == DriverResult::Success) { + MCUCommandResponse output{}; + result = SendStartPollingRequest(output, true); + } + if (result == DriverResult::Success) { + result = WaitUntilNfcIs(NFCStatus::WriteReady); + } + return result; +} + bool NfcProtocol::HasAmiibo() { if (update_counter++ < AMIIBO_UPDATE_DELAY) { return true; @@ -341,6 +457,158 @@ DriverResult NfcProtocol::WriteAmiiboData(const TagUUID& tag_uuid, std::span read_request, + std::span out_data) { + constexpr std::size_t timeout_limit = 60; + const auto nfc_data = MakeMifareReadPackage(tag_uuid, read_request); + const std::vector nfc_buffer_data = SerializeMifareReadPackage(nfc_data); + std::span buffer(nfc_buffer_data); + DriverResult result = DriverResult::Success; + MCUCommandResponse output{}; + u8 block_id = 1; + u8 package_index = 0; + std::size_t tries = 0; + std::size_t current_position = 0; + + LOG_INFO(Input, "Reading Mifare data"); + + // Send data request. Nfc buffer size is 31, Send the data in smaller packages + while (current_position < buffer.size() && tries++ < timeout_limit) { + const std::size_t next_position = + std::min(current_position + sizeof(NFCRequestState::raw_data), buffer.size()); + const std::size_t block_size = next_position - current_position; + const bool is_last_packet = block_size < sizeof(NFCRequestState::raw_data); + + SendReadDataMifareRequest(output, block_id, is_last_packet, + buffer.subspan(current_position, block_size)); + + const auto nfc_status = static_cast(output.mcu_data[6]); + + if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { + return DriverResult::ErrorReadingData; + } + + // Increase position when data is confirmed by the joycon + if (output.mcu_report == MCUReport::NFCState && + (output.mcu_data[1] << 8) + output.mcu_data[0] == 0x0500 && + output.mcu_data[3] == block_id) { + block_id++; + current_position = next_position; + } + } + + if (result != DriverResult::Success) { + return result; + } + + // Wait for reply and save the output data + while (tries++ < timeout_limit) { + result = SendNextPackageRequest(output, package_index); + const auto nfc_status = static_cast(output.mcu_data[6]); + + if (result != DriverResult::Success) { + return result; + } + + if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { + return DriverResult::ErrorReadingData; + } + + if (output.mcu_report == MCUReport::NFCState && output.mcu_data[1] == 0x10) { + constexpr std::size_t DATA_LENGHT = 0x10 + 1; + constexpr std::size_t DATA_START = 11; + const u8 number_of_elements = output.mcu_data[10]; + for (std::size_t i = 0; i < number_of_elements; i++) { + out_data[i].sector = output.mcu_data[DATA_START + (i * DATA_LENGHT)]; + memcpy(out_data[i].data.data(), + output.mcu_data.data() + DATA_START + 1 + (i * DATA_LENGHT), + sizeof(MifareReadData::data)); + } + package_index++; + continue; + } + + if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::MifareDone) { + LOG_INFO(Input, "Finished reading mifare"); + break; + } + } + + return result; +} + +DriverResult NfcProtocol::WriteMifareData(const MifareUUID& tag_uuid, + std::span write_request) { + constexpr std::size_t timeout_limit = 60; + const auto nfc_data = MakeMifareWritePackage(tag_uuid, write_request); + const std::vector nfc_buffer_data = SerializeMifareWritePackage(nfc_data); + std::span buffer(nfc_buffer_data); + DriverResult result = DriverResult::Success; + MCUCommandResponse output{}; + u8 block_id = 1; + u8 package_index = 0; + std::size_t tries = 0; + std::size_t current_position = 0; + + LOG_INFO(Input, "Writing Mifare data"); + + // Send data request. Nfc buffer size is 31, Send the data in smaller packages + while (current_position < buffer.size() && tries++ < timeout_limit) { + const std::size_t next_position = + std::min(current_position + sizeof(NFCRequestState::raw_data), buffer.size()); + const std::size_t block_size = next_position - current_position; + const bool is_last_packet = block_size < sizeof(NFCRequestState::raw_data); + + SendReadDataMifareRequest(output, block_id, is_last_packet, + buffer.subspan(current_position, block_size)); + + const auto nfc_status = static_cast(output.mcu_data[6]); + + if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { + return DriverResult::ErrorReadingData; + } + + // Increase position when data is confirmed by the joycon + if (output.mcu_report == MCUReport::NFCState && + (output.mcu_data[1] << 8) + output.mcu_data[0] == 0x0500 && + output.mcu_data[3] == block_id) { + block_id++; + current_position = next_position; + } + } + + if (result != DriverResult::Success) { + return result; + } + + // Wait for reply and ignore the output data + while (tries++ < timeout_limit) { + result = SendNextPackageRequest(output, package_index); + const auto nfc_status = static_cast(output.mcu_data[6]); + + if (result != DriverResult::Success) { + return result; + } + + if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { + return DriverResult::ErrorReadingData; + } + + if (output.mcu_report == MCUReport::NFCState && output.mcu_data[1] == 0x10) { + package_index++; + continue; + } + + if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::MifareDone) { + LOG_INFO(Input, "Finished writing mifare"); + break; + } + } + + return result; +} + DriverResult NfcProtocol::SendStartPollingRequest(MCUCommandResponse& output, bool is_second_attempt) { NFCRequestState request{ @@ -477,6 +745,28 @@ DriverResult NfcProtocol::SendWriteDataAmiiboRequest(MCUCommandResponse& output, output); } +DriverResult NfcProtocol::SendReadDataMifareRequest(MCUCommandResponse& output, u8 block_id, + bool is_last_packet, std::span data) { + const auto data_size = std::min(data.size(), sizeof(NFCRequestState::raw_data)); + NFCRequestState request{ + .command_argument = NFCCommand::Mifare, + .block_id = block_id, + .packet_id = {}, + .packet_flag = + is_last_packet ? MCUPacketFlag::LastCommandPacket : MCUPacketFlag::MorePacketsRemaining, + .data_length = static_cast(data_size), + .raw_data = {}, + .crc = {}, + }; + memcpy(request.raw_data.data(), data.data(), data_size); + + std::array request_data{}; + memcpy(request_data.data(), &request, sizeof(NFCRequestState)); + request_data[36] = CalculateMCU_CRC8(request_data.data(), 36); + return SendMCUData(ReportMode::NFC_IR_MODE_60HZ, MCUSubCommand::ReadDeviceMode, request_data, + output); +} + std::vector NfcProtocol::SerializeWritePackage(const NFCWritePackage& package) const { const std::size_t header_size = sizeof(NFCWriteCommandData) + sizeof(NFCWritePackage::number_of_chunks); @@ -498,6 +788,48 @@ std::vector NfcProtocol::SerializeWritePackage(const NFCWritePackage& packag return serialized_data; } +std::vector NfcProtocol::SerializeMifareReadPackage(const MifareReadPackage& package) const { + const std::size_t header_size = sizeof(MifareCommandData); + std::vector serialized_data(header_size); + std::size_t start_index = 0; + + memcpy(serialized_data.data(), &package, header_size); + start_index += header_size; + + for (const auto& data_chunk : package.data_chunks) { + const std::size_t chunk_size = sizeof(MifareReadChunk); + if (data_chunk.command == MifareCmd::None) { + continue; + } + serialized_data.resize(start_index + chunk_size); + memcpy(serialized_data.data() + start_index, &data_chunk, chunk_size); + start_index += chunk_size; + } + + return serialized_data; +} + +std::vector NfcProtocol::SerializeMifareWritePackage(const MifareWritePackage& package) const { + const std::size_t header_size = sizeof(MifareCommandData); + std::vector serialized_data(header_size); + std::size_t start_index = 0; + + memcpy(serialized_data.data(), &package, header_size); + start_index += header_size; + + for (const auto& data_chunk : package.data_chunks) { + const std::size_t chunk_size = sizeof(MifareWriteChunk); + if (data_chunk.command == MifareCmd::None) { + continue; + } + serialized_data.resize(start_index + chunk_size); + memcpy(serialized_data.data() + start_index, &data_chunk, chunk_size); + start_index += chunk_size; + } + + return serialized_data; +} + NFCWritePackage NfcProtocol::MakeAmiiboWritePackage(const TagUUID& tag_uuid, std::span data) const { return { @@ -527,6 +859,46 @@ NFCWritePackage NfcProtocol::MakeAmiiboWritePackage(const TagUUID& tag_uuid, }; } +MifareReadPackage NfcProtocol::MakeMifareReadPackage( + const MifareUUID& tag_uuid, std::span read_request) const { + MifareReadPackage package{ + .command_data{ + .unknown1 = 0xd0, + .unknown2 = 0x07, + .number_of_short_bytes = static_cast( + ((read_request.size() * sizeof(MifareReadChunk)) + sizeof(MifareUUID)) / 2), + .uid = tag_uuid, + }, + .data_chunks = {}, + }; + + for (std::size_t i = 0; i < read_request.size() && i < package.data_chunks.size(); ++i) { + package.data_chunks[i] = read_request[i]; + } + + return package; +} + +MifareWritePackage NfcProtocol::MakeMifareWritePackage( + const MifareUUID& tag_uuid, std::span read_request) const { + MifareWritePackage package{ + .command_data{ + .unknown1 = 0xd0, + .unknown2 = 0x07, + .number_of_short_bytes = static_cast( + ((read_request.size() * sizeof(MifareReadChunk)) + sizeof(MifareUUID) + 2) / 2), + .uid = tag_uuid, + }, + .data_chunks = {}, + }; + + for (std::size_t i = 0; i < read_request.size() && i < package.data_chunks.size(); ++i) { + package.data_chunks[i] = read_request[i]; + } + + return package; +} + NFCDataChunk NfcProtocol::MakeAmiiboChunk(u8 page, u8 size, std::span data) const { constexpr u8 NFC_PAGE_SIZE = 4; @@ -606,4 +978,8 @@ bool NfcProtocol::IsEnabled() const { return is_enabled; } +bool NfcProtocol::IsPolling() const { + return is_polling; +} + } // namespace InputCommon::Joycon diff --git a/src/input_common/helpers/joycon_protocol/nfc.h b/src/input_common/helpers/joycon_protocol/nfc.h index eb58c427d..0be95e40e 100644 --- a/src/input_common/helpers/joycon_protocol/nfc.h +++ b/src/input_common/helpers/joycon_protocol/nfc.h @@ -25,14 +25,25 @@ public: DriverResult StartNFCPollingMode(); - DriverResult ScanAmiibo(std::vector& data); + DriverResult StopNFCPollingMode(); + + DriverResult GetTagInfo(Joycon::TagInfo& tag_info); + + DriverResult ReadAmiibo(std::vector& data); DriverResult WriteAmiibo(std::span data); + DriverResult ReadMifare(std::span read_request, + std::span out_data); + + DriverResult WriteMifare(std::span write_request); + bool HasAmiibo(); bool IsEnabled() const; + bool IsPolling() const; + private: // Number of times the function will be delayed until it outputs valid data static constexpr std::size_t AMIIBO_UPDATE_DELAY = 15; @@ -51,6 +62,13 @@ private: DriverResult WriteAmiiboData(const TagUUID& tag_uuid, std::span data); + DriverResult GetMifareData(const MifareUUID& tag_uuid, + std::span read_request, + std::span out_data); + + DriverResult WriteMifareData(const MifareUUID& tag_uuid, + std::span write_request); + DriverResult SendStartPollingRequest(MCUCommandResponse& output, bool is_second_attempt = false); @@ -65,17 +83,31 @@ private: DriverResult SendWriteDataAmiiboRequest(MCUCommandResponse& output, u8 block_id, bool is_last_packet, std::span data); + DriverResult SendReadDataMifareRequest(MCUCommandResponse& output, u8 block_id, + bool is_last_packet, std::span data); + std::vector SerializeWritePackage(const NFCWritePackage& package) const; + std::vector SerializeMifareReadPackage(const MifareReadPackage& package) const; + + std::vector SerializeMifareWritePackage(const MifareWritePackage& package) const; + NFCWritePackage MakeAmiiboWritePackage(const TagUUID& tag_uuid, std::span data) const; NFCDataChunk MakeAmiiboChunk(u8 page, u8 size, std::span data) const; + MifareReadPackage MakeMifareReadPackage(const MifareUUID& tag_uuid, + std::span read_request) const; + + MifareWritePackage MakeMifareWritePackage(const MifareUUID& tag_uuid, + std::span read_request) const; + NFCReadBlockCommand GetReadBlockCommand(NFCPages pages) const; TagUUID GetTagUUID(std::span data) const; bool is_enabled{}; + bool is_polling{}; std::size_t update_counter{}; }; diff --git a/src/input_common/helpers/joycon_protocol/poller.cpp b/src/input_common/helpers/joycon_protocol/poller.cpp index dca797f7a..1aab9e12a 100644 --- a/src/input_common/helpers/joycon_protocol/poller.cpp +++ b/src/input_common/helpers/joycon_protocol/poller.cpp @@ -70,8 +70,8 @@ void JoyconPoller::UpdateColor(const Color& color) { callbacks.on_color_data(color); } -void JoyconPoller::UpdateAmiibo(const std::vector& amiibo_data) { - callbacks.on_amiibo_data(amiibo_data); +void JoyconPoller::UpdateAmiibo(const Joycon::TagInfo& tag_info) { + callbacks.on_amiibo_data(tag_info); } void JoyconPoller::UpdateCamera(const std::vector& camera_data, IrsResolution format) { diff --git a/src/input_common/helpers/joycon_protocol/poller.h b/src/input_common/helpers/joycon_protocol/poller.h index 0fa72c6db..3746abe5d 100644 --- a/src/input_common/helpers/joycon_protocol/poller.h +++ b/src/input_common/helpers/joycon_protocol/poller.h @@ -36,8 +36,8 @@ public: void UpdateColor(const Color& color); void UpdateRing(s16 value, const RingStatus& ring_status); - void UpdateAmiibo(const std::vector& amiibo_data); - void UpdateCamera(const std::vector& amiibo_data, IrsResolution format); + void UpdateAmiibo(const Joycon::TagInfo& tag_info); + void UpdateCamera(const std::vector& camera_data, IrsResolution format); private: void UpdateActiveLeftPadInput(const InputReportActive& input, diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h index 50b5a3dc8..c2d0cbb34 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h @@ -143,12 +143,46 @@ public: return Common::Input::NfcState::NotSupported; } + // Start scanning for nfc tags + virtual Common::Input::NfcState StartNfcPolling( + [[maybe_unused]] const PadIdentifier& identifier_) { + return Common::Input::NfcState::NotSupported; + } + + // Start scanning for nfc tags + virtual Common::Input::NfcState StopNfcPolling( + [[maybe_unused]] const PadIdentifier& identifier_) { + return Common::Input::NfcState::NotSupported; + } + + // Reads data from amiibo tag + virtual Common::Input::NfcState ReadAmiiboData( + [[maybe_unused]] const PadIdentifier& identifier_, + [[maybe_unused]] std::vector& out_data) { + return Common::Input::NfcState::NotSupported; + } + // Writes data to an nfc tag virtual Common::Input::NfcState WriteNfcData([[maybe_unused]] const PadIdentifier& identifier, [[maybe_unused]] const std::vector& data) { return Common::Input::NfcState::NotSupported; } + // Reads data from mifare tag + virtual Common::Input::NfcState ReadMifareData( + [[maybe_unused]] const PadIdentifier& identifier_, + [[maybe_unused]] const Common::Input::MifareRequest& request, + [[maybe_unused]] Common::Input::MifareRequest& out_data) { + return Common::Input::NfcState::NotSupported; + } + + // Write data to mifare tag + virtual Common::Input::NfcState WriteMifareData( + [[maybe_unused]] const PadIdentifier& identifier_, + [[maybe_unused]] const Common::Input::MifareRequest& request) { + return Common::Input::NfcState::NotSupported; + } + // Returns the engine name [[nodiscard]] const std::string& GetEngineName() const; diff --git a/src/input_common/input_poller.cpp b/src/input_common/input_poller.cpp index 380a01542..870e76ab0 100644 --- a/src/input_common/input_poller.cpp +++ b/src/input_common/input_poller.cpp @@ -792,8 +792,7 @@ public: const Common::Input::CallbackStatus status{ .type = Common::Input::InputType::Nfc, - .nfc_status = nfc_status.state, - .raw_data = nfc_status.data, + .nfc_status = nfc_status, }; TriggerOnChange(status); @@ -836,10 +835,31 @@ public: return input_engine->SupportsNfc(identifier); } + Common::Input::NfcState StartNfcPolling() { + return input_engine->StartNfcPolling(identifier); + } + + Common::Input::NfcState StopNfcPolling() { + return input_engine->StopNfcPolling(identifier); + } + + Common::Input::NfcState ReadAmiiboData(std::vector& out_data) { + return input_engine->ReadAmiiboData(identifier, out_data); + } + Common::Input::NfcState WriteNfcData(const std::vector& data) override { return input_engine->WriteNfcData(identifier, data); } + Common::Input::NfcState ReadMifareData(const Common::Input::MifareRequest& request, + Common::Input::MifareRequest& out_data) { + return input_engine->ReadMifareData(identifier, request, out_data); + } + + Common::Input::NfcState WriteMifareData(const Common::Input::MifareRequest& request) { + return input_engine->WriteMifareData(identifier, request); + } + private: const PadIdentifier identifier; InputEngine* input_engine; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 013715b44..cba7c3cce 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3836,7 +3836,7 @@ void GMainWindow::OnLoadAmiibo() { auto* virtual_amiibo = input_subsystem->GetVirtualAmiibo(); // Remove amiibo if one is connected - if (virtual_amiibo->GetCurrentState() == InputCommon::VirtualAmiibo::State::AmiiboIsOpen) { + if (virtual_amiibo->GetCurrentState() == InputCommon::VirtualAmiibo::State::TagNearby) { virtual_amiibo->CloseAmiibo(); QMessageBox::warning(this, tr("Amiibo"), tr("The current amiibo has been removed")); return; @@ -3864,7 +3864,7 @@ void GMainWindow::LoadAmiibo(const QString& filename) { auto* virtual_amiibo = input_subsystem->GetVirtualAmiibo(); const QString title = tr("Error loading Amiibo data"); // Remove amiibo if one is connected - if (virtual_amiibo->GetCurrentState() == InputCommon::VirtualAmiibo::State::AmiiboIsOpen) { + if (virtual_amiibo->GetCurrentState() == InputCommon::VirtualAmiibo::State::TagNearby) { virtual_amiibo->CloseAmiibo(); QMessageBox::warning(this, tr("Amiibo"), tr("The current amiibo has been removed")); return; From 5da70f719703084482933e103e561cc98163f370 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Tue, 23 May 2023 14:45:54 +0100 Subject: [PATCH 42/91] Remove memory allocations in some hot paths --- src/audio_core/device/audio_buffers.h | 8 ++- src/audio_core/device/device_session.cpp | 12 ++-- src/audio_core/device/device_session.h | 7 ++- src/audio_core/in/audio_in_system.cpp | 5 +- src/audio_core/out/audio_out_system.cpp | 4 +- .../renderer/command/data_source/decode.cpp | 23 ++++---- .../renderer/command/effect/compressor.cpp | 8 +-- .../renderer/command/effect/delay.cpp | 14 ++--- .../renderer/command/effect/i3dl2_reverb.cpp | 4 +- .../renderer/command/effect/light_limiter.cpp | 12 ++-- .../renderer/command/effect/reverb.cpp | 12 ++-- .../renderer/command/sink/circular_buffer.cpp | 4 +- .../renderer/command/sink/device.cpp | 5 +- src/audio_core/renderer/mix/mix_context.cpp | 6 +- src/audio_core/renderer/nodes/node_states.cpp | 4 +- src/audio_core/renderer/nodes/node_states.h | 2 +- src/audio_core/renderer/system.cpp | 1 + src/audio_core/sink/null_sink.h | 2 +- src/audio_core/sink/sink_stream.cpp | 15 ++--- src/audio_core/sink/sink_stream.h | 5 +- src/common/ring_buffer.h | 3 +- src/common/scratch_buffer.h | 9 +++ .../hle/kernel/k_synchronization_object.cpp | 3 +- src/core/hle/kernel/k_thread.cpp | 8 +-- src/core/hle/kernel/k_thread.h | 3 +- src/core/hle/kernel/svc/svc_ipc.cpp | 7 ++- .../hle/kernel/svc/svc_synchronization.cpp | 10 ++-- src/core/hle/kernel/svc/svc_thread.cpp | 2 +- src/core/hle/service/audio/audin_u.cpp | 16 ++--- src/core/hle/service/audio/audout_u.cpp | 15 ++--- src/core/hle/service/audio/audren_u.cpp | 22 +++---- src/core/hle/service/audio/audren_u.h | 1 + src/core/hle/service/audio/hwopus.cpp | 9 +-- src/core/hle/service/nvdrv/devices/nvdevice.h | 6 +- .../service/nvdrv/devices/nvdisp_disp0.cpp | 6 +- .../hle/service/nvdrv/devices/nvdisp_disp0.h | 8 +-- .../service/nvdrv/devices/nvhost_as_gpu.cpp | 31 +++++----- .../hle/service/nvdrv/devices/nvhost_as_gpu.h | 30 +++++----- .../hle/service/nvdrv/devices/nvhost_ctrl.cpp | 19 +++--- .../hle/service/nvdrv/devices/nvhost_ctrl.h | 21 ++++--- .../service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 32 +++++----- .../service/nvdrv/devices/nvhost_ctrl_gpu.h | 34 +++++------ .../hle/service/nvdrv/devices/nvhost_gpu.cpp | 59 ++++++++++--------- .../hle/service/nvdrv/devices/nvhost_gpu.h | 36 +++++------ .../service/nvdrv/devices/nvhost_nvdec.cpp | 6 +- .../hle/service/nvdrv/devices/nvhost_nvdec.h | 8 +-- .../nvdrv/devices/nvhost_nvdec_common.cpp | 15 +++-- .../nvdrv/devices/nvhost_nvdec_common.h | 12 ++-- .../service/nvdrv/devices/nvhost_nvjpg.cpp | 8 +-- .../hle/service/nvdrv/devices/nvhost_nvjpg.h | 10 ++-- .../hle/service/nvdrv/devices/nvhost_vic.cpp | 6 +- .../hle/service/nvdrv/devices/nvhost_vic.h | 8 +-- src/core/hle/service/nvdrv/devices/nvmap.cpp | 20 +++---- src/core/hle/service/nvdrv/devices/nvmap.h | 20 +++---- src/core/hle/service/nvdrv/nvdrv.cpp | 8 +-- src/core/hle/service/nvdrv/nvdrv.h | 8 +-- .../hle/service/nvdrv/nvdrv_interface.cpp | 24 ++++---- src/core/hle/service/nvdrv/nvdrv_interface.h | 3 + src/core/hle/service/nvnflinger/parcel.h | 7 ++- .../backend/glsl/glsl_emit_context.cpp | 2 +- .../backend/spirv/emit_spirv.cpp | 2 +- .../backend/spirv/spirv_emit_context.cpp | 2 +- src/shader_recompiler/runtime_info.h | 3 +- src/video_core/buffer_cache/buffer_cache.h | 4 +- .../buffer_cache/buffer_cache_base.h | 4 +- src/video_core/cdma_pusher.h | 1 - src/video_core/dma_pusher.h | 8 ++- src/video_core/engines/maxwell_dma.cpp | 35 ++++++----- src/video_core/host1x/codecs/h264.cpp | 4 +- src/video_core/memory_manager.cpp | 13 ++-- src/video_core/memory_manager.h | 15 +++-- .../renderer_opengl/gl_shader_cache.cpp | 4 +- .../renderer_vulkan/vk_buffer_cache.cpp | 2 +- .../renderer_vulkan/vk_pipeline_cache.cpp | 10 +++- .../renderer_vulkan/vk_texture_cache.cpp | 27 +++++---- src/video_core/shader_cache.cpp | 4 +- src/video_core/texture_cache/image_base.h | 5 +- src/video_core/texture_cache/texture_cache.h | 14 ++--- .../texture_cache/texture_cache_base.h | 4 +- src/video_core/texture_cache/util.cpp | 48 ++++++++------- src/video_core/texture_cache/util.h | 31 +++++----- src/video_core/transform_feedback.cpp | 8 ++- src/video_core/transform_feedback.h | 2 +- .../vulkan_common/vulkan_device.cpp | 1 + 84 files changed, 501 insertions(+), 458 deletions(-) diff --git a/src/audio_core/device/audio_buffers.h b/src/audio_core/device/audio_buffers.h index 15082f6c6..5d8ed0ef7 100644 --- a/src/audio_core/device/audio_buffers.h +++ b/src/audio_core/device/audio_buffers.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "audio_buffer.h" #include "audio_core/device/device_session.h" @@ -48,7 +49,7 @@ public: * * @param out_buffers - The buffers which were registered. */ - void RegisterBuffers(std::vector& out_buffers) { + void RegisterBuffers(boost::container::static_vector& out_buffers) { std::scoped_lock l{lock}; const s32 to_register{std::min(std::min(appended_count, BufferAppendLimit), BufferAppendLimit - registered_count)}; @@ -162,7 +163,8 @@ public: * @param max_buffers - Maximum number of buffers to released. * @return The number of buffers released. */ - u32 GetRegisteredAppendedBuffers(std::vector& buffers_flushed, u32 max_buffers) { + u32 GetRegisteredAppendedBuffers( + boost::container::static_vector& buffers_flushed, u32 max_buffers) { std::scoped_lock l{lock}; if (registered_count + appended_count == 0) { return 0; @@ -270,7 +272,7 @@ public: */ bool FlushBuffers(u32& buffers_released) { std::scoped_lock l{lock}; - std::vector buffers_flushed{}; + boost::container::static_vector buffers_flushed{}; buffers_released = GetRegisteredAppendedBuffers(buffers_flushed, append_limit); diff --git a/src/audio_core/device/device_session.cpp b/src/audio_core/device/device_session.cpp index b5c0ef0e6..86811fcb8 100644 --- a/src/audio_core/device/device_session.cpp +++ b/src/audio_core/device/device_session.cpp @@ -79,7 +79,7 @@ void DeviceSession::ClearBuffers() { } } -void DeviceSession::AppendBuffers(std::span buffers) const { +void DeviceSession::AppendBuffers(std::span buffers) { for (const auto& buffer : buffers) { Sink::SinkBuffer new_buffer{ .frames = buffer.size / (channel_count * sizeof(s16)), @@ -88,13 +88,13 @@ void DeviceSession::AppendBuffers(std::span buffers) const { .consumed = false, }; + tmp_samples.resize_destructive(buffer.size / sizeof(s16)); if (type == Sink::StreamType::In) { - std::vector samples{}; - stream->AppendBuffer(new_buffer, samples); + stream->AppendBuffer(new_buffer, tmp_samples); } else { - std::vector samples(buffer.size / sizeof(s16)); - system.ApplicationMemory().ReadBlockUnsafe(buffer.samples, samples.data(), buffer.size); - stream->AppendBuffer(new_buffer, samples); + system.ApplicationMemory().ReadBlockUnsafe(buffer.samples, tmp_samples.data(), + buffer.size); + stream->AppendBuffer(new_buffer, tmp_samples); } } } diff --git a/src/audio_core/device/device_session.h b/src/audio_core/device/device_session.h index 75f766c68..7d52f362d 100644 --- a/src/audio_core/device/device_session.h +++ b/src/audio_core/device/device_session.h @@ -10,6 +10,7 @@ #include "audio_core/common/common.h" #include "audio_core/sink/sink.h" +#include "common/scratch_buffer.h" #include "core/hle/service/audio/errors.h" namespace Core { @@ -62,7 +63,7 @@ public: * * @param buffers - The buffers to play. */ - void AppendBuffers(std::span buffers) const; + void AppendBuffers(std::span buffers); /** * (Audio In only) Pop samples from the backend, and write them back to this buffer's address. @@ -146,8 +147,8 @@ private: std::shared_ptr thread_event; /// Is this session initialised? bool initialized{}; - /// Buffer queue - std::vector buffer_queue{}; + /// Temporary sample buffer + Common::ScratchBuffer tmp_samples{}; }; } // namespace AudioCore diff --git a/src/audio_core/in/audio_in_system.cpp b/src/audio_core/in/audio_in_system.cpp index e23e51758..579129121 100644 --- a/src/audio_core/in/audio_in_system.cpp +++ b/src/audio_core/in/audio_in_system.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include + #include "audio_core/audio_event.h" #include "audio_core/audio_manager.h" #include "audio_core/in/audio_in_system.h" @@ -89,7 +90,7 @@ Result System::Start() { session->Start(); state = State::Started; - std::vector buffers_to_flush{}; + boost::container::static_vector buffers_to_flush{}; buffers.RegisterBuffers(buffers_to_flush); session->AppendBuffers(buffers_to_flush); session->SetRingSize(static_cast(buffers_to_flush.size())); @@ -134,7 +135,7 @@ bool System::AppendBuffer(const AudioInBuffer& buffer, const u64 tag) { void System::RegisterBuffers() { if (state == State::Started) { - std::vector registered_buffers{}; + boost::container::static_vector registered_buffers{}; buffers.RegisterBuffers(registered_buffers); session->AppendBuffers(registered_buffers); } diff --git a/src/audio_core/out/audio_out_system.cpp b/src/audio_core/out/audio_out_system.cpp index bd13f7219..0adf64bd3 100644 --- a/src/audio_core/out/audio_out_system.cpp +++ b/src/audio_core/out/audio_out_system.cpp @@ -89,7 +89,7 @@ Result System::Start() { session->Start(); state = State::Started; - std::vector buffers_to_flush{}; + boost::container::static_vector buffers_to_flush{}; buffers.RegisterBuffers(buffers_to_flush); session->AppendBuffers(buffers_to_flush); session->SetRingSize(static_cast(buffers_to_flush.size())); @@ -134,7 +134,7 @@ bool System::AppendBuffer(const AudioOutBuffer& buffer, u64 tag) { void System::RegisterBuffers() { if (state == State::Started) { - std::vector registered_buffers{}; + boost::container::static_vector registered_buffers{}; buffers.RegisterBuffers(registered_buffers); session->AppendBuffers(registered_buffers); } diff --git a/src/audio_core/renderer/command/data_source/decode.cpp b/src/audio_core/renderer/command/data_source/decode.cpp index ff5d31bd6..f45933203 100644 --- a/src/audio_core/renderer/command/data_source/decode.cpp +++ b/src/audio_core/renderer/command/data_source/decode.cpp @@ -8,6 +8,7 @@ #include "audio_core/renderer/command/resample/resample.h" #include "common/fixed_point.h" #include "common/logging/log.h" +#include "common/scratch_buffer.h" #include "core/memory.h" namespace AudioCore::AudioRenderer { @@ -27,6 +28,7 @@ constexpr std::array PitchBySrcQuality = {4, 8, 4}; template static u32 DecodePcm(Core::Memory::Memory& memory, std::span out_buffer, const DecodeArg& req) { + std::array tmp_samples{}; constexpr s32 min{std::numeric_limits::min()}; constexpr s32 max{std::numeric_limits::max()}; @@ -49,18 +51,17 @@ static u32 DecodePcm(Core::Memory::Memory& memory, std::span out_buffer, const u64 size{channel_count * samples_to_decode}; const u64 size_bytes{size * sizeof(T)}; - std::vector samples(size); - memory.ReadBlockUnsafe(source, samples.data(), size_bytes); + memory.ReadBlockUnsafe(source, tmp_samples.data(), size_bytes); if constexpr (std::is_floating_point_v) { for (u32 i = 0; i < samples_to_decode; i++) { - auto sample{static_cast(samples[i * channel_count + req.target_channel] * + auto sample{static_cast(tmp_samples[i * channel_count + req.target_channel] * std::numeric_limits::max())}; out_buffer[i] = static_cast(std::clamp(sample, min, max)); } } else { for (u32 i = 0; i < samples_to_decode; i++) { - out_buffer[i] = samples[i * channel_count + req.target_channel]; + out_buffer[i] = tmp_samples[i * channel_count + req.target_channel]; } } } break; @@ -73,17 +74,16 @@ static u32 DecodePcm(Core::Memory::Memory& memory, std::span out_buffer, } const VAddr source{req.buffer + ((req.start_offset + req.offset) * sizeof(T))}; - std::vector samples(samples_to_decode); - memory.ReadBlockUnsafe(source, samples.data(), samples_to_decode * sizeof(T)); + memory.ReadBlockUnsafe(source, tmp_samples.data(), samples_to_decode * sizeof(T)); if constexpr (std::is_floating_point_v) { for (u32 i = 0; i < samples_to_decode; i++) { - auto sample{static_cast(samples[i * channel_count + req.target_channel] * + auto sample{static_cast(tmp_samples[i * channel_count + req.target_channel] * std::numeric_limits::max())}; out_buffer[i] = static_cast(std::clamp(sample, min, max)); } } else { - std::memcpy(out_buffer.data(), samples.data(), samples_to_decode * sizeof(s16)); + std::memcpy(out_buffer.data(), tmp_samples.data(), samples_to_decode * sizeof(s16)); } break; } @@ -101,6 +101,7 @@ static u32 DecodePcm(Core::Memory::Memory& memory, std::span out_buffer, */ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span out_buffer, const DecodeArg& req) { + std::array wavebuffer{}; constexpr u32 SamplesPerFrame{14}; constexpr u32 NibblesPerFrame{16}; @@ -138,9 +139,7 @@ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span out_buffer, } const auto size{std::max((samples_to_process / 8U) * SamplesPerFrame, 8U)}; - std::vector wavebuffer(size); - memory.ReadBlockUnsafe(req.buffer + position_in_frame / 2, wavebuffer.data(), - wavebuffer.size()); + memory.ReadBlockUnsafe(req.buffer + position_in_frame / 2, wavebuffer.data(), size); auto context{req.adpcm_context}; auto header{context->header}; @@ -258,7 +257,7 @@ void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuf u32 offset{voice_state.offset}; auto output_buffer{args.output}; - std::vector temp_buffer(TempBufferSize, 0); + std::array temp_buffer{}; while (remaining_sample_count > 0) { const auto samples_to_write{std::min(remaining_sample_count, max_remaining_sample_count)}; diff --git a/src/audio_core/renderer/command/effect/compressor.cpp b/src/audio_core/renderer/command/effect/compressor.cpp index 7229618e8..ee9b68d5b 100644 --- a/src/audio_core/renderer/command/effect/compressor.cpp +++ b/src/audio_core/renderer/command/effect/compressor.cpp @@ -44,8 +44,8 @@ static void InitializeCompressorEffect(const CompressorInfo::ParameterVersion2& static void ApplyCompressorEffect(const CompressorInfo::ParameterVersion2& params, CompressorInfo::State& state, bool enabled, - std::vector> input_buffers, - std::vector> output_buffers, u32 sample_count) { + std::span> input_buffers, + std::span> output_buffers, u32 sample_count) { if (enabled) { auto state_00{state.unk_00}; auto state_04{state.unk_04}; @@ -124,8 +124,8 @@ void CompressorCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& } void CompressorCommand::Process(const ADSP::CommandListProcessor& processor) { - std::vector> input_buffers(parameter.channel_count); - std::vector> output_buffers(parameter.channel_count); + std::array, MaxChannels> input_buffers{}; + std::array, MaxChannels> output_buffers{}; for (s16 i = 0; i < parameter.channel_count; i++) { input_buffers[i] = processor.mix_buffers.subspan(inputs[i] * processor.sample_count, diff --git a/src/audio_core/renderer/command/effect/delay.cpp b/src/audio_core/renderer/command/effect/delay.cpp index a4e408d40..e536cbb1e 100644 --- a/src/audio_core/renderer/command/effect/delay.cpp +++ b/src/audio_core/renderer/command/effect/delay.cpp @@ -51,7 +51,7 @@ static void InitializeDelayEffect(const DelayInfo::ParameterVersion1& params, state.delay_lines[channel].sample_count_max = sample_count_max.to_int_floor(); state.delay_lines[channel].sample_count = sample_count.to_int_floor(); state.delay_lines[channel].buffer.resize(state.delay_lines[channel].sample_count, 0); - if (state.delay_lines[channel].buffer.size() == 0) { + if (state.delay_lines[channel].sample_count == 0) { state.delay_lines[channel].buffer.push_back(0); } state.delay_lines[channel].buffer_pos = 0; @@ -74,8 +74,8 @@ static void InitializeDelayEffect(const DelayInfo::ParameterVersion1& params, */ template static void ApplyDelay(const DelayInfo::ParameterVersion1& params, DelayInfo::State& state, - std::vector>& inputs, - std::vector>& outputs, const u32 sample_count) { + std::span> inputs, std::span> outputs, + const u32 sample_count) { for (u32 sample_index = 0; sample_index < sample_count; sample_index++) { std::array, NumChannels> input_samples{}; for (u32 channel = 0; channel < NumChannels; channel++) { @@ -153,8 +153,8 @@ static void ApplyDelay(const DelayInfo::ParameterVersion1& params, DelayInfo::St * @param sample_count - Number of samples to process. */ static void ApplyDelayEffect(const DelayInfo::ParameterVersion1& params, DelayInfo::State& state, - const bool enabled, std::vector>& inputs, - std::vector>& outputs, const u32 sample_count) { + const bool enabled, std::span> inputs, + std::span> outputs, const u32 sample_count) { if (!IsChannelCountValid(params.channel_count)) { LOG_ERROR(Service_Audio, "Invalid delay channels {}", params.channel_count); @@ -208,8 +208,8 @@ void DelayCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& proce } void DelayCommand::Process(const ADSP::CommandListProcessor& processor) { - std::vector> input_buffers(parameter.channel_count); - std::vector> output_buffers(parameter.channel_count); + std::array, MaxChannels> input_buffers{}; + std::array, MaxChannels> output_buffers{}; for (s16 i = 0; i < parameter.channel_count; i++) { input_buffers[i] = processor.mix_buffers.subspan(inputs[i] * processor.sample_count, diff --git a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp index 27d8b9844..d2bfb67cc 100644 --- a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp +++ b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp @@ -408,8 +408,8 @@ void I3dl2ReverbCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& } void I3dl2ReverbCommand::Process(const ADSP::CommandListProcessor& processor) { - std::vector> input_buffers(parameter.channel_count); - std::vector> output_buffers(parameter.channel_count); + std::array, MaxChannels> input_buffers{}; + std::array, MaxChannels> output_buffers{}; for (u32 i = 0; i < parameter.channel_count; i++) { input_buffers[i] = processor.mix_buffers.subspan(inputs[i] * processor.sample_count, diff --git a/src/audio_core/renderer/command/effect/light_limiter.cpp b/src/audio_core/renderer/command/effect/light_limiter.cpp index e8fb0e2fc..4161a9821 100644 --- a/src/audio_core/renderer/command/effect/light_limiter.cpp +++ b/src/audio_core/renderer/command/effect/light_limiter.cpp @@ -47,8 +47,8 @@ static void InitializeLightLimiterEffect(const LightLimiterInfo::ParameterVersio */ static void ApplyLightLimiterEffect(const LightLimiterInfo::ParameterVersion2& params, LightLimiterInfo::State& state, const bool enabled, - std::vector>& inputs, - std::vector>& outputs, const u32 sample_count, + std::span> inputs, + std::span> outputs, const u32 sample_count, LightLimiterInfo::StatisticsInternal* statistics) { constexpr s64 min{std::numeric_limits::min()}; constexpr s64 max{std::numeric_limits::max()}; @@ -147,8 +147,8 @@ void LightLimiterVersion1Command::Dump([[maybe_unused]] const ADSP::CommandListP } void LightLimiterVersion1Command::Process(const ADSP::CommandListProcessor& processor) { - std::vector> input_buffers(parameter.channel_count); - std::vector> output_buffers(parameter.channel_count); + std::array, MaxChannels> input_buffers{}; + std::array, MaxChannels> output_buffers{}; for (u32 i = 0; i < parameter.channel_count; i++) { input_buffers[i] = processor.mix_buffers.subspan(inputs[i] * processor.sample_count, @@ -190,8 +190,8 @@ void LightLimiterVersion2Command::Dump([[maybe_unused]] const ADSP::CommandListP } void LightLimiterVersion2Command::Process(const ADSP::CommandListProcessor& processor) { - std::vector> input_buffers(parameter.channel_count); - std::vector> output_buffers(parameter.channel_count); + std::array, MaxChannels> input_buffers{}; + std::array, MaxChannels> output_buffers{}; for (u32 i = 0; i < parameter.channel_count; i++) { input_buffers[i] = processor.mix_buffers.subspan(inputs[i] * processor.sample_count, diff --git a/src/audio_core/renderer/command/effect/reverb.cpp b/src/audio_core/renderer/command/effect/reverb.cpp index 8b9b65214..fc2f15a5e 100644 --- a/src/audio_core/renderer/command/effect/reverb.cpp +++ b/src/audio_core/renderer/command/effect/reverb.cpp @@ -250,8 +250,8 @@ static Common::FixedPoint<50, 14> Axfx2AllPassTick(ReverbInfo::ReverbDelayLine& */ template static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, ReverbInfo::State& state, - std::vector>& inputs, - std::vector>& outputs, const u32 sample_count) { + std::span> inputs, + std::span> outputs, const u32 sample_count) { static constexpr std::array OutTapIndexes1Ch{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; @@ -369,8 +369,8 @@ static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, Rever * @param sample_count - Number of samples to process. */ static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, ReverbInfo::State& state, - const bool enabled, std::vector>& inputs, - std::vector>& outputs, const u32 sample_count) { + const bool enabled, std::span> inputs, + std::span> outputs, const u32 sample_count) { if (enabled) { switch (params.channel_count) { case 0: @@ -412,8 +412,8 @@ void ReverbCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor& proc } void ReverbCommand::Process(const ADSP::CommandListProcessor& processor) { - std::vector> input_buffers(parameter.channel_count); - std::vector> output_buffers(parameter.channel_count); + std::array, MaxChannels> input_buffers{}; + std::array, MaxChannels> output_buffers{}; for (u32 i = 0; i < parameter.channel_count; i++) { input_buffers[i] = processor.mix_buffers.subspan(inputs[i] * processor.sample_count, diff --git a/src/audio_core/renderer/command/sink/circular_buffer.cpp b/src/audio_core/renderer/command/sink/circular_buffer.cpp index ded5afc94..e2ce59792 100644 --- a/src/audio_core/renderer/command/sink/circular_buffer.cpp +++ b/src/audio_core/renderer/command/sink/circular_buffer.cpp @@ -24,7 +24,7 @@ void CircularBufferSinkCommand::Process(const ADSP::CommandListProcessor& proces constexpr s32 min{std::numeric_limits::min()}; constexpr s32 max{std::numeric_limits::max()}; - std::vector output(processor.sample_count); + std::array output{}; for (u32 channel = 0; channel < input_count; channel++) { auto input{processor.mix_buffers.subspan(inputs[channel] * processor.sample_count, processor.sample_count)}; @@ -33,7 +33,7 @@ void CircularBufferSinkCommand::Process(const ADSP::CommandListProcessor& proces } processor.memory->WriteBlockUnsafe(address + pos, output.data(), - output.size() * sizeof(s16)); + processor.sample_count * sizeof(s16)); pos += static_cast(processor.sample_count * sizeof(s16)); if (pos >= size) { pos = 0; diff --git a/src/audio_core/renderer/command/sink/device.cpp b/src/audio_core/renderer/command/sink/device.cpp index e88372a75..5f74dd7ad 100644 --- a/src/audio_core/renderer/command/sink/device.cpp +++ b/src/audio_core/renderer/command/sink/device.cpp @@ -33,8 +33,7 @@ void DeviceSinkCommand::Process(const ADSP::CommandListProcessor& processor) { .consumed{false}, }; - std::vector samples(out_buffer.frames * input_count); - + std::array samples{}; for (u32 channel = 0; channel < input_count; channel++) { const auto offset{inputs[channel] * out_buffer.frames}; @@ -45,7 +44,7 @@ void DeviceSinkCommand::Process(const ADSP::CommandListProcessor& processor) { } out_buffer.tag = reinterpret_cast(samples.data()); - stream->AppendBuffer(out_buffer, samples); + stream->AppendBuffer(out_buffer, {samples.data(), out_buffer.frames * input_count}); if (stream->IsPaused()) { stream->Start(); diff --git a/src/audio_core/renderer/mix/mix_context.cpp b/src/audio_core/renderer/mix/mix_context.cpp index 35b748ede..3a18ae7c2 100644 --- a/src/audio_core/renderer/mix/mix_context.cpp +++ b/src/audio_core/renderer/mix/mix_context.cpp @@ -125,10 +125,10 @@ bool MixContext::TSortInfo(const SplitterContext& splitter_context) { return false; } - std::vector sorted_results{node_states.GetSortedResuls()}; - const auto result_size{std::min(count, static_cast(sorted_results.size()))}; + auto sorted_results{node_states.GetSortedResuls()}; + const auto result_size{std::min(count, static_cast(sorted_results.second))}; for (s32 i = 0; i < result_size; i++) { - sorted_mix_infos[i] = &mix_infos[sorted_results[i]]; + sorted_mix_infos[i] = &mix_infos[sorted_results.first[i]]; } CalcMixBufferOffset(); diff --git a/src/audio_core/renderer/nodes/node_states.cpp b/src/audio_core/renderer/nodes/node_states.cpp index 1821a51e6..b7a44a54c 100644 --- a/src/audio_core/renderer/nodes/node_states.cpp +++ b/src/audio_core/renderer/nodes/node_states.cpp @@ -134,8 +134,8 @@ u32 NodeStates::GetNodeCount() const { return node_count; } -std::vector NodeStates::GetSortedResuls() const { - return {results.rbegin(), results.rbegin() + result_pos}; +std::pair::reverse_iterator, size_t> NodeStates::GetSortedResuls() const { + return {results.rbegin(), result_pos}; } } // namespace AudioCore::AudioRenderer diff --git a/src/audio_core/renderer/nodes/node_states.h b/src/audio_core/renderer/nodes/node_states.h index 94b1d1254..e768cd4b5 100644 --- a/src/audio_core/renderer/nodes/node_states.h +++ b/src/audio_core/renderer/nodes/node_states.h @@ -175,7 +175,7 @@ public: * * @return Vector of nodes in reverse order. */ - std::vector GetSortedResuls() const; + std::pair::reverse_iterator, size_t> GetSortedResuls() const; private: /// Number of nodes in the graph diff --git a/src/audio_core/renderer/system.cpp b/src/audio_core/renderer/system.cpp index 53b258c4f..a23627472 100644 --- a/src/audio_core/renderer/system.cpp +++ b/src/audio_core/renderer/system.cpp @@ -444,6 +444,7 @@ Result System::Update(std::span input, std::span performance, std: std::scoped_lock l{lock}; const auto start_time{core.CoreTiming().GetClockTicks()}; + std::memset(output.data(), 0, output.size()); InfoUpdater info_updater(input, output, process_handle, behavior); diff --git a/src/audio_core/sink/null_sink.h b/src/audio_core/sink/null_sink.h index 1215d3cd2..b6b43c93e 100644 --- a/src/audio_core/sink/null_sink.h +++ b/src/audio_core/sink/null_sink.h @@ -20,7 +20,7 @@ public: explicit NullSinkStreamImpl(Core::System& system_, StreamType type_) : SinkStream{system_, type_} {} ~NullSinkStreamImpl() override {} - void AppendBuffer(SinkBuffer&, std::vector&) override {} + void AppendBuffer(SinkBuffer&, std::span) override {} std::vector ReleaseBuffer(u64) override { return {}; } diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp index 9a718a9cc..404dcd0e9 100644 --- a/src/audio_core/sink/sink_stream.cpp +++ b/src/audio_core/sink/sink_stream.cpp @@ -18,7 +18,7 @@ namespace AudioCore::Sink { -void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector& samples) { +void SinkStream::AppendBuffer(SinkBuffer& buffer, std::span samples) { if (type == StreamType::In) { queue.enqueue(buffer); queued_buffers++; @@ -66,15 +66,16 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector& samples) { static_cast(std::clamp(right_sample, min, max)); } - samples.resize(samples.size() / system_channels * device_channels); + samples = samples.subspan(0, samples.size() / system_channels * device_channels); } else if (system_channels == 2 && device_channels == 6) { // We need moar samples! Not all games will provide 6 channel audio. // TODO: Implement some upmixing here. Currently just passthrough, with other // channels left as silence. - std::vector new_samples(samples.size() / system_channels * device_channels, 0); + auto new_size = samples.size() / system_channels * device_channels; + tmp_samples.resize_destructive(new_size); - for (u32 read_index = 0, write_index = 0; read_index < samples.size(); + for (u32 read_index = 0, write_index = 0; read_index < new_size; read_index += system_channels, write_index += device_channels) { const auto left_sample{static_cast(std::clamp( static_cast( @@ -82,7 +83,7 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector& samples) { volume), min, max))}; - new_samples[write_index + static_cast(Channels::FrontLeft)] = left_sample; + tmp_samples[write_index + static_cast(Channels::FrontLeft)] = left_sample; const auto right_sample{static_cast(std::clamp( static_cast( @@ -90,9 +91,9 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector& samples) { volume), min, max))}; - new_samples[write_index + static_cast(Channels::FrontRight)] = right_sample; + tmp_samples[write_index + static_cast(Channels::FrontRight)] = right_sample; } - samples = std::move(new_samples); + samples = std::span(tmp_samples); } else if (volume != 1.0f) { for (u32 i = 0; i < samples.size(); i++) { diff --git a/src/audio_core/sink/sink_stream.h b/src/audio_core/sink/sink_stream.h index 41cbadc9c..98d72ace1 100644 --- a/src/audio_core/sink/sink_stream.h +++ b/src/audio_core/sink/sink_stream.h @@ -16,6 +16,7 @@ #include "common/polyfill_thread.h" #include "common/reader_writer_queue.h" #include "common/ring_buffer.h" +#include "common/scratch_buffer.h" #include "common/thread.h" namespace Core { @@ -170,7 +171,7 @@ public: * @param buffer - Audio buffer information to be queued. * @param samples - The s16 samples to be queue for playback. */ - virtual void AppendBuffer(SinkBuffer& buffer, std::vector& samples); + virtual void AppendBuffer(SinkBuffer& buffer, std::span samples); /** * Release a buffer. Audio In only, will fill a buffer with recorded samples. @@ -255,6 +256,8 @@ private: /// Signalled when ring buffer entries are consumed std::condition_variable_any release_cv; std::mutex release_mutex; + /// Temporary buffer for appending samples when upmixing + Common::ScratchBuffer tmp_samples{}; }; using SinkStreamPtr = std::unique_ptr; diff --git a/src/common/ring_buffer.h b/src/common/ring_buffer.h index 4c328ab44..416680d44 100644 --- a/src/common/ring_buffer.h +++ b/src/common/ring_buffer.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -53,7 +54,7 @@ public: return push_count; } - std::size_t Push(const std::vector& input) { + std::size_t Push(const std::span input) { return Push(input.data(), input.size()); } diff --git a/src/common/scratch_buffer.h b/src/common/scratch_buffer.h index a69a5a7af..6fe907953 100644 --- a/src/common/scratch_buffer.h +++ b/src/common/scratch_buffer.h @@ -3,6 +3,9 @@ #pragma once +#include + +#include "common/concepts.h" #include "common/make_unique_for_overwrite.h" namespace Common { @@ -16,6 +19,12 @@ namespace Common { template class ScratchBuffer { public: + using iterator = T*; + using const_iterator = const T*; + using value_type = T; + using element_type = T; + using iterator_category = std::contiguous_iterator_tag; + ScratchBuffer() = default; explicit ScratchBuffer(size_t initial_capacity) diff --git a/src/core/hle/kernel/k_synchronization_object.cpp b/src/core/hle/kernel/k_synchronization_object.cpp index b7da3eee7..3e5b735b1 100644 --- a/src/core/hle/kernel/k_synchronization_object.cpp +++ b/src/core/hle/kernel/k_synchronization_object.cpp @@ -3,6 +3,7 @@ #include "common/assert.h" #include "common/common_types.h" +#include "common/scratch_buffer.h" #include "core/hle/kernel/k_scheduler.h" #include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h" #include "core/hle/kernel/k_synchronization_object.h" @@ -75,7 +76,7 @@ Result KSynchronizationObject::Wait(KernelCore& kernel, s32* out_index, KSynchronizationObject** objects, const s32 num_objects, s64 timeout) { // Allocate space on stack for thread nodes. - std::vector thread_nodes(num_objects); + std::array thread_nodes; // Prepare for wait. KThread* thread = GetCurrentThreadPointer(kernel); diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 908811e2c..adb6ec581 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -909,7 +909,7 @@ Result KThread::SetActivity(Svc::ThreadActivity activity) { R_SUCCEED(); } -Result KThread::GetThreadContext3(std::vector& out) { +Result KThread::GetThreadContext3(Common::ScratchBuffer& out) { // Lock ourselves. KScopedLightLock lk{m_activity_pause_lock}; @@ -927,15 +927,13 @@ Result KThread::GetThreadContext3(std::vector& out) { // Mask away mode bits, interrupt bits, IL bit, and other reserved bits. auto context = GetContext64(); context.pstate &= 0xFF0FFE20; - - out.resize(sizeof(context)); + out.resize_destructive(sizeof(context)); std::memcpy(out.data(), std::addressof(context), sizeof(context)); } else { // Mask away mode bits, interrupt bits, IL bit, and other reserved bits. auto context = GetContext32(); context.cpsr &= 0xFF0FFE20; - - out.resize(sizeof(context)); + out.resize_destructive(sizeof(context)); std::memcpy(out.data(), std::addressof(context), sizeof(context)); } } diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index 37fe5db77..dd662b3f8 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -15,6 +15,7 @@ #include "common/intrusive_list.h" #include "common/intrusive_red_black_tree.h" +#include "common/scratch_buffer.h" #include "common/spin_lock.h" #include "core/arm/arm_interface.h" #include "core/hle/kernel/k_affinity_mask.h" @@ -567,7 +568,7 @@ public: void RemoveWaiter(KThread* thread); - Result GetThreadContext3(std::vector& out); + Result GetThreadContext3(Common::ScratchBuffer& out); KThread* RemoveUserWaiterByKey(bool* out_has_waiters, KProcessAddress key) { return this->RemoveWaiterByKey(out_has_waiters, key, false); diff --git a/src/core/hle/kernel/svc/svc_ipc.cpp b/src/core/hle/kernel/svc/svc_ipc.cpp index ea03068aa..60247df2e 100644 --- a/src/core/hle/kernel/svc/svc_ipc.cpp +++ b/src/core/hle/kernel/svc/svc_ipc.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common/scope_exit.h" +#include "common/scratch_buffer.h" #include "core/core.h" #include "core/hle/kernel/k_client_session.h" #include "core/hle/kernel/k_process.h" @@ -45,11 +46,11 @@ Result ReplyAndReceive(Core::System& system, s32* out_index, uint64_t handles_ad handles_addr, static_cast(sizeof(Handle) * num_handles)), ResultInvalidPointer); - std::vector handles(num_handles); + std::array handles; GetCurrentMemory(kernel).ReadBlock(handles_addr, handles.data(), sizeof(Handle) * num_handles); // Convert handle list to object table. - std::vector objs(num_handles); + std::array objs; R_UNLESS(handle_table.GetMultipleObjects(objs.data(), handles.data(), num_handles), ResultInvalidHandle); @@ -80,7 +81,7 @@ Result ReplyAndReceive(Core::System& system, s32* out_index, uint64_t handles_ad // Wait for an object. s32 index; Result result = KSynchronizationObject::Wait(kernel, std::addressof(index), objs.data(), - static_cast(objs.size()), timeout_ns); + num_handles, timeout_ns); if (result == ResultTimedOut) { R_RETURN(result); } diff --git a/src/core/hle/kernel/svc/svc_synchronization.cpp b/src/core/hle/kernel/svc/svc_synchronization.cpp index 04d65f0bd..53df5bcd8 100644 --- a/src/core/hle/kernel/svc/svc_synchronization.cpp +++ b/src/core/hle/kernel/svc/svc_synchronization.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common/scope_exit.h" +#include "common/scratch_buffer.h" #include "core/core.h" #include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_readable_event.h" @@ -54,7 +55,7 @@ static Result WaitSynchronization(Core::System& system, int32_t* out_index, cons // Get the synchronization context. auto& kernel = system.Kernel(); auto& handle_table = GetCurrentProcess(kernel).GetHandleTable(); - std::vector objs(num_handles); + std::array objs; // Copy user handles. if (num_handles > 0) { @@ -72,8 +73,8 @@ static Result WaitSynchronization(Core::System& system, int32_t* out_index, cons }); // Wait on the objects. - Result res = KSynchronizationObject::Wait(kernel, out_index, objs.data(), - static_cast(objs.size()), timeout_ns); + Result res = + KSynchronizationObject::Wait(kernel, out_index, objs.data(), num_handles, timeout_ns); R_SUCCEED_IF(res == ResultSessionClosed); R_RETURN(res); @@ -87,8 +88,7 @@ Result WaitSynchronization(Core::System& system, int32_t* out_index, u64 user_ha // Ensure number of handles is valid. R_UNLESS(0 <= num_handles && num_handles <= Svc::ArgumentHandleCountMax, ResultOutOfRange); - - std::vector handles(num_handles); + std::array handles; if (num_handles > 0) { GetCurrentMemory(system.Kernel()) .ReadBlock(user_handles, handles.data(), num_handles * sizeof(Handle)); diff --git a/src/core/hle/kernel/svc/svc_thread.cpp b/src/core/hle/kernel/svc/svc_thread.cpp index 37b54079c..36b94e6bf 100644 --- a/src/core/hle/kernel/svc/svc_thread.cpp +++ b/src/core/hle/kernel/svc/svc_thread.cpp @@ -174,7 +174,7 @@ Result GetThreadContext3(Core::System& system, u64 out_context, Handle thread_ha } // Get the thread context. - std::vector context; + static thread_local Common::ScratchBuffer context; R_TRY(thread->GetThreadContext3(context)); // Copy the thread context to user space. diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index f0640c64f..c8d574993 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -5,6 +5,7 @@ #include "audio_core/renderer/audio_device.h" #include "common/common_funcs.h" #include "common/logging/log.h" +#include "common/settings.h" #include "common/string_util.h" #include "core/core.h" #include "core/hle/kernel/k_event.h" @@ -123,19 +124,13 @@ private: void GetReleasedAudioInBuffer(HLERequestContext& ctx) { const auto write_buffer_size = ctx.GetWriteBufferNumElements(); - std::vector released_buffers(write_buffer_size); + tmp_buffer.resize_destructive(write_buffer_size); + tmp_buffer[0] = 0; - const auto count = impl->GetReleasedBuffers(released_buffers); + const auto count = impl->GetReleasedBuffers(tmp_buffer); - [[maybe_unused]] std::string tags{}; - for (u32 i = 0; i < count; i++) { - tags += fmt::format("{:08X}, ", released_buffers[i]); - } - [[maybe_unused]] auto sessionid{impl->GetSystem().GetSessionId()}; - LOG_TRACE(Service_Audio, "called. Session {} released {} buffers: {}", sessionid, count, - tags); + ctx.WriteBuffer(tmp_buffer); - ctx.WriteBuffer(released_buffers); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); rb.Push(count); @@ -200,6 +195,7 @@ private: KernelHelpers::ServiceContext service_context; Kernel::KEvent* event; std::shared_ptr impl; + Common::ScratchBuffer tmp_buffer; }; AudInU::AudInU(Core::System& system_) diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 3e62fa4fc..032c8c11f 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -123,19 +123,13 @@ private: void GetReleasedAudioOutBuffers(HLERequestContext& ctx) { const auto write_buffer_size = ctx.GetWriteBufferNumElements(); - std::vector released_buffers(write_buffer_size); + tmp_buffer.resize_destructive(write_buffer_size); + tmp_buffer[0] = 0; - const auto count = impl->GetReleasedBuffers(released_buffers); + const auto count = impl->GetReleasedBuffers(tmp_buffer); - [[maybe_unused]] std::string tags{}; - for (u32 i = 0; i < count; i++) { - tags += fmt::format("{:08X}, ", released_buffers[i]); - } - [[maybe_unused]] const auto sessionid{impl->GetSystem().GetSessionId()}; - LOG_TRACE(Service_Audio, "called. Session {} released {} buffers: {}", sessionid, count, - tags); + ctx.WriteBuffer(tmp_buffer); - ctx.WriteBuffer(released_buffers); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); rb.Push(count); @@ -211,6 +205,7 @@ private: KernelHelpers::ServiceContext service_context; Kernel::KEvent* event; std::shared_ptr impl; + Common::ScratchBuffer tmp_buffer; }; AudOutU::AudOutU(Core::System& system_) diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 7086d4750..12845c23a 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -116,28 +116,26 @@ private: // These buffers are written manually to avoid an issue with WriteBuffer throwing errors for // checking size 0. Performance size is 0 for most games. - std::vector output{}; - std::vector performance{}; auto is_buffer_b{ctx.BufferDescriptorB()[0].Size() != 0}; if (is_buffer_b) { const auto buffersB{ctx.BufferDescriptorB()}; - output.resize(buffersB[0].Size(), 0); - performance.resize(buffersB[1].Size(), 0); + tmp_output.resize_destructive(buffersB[0].Size()); + tmp_performance.resize_destructive(buffersB[1].Size()); } else { const auto buffersC{ctx.BufferDescriptorC()}; - output.resize(buffersC[0].Size(), 0); - performance.resize(buffersC[1].Size(), 0); + tmp_output.resize_destructive(buffersC[0].Size()); + tmp_performance.resize_destructive(buffersC[1].Size()); } - auto result = impl->RequestUpdate(input, performance, output); + auto result = impl->RequestUpdate(input, tmp_performance, tmp_output); if (result.IsSuccess()) { if (is_buffer_b) { - ctx.WriteBufferB(output.data(), output.size(), 0); - ctx.WriteBufferB(performance.data(), performance.size(), 1); + ctx.WriteBufferB(tmp_output.data(), tmp_output.size(), 0); + ctx.WriteBufferB(tmp_performance.data(), tmp_performance.size(), 1); } else { - ctx.WriteBufferC(output.data(), output.size(), 0); - ctx.WriteBufferC(performance.data(), performance.size(), 1); + ctx.WriteBufferC(tmp_output.data(), tmp_output.size(), 0); + ctx.WriteBufferC(tmp_performance.data(), tmp_performance.size(), 1); } } else { LOG_ERROR(Service_Audio, "RequestUpdate failed error 0x{:02X}!", result.description); @@ -235,6 +233,8 @@ private: Kernel::KEvent* rendered_event; Manager& manager; std::unique_ptr impl; + Common::ScratchBuffer tmp_output; + Common::ScratchBuffer tmp_performance; }; class IAudioDevice final : public ServiceFramework { diff --git a/src/core/hle/service/audio/audren_u.h b/src/core/hle/service/audio/audren_u.h index 24ce37e87..d8e9c8719 100644 --- a/src/core/hle/service/audio/audren_u.h +++ b/src/core/hle/service/audio/audren_u.h @@ -4,6 +4,7 @@ #pragma once #include "audio_core/audio_render_manager.h" +#include "common/scratch_buffer.h" #include "core/hle/service/kernel_helpers.h" #include "core/hle/service/service.h" diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 451ac224a..c835f6cb7 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -68,13 +68,13 @@ private: ExtraBehavior extra_behavior) { u32 consumed = 0; u32 sample_count = 0; - std::vector samples(ctx.GetWriteBufferNumElements()); + tmp_samples.resize_destructive(ctx.GetWriteBufferNumElements()); if (extra_behavior == ExtraBehavior::ResetContext) { ResetDecoderContext(); } - if (!DecodeOpusData(consumed, sample_count, ctx.ReadBuffer(), samples, performance)) { + if (!DecodeOpusData(consumed, sample_count, ctx.ReadBuffer(), tmp_samples, performance)) { LOG_ERROR(Audio, "Failed to decode opus data"); IPC::ResponseBuilder rb{ctx, 2}; // TODO(ogniK): Use correct error code @@ -90,11 +90,11 @@ private: if (performance) { rb.Push(*performance); } - ctx.WriteBuffer(samples); + ctx.WriteBuffer(tmp_samples); } bool DecodeOpusData(u32& consumed, u32& sample_count, std::span input, - std::vector& output, u64* out_performance_time) const { + std::span output, u64* out_performance_time) const { const auto start_time = std::chrono::steady_clock::now(); const std::size_t raw_output_sz = output.size() * sizeof(opus_int16); if (sizeof(OpusPacketHeader) > input.size()) { @@ -154,6 +154,7 @@ private: OpusDecoderPtr decoder; u32 sample_rate; u32 channel_count; + Common::ScratchBuffer tmp_samples; }; class IHardwareOpusDecoderManager final : public ServiceFramework { diff --git a/src/core/hle/service/nvdrv/devices/nvdevice.h b/src/core/hle/service/nvdrv/devices/nvdevice.h index ab1f30f9e..a04538d5d 100644 --- a/src/core/hle/service/nvdrv/devices/nvdevice.h +++ b/src/core/hle/service/nvdrv/devices/nvdevice.h @@ -34,7 +34,7 @@ public: * @returns The result code of the ioctl. */ virtual NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) = 0; + std::span output) = 0; /** * Handles an ioctl2 request. @@ -45,7 +45,7 @@ public: * @returns The result code of the ioctl. */ virtual NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) = 0; + std::span inline_input, std::span output) = 0; /** * Handles an ioctl3 request. @@ -56,7 +56,7 @@ public: * @returns The result code of the ioctl. */ virtual NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) = 0; + std::span output, std::span inline_output) = 0; /** * Called once a device is opened diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index 0fe242e9d..05a43d8dc 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp @@ -18,19 +18,19 @@ nvdisp_disp0::nvdisp_disp0(Core::System& system_, NvCore::Container& core) nvdisp_disp0::~nvdisp_disp0() = default; NvResult nvdisp_disp0::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvdisp_disp0::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvdisp_disp0::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { + std::span output, std::span inline_output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h index bcd0e3ed5..daee05fe8 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h @@ -26,11 +26,11 @@ public: ~nvdisp_disp0() override; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 681bd0867..07e570a9f 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp @@ -28,7 +28,7 @@ nvhost_as_gpu::nvhost_as_gpu(Core::System& system_, Module& module_, NvCore::Con nvhost_as_gpu::~nvhost_as_gpu() = default; NvResult nvhost_as_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 'A': switch (command.cmd) { @@ -61,13 +61,13 @@ NvResult nvhost_as_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span i } NvResult nvhost_as_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { + std::span output, std::span inline_output) { switch (command.group) { case 'A': switch (command.cmd) { @@ -87,7 +87,7 @@ NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span i void nvhost_as_gpu::OnOpen(DeviceFD fd) {} void nvhost_as_gpu::OnClose(DeviceFD fd) {} -NvResult nvhost_as_gpu::AllocAsEx(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::AllocAsEx(std::span input, std::span output) { IoctlAllocAsEx params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -141,7 +141,7 @@ NvResult nvhost_as_gpu::AllocAsEx(std::span input, std::vector& ou return NvResult::Success; } -NvResult nvhost_as_gpu::AllocateSpace(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::AllocateSpace(std::span input, std::span output) { IoctlAllocSpace params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -220,7 +220,7 @@ void nvhost_as_gpu::FreeMappingLocked(u64 offset) { mapping_map.erase(offset); } -NvResult nvhost_as_gpu::FreeSpace(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::FreeSpace(std::span input, std::span output) { IoctlFreeSpace params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -266,15 +266,14 @@ NvResult nvhost_as_gpu::FreeSpace(std::span input, std::vector& ou return NvResult::Success; } -NvResult nvhost_as_gpu::Remap(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::Remap(std::span input, std::span output) { const auto num_entries = input.size() / sizeof(IoctlRemapEntry); LOG_DEBUG(Service_NVDRV, "called, num_entries=0x{:X}", num_entries); - std::vector entries(num_entries); - std::memcpy(entries.data(), input.data(), input.size()); - std::scoped_lock lock(mutex); + entries.resize_destructive(num_entries); + std::memcpy(entries.data(), input.data(), input.size()); if (!vm.initialised) { return NvResult::BadValue; @@ -320,7 +319,7 @@ NvResult nvhost_as_gpu::Remap(std::span input, std::vector& output return NvResult::Success; } -NvResult nvhost_as_gpu::MapBufferEx(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::MapBufferEx(std::span input, std::span output) { IoctlMapBufferEx params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -424,7 +423,7 @@ NvResult nvhost_as_gpu::MapBufferEx(std::span input, std::vector& return NvResult::Success; } -NvResult nvhost_as_gpu::UnmapBuffer(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::UnmapBuffer(std::span input, std::span output) { IoctlUnmapBuffer params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -463,7 +462,7 @@ NvResult nvhost_as_gpu::UnmapBuffer(std::span input, std::vector& return NvResult::Success; } -NvResult nvhost_as_gpu::BindChannel(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::BindChannel(std::span input, std::span output) { IoctlBindChannel params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd); @@ -492,7 +491,7 @@ void nvhost_as_gpu::GetVARegionsImpl(IoctlGetVaRegions& params) { }; } -NvResult nvhost_as_gpu::GetVARegions(std::span input, std::vector& output) { +NvResult nvhost_as_gpu::GetVARegions(std::span input, std::span output) { IoctlGetVaRegions params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -511,8 +510,8 @@ NvResult nvhost_as_gpu::GetVARegions(std::span input, std::vector& return NvResult::Success; } -NvResult nvhost_as_gpu::GetVARegions(std::span input, std::vector& output, - std::vector& inline_output) { +NvResult nvhost_as_gpu::GetVARegions(std::span input, std::span output, + std::span inline_output) { IoctlGetVaRegions params{}; std::memcpy(¶ms, input.data(), input.size()); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h index 1aba8d579..2af3e1260 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h @@ -15,6 +15,7 @@ #include "common/address_space.h" #include "common/common_funcs.h" #include "common/common_types.h" +#include "common/scratch_buffer.h" #include "common/swap.h" #include "core/hle/service/nvdrv/core/nvmap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" @@ -48,11 +49,11 @@ public: ~nvhost_as_gpu() override; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -138,18 +139,18 @@ private: static_assert(sizeof(IoctlGetVaRegions) == 16 + sizeof(VaRegion) * 2, "IoctlGetVaRegions is incorrect size"); - NvResult AllocAsEx(std::span input, std::vector& output); - NvResult AllocateSpace(std::span input, std::vector& output); - NvResult Remap(std::span input, std::vector& output); - NvResult MapBufferEx(std::span input, std::vector& output); - NvResult UnmapBuffer(std::span input, std::vector& output); - NvResult FreeSpace(std::span input, std::vector& output); - NvResult BindChannel(std::span input, std::vector& output); + NvResult AllocAsEx(std::span input, std::span output); + NvResult AllocateSpace(std::span input, std::span output); + NvResult Remap(std::span input, std::span output); + NvResult MapBufferEx(std::span input, std::span output); + NvResult UnmapBuffer(std::span input, std::span output); + NvResult FreeSpace(std::span input, std::span output); + NvResult BindChannel(std::span input, std::span output); void GetVARegionsImpl(IoctlGetVaRegions& params); - NvResult GetVARegions(std::span input, std::vector& output); - NvResult GetVARegions(std::span input, std::vector& output, - std::vector& inline_output); + NvResult GetVARegions(std::span input, std::span output); + NvResult GetVARegions(std::span input, std::span output, + std::span inline_output); void FreeMappingLocked(u64 offset); @@ -212,6 +213,7 @@ private: bool initialised{}; } vm; std::shared_ptr gmmu; + Common::ScratchBuffer entries; // s32 channel{}; // u32 big_page_size{VM::DEFAULT_BIG_PAGE_SIZE}; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index e12025560..4d55554b4 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -35,7 +35,7 @@ nvhost_ctrl::~nvhost_ctrl() { } NvResult nvhost_ctrl::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 0x0: switch (command.cmd) { @@ -64,13 +64,13 @@ NvResult nvhost_ctrl::Ioctl1(DeviceFD fd, Ioctl command, std::span inp } NvResult nvhost_ctrl::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvhost_ctrl::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_outpu) { + std::span output, std::span inline_outpu) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } @@ -79,7 +79,7 @@ void nvhost_ctrl::OnOpen(DeviceFD fd) {} void nvhost_ctrl::OnClose(DeviceFD fd) {} -NvResult nvhost_ctrl::NvOsGetConfigU32(std::span input, std::vector& output) { +NvResult nvhost_ctrl::NvOsGetConfigU32(std::span input, std::span output) { IocGetConfigParams params{}; std::memcpy(¶ms, input.data(), sizeof(params)); LOG_TRACE(Service_NVDRV, "called, setting={}!{}", params.domain_str.data(), @@ -87,7 +87,7 @@ NvResult nvhost_ctrl::NvOsGetConfigU32(std::span input, std::vector input, std::vector& output, +NvResult nvhost_ctrl::IocCtrlEventWait(std::span input, std::span output, bool is_allocation) { IocCtrlEventWaitParams params{}; std::memcpy(¶ms, input.data(), sizeof(params)); @@ -231,7 +231,7 @@ NvResult nvhost_ctrl::FreeEvent(u32 slot) { return NvResult::Success; } -NvResult nvhost_ctrl::IocCtrlEventRegister(std::span input, std::vector& output) { +NvResult nvhost_ctrl::IocCtrlEventRegister(std::span input, std::span output) { IocCtrlEventRegisterParams params{}; std::memcpy(¶ms, input.data(), sizeof(params)); const u32 event_id = params.user_event_id; @@ -252,7 +252,7 @@ NvResult nvhost_ctrl::IocCtrlEventRegister(std::span input, std::vecto return NvResult::Success; } -NvResult nvhost_ctrl::IocCtrlEventUnregister(std::span input, std::vector& output) { +NvResult nvhost_ctrl::IocCtrlEventUnregister(std::span input, std::span output) { IocCtrlEventUnregisterParams params{}; std::memcpy(¶ms, input.data(), sizeof(params)); const u32 event_id = params.user_event_id & 0x00FF; @@ -262,8 +262,7 @@ NvResult nvhost_ctrl::IocCtrlEventUnregister(std::span input, std::vec return FreeEvent(event_id); } -NvResult nvhost_ctrl::IocCtrlEventUnregisterBatch(std::span input, - std::vector& output) { +NvResult nvhost_ctrl::IocCtrlEventUnregisterBatch(std::span input, std::span output) { IocCtrlEventUnregisterBatchParams params{}; std::memcpy(¶ms, input.data(), sizeof(params)); u64 event_mask = params.user_events; @@ -281,7 +280,7 @@ NvResult nvhost_ctrl::IocCtrlEventUnregisterBatch(std::span input, return NvResult::Success; } -NvResult nvhost_ctrl::IocCtrlClearEventWait(std::span input, std::vector& output) { +NvResult nvhost_ctrl::IocCtrlClearEventWait(std::span input, std::span output) { IocCtrlEventClearParams params{}; std::memcpy(¶ms, input.data(), sizeof(params)); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h index dd2e7888a..2efed4862 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h @@ -26,11 +26,11 @@ public: ~nvhost_ctrl() override; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -186,13 +186,12 @@ private: static_assert(sizeof(IocCtrlEventUnregisterBatchParams) == 8, "IocCtrlEventKill is incorrect size"); - NvResult NvOsGetConfigU32(std::span input, std::vector& output); - NvResult IocCtrlEventWait(std::span input, std::vector& output, - bool is_allocation); - NvResult IocCtrlEventRegister(std::span input, std::vector& output); - NvResult IocCtrlEventUnregister(std::span input, std::vector& output); - NvResult IocCtrlEventUnregisterBatch(std::span input, std::vector& output); - NvResult IocCtrlClearEventWait(std::span input, std::vector& output); + NvResult NvOsGetConfigU32(std::span input, std::span output); + NvResult IocCtrlEventWait(std::span input, std::span output, bool is_allocation); + NvResult IocCtrlEventRegister(std::span input, std::span output); + NvResult IocCtrlEventUnregister(std::span input, std::span output); + NvResult IocCtrlEventUnregisterBatch(std::span input, std::span output); + NvResult IocCtrlClearEventWait(std::span input, std::span output); NvResult FreeEvent(u32 slot); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index be3c083db..6081d92e9 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -22,7 +22,7 @@ nvhost_ctrl_gpu::~nvhost_ctrl_gpu() { } NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 'G': switch (command.cmd) { @@ -54,13 +54,13 @@ NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span } NvResult nvhost_ctrl_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { + std::span output, std::span inline_output) { switch (command.group) { case 'G': switch (command.cmd) { @@ -82,7 +82,7 @@ NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span void nvhost_ctrl_gpu::OnOpen(DeviceFD fd) {} void nvhost_ctrl_gpu::OnClose(DeviceFD fd) {} -NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::vector& output) { +NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::span output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlCharacteristics params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -127,8 +127,8 @@ NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::vec return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::vector& output, - std::vector& inline_output) { +NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::span output, + std::span inline_output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlCharacteristics params{}; std::memcpy(¶ms, input.data(), input.size()); @@ -175,7 +175,7 @@ NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::vec return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::vector& output) { +NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::span output) { IoctlGpuGetTpcMasksArgs params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size=0x{:X}", params.mask_buffer_size); @@ -186,8 +186,8 @@ NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::vector return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::vector& output, - std::vector& inline_output) { +NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::span output, + std::span inline_output) { IoctlGpuGetTpcMasksArgs params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size=0x{:X}", params.mask_buffer_size); @@ -199,7 +199,7 @@ NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::vector return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetActiveSlotMask(std::span input, std::vector& output) { +NvResult nvhost_ctrl_gpu::GetActiveSlotMask(std::span input, std::span output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlActiveSlotMask params{}; @@ -212,7 +212,7 @@ NvResult nvhost_ctrl_gpu::GetActiveSlotMask(std::span input, std::vect return NvResult::Success; } -NvResult nvhost_ctrl_gpu::ZCullGetCtxSize(std::span input, std::vector& output) { +NvResult nvhost_ctrl_gpu::ZCullGetCtxSize(std::span input, std::span output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlZcullGetCtxSize params{}; @@ -224,7 +224,7 @@ NvResult nvhost_ctrl_gpu::ZCullGetCtxSize(std::span input, std::vector return NvResult::Success; } -NvResult nvhost_ctrl_gpu::ZCullGetInfo(std::span input, std::vector& output) { +NvResult nvhost_ctrl_gpu::ZCullGetInfo(std::span input, std::span output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlNvgpuGpuZcullGetInfoArgs params{}; @@ -247,7 +247,7 @@ NvResult nvhost_ctrl_gpu::ZCullGetInfo(std::span input, std::vector input, std::vector& output) { +NvResult nvhost_ctrl_gpu::ZBCSetTable(std::span input, std::span output) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); IoctlZbcSetTable params{}; @@ -263,7 +263,7 @@ NvResult nvhost_ctrl_gpu::ZBCSetTable(std::span input, std::vector return NvResult::Success; } -NvResult nvhost_ctrl_gpu::ZBCQueryTable(std::span input, std::vector& output) { +NvResult nvhost_ctrl_gpu::ZBCQueryTable(std::span input, std::span output) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); IoctlZbcQueryTable params{}; @@ -273,7 +273,7 @@ NvResult nvhost_ctrl_gpu::ZBCQueryTable(std::span input, std::vector input, std::vector& output) { +NvResult nvhost_ctrl_gpu::FlushL2(std::span input, std::span output) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); IoctlFlushL2 params{}; @@ -283,7 +283,7 @@ NvResult nvhost_ctrl_gpu::FlushL2(std::span input, std::vector& ou return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetGpuTime(std::span input, std::vector& output) { +NvResult nvhost_ctrl_gpu::GetGpuTime(std::span input, std::span output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlGetGpuTime params{}; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h index b9333d9d3..97995551c 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h @@ -22,11 +22,11 @@ public: ~nvhost_ctrl_gpu() override; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -151,21 +151,21 @@ private: }; static_assert(sizeof(IoctlGetGpuTime) == 0x10, "IoctlGetGpuTime is incorrect size"); - NvResult GetCharacteristics(std::span input, std::vector& output); - NvResult GetCharacteristics(std::span input, std::vector& output, - std::vector& inline_output); + NvResult GetCharacteristics(std::span input, std::span output); + NvResult GetCharacteristics(std::span input, std::span output, + std::span inline_output); - NvResult GetTPCMasks(std::span input, std::vector& output); - NvResult GetTPCMasks(std::span input, std::vector& output, - std::vector& inline_output); + NvResult GetTPCMasks(std::span input, std::span output); + NvResult GetTPCMasks(std::span input, std::span output, + std::span inline_output); - NvResult GetActiveSlotMask(std::span input, std::vector& output); - NvResult ZCullGetCtxSize(std::span input, std::vector& output); - NvResult ZCullGetInfo(std::span input, std::vector& output); - NvResult ZBCSetTable(std::span input, std::vector& output); - NvResult ZBCQueryTable(std::span input, std::vector& output); - NvResult FlushL2(std::span input, std::vector& output); - NvResult GetGpuTime(std::span input, std::vector& output); + NvResult GetActiveSlotMask(std::span input, std::span output); + NvResult ZCullGetCtxSize(std::span input, std::span output); + NvResult ZCullGetInfo(std::span input, std::span output); + NvResult ZBCSetTable(std::span input, std::span output); + NvResult ZBCQueryTable(std::span input, std::span output); + NvResult FlushL2(std::span input, std::span output); + NvResult GetGpuTime(std::span input, std::span output); EventInterface& events_interface; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 453a965dc..46a25fcab 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -47,7 +47,7 @@ nvhost_gpu::~nvhost_gpu() { } NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 0x0: switch (command.cmd) { @@ -99,7 +99,7 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu }; NvResult nvhost_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { switch (command.group) { case 'H': switch (command.cmd) { @@ -113,7 +113,7 @@ NvResult nvhost_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span inpu } NvResult nvhost_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { + std::span output, std::span inline_output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } @@ -121,7 +121,7 @@ NvResult nvhost_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span inpu void nvhost_gpu::OnOpen(DeviceFD fd) {} void nvhost_gpu::OnClose(DeviceFD fd) {} -NvResult nvhost_gpu::SetNVMAPfd(std::span input, std::vector& output) { +NvResult nvhost_gpu::SetNVMAPfd(std::span input, std::span output) { IoctlSetNvmapFD params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); @@ -130,7 +130,7 @@ NvResult nvhost_gpu::SetNVMAPfd(std::span input, std::vector& outp return NvResult::Success; } -NvResult nvhost_gpu::SetClientData(std::span input, std::vector& output) { +NvResult nvhost_gpu::SetClientData(std::span input, std::span output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlClientData params{}; @@ -139,7 +139,7 @@ NvResult nvhost_gpu::SetClientData(std::span input, std::vector& o return NvResult::Success; } -NvResult nvhost_gpu::GetClientData(std::span input, std::vector& output) { +NvResult nvhost_gpu::GetClientData(std::span input, std::span output) { LOG_DEBUG(Service_NVDRV, "called"); IoctlClientData params{}; @@ -149,7 +149,7 @@ NvResult nvhost_gpu::GetClientData(std::span input, std::vector& o return NvResult::Success; } -NvResult nvhost_gpu::ZCullBind(std::span input, std::vector& output) { +NvResult nvhost_gpu::ZCullBind(std::span input, std::span output) { std::memcpy(&zcull_params, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, "called, gpu_va={:X}, mode={:X}", zcull_params.gpu_va, zcull_params.mode); @@ -158,7 +158,7 @@ NvResult nvhost_gpu::ZCullBind(std::span input, std::vector& outpu return NvResult::Success; } -NvResult nvhost_gpu::SetErrorNotifier(std::span input, std::vector& output) { +NvResult nvhost_gpu::SetErrorNotifier(std::span input, std::span output) { IoctlSetErrorNotifier params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_WARNING(Service_NVDRV, "(STUBBED) called, offset={:X}, size={:X}, mem={:X}", params.offset, @@ -168,14 +168,14 @@ NvResult nvhost_gpu::SetErrorNotifier(std::span input, std::vector return NvResult::Success; } -NvResult nvhost_gpu::SetChannelPriority(std::span input, std::vector& output) { +NvResult nvhost_gpu::SetChannelPriority(std::span input, std::span output) { std::memcpy(&channel_priority, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority); return NvResult::Success; } -NvResult nvhost_gpu::AllocGPFIFOEx2(std::span input, std::vector& output) { +NvResult nvhost_gpu::AllocGPFIFOEx2(std::span input, std::span output) { IoctlAllocGpfifoEx2 params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_WARNING(Service_NVDRV, @@ -197,7 +197,7 @@ NvResult nvhost_gpu::AllocGPFIFOEx2(std::span input, std::vector& return NvResult::Success; } -NvResult nvhost_gpu::AllocateObjectContext(std::span input, std::vector& output) { +NvResult nvhost_gpu::AllocateObjectContext(std::span input, std::span output) { IoctlAllocObjCtx params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_WARNING(Service_NVDRV, "(STUBBED) called, class_num={:X}, flags={:X}", params.class_num, @@ -208,7 +208,8 @@ NvResult nvhost_gpu::AllocateObjectContext(std::span input, std::vecto return NvResult::Success; } -static std::vector BuildWaitCommandList(NvFence fence) { +static boost::container::small_vector BuildWaitCommandList( + NvFence fence) { return { Tegra::BuildCommandHeader(Tegra::BufferMethods::SyncpointPayload, 1, Tegra::SubmissionMode::Increasing), @@ -219,35 +220,35 @@ static std::vector BuildWaitCommandList(NvFence fence) { }; } -static std::vector BuildIncrementCommandList(NvFence fence) { - std::vector result{ +static boost::container::small_vector BuildIncrementCommandList( + NvFence fence) { + boost::container::small_vector result{ Tegra::BuildCommandHeader(Tegra::BufferMethods::SyncpointPayload, 1, Tegra::SubmissionMode::Increasing), {}}; for (u32 count = 0; count < 2; ++count) { - result.emplace_back(Tegra::BuildCommandHeader(Tegra::BufferMethods::SyncpointOperation, 1, - Tegra::SubmissionMode::Increasing)); - result.emplace_back( + result.push_back(Tegra::BuildCommandHeader(Tegra::BufferMethods::SyncpointOperation, 1, + Tegra::SubmissionMode::Increasing)); + result.push_back( BuildFenceAction(Tegra::Engines::Puller::FenceOperation::Increment, fence.id)); } return result; } -static std::vector BuildIncrementWithWfiCommandList(NvFence fence) { - std::vector result{ +static boost::container::small_vector BuildIncrementWithWfiCommandList( + NvFence fence) { + boost::container::small_vector result{ Tegra::BuildCommandHeader(Tegra::BufferMethods::WaitForIdle, 1, Tegra::SubmissionMode::Increasing), {}}; - const std::vector increment{BuildIncrementCommandList(fence)}; - - result.insert(result.end(), increment.begin(), increment.end()); - + auto increment_list{BuildIncrementCommandList(fence)}; + result.insert(result.end(), increment_list.begin(), increment_list.end()); return result; } -NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::vector& output, +NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span output, Tegra::CommandList&& entries) { LOG_TRACE(Service_NVDRV, "called, gpfifo={:X}, num_entries={:X}, flags={:X}", params.address, params.num_entries, params.flags.raw); @@ -293,7 +294,7 @@ NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::vector return NvResult::Success; } -NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::vector& output, +NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::span output, bool kickoff) { if (input.size() < sizeof(IoctlSubmitGpfifo)) { UNIMPLEMENTED(); @@ -315,7 +316,7 @@ NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::vector } NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::span input_inline, - std::vector& output) { + std::span output) { if (input.size() < sizeof(IoctlSubmitGpfifo)) { UNIMPLEMENTED(); return NvResult::InvalidSize; @@ -327,7 +328,7 @@ NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::span input, std::vector& output) { +NvResult nvhost_gpu::GetWaitbase(std::span input, std::span output) { IoctlGetWaitbase params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlGetWaitbase)); LOG_INFO(Service_NVDRV, "called, unknown=0x{:X}", params.unknown); @@ -337,7 +338,7 @@ NvResult nvhost_gpu::GetWaitbase(std::span input, std::vector& out return NvResult::Success; } -NvResult nvhost_gpu::ChannelSetTimeout(std::span input, std::vector& output) { +NvResult nvhost_gpu::ChannelSetTimeout(std::span input, std::span output) { IoctlChannelSetTimeout params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlChannelSetTimeout)); LOG_INFO(Service_NVDRV, "called, timeout=0x{:X}", params.timeout); @@ -345,7 +346,7 @@ NvResult nvhost_gpu::ChannelSetTimeout(std::span input, std::vector input, std::vector& output) { +NvResult nvhost_gpu::ChannelSetTimeslice(std::span input, std::span output) { IoctlSetTimeslice params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlSetTimeslice)); LOG_INFO(Service_NVDRV, "called, timeslice=0x{:X}", params.timeslice); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index 3ca58202d..529c20526 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -41,11 +41,11 @@ public: ~nvhost_gpu() override; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -186,23 +186,23 @@ private: u32_le channel_priority{}; u32_le channel_timeslice{}; - NvResult SetNVMAPfd(std::span input, std::vector& output); - NvResult SetClientData(std::span input, std::vector& output); - NvResult GetClientData(std::span input, std::vector& output); - NvResult ZCullBind(std::span input, std::vector& output); - NvResult SetErrorNotifier(std::span input, std::vector& output); - NvResult SetChannelPriority(std::span input, std::vector& output); - NvResult AllocGPFIFOEx2(std::span input, std::vector& output); - NvResult AllocateObjectContext(std::span input, std::vector& output); - NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::vector& output, + NvResult SetNVMAPfd(std::span input, std::span output); + NvResult SetClientData(std::span input, std::span output); + NvResult GetClientData(std::span input, std::span output); + NvResult ZCullBind(std::span input, std::span output); + NvResult SetErrorNotifier(std::span input, std::span output); + NvResult SetChannelPriority(std::span input, std::span output); + NvResult AllocGPFIFOEx2(std::span input, std::span output); + NvResult AllocateObjectContext(std::span input, std::span output); + NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span output, Tegra::CommandList&& entries); - NvResult SubmitGPFIFOBase(std::span input, std::vector& output, + NvResult SubmitGPFIFOBase(std::span input, std::span output, bool kickoff = false); NvResult SubmitGPFIFOBase(std::span input, std::span input_inline, - std::vector& output); - NvResult GetWaitbase(std::span input, std::vector& output); - NvResult ChannelSetTimeout(std::span input, std::vector& output); - NvResult ChannelSetTimeslice(std::span input, std::vector& output); + std::span output); + NvResult GetWaitbase(std::span input, std::span output); + NvResult ChannelSetTimeout(std::span input, std::span output); + NvResult ChannelSetTimeslice(std::span input, std::span output); EventInterface& events_interface; NvCore::Container& core; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index dc45169ad..a174442a6 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp @@ -16,7 +16,7 @@ nvhost_nvdec::nvhost_nvdec(Core::System& system_, NvCore::Container& core_) nvhost_nvdec::~nvhost_nvdec() = default; NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 0x0: switch (command.cmd) { @@ -56,13 +56,13 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span in } NvResult nvhost_nvdec::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvhost_nvdec::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { + std::span output, std::span inline_output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.h index 0d615bbcb..ad2233c49 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.h @@ -14,11 +14,11 @@ public: ~nvhost_nvdec() override; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index 1ab51f10b..61649aa4a 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp @@ -36,7 +36,7 @@ std::size_t SliceVectors(std::span input, std::vector& dst, std::si // Writes the data in src to an offset into the dst vector. The offset is specified in bytes // Returns the number of bytes written into dst. template -std::size_t WriteVectors(std::vector& dst, const std::vector& src, std::size_t offset) { +std::size_t WriteVectors(std::span dst, const std::vector& src, std::size_t offset) { if (src.empty()) { return 0; } @@ -72,8 +72,7 @@ NvResult nvhost_nvdec_common::SetNVMAPfd(std::span input) { return NvResult::Success; } -NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, - std::vector& output) { +NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, std::span output) { IoctlSubmit params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlSubmit)); LOG_DEBUG(Service_NVDRV, "called NVDEC Submit, cmd_buffer_count={}", params.cmd_buffer_count); @@ -121,7 +120,7 @@ NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, return NvResult::Success; } -NvResult nvhost_nvdec_common::GetSyncpoint(std::span input, std::vector& output) { +NvResult nvhost_nvdec_common::GetSyncpoint(std::span input, std::span output) { IoctlGetSyncpoint params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlGetSyncpoint)); LOG_DEBUG(Service_NVDRV, "called GetSyncpoint, id={}", params.param); @@ -133,7 +132,7 @@ NvResult nvhost_nvdec_common::GetSyncpoint(std::span input, std::vecto return NvResult::Success; } -NvResult nvhost_nvdec_common::GetWaitbase(std::span input, std::vector& output) { +NvResult nvhost_nvdec_common::GetWaitbase(std::span input, std::span output) { IoctlGetWaitbase params{}; LOG_CRITICAL(Service_NVDRV, "called WAITBASE"); std::memcpy(¶ms, input.data(), sizeof(IoctlGetWaitbase)); @@ -142,7 +141,7 @@ NvResult nvhost_nvdec_common::GetWaitbase(std::span input, std::vector return NvResult::Success; } -NvResult nvhost_nvdec_common::MapBuffer(std::span input, std::vector& output) { +NvResult nvhost_nvdec_common::MapBuffer(std::span input, std::span output) { IoctlMapBuffer params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlMapBuffer)); std::vector cmd_buffer_handles(params.num_entries); @@ -159,7 +158,7 @@ NvResult nvhost_nvdec_common::MapBuffer(std::span input, std::vector input, std::vector& output) { +NvResult nvhost_nvdec_common::UnmapBuffer(std::span input, std::span output) { IoctlMapBuffer params{}; std::memcpy(¶ms, input.data(), sizeof(IoctlMapBuffer)); std::vector cmd_buffer_handles(params.num_entries); @@ -173,7 +172,7 @@ NvResult nvhost_nvdec_common::UnmapBuffer(std::span input, std::vector return NvResult::Success; } -NvResult nvhost_nvdec_common::SetSubmitTimeout(std::span input, std::vector& output) { +NvResult nvhost_nvdec_common::SetSubmitTimeout(std::span input, std::span output) { std::memcpy(&submit_timeout, input.data(), input.size()); LOG_WARNING(Service_NVDRV, "(STUBBED) called"); return NvResult::Success; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h index 5af26a26f..9bb573bfe 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h @@ -108,12 +108,12 @@ protected: /// Ioctl command implementations NvResult SetNVMAPfd(std::span input); - NvResult Submit(DeviceFD fd, std::span input, std::vector& output); - NvResult GetSyncpoint(std::span input, std::vector& output); - NvResult GetWaitbase(std::span input, std::vector& output); - NvResult MapBuffer(std::span input, std::vector& output); - NvResult UnmapBuffer(std::span input, std::vector& output); - NvResult SetSubmitTimeout(std::span input, std::vector& output); + NvResult Submit(DeviceFD fd, std::span input, std::span output); + NvResult GetSyncpoint(std::span input, std::span output); + NvResult GetWaitbase(std::span input, std::span output); + NvResult MapBuffer(std::span input, std::span output); + NvResult UnmapBuffer(std::span input, std::span output); + NvResult SetSubmitTimeout(std::span input, std::span output); Kernel::KEvent* QueryEvent(u32 event_id) override; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp index 39f30e7c8..a05c8cdae 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp @@ -13,7 +13,7 @@ nvhost_nvjpg::nvhost_nvjpg(Core::System& system_) : nvdevice{system_} {} nvhost_nvjpg::~nvhost_nvjpg() = default; NvResult nvhost_nvjpg::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 'H': switch (command.cmd) { @@ -32,13 +32,13 @@ NvResult nvhost_nvjpg::Ioctl1(DeviceFD fd, Ioctl command, std::span in } NvResult nvhost_nvjpg::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvhost_nvjpg::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { + std::span output, std::span inline_output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } @@ -46,7 +46,7 @@ NvResult nvhost_nvjpg::Ioctl3(DeviceFD fd, Ioctl command, std::span in void nvhost_nvjpg::OnOpen(DeviceFD fd) {} void nvhost_nvjpg::OnClose(DeviceFD fd) {} -NvResult nvhost_nvjpg::SetNVMAPfd(std::span input, std::vector& output) { +NvResult nvhost_nvjpg::SetNVMAPfd(std::span input, std::span output) { IoctlSetNvmapFD params{}; std::memcpy(¶ms, input.data(), input.size()); LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h index 41b57e872..5623e0d47 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h @@ -16,11 +16,11 @@ public: ~nvhost_nvjpg() override; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -33,7 +33,7 @@ private: s32_le nvmap_fd{}; - NvResult SetNVMAPfd(std::span input, std::vector& output); + NvResult SetNVMAPfd(std::span input, std::span output); }; } // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index b0ea402a7..c0b8684c3 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp @@ -16,7 +16,7 @@ nvhost_vic::nvhost_vic(Core::System& system_, NvCore::Container& core_) nvhost_vic::~nvhost_vic() = default; NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 0x0: switch (command.cmd) { @@ -56,13 +56,13 @@ NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu } NvResult nvhost_vic::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } NvResult nvhost_vic::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { + std::span output, std::span inline_output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.h b/src/core/hle/service/nvdrv/devices/nvhost_vic.h index b5e350a83..cadbcb0a5 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.h @@ -13,11 +13,11 @@ public: ~nvhost_vic(); NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index 07417f045..e7f7e273b 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -26,7 +26,7 @@ nvmap::nvmap(Core::System& system_, NvCore::Container& container_) nvmap::~nvmap() = default; NvResult nvmap::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { switch (command.group) { case 0x1: switch (command.cmd) { @@ -55,13 +55,13 @@ NvResult nvmap::Ioctl1(DeviceFD fd, Ioctl command, std::span input, } NvResult nvmap::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } -NvResult nvmap::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { +NvResult nvmap::Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } @@ -69,7 +69,7 @@ NvResult nvmap::Ioctl3(DeviceFD fd, Ioctl command, std::span input, void nvmap::OnOpen(DeviceFD fd) {} void nvmap::OnClose(DeviceFD fd) {} -NvResult nvmap::IocCreate(std::span input, std::vector& output) { +NvResult nvmap::IocCreate(std::span input, std::span output) { IocCreateParams params; std::memcpy(¶ms, input.data(), sizeof(params)); LOG_DEBUG(Service_NVDRV, "called, size=0x{:08X}", params.size); @@ -89,7 +89,7 @@ NvResult nvmap::IocCreate(std::span input, std::vector& output) { return NvResult::Success; } -NvResult nvmap::IocAlloc(std::span input, std::vector& output) { +NvResult nvmap::IocAlloc(std::span input, std::span output) { IocAllocParams params; std::memcpy(¶ms, input.data(), sizeof(params)); LOG_DEBUG(Service_NVDRV, "called, addr={:X}", params.address); @@ -137,7 +137,7 @@ NvResult nvmap::IocAlloc(std::span input, std::vector& output) { return result; } -NvResult nvmap::IocGetId(std::span input, std::vector& output) { +NvResult nvmap::IocGetId(std::span input, std::span output) { IocGetIdParams params; std::memcpy(¶ms, input.data(), sizeof(params)); @@ -161,7 +161,7 @@ NvResult nvmap::IocGetId(std::span input, std::vector& output) { return NvResult::Success; } -NvResult nvmap::IocFromId(std::span input, std::vector& output) { +NvResult nvmap::IocFromId(std::span input, std::span output) { IocFromIdParams params; std::memcpy(¶ms, input.data(), sizeof(params)); @@ -192,7 +192,7 @@ NvResult nvmap::IocFromId(std::span input, std::vector& output) { return NvResult::Success; } -NvResult nvmap::IocParam(std::span input, std::vector& output) { +NvResult nvmap::IocParam(std::span input, std::span output) { enum class ParamTypes { Size = 1, Alignment = 2, Base = 3, Heap = 4, Kind = 5, Compr = 6 }; IocParamParams params; @@ -241,7 +241,7 @@ NvResult nvmap::IocParam(std::span input, std::vector& output) { return NvResult::Success; } -NvResult nvmap::IocFree(std::span input, std::vector& output) { +NvResult nvmap::IocFree(std::span input, std::span output) { IocFreeParams params; std::memcpy(¶ms, input.data(), sizeof(params)); diff --git a/src/core/hle/service/nvdrv/devices/nvmap.h b/src/core/hle/service/nvdrv/devices/nvmap.h index 82bd3b118..40c65b430 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.h +++ b/src/core/hle/service/nvdrv/devices/nvmap.h @@ -27,11 +27,11 @@ public: nvmap& operator=(const nvmap&) = delete; NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) override; + std::span output) override; NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) override; - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output) override; + std::span inline_input, std::span output) override; + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) override; void OnOpen(DeviceFD fd) override; void OnClose(DeviceFD fd) override; @@ -106,12 +106,12 @@ private: }; static_assert(sizeof(IocGetIdParams) == 8, "IocGetIdParams has wrong size"); - NvResult IocCreate(std::span input, std::vector& output); - NvResult IocAlloc(std::span input, std::vector& output); - NvResult IocGetId(std::span input, std::vector& output); - NvResult IocFromId(std::span input, std::vector& output); - NvResult IocParam(std::span input, std::vector& output); - NvResult IocFree(std::span input, std::vector& output); + NvResult IocCreate(std::span input, std::span output); + NvResult IocAlloc(std::span input, std::span output); + NvResult IocGetId(std::span input, std::span output); + NvResult IocFromId(std::span input, std::span output); + NvResult IocParam(std::span input, std::span output); + NvResult IocFree(std::span input, std::span output); NvCore::Container& container; NvCore::NvMap& file; diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index 3d774eec4..9e46ee8dd 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -130,7 +130,7 @@ DeviceFD Module::Open(const std::string& device_name) { } NvResult Module::Ioctl1(DeviceFD fd, Ioctl command, std::span input, - std::vector& output) { + std::span output) { if (fd < 0) { LOG_ERROR(Service_NVDRV, "Invalid DeviceFD={}!", fd); return NvResult::InvalidState; @@ -147,7 +147,7 @@ NvResult Module::Ioctl1(DeviceFD fd, Ioctl command, std::span input, } NvResult Module::Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output) { + std::span inline_input, std::span output) { if (fd < 0) { LOG_ERROR(Service_NVDRV, "Invalid DeviceFD={}!", fd); return NvResult::InvalidState; @@ -163,8 +163,8 @@ NvResult Module::Ioctl2(DeviceFD fd, Ioctl command, std::span input, return itr->second->Ioctl2(fd, command, input, inline_input, output); } -NvResult Module::Ioctl3(DeviceFD fd, Ioctl command, std::span input, - std::vector& output, std::vector& inline_output) { +NvResult Module::Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output) { if (fd < 0) { LOG_ERROR(Service_NVDRV, "Invalid DeviceFD={}!", fd); return NvResult::InvalidState; diff --git a/src/core/hle/service/nvdrv/nvdrv.h b/src/core/hle/service/nvdrv/nvdrv.h index 668be742b..d8622b3ca 100644 --- a/src/core/hle/service/nvdrv/nvdrv.h +++ b/src/core/hle/service/nvdrv/nvdrv.h @@ -80,13 +80,13 @@ public: DeviceFD Open(const std::string& device_name); /// Sends an ioctl command to the specified file descriptor. - NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, std::vector& output); + NvResult Ioctl1(DeviceFD fd, Ioctl command, std::span input, std::span output); NvResult Ioctl2(DeviceFD fd, Ioctl command, std::span input, - std::span inline_input, std::vector& output); + std::span inline_input, std::span output); - NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::vector& output, - std::vector& inline_output); + NvResult Ioctl3(DeviceFD fd, Ioctl command, std::span input, std::span output, + std::span inline_output); /// Closes a device file descriptor and returns operation success. NvResult Close(DeviceFD fd); diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.cpp b/src/core/hle/service/nvdrv/nvdrv_interface.cpp index d010a1e03..348207e25 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.cpp +++ b/src/core/hle/service/nvdrv/nvdrv_interface.cpp @@ -63,12 +63,12 @@ void NVDRV::Ioctl1(HLERequestContext& ctx) { } // Check device - std::vector output_buffer(ctx.GetWriteBufferSize(0)); + tmp_output.resize_destructive(ctx.GetWriteBufferSize(0)); const auto input_buffer = ctx.ReadBuffer(0); - const auto nv_result = nvdrv->Ioctl1(fd, command, input_buffer, output_buffer); + const auto nv_result = nvdrv->Ioctl1(fd, command, input_buffer, tmp_output); if (command.is_out != 0) { - ctx.WriteBuffer(output_buffer); + ctx.WriteBuffer(tmp_output); } IPC::ResponseBuilder rb{ctx, 3}; @@ -90,12 +90,12 @@ void NVDRV::Ioctl2(HLERequestContext& ctx) { const auto input_buffer = ctx.ReadBuffer(0); const auto input_inlined_buffer = ctx.ReadBuffer(1); - std::vector output_buffer(ctx.GetWriteBufferSize(0)); + tmp_output.resize_destructive(ctx.GetWriteBufferSize(0)); const auto nv_result = - nvdrv->Ioctl2(fd, command, input_buffer, input_inlined_buffer, output_buffer); + nvdrv->Ioctl2(fd, command, input_buffer, input_inlined_buffer, tmp_output); if (command.is_out != 0) { - ctx.WriteBuffer(output_buffer); + ctx.WriteBuffer(tmp_output); } IPC::ResponseBuilder rb{ctx, 3}; @@ -116,14 +116,12 @@ void NVDRV::Ioctl3(HLERequestContext& ctx) { } const auto input_buffer = ctx.ReadBuffer(0); - std::vector output_buffer(ctx.GetWriteBufferSize(0)); - std::vector output_buffer_inline(ctx.GetWriteBufferSize(1)); - - const auto nv_result = - nvdrv->Ioctl3(fd, command, input_buffer, output_buffer, output_buffer_inline); + tmp_output.resize_destructive(ctx.GetWriteBufferSize(0)); + tmp_output_inline.resize_destructive(ctx.GetWriteBufferSize(1)); + const auto nv_result = nvdrv->Ioctl3(fd, command, input_buffer, tmp_output, tmp_output_inline); if (command.is_out != 0) { - ctx.WriteBuffer(output_buffer, 0); - ctx.WriteBuffer(output_buffer_inline, 1); + ctx.WriteBuffer(tmp_output, 0); + ctx.WriteBuffer(tmp_output_inline, 1); } IPC::ResponseBuilder rb{ctx, 3}; diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.h b/src/core/hle/service/nvdrv/nvdrv_interface.h index 881ea1a6b..4b593ff90 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.h +++ b/src/core/hle/service/nvdrv/nvdrv_interface.h @@ -4,6 +4,7 @@ #pragma once #include +#include "common/scratch_buffer.h" #include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/service.h" @@ -33,6 +34,8 @@ private: u64 pid{}; bool is_initialized{}; + Common::ScratchBuffer tmp_output; + Common::ScratchBuffer tmp_output_inline; }; } // namespace Service::Nvidia diff --git a/src/core/hle/service/nvnflinger/parcel.h b/src/core/hle/service/nvnflinger/parcel.h index fb56d75d7..23ba315a0 100644 --- a/src/core/hle/service/nvnflinger/parcel.h +++ b/src/core/hle/service/nvnflinger/parcel.h @@ -6,6 +6,7 @@ #include #include #include +#include #include "common/alignment.h" #include "common/assert.h" @@ -167,7 +168,7 @@ public: private: template requires(std::is_trivially_copyable_v) - void WriteImpl(const T& val, std::vector& buffer) { + void WriteImpl(const T& val, boost::container::small_vector& buffer) { const size_t aligned_size = Common::AlignUp(sizeof(T), 4); const size_t old_size = buffer.size(); buffer.resize(old_size + aligned_size); @@ -176,8 +177,8 @@ private: } private: - std::vector m_data_buffer; - std::vector m_object_buffer; + boost::container::small_vector m_data_buffer; + boost::container::small_vector m_object_buffer; }; } // namespace Service::android diff --git a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp index c3c2281bb..9ff4028c2 100644 --- a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp @@ -479,7 +479,7 @@ void EmitContext::DefineGenericOutput(size_t index, u32 invocations) { const u32 remainder{4 - element}; const TransformFeedbackVarying* xfb_varying{}; const size_t xfb_varying_index{base_index + element}; - if (xfb_varying_index < runtime_info.xfb_varyings.size()) { + if (xfb_varying_index < runtime_info.xfb_count) { xfb_varying = &runtime_info.xfb_varyings[xfb_varying_index]; xfb_varying = xfb_varying->components > 0 ? xfb_varying : nullptr; } diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 0f86a8004..34592a01f 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp @@ -387,7 +387,7 @@ void SetupSignedNanCapabilities(const Profile& profile, const IR::Program& progr } void SetupTransformFeedbackCapabilities(EmitContext& ctx, Id main_func) { - if (ctx.runtime_info.xfb_varyings.empty()) { + if (ctx.runtime_info.xfb_count == 0) { return; } ctx.AddCapability(spv::Capability::TransformFeedback); diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp index fd15f47ea..bec5db173 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp @@ -160,7 +160,7 @@ void DefineGenericOutput(EmitContext& ctx, size_t index, std::optional invo const u32 remainder{4 - element}; const TransformFeedbackVarying* xfb_varying{}; const size_t xfb_varying_index{base_attr_index + element}; - if (xfb_varying_index < ctx.runtime_info.xfb_varyings.size()) { + if (xfb_varying_index < ctx.runtime_info.xfb_count) { xfb_varying = &ctx.runtime_info.xfb_varyings[xfb_varying_index]; xfb_varying = xfb_varying->components > 0 ? xfb_varying : nullptr; } diff --git a/src/shader_recompiler/runtime_info.h b/src/shader_recompiler/runtime_info.h index 3b63c249f..619c0b138 100644 --- a/src/shader_recompiler/runtime_info.h +++ b/src/shader_recompiler/runtime_info.h @@ -84,7 +84,8 @@ struct RuntimeInfo { bool glasm_use_storage_buffers{}; /// Transform feedback state for each varying - std::vector xfb_varyings; + std::array xfb_varyings{}; + u32 xfb_count{0}; }; } // namespace Shader diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 45977d578..58a45ab67 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -207,7 +207,7 @@ bool BufferCache

::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am if (has_new_downloads) { memory_tracker.MarkRegionAsGpuModified(*cpu_dest_address, amount); } - tmp_buffer.resize(amount); + tmp_buffer.resize_destructive(amount); cpu_memory.ReadBlockUnsafe(*cpu_src_address, tmp_buffer.data(), amount); cpu_memory.WriteBlockUnsafe(*cpu_dest_address, tmp_buffer.data(), amount); return true; @@ -1279,7 +1279,7 @@ template typename BufferCache

::OverlapResult BufferCache

::ResolveOverlaps(VAddr cpu_addr, u32 wanted_size) { static constexpr int STREAM_LEAP_THRESHOLD = 16; - std::vector overlap_ids; + boost::container::small_vector overlap_ids; VAddr begin = cpu_addr; VAddr end = cpu_addr + wanted_size; int stream_score = 0; diff --git a/src/video_core/buffer_cache/buffer_cache_base.h b/src/video_core/buffer_cache/buffer_cache_base.h index 63a120f7a..fe6068cfe 100644 --- a/src/video_core/buffer_cache/buffer_cache_base.h +++ b/src/video_core/buffer_cache/buffer_cache_base.h @@ -229,7 +229,7 @@ class BufferCache : public VideoCommon::ChannelSetupCaches; struct OverlapResult { - std::vector ids; + boost::container::small_vector ids; VAddr begin; VAddr end; bool has_stream_leap = false; @@ -582,7 +582,7 @@ private: BufferId inline_buffer_id; std::array> CACHING_PAGEBITS)> page_table; - std::vector tmp_buffer; + Common::ScratchBuffer tmp_buffer; }; } // namespace VideoCommon diff --git a/src/video_core/cdma_pusher.h b/src/video_core/cdma_pusher.h index 83112dfce..7d660af47 100644 --- a/src/video_core/cdma_pusher.h +++ b/src/video_core/cdma_pusher.h @@ -63,7 +63,6 @@ struct ChCommand { }; using ChCommandHeaderList = std::vector; -using ChCommandList = std::vector; struct ThiRegisters { u32_le increment_syncpt{}; diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h index 1cdb690ed..8a2784cdc 100644 --- a/src/video_core/dma_pusher.h +++ b/src/video_core/dma_pusher.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "common/bit_field.h" @@ -102,11 +103,12 @@ inline CommandHeader BuildCommandHeader(BufferMethods method, u32 arg_count, Sub struct CommandList final { CommandList() = default; explicit CommandList(std::size_t size) : command_lists(size) {} - explicit CommandList(std::vector&& prefetch_command_list_) + explicit CommandList( + boost::container::small_vector&& prefetch_command_list_) : prefetch_command_list{std::move(prefetch_command_list_)} {} - std::vector command_lists; - std::vector prefetch_command_list; + boost::container::small_vector command_lists; + boost::container::small_vector prefetch_command_list; }; /** diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index ebe5536de..bc1eb41e7 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -108,9 +108,11 @@ void MaxwellDMA::Launch() { if (regs.launch_dma.remap_enable != 0 && is_const_a_dst) { ASSERT(regs.remap_const.component_size_minus_one == 3); accelerate.BufferClear(regs.offset_out, regs.line_length_in, regs.remap_consta_value); - std::vector tmp_buffer(regs.line_length_in, regs.remap_consta_value); + read_buffer.resize_destructive(regs.line_length_in * sizeof(u32)); + std::span span(reinterpret_cast(read_buffer.data()), regs.line_length_in); + std::ranges::fill(span, regs.remap_consta_value); memory_manager.WriteBlockUnsafe(regs.offset_out, - reinterpret_cast(tmp_buffer.data()), + reinterpret_cast(read_buffer.data()), regs.line_length_in * sizeof(u32)); } else { memory_manager.FlushCaching(); @@ -126,32 +128,32 @@ void MaxwellDMA::Launch() { UNIMPLEMENTED_IF(regs.line_length_in % 16 != 0); UNIMPLEMENTED_IF(regs.offset_in % 16 != 0); UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); - std::vector tmp_buffer(16); + read_buffer.resize_destructive(16); for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { memory_manager.ReadBlockUnsafe( convert_linear_2_blocklinear_addr(regs.offset_in + offset), - tmp_buffer.data(), tmp_buffer.size()); - memory_manager.WriteBlockCached(regs.offset_out + offset, tmp_buffer.data(), - tmp_buffer.size()); + read_buffer.data(), read_buffer.size()); + memory_manager.WriteBlockCached(regs.offset_out + offset, read_buffer.data(), + read_buffer.size()); } } else if (is_src_pitch && !is_dst_pitch) { UNIMPLEMENTED_IF(regs.line_length_in % 16 != 0); UNIMPLEMENTED_IF(regs.offset_in % 16 != 0); UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); - std::vector tmp_buffer(16); + read_buffer.resize_destructive(16); for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { - memory_manager.ReadBlockUnsafe(regs.offset_in + offset, tmp_buffer.data(), - tmp_buffer.size()); + memory_manager.ReadBlockUnsafe(regs.offset_in + offset, read_buffer.data(), + read_buffer.size()); memory_manager.WriteBlockCached( convert_linear_2_blocklinear_addr(regs.offset_out + offset), - tmp_buffer.data(), tmp_buffer.size()); + read_buffer.data(), read_buffer.size()); } } else { if (!accelerate.BufferCopy(regs.offset_in, regs.offset_out, regs.line_length_in)) { - std::vector tmp_buffer(regs.line_length_in); - memory_manager.ReadBlockUnsafe(regs.offset_in, tmp_buffer.data(), + read_buffer.resize_destructive(regs.line_length_in); + memory_manager.ReadBlockUnsafe(regs.offset_in, read_buffer.data(), regs.line_length_in); - memory_manager.WriteBlockCached(regs.offset_out, tmp_buffer.data(), + memory_manager.WriteBlockCached(regs.offset_out, read_buffer.data(), regs.line_length_in); } } @@ -171,7 +173,8 @@ void MaxwellDMA::CopyBlockLinearToPitch() { src_operand.address = regs.offset_in; DMA::BufferOperand dst_operand; - dst_operand.pitch = regs.pitch_out; + u32 abs_pitch_out = std::abs(static_cast(regs.pitch_out)); + dst_operand.pitch = abs_pitch_out; dst_operand.width = regs.line_length_in; dst_operand.height = regs.line_count; dst_operand.address = regs.offset_out; @@ -218,7 +221,7 @@ void MaxwellDMA::CopyBlockLinearToPitch() { const size_t src_size = CalculateSize(true, bytes_per_pixel, width, height, depth, block_height, block_depth); - const size_t dst_size = static_cast(regs.pitch_out) * regs.line_count; + const size_t dst_size = static_cast(abs_pitch_out) * regs.line_count; read_buffer.resize_destructive(src_size); write_buffer.resize_destructive(dst_size); @@ -227,7 +230,7 @@ void MaxwellDMA::CopyBlockLinearToPitch() { UnswizzleSubrect(write_buffer, read_buffer, bytes_per_pixel, width, height, depth, x_offset, src_params.origin.y, x_elements, regs.line_count, block_height, block_depth, - regs.pitch_out); + abs_pitch_out); memory_manager.WriteBlockCached(regs.offset_out, write_buffer.data(), dst_size); } diff --git a/src/video_core/host1x/codecs/h264.cpp b/src/video_core/host1x/codecs/h264.cpp index 6ce179167..ce827eb6c 100644 --- a/src/video_core/host1x/codecs/h264.cpp +++ b/src/video_core/host1x/codecs/h264.cpp @@ -4,6 +4,7 @@ #include #include +#include "common/scratch_buffer.h" #include "common/settings.h" #include "video_core/host1x/codecs/h264.h" #include "video_core/host1x/host1x.h" @@ -188,7 +189,8 @@ void H264BitWriter::WriteBit(bool state) { } void H264BitWriter::WriteScalingList(std::span list, s32 start, s32 count) { - std::vector scan(count); + static Common::ScratchBuffer scan{}; + scan.resize_destructive(count); if (count == 16) { std::memcpy(scan.data(), zig_zag_scan.data(), scan.size()); } else { diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index b2f7e160a..45141e488 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -587,7 +587,7 @@ void MemoryManager::InvalidateRegion(GPUVAddr gpu_addr, size_t size, void MemoryManager::CopyBlock(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, std::size_t size, VideoCommon::CacheType which) { - std::vector tmp_buffer(size); + tmp_buffer.resize_destructive(size); ReadBlock(gpu_src_addr, tmp_buffer.data(), size, which); // The output block must be flushed in case it has data modified from the GPU. @@ -670,9 +670,9 @@ bool MemoryManager::IsFullyMappedRange(GPUVAddr gpu_addr, std::size_t size) cons return result; } -std::vector> MemoryManager::GetSubmappedRange( - GPUVAddr gpu_addr, std::size_t size) const { - std::vector> result{}; +boost::container::small_vector, 32> +MemoryManager::GetSubmappedRange(GPUVAddr gpu_addr, std::size_t size) const { + boost::container::small_vector, 32> result{}; GetSubmappedRangeImpl(gpu_addr, size, result); return result; } @@ -680,8 +680,9 @@ std::vector> MemoryManager::GetSubmappedRange( template void MemoryManager::GetSubmappedRangeImpl( GPUVAddr gpu_addr, std::size_t size, - std::vector, std::size_t>>& - result) const { + boost::container::small_vector< + std::pair, std::size_t>, 32>& result) + const { std::optional, std::size_t>> last_segment{}; std::optional old_page_addr{}; diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index 794535122..4202c26ff 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h @@ -8,10 +8,12 @@ #include #include #include +#include #include "common/common_types.h" #include "common/multi_level_page_table.h" #include "common/range_map.h" +#include "common/scratch_buffer.h" #include "common/virtual_buffer.h" #include "video_core/cache_types.h" #include "video_core/pte_kind.h" @@ -107,8 +109,8 @@ public: * if the region is continuous, a single pair will be returned. If it's unmapped, an empty * vector will be returned; */ - std::vector> GetSubmappedRange(GPUVAddr gpu_addr, - std::size_t size) const; + boost::container::small_vector, 32> GetSubmappedRange( + GPUVAddr gpu_addr, std::size_t size) const; GPUVAddr Map(GPUVAddr gpu_addr, VAddr cpu_addr, std::size_t size, PTEKind kind = PTEKind::INVALID, bool is_big_pages = true); @@ -165,7 +167,8 @@ private: template void GetSubmappedRangeImpl( GPUVAddr gpu_addr, std::size_t size, - std::vector, std::size_t>>& + boost::container::small_vector< + std::pair, std::size_t>, 32>& result) const; Core::System& system; @@ -215,8 +218,8 @@ private: Common::VirtualBuffer big_page_table_cpu; std::vector big_page_continuous; - std::vector> page_stash{}; - std::vector> page_stash2{}; + boost::container::small_vector, 32> page_stash{}; + boost::container::small_vector, 32> page_stash2{}; mutable std::mutex guard; @@ -226,6 +229,8 @@ private: std::unique_ptr accumulator; static std::atomic unique_identifier_generator; + + Common::ScratchBuffer tmp_buffer; }; } // namespace Tegra diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 3f077311e..0329ed820 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -85,7 +85,9 @@ Shader::RuntimeInfo MakeRuntimeInfo(const GraphicsPipelineKey& key, case Shader::Stage::VertexB: case Shader::Stage::Geometry: if (!use_assembly_shaders && key.xfb_enabled != 0) { - info.xfb_varyings = VideoCommon::MakeTransformFeedbackVaryings(key.xfb_state); + auto [varyings, count] = VideoCommon::MakeTransformFeedbackVaryings(key.xfb_state); + info.xfb_varyings = varyings; + info.xfb_count = count; } break; case Shader::Stage::TessellationEval: diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index e30fcb1ed..f47301ad5 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -361,7 +361,7 @@ void BufferCacheRuntime::CopyBuffer(VkBuffer dst_buffer, VkBuffer src_buffer, .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, }; // Measuring a popular game, this number never exceeds the specified size once data is warmed up - boost::container::small_vector vk_copies(copies.size()); + boost::container::small_vector vk_copies(copies.size()); std::ranges::transform(copies, vk_copies.begin(), MakeBufferCopy); scheduler.RequestOutsideRenderPassOperationContext(); scheduler.Record([src_buffer, dst_buffer, vk_copies, barrier](vk::CommandBuffer cmdbuf) { diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index a2cfb2105..9f316113c 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -167,7 +167,10 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span program info.fixed_state_point_size = point_size; } if (key.state.xfb_enabled) { - info.xfb_varyings = VideoCommon::MakeTransformFeedbackVaryings(key.state.xfb_state); + auto [varyings, count] = + VideoCommon::MakeTransformFeedbackVaryings(key.state.xfb_state); + info.xfb_varyings = varyings; + info.xfb_count = count; } info.convert_depth_mode = gl_ndc; } @@ -214,7 +217,10 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span program info.fixed_state_point_size = point_size; } if (key.state.xfb_enabled != 0) { - info.xfb_varyings = VideoCommon::MakeTransformFeedbackVaryings(key.state.xfb_state); + auto [varyings, count] = + VideoCommon::MakeTransformFeedbackVaryings(key.state.xfb_state); + info.xfb_varyings = varyings; + info.xfb_count = count; } info.convert_depth_mode = gl_ndc; break; diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index f025f618b..f3cef09dd 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -330,9 +330,9 @@ constexpr VkBorderColor ConvertBorderColor(const std::array& color) { }; } -[[maybe_unused]] [[nodiscard]] std::vector TransformBufferCopies( - std::span copies, size_t buffer_offset) { - std::vector result(copies.size()); +[[maybe_unused]] [[nodiscard]] boost::container::small_vector +TransformBufferCopies(std::span copies, size_t buffer_offset) { + boost::container::small_vector result(copies.size()); std::ranges::transform( copies, result.begin(), [buffer_offset](const VideoCommon::BufferCopy& copy) { return VkBufferCopy{ @@ -344,7 +344,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array& color) { return result; } -[[nodiscard]] std::vector TransformBufferImageCopies( +[[nodiscard]] boost::container::small_vector TransformBufferImageCopies( std::span copies, size_t buffer_offset, VkImageAspectFlags aspect_mask) { struct Maker { VkBufferImageCopy operator()(const BufferImageCopy& copy) const { @@ -377,14 +377,14 @@ constexpr VkBorderColor ConvertBorderColor(const std::array& color) { VkImageAspectFlags aspect_mask; }; if (aspect_mask == (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) { - std::vector result(copies.size() * 2); + boost::container::small_vector result(copies.size() * 2); std::ranges::transform(copies, result.begin(), Maker{buffer_offset, VK_IMAGE_ASPECT_DEPTH_BIT}); std::ranges::transform(copies, result.begin() + copies.size(), Maker{buffer_offset, VK_IMAGE_ASPECT_STENCIL_BIT}); return result; } else { - std::vector result(copies.size()); + boost::container::small_vector result(copies.size()); std::ranges::transform(copies, result.begin(), Maker{buffer_offset, aspect_mask}); return result; } @@ -867,8 +867,8 @@ void TextureCacheRuntime::BarrierFeedbackLoop() { void TextureCacheRuntime::ReinterpretImage(Image& dst, Image& src, std::span copies) { - std::vector vk_in_copies(copies.size()); - std::vector vk_out_copies(copies.size()); + boost::container::small_vector vk_in_copies(copies.size()); + boost::container::small_vector vk_out_copies(copies.size()); const VkImageAspectFlags src_aspect_mask = src.AspectMask(); const VkImageAspectFlags dst_aspect_mask = dst.AspectMask(); @@ -1157,7 +1157,7 @@ void TextureCacheRuntime::ConvertImage(Framebuffer* dst, ImageView& dst_view, Im void TextureCacheRuntime::CopyImage(Image& dst, Image& src, std::span copies) { - std::vector vk_copies(copies.size()); + boost::container::small_vector vk_copies(copies.size()); const VkImageAspectFlags aspect_mask = dst.AspectMask(); ASSERT(aspect_mask == src.AspectMask()); @@ -1332,7 +1332,7 @@ void Image::UploadMemory(VkBuffer buffer, VkDeviceSize offset, ScaleDown(true); } scheduler->RequestOutsideRenderPassOperationContext(); - std::vector vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); + auto vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); const VkBuffer src_buffer = buffer; const VkImage vk_image = *original_image; const VkImageAspectFlags vk_aspect_mask = aspect_mask; @@ -1367,8 +1367,9 @@ void Image::DownloadMemory(std::span buffers_span, std::span buffers_vector{}; - boost::container::small_vector, 1> vk_copies; + boost::container::small_vector buffers_vector{}; + boost::container::small_vector, 8> + vk_copies; for (size_t index = 0; index < buffers_span.size(); index++) { buffers_vector.emplace_back(buffers_span[index]); vk_copies.emplace_back( @@ -1858,7 +1859,7 @@ Framebuffer::~Framebuffer() = default; void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime, std::span color_buffers, ImageView* depth_buffer, bool is_rescaled) { - std::vector attachments; + boost::container::small_vector attachments; RenderPassKey renderpass_key{}; s32 num_layers = 1; diff --git a/src/video_core/shader_cache.cpp b/src/video_core/shader_cache.cpp index c5213875b..4db948b6d 100644 --- a/src/video_core/shader_cache.cpp +++ b/src/video_core/shader_cache.cpp @@ -151,11 +151,9 @@ void ShaderCache::RemovePendingShaders() { marked_for_removal.erase(std::unique(marked_for_removal.begin(), marked_for_removal.end()), marked_for_removal.end()); - std::vector removed_shaders; - removed_shaders.reserve(marked_for_removal.size()); + boost::container::small_vector removed_shaders; std::scoped_lock lock{lookup_mutex}; - for (Entry* const entry : marked_for_removal) { removed_shaders.push_back(entry->data); diff --git a/src/video_core/texture_cache/image_base.h b/src/video_core/texture_cache/image_base.h index 1b8a17ee8..55d49d017 100644 --- a/src/video_core/texture_cache/image_base.h +++ b/src/video_core/texture_cache/image_base.h @@ -6,6 +6,7 @@ #include #include #include +#include #include "common/common_funcs.h" #include "common/common_types.h" @@ -108,8 +109,8 @@ struct ImageBase { std::vector image_view_infos; std::vector image_view_ids; - std::vector slice_offsets; - std::vector slice_subresources; + boost::container::small_vector slice_offsets; + boost::container::small_vector slice_subresources; std::vector aliased_images; std::vector overlapping_images; diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index d58bb69ff..d3f03a995 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -526,7 +526,7 @@ void TextureCache

::WriteMemory(VAddr cpu_addr, size_t size) { template void TextureCache

::DownloadMemory(VAddr cpu_addr, size_t size) { - std::vector images; + boost::container::small_vector images; ForEachImageInRegion(cpu_addr, size, [&images](ImageId image_id, ImageBase& image) { if (!image.IsSafeDownload()) { return; @@ -579,7 +579,7 @@ std::optional TextureCache

::GetFlushArea(V template void TextureCache

::UnmapMemory(VAddr cpu_addr, size_t size) { - std::vector deleted_images; + boost::container::small_vector deleted_images; ForEachImageInRegion(cpu_addr, size, [&](ImageId id, Image&) { deleted_images.push_back(id); }); for (const ImageId id : deleted_images) { Image& image = slot_images[id]; @@ -593,7 +593,7 @@ void TextureCache

::UnmapMemory(VAddr cpu_addr, size_t size) { template void TextureCache

::UnmapGPUMemory(size_t as_id, GPUVAddr gpu_addr, size_t size) { - std::vector deleted_images; + boost::container::small_vector deleted_images; ForEachImageInRegionGPU(as_id, gpu_addr, size, [&](ImageId id, Image&) { deleted_images.push_back(id); }); for (const ImageId id : deleted_images) { @@ -1101,7 +1101,7 @@ ImageId TextureCache

::FindImage(const ImageInfo& info, GPUVAddr gpu_addr, const bool native_bgr = runtime.HasNativeBgr(); const bool flexible_formats = True(options & RelaxedOptions::Format); ImageId image_id{}; - boost::container::small_vector image_ids; + boost::container::small_vector image_ids; const auto lambda = [&](ImageId existing_image_id, ImageBase& existing_image) { if (True(existing_image.flags & ImageFlagBits::Remapped)) { return false; @@ -1622,7 +1622,7 @@ ImageId TextureCache

::FindDMAImage(const ImageInfo& info, GPUVAddr gpu_addr) } } ImageId image_id{}; - boost::container::small_vector image_ids; + boost::container::small_vector image_ids; const auto lambda = [&](ImageId existing_image_id, ImageBase& existing_image) { if (True(existing_image.flags & ImageFlagBits::Remapped)) { return false; @@ -1942,7 +1942,7 @@ void TextureCache

::RegisterImage(ImageId image_id) { image.map_view_id = map_id; return; } - std::vector sparse_maps{}; + boost::container::small_vector sparse_maps; ForEachSparseSegment( image, [this, image_id, &sparse_maps](GPUVAddr gpu_addr, VAddr cpu_addr, size_t size) { auto map_id = slot_map_views.insert(gpu_addr, cpu_addr, size, image_id); @@ -2217,7 +2217,7 @@ void TextureCache

::MarkModification(ImageBase& image) noexcept { template void TextureCache

::SynchronizeAliases(ImageId image_id) { - boost::container::small_vector aliased_images; + boost::container::small_vector aliased_images; Image& image = slot_images[image_id]; bool any_rescaled = True(image.flags & ImageFlagBits::Rescaled); bool any_modified = True(image.flags & ImageFlagBits::GpuModified); diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h index 44232b961..e9ec91265 100644 --- a/src/video_core/texture_cache/texture_cache_base.h +++ b/src/video_core/texture_cache/texture_cache_base.h @@ -56,7 +56,7 @@ struct ImageViewInOut { struct AsyncDecodeContext { ImageId image_id; Common::ScratchBuffer decoded_data; - std::vector copies; + boost::container::small_vector copies; std::mutex mutex; std::atomic_bool complete; }; @@ -429,7 +429,7 @@ private: std::unordered_map, Common::IdentityHash> page_table; std::unordered_map, Common::IdentityHash> sparse_page_table; - std::unordered_map> sparse_views; + std::unordered_map> sparse_views; VAddr virtual_invalid_space{}; diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 95a5b47d8..f781cb7a0 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -329,13 +329,13 @@ template [[nodiscard]] std::optional ResolveOverlapRightAddress3D( const ImageInfo& new_info, GPUVAddr gpu_addr, const ImageBase& overlap, bool strict_size) { - const std::vector slice_offsets = CalculateSliceOffsets(new_info); + const auto slice_offsets = CalculateSliceOffsets(new_info); const u32 diff = static_cast(overlap.gpu_addr - gpu_addr); const auto it = std::ranges::find(slice_offsets, diff); if (it == slice_offsets.end()) { return std::nullopt; } - const std::vector subresources = CalculateSliceSubresources(new_info); + const auto subresources = CalculateSliceSubresources(new_info); const SubresourceBase base = subresources[std::distance(slice_offsets.begin(), it)]; const ImageInfo& info = overlap.info; if (!IsBlockLinearSizeCompatible(new_info, info, base.level, 0, strict_size)) { @@ -655,9 +655,9 @@ LevelArray CalculateMipLevelSizes(const ImageInfo& info) noexcept { return sizes; } -std::vector CalculateSliceOffsets(const ImageInfo& info) { +boost::container::small_vector CalculateSliceOffsets(const ImageInfo& info) { ASSERT(info.type == ImageType::e3D); - std::vector offsets; + boost::container::small_vector offsets; offsets.reserve(NumSlices(info)); const LevelInfo level_info = MakeLevelInfo(info); @@ -679,9 +679,10 @@ std::vector CalculateSliceOffsets(const ImageInfo& info) { return offsets; } -std::vector CalculateSliceSubresources(const ImageInfo& info) { +boost::container::small_vector CalculateSliceSubresources( + const ImageInfo& info) { ASSERT(info.type == ImageType::e3D); - std::vector subresources; + boost::container::small_vector subresources; subresources.reserve(NumSlices(info)); for (s32 level = 0; level < info.resources.levels; ++level) { const s32 depth = AdjustMipSize(info.size.depth, level); @@ -723,8 +724,10 @@ ImageViewType RenderTargetImageViewType(const ImageInfo& info) noexcept { } } -std::vector MakeShrinkImageCopies(const ImageInfo& dst, const ImageInfo& src, - SubresourceBase base, u32 up_scale, u32 down_shift) { +boost::container::small_vector MakeShrinkImageCopies(const ImageInfo& dst, + const ImageInfo& src, + SubresourceBase base, + u32 up_scale, u32 down_shift) { ASSERT(dst.resources.levels >= src.resources.levels); const bool is_dst_3d = dst.type == ImageType::e3D; @@ -733,7 +736,7 @@ std::vector MakeShrinkImageCopies(const ImageInfo& dst, const ImageIn ASSERT(src.resources.levels == 1); } const bool both_2d{src.type == ImageType::e2D && dst.type == ImageType::e2D}; - std::vector copies; + boost::container::small_vector copies; copies.reserve(src.resources.levels); for (s32 level = 0; level < src.resources.levels; ++level) { ImageCopy& copy = copies.emplace_back(); @@ -770,9 +773,10 @@ std::vector MakeShrinkImageCopies(const ImageInfo& dst, const ImageIn return copies; } -std::vector MakeReinterpretImageCopies(const ImageInfo& src, u32 up_scale, - u32 down_shift) { - std::vector copies; +boost::container::small_vector MakeReinterpretImageCopies(const ImageInfo& src, + u32 up_scale, + u32 down_shift) { + boost::container::small_vector copies; copies.reserve(src.resources.levels); const bool is_3d = src.type == ImageType::e3D; for (s32 level = 0; level < src.resources.levels; ++level) { @@ -824,9 +828,11 @@ bool IsValidEntry(const Tegra::MemoryManager& gpu_memory, const TICEntry& config return gpu_memory.GpuToCpuAddress(address, guest_size_bytes).has_value(); } -std::vector UnswizzleImage(Tegra::MemoryManager& gpu_memory, GPUVAddr gpu_addr, - const ImageInfo& info, std::span input, - std::span output) { +boost::container::small_vector UnswizzleImage(Tegra::MemoryManager& gpu_memory, + GPUVAddr gpu_addr, + const ImageInfo& info, + std::span input, + std::span output) { const size_t guest_size_bytes = input.size_bytes(); const u32 bpp_log2 = BytesPerBlockLog2(info.format); const Extent3D size = info.size; @@ -861,7 +867,7 @@ std::vector UnswizzleImage(Tegra::MemoryManager& gpu_memory, GP info.tile_width_spacing); size_t guest_offset = 0; u32 host_offset = 0; - std::vector copies(num_levels); + boost::container::small_vector copies(num_levels); for (s32 level = 0; level < num_levels; ++level) { const Extent3D level_size = AdjustMipSize(size, level); @@ -978,7 +984,7 @@ void ConvertImage(std::span input, const ImageInfo& info, std::span FullDownloadCopies(const ImageInfo& info) { +boost::container::small_vector FullDownloadCopies(const ImageInfo& info) { const Extent3D size = info.size; const u32 bytes_per_block = BytesPerBlock(info.format); if (info.type == ImageType::Linear) { @@ -1006,7 +1012,7 @@ std::vector FullDownloadCopies(const ImageInfo& info) { u32 host_offset = 0; - std::vector copies(num_levels); + boost::container::small_vector copies(num_levels); for (s32 level = 0; level < num_levels; ++level) { const Extent3D level_size = AdjustMipSize(size, level); const u32 num_blocks_per_layer = NumBlocks(level_size, tile_size); @@ -1042,10 +1048,10 @@ Extent3D MipBlockSize(const ImageInfo& info, u32 level) { return AdjustMipBlockSize(num_tiles, level_info.block, level); } -std::vector FullUploadSwizzles(const ImageInfo& info) { +boost::container::small_vector FullUploadSwizzles(const ImageInfo& info) { const Extent2D tile_size = DefaultBlockSize(info.format); if (info.type == ImageType::Linear) { - return std::vector{SwizzleParameters{ + return {SwizzleParameters{ .num_tiles = AdjustTileSize(info.size, tile_size), .block = {}, .buffer_offset = 0, @@ -1057,7 +1063,7 @@ std::vector FullUploadSwizzles(const ImageInfo& info) { const s32 num_levels = info.resources.levels; u32 guest_offset = 0; - std::vector params(num_levels); + boost::container::small_vector params(num_levels); for (s32 level = 0; level < num_levels; ++level) { const Extent3D level_size = AdjustMipSize(size, level); const Extent3D num_tiles = AdjustTileSize(level_size, tile_size); diff --git a/src/video_core/texture_cache/util.h b/src/video_core/texture_cache/util.h index 84aa6880d..ab45a43c4 100644 --- a/src/video_core/texture_cache/util.h +++ b/src/video_core/texture_cache/util.h @@ -5,6 +5,7 @@ #include #include +#include #include "common/common_types.h" #include "common/scratch_buffer.h" @@ -40,9 +41,10 @@ struct OverlapResult { [[nodiscard]] LevelArray CalculateMipLevelSizes(const ImageInfo& info) noexcept; -[[nodiscard]] std::vector CalculateSliceOffsets(const ImageInfo& info); +[[nodiscard]] boost::container::small_vector CalculateSliceOffsets(const ImageInfo& info); -[[nodiscard]] std::vector CalculateSliceSubresources(const ImageInfo& info); +[[nodiscard]] boost::container::small_vector CalculateSliceSubresources( + const ImageInfo& info); [[nodiscard]] u32 CalculateLevelStrideAlignment(const ImageInfo& info, u32 level); @@ -51,21 +53,18 @@ struct OverlapResult { [[nodiscard]] ImageViewType RenderTargetImageViewType(const ImageInfo& info) noexcept; -[[nodiscard]] std::vector MakeShrinkImageCopies(const ImageInfo& dst, - const ImageInfo& src, - SubresourceBase base, u32 up_scale = 1, - u32 down_shift = 0); +[[nodiscard]] boost::container::small_vector MakeShrinkImageCopies( + const ImageInfo& dst, const ImageInfo& src, SubresourceBase base, u32 up_scale = 1, + u32 down_shift = 0); -[[nodiscard]] std::vector MakeReinterpretImageCopies(const ImageInfo& src, - u32 up_scale = 1, - u32 down_shift = 0); +[[nodiscard]] boost::container::small_vector MakeReinterpretImageCopies( + const ImageInfo& src, u32 up_scale = 1, u32 down_shift = 0); [[nodiscard]] bool IsValidEntry(const Tegra::MemoryManager& gpu_memory, const TICEntry& config); -[[nodiscard]] std::vector UnswizzleImage(Tegra::MemoryManager& gpu_memory, - GPUVAddr gpu_addr, const ImageInfo& info, - std::span input, - std::span output); +[[nodiscard]] boost::container::small_vector UnswizzleImage( + Tegra::MemoryManager& gpu_memory, GPUVAddr gpu_addr, const ImageInfo& info, + std::span input, std::span output); [[nodiscard]] BufferCopy UploadBufferCopy(Tegra::MemoryManager& gpu_memory, GPUVAddr gpu_addr, const ImageBase& image, std::span output); @@ -73,13 +72,15 @@ struct OverlapResult { void ConvertImage(std::span input, const ImageInfo& info, std::span output, std::span copies); -[[nodiscard]] std::vector FullDownloadCopies(const ImageInfo& info); +[[nodiscard]] boost::container::small_vector FullDownloadCopies( + const ImageInfo& info); [[nodiscard]] Extent3D MipSize(Extent3D size, u32 level); [[nodiscard]] Extent3D MipBlockSize(const ImageInfo& info, u32 level); -[[nodiscard]] std::vector FullUploadSwizzles(const ImageInfo& info); +[[nodiscard]] boost::container::small_vector FullUploadSwizzles( + const ImageInfo& info); void SwizzleImage(Tegra::MemoryManager& gpu_memory, GPUVAddr gpu_addr, const ImageInfo& info, std::span copies, std::span memory, diff --git a/src/video_core/transform_feedback.cpp b/src/video_core/transform_feedback.cpp index 155599316..1f353d2df 100644 --- a/src/video_core/transform_feedback.cpp +++ b/src/video_core/transform_feedback.cpp @@ -13,7 +13,7 @@ namespace VideoCommon { -std::vector MakeTransformFeedbackVaryings( +std::pair, u32> MakeTransformFeedbackVaryings( const TransformFeedbackState& state) { static constexpr std::array VECTORS{ 28U, // gl_Position @@ -62,7 +62,8 @@ std::vector MakeTransformFeedbackVaryings( 216U, // gl_TexCoord[6] 220U, // gl_TexCoord[7] }; - std::vector xfb(256); + std::array xfb{}; + u32 count{0}; for (size_t buffer = 0; buffer < state.layouts.size(); ++buffer) { const auto& locations = state.varyings[buffer]; const auto& layout = state.layouts[buffer]; @@ -103,11 +104,12 @@ std::vector MakeTransformFeedbackVaryings( } } xfb[attribute] = varying; + count = std::max(count, attribute); highest = std::max(highest, (base_offset + varying.components) * 4); } UNIMPLEMENTED_IF(highest != layout.stride); } - return xfb; + return {xfb, count + 1}; } } // namespace VideoCommon diff --git a/src/video_core/transform_feedback.h b/src/video_core/transform_feedback.h index d13eb16c3..401b1352a 100644 --- a/src/video_core/transform_feedback.h +++ b/src/video_core/transform_feedback.h @@ -24,7 +24,7 @@ struct TransformFeedbackState { varyings; }; -std::vector MakeTransformFeedbackVaryings( +std::pair, u32> MakeTransformFeedbackVaryings( const TransformFeedbackState& state); } // namespace VideoCommon diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index fa9cde75b..b11abe311 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -316,6 +316,7 @@ NvidiaArchitecture GetNvidiaArchitecture(vk::PhysicalDevice physical, std::vector ExtensionListForVulkan( const std::set>& extensions) { std::vector output; + output.reserve(extensions.size()); for (const auto& extension : extensions) { output.push_back(extension.c_str()); } From 1586f1c0b174bec6b1db7de48b46ff75e29f3bb2 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 20 Jun 2023 11:41:38 -0400 Subject: [PATCH 43/91] general: remove atomic signal and wait --- src/common/thread.h | 2 +- .../hle/service/nvnflinger/nvnflinger.cpp | 14 ++++-------- src/core/hle/service/nvnflinger/nvnflinger.h | 3 ++- src/core/hle/service/server_manager.cpp | 7 ++---- src/core/hle/service/server_manager.h | 4 ++-- .../renderer_vulkan/vk_master_semaphore.cpp | 22 ++++++++----------- .../renderer_vulkan/vk_master_semaphore.h | 1 + src/yuzu/bootmanager.cpp | 6 ++--- src/yuzu/bootmanager.h | 7 +++--- 9 files changed, 26 insertions(+), 40 deletions(-) diff --git a/src/common/thread.h b/src/common/thread.h index 8ae169b4e..c6976fb6c 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -55,7 +55,7 @@ public: is_set = false; } - [[nodiscard]] bool IsSet() { + [[nodiscard]] bool IsSet() const { return is_set; } diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp index b41c6240c..5f55cd31e 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.cpp +++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp @@ -43,14 +43,10 @@ void Nvnflinger::SplitVSync(std::stop_token stop_token) { Common::SetCurrentThreadPriority(Common::ThreadPriority::High); while (!stop_token.stop_requested()) { - vsync_signal.wait(false); - vsync_signal.store(false); - - guard->lock(); + vsync_signal.Wait(); + const auto lock_guard = Lock(); Compose(); - - guard->unlock(); } } @@ -69,9 +65,8 @@ Nvnflinger::Nvnflinger(Core::System& system_, HosBinderDriverServer& hos_binder_ "ScreenComposition", [this](std::uintptr_t, s64 time, std::chrono::nanoseconds ns_late) -> std::optional { - vsync_signal.store(true); { const auto lock_guard = Lock(); } - vsync_signal.notify_one(); + vsync_signal.Set(); return std::chrono::nanoseconds(GetNextTicks()); }); @@ -97,8 +92,7 @@ Nvnflinger::~Nvnflinger() { if (system.IsMulticore()) { system.CoreTiming().UnscheduleEvent(multi_composition_event, {}); vsync_thread.request_stop(); - vsync_signal.store(true); - vsync_signal.notify_all(); + vsync_signal.Set(); } else { system.CoreTiming().UnscheduleEvent(single_composition_event, {}); } diff --git a/src/core/hle/service/nvnflinger/nvnflinger.h b/src/core/hle/service/nvnflinger/nvnflinger.h index a043cceb2..ef236303a 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.h +++ b/src/core/hle/service/nvnflinger/nvnflinger.h @@ -12,6 +12,7 @@ #include "common/common_types.h" #include "common/polyfill_thread.h" +#include "common/thread.h" #include "core/hle/result.h" #include "core/hle/service/kernel_helpers.h" @@ -143,7 +144,7 @@ private: Core::System& system; - std::atomic vsync_signal; + Common::Event vsync_signal; std::jthread vsync_thread; diff --git a/src/core/hle/service/server_manager.cpp b/src/core/hle/service/server_manager.cpp index 156bc27d8..d1e99b184 100644 --- a/src/core/hle/service/server_manager.cpp +++ b/src/core/hle/service/server_manager.cpp @@ -44,7 +44,7 @@ ServerManager::~ServerManager() { m_event->Signal(); // Wait for processing to stop. - m_stopped.wait(false); + m_stopped.Wait(); m_threads.clear(); // Clean up ports. @@ -182,10 +182,7 @@ void ServerManager::StartAdditionalHostThreads(const char* name, size_t num_thre } Result ServerManager::LoopProcess() { - SCOPE_EXIT({ - m_stopped.store(true); - m_stopped.notify_all(); - }); + SCOPE_EXIT({ m_stopped.Set(); }); R_RETURN(this->LoopProcessImpl()); } diff --git a/src/core/hle/service/server_manager.h b/src/core/hle/service/server_manager.h index fdb8af2ff..58b0a0832 100644 --- a/src/core/hle/service/server_manager.h +++ b/src/core/hle/service/server_manager.h @@ -3,7 +3,6 @@ #pragma once -#include #include #include #include @@ -12,6 +11,7 @@ #include #include "common/polyfill_thread.h" +#include "common/thread.h" #include "core/hle/result.h" #include "core/hle/service/mutex.h" @@ -82,7 +82,7 @@ private: std::list m_deferrals{}; // Host state tracking - std::atomic m_stopped{}; + Common::Event m_stopped{}; std::vector m_threads{}; std::stop_source m_stop_source{}; }; diff --git a/src/video_core/renderer_vulkan/vk_master_semaphore.cpp b/src/video_core/renderer_vulkan/vk_master_semaphore.cpp index 5eeda08d2..6b288b994 100644 --- a/src/video_core/renderer_vulkan/vk_master_semaphore.cpp +++ b/src/video_core/renderer_vulkan/vk_master_semaphore.cpp @@ -75,15 +75,9 @@ void MasterSemaphore::Refresh() { void MasterSemaphore::Wait(u64 tick) { if (!semaphore) { - // If we don't support timeline semaphores, use an atomic wait - while (true) { - u64 current_value = gpu_tick.load(std::memory_order_relaxed); - if (current_value >= tick) { - return; - } - gpu_tick.wait(current_value); - } - + // If we don't support timeline semaphores, wait for the value normally + std::unique_lock lk{free_mutex}; + free_cv.wait(lk, [&] { return gpu_tick.load(std::memory_order_relaxed) >= tick; }); return; } @@ -198,11 +192,13 @@ void MasterSemaphore::WaitThread(std::stop_token token) { fence.Wait(); fence.Reset(); - gpu_tick.store(host_tick); - gpu_tick.notify_all(); - std::scoped_lock lock{free_mutex}; - free_queue.push_front(std::move(fence)); + { + std::scoped_lock lock{free_mutex}; + free_queue.push_front(std::move(fence)); + gpu_tick.store(host_tick); + } + free_cv.notify_one(); } } diff --git a/src/video_core/renderer_vulkan/vk_master_semaphore.h b/src/video_core/renderer_vulkan/vk_master_semaphore.h index 1e7c90215..3f599d7bd 100644 --- a/src/video_core/renderer_vulkan/vk_master_semaphore.h +++ b/src/video_core/renderer_vulkan/vk_master_semaphore.h @@ -72,6 +72,7 @@ private: std::atomic current_tick{1}; ///< Current logical tick. std::mutex wait_mutex; std::mutex free_mutex; + std::condition_variable free_cv; std::condition_variable_any wait_cv; std::queue wait_queue; ///< Queue for the fences to be waited on by the wait thread. std::deque free_queue; ///< Holds available fences for submission. diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index cc6b6a25a..bdd1497b5 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -105,14 +105,12 @@ void EmuThread::run() { std::unique_lock lk{m_should_run_mutex}; if (m_should_run) { m_system.Run(); - m_is_running.store(true); - m_is_running.notify_all(); + m_stopped.Reset(); Common::CondvarWait(m_should_run_cv, lk, stop_token, [&] { return !m_should_run; }); } else { m_system.Pause(); - m_is_running.store(false); - m_is_running.notify_all(); + m_stopped.Set(); EmulationPaused(lk); Common::CondvarWait(m_should_run_cv, lk, stop_token, [&] { return m_should_run; }); diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index b7b9d4141..87b23df12 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h @@ -3,7 +3,6 @@ #pragma once -#include #include #include #include @@ -88,7 +87,7 @@ public: // Wait until paused, if pausing. if (!should_run) { - m_is_running.wait(true); + m_stopped.Wait(); } } @@ -97,7 +96,7 @@ public: * @return True if the emulation thread is running, otherwise false */ bool IsRunning() const { - return m_is_running.load() || m_should_run; + return m_should_run; } /** @@ -118,7 +117,7 @@ private: std::stop_source m_stop_source; std::mutex m_should_run_mutex; std::condition_variable_any m_should_run_cv; - std::atomic m_is_running{false}; + Common::Event m_stopped; bool m_should_run{true}; signals: From 75fb29e08e3891ecfc5d96d54603cda806ebd426 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Thu, 22 Jun 2023 20:03:12 +0300 Subject: [PATCH 44/91] vulkan_common: Remove required flags * Allows VMA to fallback to system RAM instead of crashing --- .../vulkan_common/vulkan_memory_allocator.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 20d36680c..70db41343 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -59,20 +59,6 @@ struct Range { return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; } -[[nodiscard]] VkMemoryPropertyFlags MemoryUsageRequiredVmaFlags(MemoryUsage usage) { - switch (usage) { - case MemoryUsage::DeviceLocal: - return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; - case MemoryUsage::Upload: - case MemoryUsage::Stream: - return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; - case MemoryUsage::Download: - return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; - } - ASSERT_MSG(false, "Invalid memory usage={}", usage); - return {}; -} - [[nodiscard]] VkMemoryPropertyFlags MemoryUsagePreferedVmaFlags(MemoryUsage usage) { return usage != MemoryUsage::DeviceLocal ? VK_MEMORY_PROPERTY_HOST_COHERENT_BIT : VkMemoryPropertyFlagBits{}; @@ -259,7 +245,7 @@ vk::Buffer MemoryAllocator::CreateBuffer(const VkBufferCreateInfo& ci, MemoryUsa .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT | MemoryUsageVmaFlags(usage), .usage = MemoryUsageVma(usage), - .requiredFlags = MemoryUsageRequiredVmaFlags(usage), + .requiredFlags = 0, .preferredFlags = MemoryUsagePreferedVmaFlags(usage), .memoryTypeBits = 0, .pool = VK_NULL_HANDLE, From c133509368f1054690a39a117e9d9ea34f187b8d Mon Sep 17 00:00:00 2001 From: GPUCode Date: Thu, 22 Jun 2023 20:17:52 +0300 Subject: [PATCH 45/91] android: Log settings --- src/android/app/src/main/jni/native.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 632aa50b3..f4fed0886 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -237,6 +237,7 @@ public: m_software_keyboard = android_keyboard.get(); m_system.SetShuttingDown(false); m_system.ApplySettings(); + Settings::LogSettings(); m_system.HIDCore().ReloadInputDevices(); m_system.SetAppletFrontendSet({ nullptr, // Amiibo Settings From 1dd166f76653bee7f7c2a0a89929ee9232680536 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 22 Jun 2023 22:05:08 -0400 Subject: [PATCH 46/91] vfs_real: lock concurrent accesses --- src/core/file_sys/vfs_real.cpp | 55 ++++++++++++++++++++++------------ src/core/file_sys/vfs_real.h | 15 ++++++---- 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp index fcc81a664..b0515ec05 100644 --- a/src/core/file_sys/vfs_real.cpp +++ b/src/core/file_sys/vfs_real.cpp @@ -76,6 +76,7 @@ VfsEntryType RealVfsFilesystem::GetEntryType(std::string_view path_) const { VirtualFile RealVfsFilesystem::OpenFileFromEntry(std::string_view path_, std::optional size, Mode perms) { const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault); + std::scoped_lock lk{list_lock}; if (auto it = cache.find(path); it != cache.end()) { if (auto file = it->second.lock(); file) { @@ -88,7 +89,7 @@ VirtualFile RealVfsFilesystem::OpenFileFromEntry(std::string_view path_, std::op } auto reference = std::make_unique(); - this->InsertReferenceIntoList(*reference); + this->InsertReferenceIntoListLocked(*reference); auto file = std::shared_ptr( new RealVfsFile(*this, std::move(reference), path, perms, size)); @@ -103,7 +104,10 @@ VirtualFile RealVfsFilesystem::OpenFile(std::string_view path_, Mode perms) { VirtualFile RealVfsFilesystem::CreateFile(std::string_view path_, Mode perms) { const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault); - cache.erase(path); + { + std::scoped_lock lk{list_lock}; + cache.erase(path); + } // Current usages of CreateFile expect to delete the contents of an existing file. if (FS::IsFile(path)) { @@ -133,8 +137,11 @@ VirtualFile RealVfsFilesystem::CopyFile(std::string_view old_path_, std::string_ VirtualFile RealVfsFilesystem::MoveFile(std::string_view old_path_, std::string_view new_path_) { const auto old_path = FS::SanitizePath(old_path_, FS::DirectorySeparator::PlatformDefault); const auto new_path = FS::SanitizePath(new_path_, FS::DirectorySeparator::PlatformDefault); - cache.erase(old_path); - cache.erase(new_path); + { + std::scoped_lock lk{list_lock}; + cache.erase(old_path); + cache.erase(new_path); + } if (!FS::RenameFile(old_path, new_path)) { return nullptr; } @@ -143,7 +150,10 @@ VirtualFile RealVfsFilesystem::MoveFile(std::string_view old_path_, std::string_ bool RealVfsFilesystem::DeleteFile(std::string_view path_) { const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault); - cache.erase(path); + { + std::scoped_lock lk{list_lock}; + cache.erase(path); + } return FS::RemoveFile(path); } @@ -182,14 +192,17 @@ bool RealVfsFilesystem::DeleteDirectory(std::string_view path_) { return FS::RemoveDirRecursively(path); } -void RealVfsFilesystem::RefreshReference(const std::string& path, Mode perms, - FileReference& reference) { +std::unique_lock RealVfsFilesystem::RefreshReference(const std::string& path, + Mode perms, + FileReference& reference) { + std::unique_lock lk{list_lock}; + // Temporarily remove from list. - this->RemoveReferenceFromList(reference); + this->RemoveReferenceFromListLocked(reference); // Restore file if needed. if (!reference.file) { - this->EvictSingleReference(); + this->EvictSingleReferenceLocked(); reference.file = FS::FileOpen(path, ModeFlagsToFileAccessMode(perms), FS::FileType::BinaryFile); @@ -199,12 +212,16 @@ void RealVfsFilesystem::RefreshReference(const std::string& path, Mode perms, } // Reinsert into list. - this->InsertReferenceIntoList(reference); + this->InsertReferenceIntoListLocked(reference); + + return lk; } void RealVfsFilesystem::DropReference(std::unique_ptr&& reference) { + std::scoped_lock lk{list_lock}; + // Remove from list. - this->RemoveReferenceFromList(*reference); + this->RemoveReferenceFromListLocked(*reference); // Close the file. if (reference->file) { @@ -213,14 +230,14 @@ void RealVfsFilesystem::DropReference(std::unique_ptr&& reference } } -void RealVfsFilesystem::EvictSingleReference() { +void RealVfsFilesystem::EvictSingleReferenceLocked() { if (num_open_files < MaxOpenFiles || open_references.empty()) { return; } // Get and remove from list. auto& reference = open_references.back(); - this->RemoveReferenceFromList(reference); + this->RemoveReferenceFromListLocked(reference); // Close the file. if (reference.file) { @@ -229,10 +246,10 @@ void RealVfsFilesystem::EvictSingleReference() { } // Reinsert into closed list. - this->InsertReferenceIntoList(reference); + this->InsertReferenceIntoListLocked(reference); } -void RealVfsFilesystem::InsertReferenceIntoList(FileReference& reference) { +void RealVfsFilesystem::InsertReferenceIntoListLocked(FileReference& reference) { if (reference.file) { open_references.push_front(reference); } else { @@ -240,7 +257,7 @@ void RealVfsFilesystem::InsertReferenceIntoList(FileReference& reference) { } } -void RealVfsFilesystem::RemoveReferenceFromList(FileReference& reference) { +void RealVfsFilesystem::RemoveReferenceFromListLocked(FileReference& reference) { if (reference.file) { open_references.erase(open_references.iterator_to(reference)); } else { @@ -271,7 +288,7 @@ std::size_t RealVfsFile::GetSize() const { bool RealVfsFile::Resize(std::size_t new_size) { size.reset(); - base.RefreshReference(path, perms, *reference); + auto lk = base.RefreshReference(path, perms, *reference); return reference->file ? reference->file->SetSize(new_size) : false; } @@ -288,7 +305,7 @@ bool RealVfsFile::IsReadable() const { } std::size_t RealVfsFile::Read(u8* data, std::size_t length, std::size_t offset) const { - base.RefreshReference(path, perms, *reference); + auto lk = base.RefreshReference(path, perms, *reference); if (!reference->file || !reference->file->Seek(static_cast(offset))) { return 0; } @@ -297,7 +314,7 @@ std::size_t RealVfsFile::Read(u8* data, std::size_t length, std::size_t offset) std::size_t RealVfsFile::Write(const u8* data, std::size_t length, std::size_t offset) { size.reset(); - base.RefreshReference(path, perms, *reference); + auto lk = base.RefreshReference(path, perms, *reference); if (!reference->file || !reference->file->Seek(static_cast(offset))) { return 0; } diff --git a/src/core/file_sys/vfs_real.h b/src/core/file_sys/vfs_real.h index 67f4c4422..26ea7df62 100644 --- a/src/core/file_sys/vfs_real.h +++ b/src/core/file_sys/vfs_real.h @@ -4,6 +4,7 @@ #pragma once #include +#include #include #include #include "common/intrusive_list.h" @@ -48,22 +49,24 @@ private: std::map, std::less<>> cache; ReferenceListType open_references; ReferenceListType closed_references; + std::mutex list_lock; size_t num_open_files{}; private: friend class RealVfsFile; - void RefreshReference(const std::string& path, Mode perms, FileReference& reference); + std::unique_lock RefreshReference(const std::string& path, Mode perms, + FileReference& reference); void DropReference(std::unique_ptr&& reference); - void EvictSingleReference(); - -private: - void InsertReferenceIntoList(FileReference& reference); - void RemoveReferenceFromList(FileReference& reference); private: friend class RealVfsDirectory; VirtualFile OpenFileFromEntry(std::string_view path, std::optional size, Mode perms = Mode::Read); + +private: + void EvictSingleReferenceLocked(); + void InsertReferenceIntoListLocked(FileReference& reference); + void RemoveReferenceFromListLocked(FileReference& reference); }; // An implementation of VfsFile that represents a file on the user's computer. From a58a1403ba62f27f67ece97eadc0136834afbe29 Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Fri, 23 Jun 2023 09:48:02 -0400 Subject: [PATCH 47/91] android: Parameter types from Android Studio Android Studio marked these parameters as errors because it is an instance, not a class, that is being passed from Java. --- src/android/app/src/main/jni/native.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index d576aac50..5d6d61f68 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -528,23 +528,24 @@ static Core::SystemResultStatus RunEmulation(const std::string& filepath) { extern "C" { -void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceChanged(JNIEnv* env, jclass clazz, jobject surf) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceChanged(JNIEnv* env, jobject instance, + jobject surf) { EmulationSession::GetInstance().SetNativeWindow(ANativeWindow_fromSurface(env, surf)); EmulationSession::GetInstance().SurfaceChanged(); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceDestroyed(JNIEnv* env, jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceDestroyed(JNIEnv* env, jobject instance) { ANativeWindow_release(EmulationSession::GetInstance().NativeWindow()); EmulationSession::GetInstance().SetNativeWindow(nullptr); EmulationSession::GetInstance().SurfaceChanged(); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_setAppDirectory(JNIEnv* env, jclass clazz, +void Java_org_yuzu_yuzu_1emu_NativeLibrary_setAppDirectory(JNIEnv* env, jobject instance, jstring j_directory) { Common::FS::SetAppDirectory(GetJString(env, j_directory)); } -int Java_org_yuzu_yuzu_1emu_NativeLibrary_installFileToNand(JNIEnv* env, jclass clazz, +int Java_org_yuzu_yuzu_1emu_NativeLibrary_installFileToNand(JNIEnv* env, jobject instance, jstring j_file) { return EmulationSession::GetInstance().InstallFileToNand(GetJString(env, j_file)); } From b53945a99f009076d6e48d368e5aa043ca04bf7b Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Fri, 23 Jun 2023 12:43:27 -0400 Subject: [PATCH 48/91] android: define [[maybe_unused]] (const) auto --- src/android/app/src/main/jni/native.cpp | 84 +++++++++++++------------ 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 5d6d61f68..8bc6a4a04 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -60,6 +60,9 @@ #include "video_core/rasterizer_interface.h" #include "video_core/renderer_base.h" +#define jconst [[maybe_unused]] const auto +#define jauto [[maybe_unused]] auto + namespace { class EmulationSession final { @@ -99,8 +102,8 @@ public: } int InstallFileToNand(std::string filename) { - const auto copy_func = [](const FileSys::VirtualFile& src, const FileSys::VirtualFile& dest, - std::size_t block_size) { + jconst copy_func = [](const FileSys::VirtualFile& src, const FileSys::VirtualFile& dest, + std::size_t block_size) { if (src == nullptr || dest == nullptr) { return false; } @@ -109,10 +112,10 @@ public: } using namespace Common::Literals; - std::vector buffer(1_MiB); + [[maybe_unused]] std::vector buffer(1_MiB); for (std::size_t i = 0; i < src->GetSize(); i += buffer.size()) { - const auto read = src->Read(buffer.data(), buffer.size(), i); + jconst read = src->Read(buffer.data(), buffer.size(), i); dest->Write(buffer.data(), read, i); } return true; @@ -129,14 +132,14 @@ public: m_system.SetContentProvider(std::make_unique()); m_system.GetFileSystemController().CreateFactories(*m_vfs); - std::shared_ptr nsp; + [[maybe_unused]] std::shared_ptr nsp; if (filename.ends_with("nsp")) { nsp = std::make_shared(m_vfs->OpenFile(filename, FileSys::Mode::Read)); if (nsp->IsExtractedType()) { return InstallError; } } else if (filename.ends_with("xci")) { - const auto xci = + jconst xci = std::make_shared(m_vfs->OpenFile(filename, FileSys::Mode::Read)); nsp = xci->GetSecurePartitionNSP(); } else { @@ -151,7 +154,7 @@ public: return InstallError; } - const auto res = m_system.GetFileSystemController().GetUserNANDContents()->InstallEntry( + jconst res = m_system.GetFileSystemController().GetUserNANDContents()->InstallEntry( *nsp, true, copy_func); switch (res) { @@ -234,7 +237,7 @@ public: m_system.SetFilesystem(m_vfs); // Initialize system. - auto android_keyboard = std::make_unique(); + jauto android_keyboard = std::make_unique(); m_software_keyboard = android_keyboard.get(); m_system.SetShuttingDown(false); m_system.ApplySettings(); @@ -332,7 +335,7 @@ public: while (true) { { - std::unique_lock lock(m_mutex); + [[maybe_unused]] std::unique_lock lock(m_mutex); if (m_cv.wait_for(lock, std::chrono::milliseconds(800), [&]() { return !m_is_running; })) { // Emulation halted. @@ -364,7 +367,7 @@ public: } bool IsHandheldOnly() { - const auto npad_style_set = m_system.HIDCore().GetSupportedStyleTag(); + jconst npad_style_set = m_system.HIDCore().GetSupportedStyleTag(); if (npad_style_set.fullkey == 1) { return false; @@ -377,17 +380,17 @@ public: return !Settings::values.use_docked_mode.GetValue(); } - void SetDeviceType(int index, int type) { - auto controller = m_system.HIDCore().GetEmulatedControllerByIndex(index); + void SetDeviceType([[maybe_unused]] int index, int type) { + jauto controller = m_system.HIDCore().GetEmulatedControllerByIndex(index); controller->SetNpadStyleIndex(static_cast(type)); } - void OnGamepadConnectEvent(int index) { - auto controller = m_system.HIDCore().GetEmulatedControllerByIndex(index); + void OnGamepadConnectEvent([[maybe_unused]] int index) { + jauto controller = m_system.HIDCore().GetEmulatedControllerByIndex(index); // Ensure that player1 is configured correctly and handheld disconnected if (controller->GetNpadIdType() == Core::HID::NpadIdType::Player1) { - auto handheld = + jauto handheld = m_system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld); if (controller->GetNpadStyleIndex() == Core::HID::NpadStyleIndex::Handheld) { @@ -399,7 +402,8 @@ public: // Ensure that handheld is configured correctly and player 1 disconnected if (controller->GetNpadIdType() == Core::HID::NpadIdType::Handheld) { - auto player1 = m_system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1); + jauto player1 = + m_system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1); if (controller->GetNpadStyleIndex() != Core::HID::NpadStyleIndex::Handheld) { player1->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); @@ -413,8 +417,8 @@ public: } } - void OnGamepadDisconnectEvent(int index) { - auto controller = m_system.HIDCore().GetEmulatedControllerByIndex(index); + void OnGamepadDisconnectEvent([[maybe_unused]] int index) { + jauto controller = m_system.HIDCore().GetEmulatedControllerByIndex(index); controller->Disconnect(); } @@ -430,7 +434,7 @@ private: }; RomMetadata GetRomMetadata(const std::string& path) { - if (auto search = m_rom_metadata_cache.find(path); search != m_rom_metadata_cache.end()) { + if (jauto search = m_rom_metadata_cache.find(path); search != m_rom_metadata_cache.end()) { return search->second; } @@ -438,14 +442,14 @@ private: } RomMetadata CacheRomMetadata(const std::string& path) { - const auto file = Core::GetGameFileFromPath(m_vfs, path); - auto loader = Loader::GetLoader(EmulationSession::GetInstance().System(), file, 0, 0); + jconst file = Core::GetGameFileFromPath(m_vfs, path); + jauto loader = Loader::GetLoader(EmulationSession::GetInstance().System(), file, 0, 0); RomMetadata entry; loader->ReadTitle(entry.title); loader->ReadIcon(entry.icon); if (loader->GetFileType() == Loader::FileType::NRO) { - auto loader_nro = dynamic_cast(loader.get()); + jauto loader_nro = dynamic_cast(loader.get()); entry.isHomebrew = loader_nro->IsHomebrew(); } else { entry.isHomebrew = false; @@ -516,7 +520,7 @@ static Core::SystemResultStatus RunEmulation(const std::string& filepath) { SCOPE_EXIT({ EmulationSession::GetInstance().ShutdownEmulation(); }); - const auto result = EmulationSession::GetInstance().InitializeEmulation(filepath); + jconst result = EmulationSession::GetInstance().InitializeEmulation(filepath); if (result != Core::SystemResultStatus::Success) { return result; } @@ -529,7 +533,7 @@ static Core::SystemResultStatus RunEmulation(const std::string& filepath) { extern "C" { void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceChanged(JNIEnv* env, jobject instance, - jobject surf) { + [[maybe_unused]] jobject surf) { EmulationSession::GetInstance().SetNativeWindow(ANativeWindow_fromSurface(env, surf)); EmulationSession::GetInstance().SurfaceChanged(); } @@ -541,12 +545,12 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_surfaceDestroyed(JNIEnv* env, jobject } void Java_org_yuzu_yuzu_1emu_NativeLibrary_setAppDirectory(JNIEnv* env, jobject instance, - jstring j_directory) { + [[maybe_unused]] jstring j_directory) { Common::FS::SetAppDirectory(GetJString(env, j_directory)); } int Java_org_yuzu_yuzu_1emu_NativeLibrary_installFileToNand(JNIEnv* env, jobject instance, - jstring j_file) { + [[maybe_unused]] jstring j_file) { return EmulationSession::GetInstance().InstallFileToNand(GetJString(env, j_file)); } @@ -571,7 +575,7 @@ void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeGpuDriver(JNIEnv* e } jboolean JNICALL Java_org_yuzu_yuzu_1emu_utils_GpuDriverHelper_supportsCustomDriverLoading( - JNIEnv* env, [[maybe_unused]] jobject instance) { + JNIEnv* env, jobject instance) { #ifdef ARCHITECTURE_arm64 // If the KGSL device exists custom drivers can be loaded using adrenotools return SupportsCustomDriver(); @@ -649,8 +653,8 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadDisconnectEvent(JNIEnv* return static_cast(true); } jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_onGamePadButtonEvent(JNIEnv* env, jclass clazz, - [[maybe_unused]] jint j_device, - jint j_button, jint action) { + jint j_device, jint j_button, + jint action) { if (EmulationSession::GetInstance().IsRunning()) { // Ensure gamepad is connected EmulationSession::GetInstance().OnGamepadConnectEvent(j_device); @@ -719,8 +723,8 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchReleased(JNIEnv* env, jclass c } jbyteArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getIcon(JNIEnv* env, jclass clazz, - [[maybe_unused]] jstring j_filename) { - auto icon_data = EmulationSession::GetInstance().GetRomIcon(GetJString(env, j_filename)); + jstring j_filename) { + jauto icon_data = EmulationSession::GetInstance().GetRomIcon(GetJString(env, j_filename)); jbyteArray icon = env->NewByteArray(static_cast(icon_data.size())); env->SetByteArrayRegion(icon, 0, env->GetArrayLength(icon), reinterpret_cast(icon_data.data())); @@ -728,8 +732,8 @@ jbyteArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getIcon(JNIEnv* env, jclass cla } jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getTitle(JNIEnv* env, jclass clazz, - [[maybe_unused]] jstring j_filename) { - auto title = EmulationSession::GetInstance().GetRomTitle(GetJString(env, j_filename)); + jstring j_filename) { + jauto title = EmulationSession::GetInstance().GetRomTitle(GetJString(env, j_filename)); return env->NewStringUTF(title.c_str()); } @@ -744,22 +748,21 @@ jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getGameId(JNIEnv* env, jclass claz } jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getRegions(JNIEnv* env, jclass clazz, - [[maybe_unused]] jstring j_filename) { + jstring j_filename) { return env->NewStringUTF(""); } jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCompany(JNIEnv* env, jclass clazz, - [[maybe_unused]] jstring j_filename) { + jstring j_filename) { return env->NewStringUTF(""); } jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_isHomebrew(JNIEnv* env, jclass clazz, - [[maybe_unused]] jstring j_filename) { + jstring j_filename) { return EmulationSession::GetInstance().GetIsHomebrew(GetJString(env, j_filename)); } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmulation - [[maybe_unused]] (JNIEnv* env, jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmulation(JNIEnv* env, jclass clazz) { // Create the default config.ini. Config{}; // Initialize the emulated system. @@ -771,8 +774,7 @@ jint Java_org_yuzu_yuzu_1emu_NativeLibrary_defaultCPUCore(JNIEnv* env, jclass cl } void Java_org_yuzu_yuzu_1emu_NativeLibrary_run__Ljava_lang_String_2Ljava_lang_String_2Z( - JNIEnv* env, jclass clazz, [[maybe_unused]] jstring j_file, - [[maybe_unused]] jstring j_savestate, [[maybe_unused]] jboolean j_delete_savestate) {} + JNIEnv* env, jclass clazz, jstring j_file, jstring j_savestate, jboolean j_delete_savestate) {} void Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadSettings(JNIEnv* env, jclass clazz) { Config{}; @@ -817,7 +819,7 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jcl jdoubleArray j_stats = env->NewDoubleArray(4); if (EmulationSession::GetInstance().IsRunning()) { - const auto results = EmulationSession::GetInstance().PerfStats(); + jconst results = EmulationSession::GetInstance().PerfStats(); // Converting the structure into an array makes it easier to pass it to the frontend double stats[4] = {results.system_fps, results.average_game_fps, results.frametime, From 142c1b72f9198aa080cae20e0b6a3a1506640bd7 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Fri, 23 Jun 2023 12:25:47 -0600 Subject: [PATCH 49/91] externals: Include post release SDL fixes --- externals/SDL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/SDL b/externals/SDL index ffa78e6be..c27f3ead7 160000 --- a/externals/SDL +++ b/externals/SDL @@ -1 +1 @@ -Subproject commit ffa78e6bead23e2ba3adf8ec2367ff2218d4343c +Subproject commit c27f3ead7c37bcbef608f385baa9fce7232efc6d From e5769e946700be113381d6d0a5c29cb087deb1f5 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 23 Jun 2023 19:07:26 -0400 Subject: [PATCH 50/91] nx_tzdb: Update tzdb_to_nx Includes fixes for other BSD's, and axes shell scripts for pure CMake. --- externals/nx_tzdb/tzdb_to_nx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/nx_tzdb/tzdb_to_nx b/externals/nx_tzdb/tzdb_to_nx index 8c272f21d..10cde7fe1 160000 --- a/externals/nx_tzdb/tzdb_to_nx +++ b/externals/nx_tzdb/tzdb_to_nx @@ -1 +1 @@ -Subproject commit 8c272f21d19c6e821345fd055f41b9640f9189d0 +Subproject commit 10cde7fe1b15d304a3a37a2ae719e35a1f9c526e From 482fbded9b2dd2d5dd0ac55d66d456d7ffefaaa2 Mon Sep 17 00:00:00 2001 From: zeltermann <136022354+zeltermann@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:42:23 +0700 Subject: [PATCH 51/91] Only use SDL wakelock on Linux SDL has internally fixed shenanigans related to wakelocking through DBus from inside sandboxes from around August 2022, so we can now remove the workaround we used since 2021. --- src/input_common/drivers/sdl_driver.cpp | 4 ++ src/yuzu/main.cpp | 58 ++++--------------------- src/yuzu/main.h | 2 - 3 files changed, 12 insertions(+), 52 deletions(-) diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 9a0439bb5..ab64a64a2 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -483,6 +483,10 @@ void SDLDriver::CloseJoysticks() { } SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_engine_)) { + // Set our application name. Currently passed to DBus by SDL and visible to the user through + // their desktop environment. + SDL_SetHint(SDL_HINT_APP_NAME, "yuzu"); + if (!Settings::values.enable_raw_input) { // Disable raw input. When enabled this setting causes SDL to die when a web applet opens SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0"); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 45a39451d..2133f7343 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -447,6 +447,14 @@ GMainWindow::GMainWindow(std::unique_ptr config_, bool has_broken_vulkan #if defined(HAVE_SDL2) && !defined(_WIN32) SDL_InitSubSystem(SDL_INIT_VIDEO); + + // Set a screensaver inhibition reason string. Currently passed to DBus by SDL and visible to + // the user through their desktop environment. + //: TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the + //: computer from sleeping + QByteArray wakelock_reason = tr("Running a game").toLatin1(); + SDL_SetHint(SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME, wakelock_reason.data()); + // SDL disables the screen saver by default, and setting the hint // SDL_HINT_VIDEO_ALLOW_SCREENSAVER doesn't seem to work, so we just enable the screen saver // for now. @@ -1623,45 +1631,6 @@ void GMainWindow::OnPrepareForSleep(bool prepare_sleep) { } #ifdef __unix__ -static std::optional HoldWakeLockLinux(u32 window_id = 0) { - if (!QDBusConnection::sessionBus().isConnected()) { - return {}; - } - // reference: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Inhibit - QDBusInterface xdp(QString::fromLatin1("org.freedesktop.portal.Desktop"), - QString::fromLatin1("/org/freedesktop/portal/desktop"), - QString::fromLatin1("org.freedesktop.portal.Inhibit")); - if (!xdp.isValid()) { - LOG_WARNING(Frontend, "Couldn't connect to XDP D-Bus endpoint"); - return {}; - } - QVariantMap options = {}; - //: TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the - //: computer from sleeping - options.insert(QString::fromLatin1("reason"), - QCoreApplication::translate("GMainWindow", "yuzu is running a game")); - // 0x4: Suspend lock; 0x8: Idle lock - QDBusReply reply = - xdp.call(QString::fromLatin1("Inhibit"), - QString::fromLatin1("x11:") + QString::number(window_id, 16), 12U, options); - - if (reply.isValid()) { - return reply.value(); - } - LOG_WARNING(Frontend, "Couldn't read Inhibit reply from XDP: {}", - reply.error().message().toStdString()); - return {}; -} - -static void ReleaseWakeLockLinux(QDBusObjectPath lock) { - if (!QDBusConnection::sessionBus().isConnected()) { - return; - } - QDBusInterface unlocker(QString::fromLatin1("org.freedesktop.portal.Desktop"), lock.path(), - QString::fromLatin1("org.freedesktop.portal.Request")); - unlocker.call(QString::fromLatin1("Close")); -} - std::array GMainWindow::sig_interrupt_fds{0, 0, 0}; void GMainWindow::SetupSigInterrupts() { @@ -1714,12 +1683,6 @@ void GMainWindow::PreventOSSleep() { SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED); #elif defined(HAVE_SDL2) SDL_DisableScreenSaver(); -#ifdef __unix__ - auto reply = HoldWakeLockLinux(winId()); - if (reply) { - wake_lock = std::move(reply.value()); - } -#endif #endif } @@ -1728,11 +1691,6 @@ void GMainWindow::AllowOSSleep() { SetThreadExecutionState(ES_CONTINUOUS); #elif defined(HAVE_SDL2) SDL_EnableScreenSaver(); -#ifdef __unix__ - if (!wake_lock.path().isEmpty()) { - ReleaseWakeLockLinux(wake_lock); - } -#endif #endif } diff --git a/src/yuzu/main.h b/src/yuzu/main.h index e0e775d87..2cfb96257 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -504,8 +504,6 @@ private: #ifdef __unix__ QSocketNotifier* sig_interrupt_notifier; static std::array sig_interrupt_fds; - - QDBusObjectPath wake_lock{}; #endif protected: From 474fa13a1a4781b7a97d0f4ac379e2a3f76f4a06 Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 24 Jun 2023 14:06:34 -0600 Subject: [PATCH 52/91] input_common: Make use of new SDL features --- src/input_common/drivers/sdl_driver.cpp | 28 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 9a0439bb5..3cc639ba7 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -150,6 +150,8 @@ public: if (sdl_controller) { const auto type = SDL_GameControllerGetType(sdl_controller.get()); return (type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO) || + (type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT) || + (type == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT) || (type == SDL_CONTROLLER_TYPE_PS5); } return false; @@ -228,9 +230,8 @@ public: return false; } - Common::Input::BatteryLevel GetBatteryLevel() { - const auto level = SDL_JoystickCurrentPowerLevel(sdl_joystick.get()); - switch (level) { + Common::Input::BatteryLevel GetBatteryLevel(SDL_JoystickPowerLevel battery_level) { + switch (battery_level) { case SDL_JOYSTICK_POWER_EMPTY: return Common::Input::BatteryLevel::Empty; case SDL_JOYSTICK_POWER_LOW: @@ -378,7 +379,6 @@ void SDLDriver::InitJoystick(int joystick_index) { if (joystick_map.find(guid) == joystick_map.end()) { auto joystick = std::make_shared(guid, 0, sdl_joystick, sdl_gamecontroller); PreSetController(joystick->GetPadIdentifier()); - SetBattery(joystick->GetPadIdentifier(), joystick->GetBatteryLevel()); joystick->EnableMotion(); joystick_map[guid].emplace_back(std::move(joystick)); return; @@ -398,7 +398,6 @@ void SDLDriver::InitJoystick(int joystick_index) { const int port = static_cast(joystick_guid_list.size()); auto joystick = std::make_shared(guid, port, sdl_joystick, sdl_gamecontroller); PreSetController(joystick->GetPadIdentifier()); - SetBattery(joystick->GetPadIdentifier(), joystick->GetBatteryLevel()); joystick->EnableMotion(); joystick_guid_list.emplace_back(std::move(joystick)); } @@ -438,8 +437,6 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Event& event) { if (const auto joystick = GetSDLJoystickBySDLID(event.jbutton.which)) { const PadIdentifier identifier = joystick->GetPadIdentifier(); SetButton(identifier, event.jbutton.button, true); - // Battery doesn't trigger an event so just update every button press - SetBattery(identifier, joystick->GetBatteryLevel()); } break; } @@ -466,6 +463,13 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Event& event) { } break; } + case SDL_JOYBATTERYUPDATED: { + if (auto joystick = GetSDLJoystickBySDLID(event.jbattery.which)) { + const PadIdentifier identifier = joystick->GetPadIdentifier(); + SetBattery(identifier, joystick->GetBatteryLevel(event.jbattery.level)); + } + break; + } case SDL_JOYDEVICEREMOVED: LOG_DEBUG(Input, "Controller removed with Instance_ID {}", event.jdevice.which); CloseJoystick(SDL_JoystickFromInstanceID(event.jdevice.which)); @@ -501,6 +505,9 @@ SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_en SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "0"); } else { SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1"); + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED, "0"); + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, "0"); + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS, "1"); } // Disable hidapi drivers for pro controllers when the custom joycon driver is enabled @@ -508,8 +515,11 @@ SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_en SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, "0"); } else { SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, "1"); + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED, "0"); } + SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED, "1"); + // Disable hidapi driver for xbox. Already default on Windows, this causes conflict with native // driver on Linux. SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_XBOX, "0"); @@ -789,7 +799,9 @@ ButtonMapping SDLDriver::GetButtonMappingForDevice(const Common::ParamPackage& p // This list also excludes Screenshot since there's not really a mapping for that ButtonBindings switch_to_sdl_button; - if (SDL_GameControllerGetType(controller) == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO) { + if (SDL_GameControllerGetType(controller) == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO || + SDL_GameControllerGetType(controller) == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT || + SDL_GameControllerGetType(controller) == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT) { switch_to_sdl_button = GetNintendoButtonBinding(joystick); } else { switch_to_sdl_button = GetDefaultButtonBinding(); From ec9a71b12ad14d7a65798df104b15d319156c43b Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 24 Jun 2023 17:09:23 -0600 Subject: [PATCH 53/91] externals: Include player led fix on SDL --- externals/SDL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/SDL b/externals/SDL index c27f3ead7..491fba1d0 160000 --- a/externals/SDL +++ b/externals/SDL @@ -1 +1 @@ -Subproject commit c27f3ead7c37bcbef608f385baa9fce7232efc6d +Subproject commit 491fba1d06a4810645092b2559b9cc94abeb23bb From 5aa208e26417a455abced9c067f75e1b81f2cb80 Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 24 Jun 2023 18:48:45 -0600 Subject: [PATCH 54/91] input_common: Dont try to read/write data from 3rd party controllers --- src/core/hid/emulated_controller.cpp | 5 +++ src/input_common/helpers/joycon_driver.cpp | 42 +++++++++++++++---- src/input_common/helpers/joycon_driver.h | 1 + .../joycon_protocol/common_protocol.cpp | 8 ++-- 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index c937495f9..190f7c906 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -1250,6 +1250,11 @@ Common::Input::DriverResult EmulatedController::SetPollingMode( const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode); const auto mapped_nfc_result = right_output_device->SetPollingMode(polling_mode); + // Restore previous state + if (mapped_nfc_result != Common::Input::DriverResult::Success) { + right_output_device->SetPollingMode(Common::Input::PollingMode::Active); + } + if (virtual_nfc_result == Common::Input::DriverResult::Success) { return virtual_nfc_result; } diff --git a/src/input_common/helpers/joycon_driver.cpp b/src/input_common/helpers/joycon_driver.cpp index 2c8c66951..ec984a647 100644 --- a/src/input_common/helpers/joycon_driver.cpp +++ b/src/input_common/helpers/joycon_driver.cpp @@ -72,6 +72,7 @@ DriverResult JoyconDriver::InitializeDevice() { nfc_enabled = false; passive_enabled = false; irs_enabled = false; + input_only_device = false; gyro_sensitivity = Joycon::GyroSensitivity::DPS2000; gyro_performance = Joycon::GyroPerformance::HZ833; accelerometer_sensitivity = Joycon::AccelerometerSensitivity::G8; @@ -86,16 +87,23 @@ DriverResult JoyconDriver::InitializeDevice() { rumble_protocol = std::make_unique(hidapi_handle); // Get fixed joycon info - generic_protocol->GetVersionNumber(version); - generic_protocol->SetLowPowerMode(false); - generic_protocol->GetColor(color); - if (handle_device_type == ControllerType::Pro) { - // Some 3rd party controllers aren't pro controllers - generic_protocol->GetControllerType(device_type); - } else { - device_type = handle_device_type; + if (generic_protocol->GetVersionNumber(version) != DriverResult::Success) { + // If this command fails the device doesn't accept configuration commands + input_only_device = true; } - generic_protocol->GetSerialNumber(serial_number); + + if (!input_only_device) { + generic_protocol->SetLowPowerMode(false); + generic_protocol->GetColor(color); + if (handle_device_type == ControllerType::Pro) { + // Some 3rd party controllers aren't pro controllers + generic_protocol->GetControllerType(device_type); + } else { + device_type = handle_device_type; + } + generic_protocol->GetSerialNumber(serial_number); + } + supported_features = GetSupportedFeatures(); // Get Calibration data @@ -261,6 +269,10 @@ DriverResult JoyconDriver::SetPollingMode() { generic_protocol->EnableImu(false); } + if (input_only_device) { + return DriverResult::NotSupported; + } + if (irs_protocol->IsEnabled()) { irs_protocol->DisableIrs(); } @@ -282,6 +294,7 @@ DriverResult JoyconDriver::SetPollingMode() { } irs_protocol->DisableIrs(); LOG_ERROR(Input, "Error enabling IRS"); + return result; } if (nfc_enabled && supported_features.nfc) { @@ -291,6 +304,7 @@ DriverResult JoyconDriver::SetPollingMode() { } nfc_protocol->DisableNfc(); LOG_ERROR(Input, "Error enabling NFC"); + return result; } if (hidbus_enabled && supported_features.hidbus) { @@ -305,6 +319,7 @@ DriverResult JoyconDriver::SetPollingMode() { ring_connected = false; ring_protocol->DisableRingCon(); LOG_ERROR(Input, "Error enabling Ringcon"); + return result; } if (passive_enabled && supported_features.passive) { @@ -333,6 +348,10 @@ JoyconDriver::SupportedFeatures JoyconDriver::GetSupportedFeatures() { .vibration = true, }; + if (input_only_device) { + return features; + } + if (device_type == ControllerType::Right) { features.nfc = true; features.irs = true; @@ -517,6 +536,11 @@ DriverResult JoyconDriver::StopNfcPolling() { const auto result = nfc_protocol->StopNFCPollingMode(); disable_input_thread = false; + if (amiibo_detected) { + amiibo_detected = false; + joycon_poller->UpdateAmiibo({}); + } + return result; } diff --git a/src/input_common/helpers/joycon_driver.h b/src/input_common/helpers/joycon_driver.h index bc7025a21..45b32d2f8 100644 --- a/src/input_common/helpers/joycon_driver.h +++ b/src/input_common/helpers/joycon_driver.h @@ -120,6 +120,7 @@ private: // Hardware configuration u8 leds{}; ReportMode mode{}; + bool input_only_device{}; bool passive_enabled{}; // Low power mode, Ideal for multiple controllers at the same time bool hidbus_enabled{}; // External device support bool irs_enabled{}; // Infrared camera input diff --git a/src/input_common/helpers/joycon_protocol/common_protocol.cpp b/src/input_common/helpers/joycon_protocol/common_protocol.cpp index 51669261a..88f4cec1c 100644 --- a/src/input_common/helpers/joycon_protocol/common_protocol.cpp +++ b/src/input_common/helpers/joycon_protocol/common_protocol.cpp @@ -73,7 +73,7 @@ DriverResult JoyconCommonProtocol::SendRawData(std::span buffer) { DriverResult JoyconCommonProtocol::GetSubCommandResponse(SubCommand sc, SubCommandResponse& output) { constexpr int timeout_mili = 66; - constexpr int MaxTries = 15; + constexpr int MaxTries = 3; int tries = 0; do { @@ -113,9 +113,7 @@ DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, std::span buffer) { @@ -158,7 +156,7 @@ DriverResult JoyconCommonProtocol::SendVibrationReport(std::span buffe DriverResult JoyconCommonProtocol::ReadRawSPI(SpiAddress addr, std::span output) { constexpr std::size_t HeaderSize = 5; - constexpr std::size_t MaxTries = 10; + constexpr std::size_t MaxTries = 5; std::size_t tries = 0; SubCommandResponse response{}; std::array buffer{}; From bf641e2964d513e9b9e3495c7d68d1c18c5b806e Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 24 Jun 2023 18:59:40 -0600 Subject: [PATCH 55/91] core: hid: Allow to read bin files while switch controller is available --- src/core/hid/emulated_controller.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 190f7c906..1ebc32c1e 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -1334,16 +1334,22 @@ bool EmulatedController::StartNfcPolling() { auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; auto& nfc_virtual_output_device = output_devices[3]; - return nfc_output_device->StartNfcPolling() == Common::Input::NfcState::Success || - nfc_virtual_output_device->StartNfcPolling() == Common::Input::NfcState::Success; + const auto device_result = nfc_output_device->StartNfcPolling(); + const auto virtual_device_result = nfc_virtual_output_device->StartNfcPolling(); + + return device_result == Common::Input::NfcState::Success || + virtual_device_result == Common::Input::NfcState::Success; } bool EmulatedController::StopNfcPolling() { auto& nfc_output_device = output_devices[static_cast(DeviceIndex::Right)]; auto& nfc_virtual_output_device = output_devices[3]; - return nfc_output_device->StopNfcPolling() == Common::Input::NfcState::Success || - nfc_virtual_output_device->StopNfcPolling() == Common::Input::NfcState::Success; + const auto device_result = nfc_output_device->StopNfcPolling(); + const auto virtual_device_result = nfc_virtual_output_device->StopNfcPolling(); + + return device_result == Common::Input::NfcState::Success || + virtual_device_result == Common::Input::NfcState::Success; } bool EmulatedController::ReadAmiiboData(std::vector& data) { From b6025cf62f895dba08530eb7d832cec3c89a9e51 Mon Sep 17 00:00:00 2001 From: Kirill Ignatev Date: Sun, 25 Jun 2023 11:52:15 -0400 Subject: [PATCH 56/91] Clarify Ring-Con configuration message in UI Not obvious how left controller should be set up Mention that it should be left physical dual emulated --- src/yuzu/configuration/configure_ringcon.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/configuration/configure_ringcon.ui b/src/yuzu/configuration/configure_ringcon.ui index 514dff372..0c50b9258 100644 --- a/src/yuzu/configuration/configure_ringcon.ui +++ b/src/yuzu/configuration/configure_ringcon.ui @@ -23,7 +23,7 @@ - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con configure player 1 as right JoyCon both physical and emulated, and player 2 as left JoyCon physical and dual (!) JoyCon emulated before starting the game. true From b6e89bdf2c871d2d793c78781babe4f0c0636514 Mon Sep 17 00:00:00 2001 From: Kirill Ignatev Date: Sun, 25 Jun 2023 12:51:16 -0400 Subject: [PATCH 57/91] Hyphenate Joy-Con and clarify further --- src/yuzu/configuration/configure_ringcon.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/configuration/configure_ringcon.ui b/src/yuzu/configuration/configure_ringcon.ui index 0c50b9258..38ecccc3d 100644 --- a/src/yuzu/configuration/configure_ringcon.ui +++ b/src/yuzu/configuration/configure_ringcon.ui @@ -23,7 +23,7 @@ - To use Ring-Con configure player 1 as right JoyCon both physical and emulated, and player 2 as left JoyCon physical and dual (!) JoyCon emulated before starting the game. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. true From f5569bfed900aca31787ffcf1fe4e5a7f0a69dd7 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 25 Jun 2023 17:20:18 -0400 Subject: [PATCH 58/91] nx_tzdb: Update tzdb_to_nx to 212afa2 Moves build data to a separate directory so the build happens out of the source tree. --- externals/nx_tzdb/tzdb_to_nx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/nx_tzdb/tzdb_to_nx b/externals/nx_tzdb/tzdb_to_nx index 10cde7fe1..212afa239 160000 --- a/externals/nx_tzdb/tzdb_to_nx +++ b/externals/nx_tzdb/tzdb_to_nx @@ -1 +1 @@ -Subproject commit 10cde7fe1b15d304a3a37a2ae719e35a1f9c526e +Subproject commit 212afa2394a74226dcf1b7996a570aae17debb69 From 82107b33a2251eb4f55ab2006a8fc0cb47cc39e8 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sun, 25 Jun 2023 18:43:23 -0400 Subject: [PATCH 59/91] OpenGL: Add Local Memory warmup shader --- src/video_core/host_shaders/CMakeLists.txt | 1 + .../host_shaders/opengl_lmem_warmup.comp | 47 +++++++++++++++++++ .../renderer_opengl/gl_rasterizer.cpp | 2 + .../renderer_opengl/gl_shader_manager.cpp | 10 +++- .../renderer_opengl/gl_shader_manager.h | 3 ++ 5 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 src/video_core/host_shaders/opengl_lmem_warmup.comp diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt index 2442c3c29..e61d9af80 100644 --- a/src/video_core/host_shaders/CMakeLists.txt +++ b/src/video_core/host_shaders/CMakeLists.txt @@ -33,6 +33,7 @@ set(SHADER_FILES opengl_fidelityfx_fsr.frag opengl_fidelityfx_fsr_easu.frag opengl_fidelityfx_fsr_rcas.frag + opengl_lmem_warmup.comp opengl_present.frag opengl_present.vert opengl_present_scaleforce.frag diff --git a/src/video_core/host_shaders/opengl_lmem_warmup.comp b/src/video_core/host_shaders/opengl_lmem_warmup.comp new file mode 100644 index 000000000..518268477 --- /dev/null +++ b/src/video_core/host_shaders/opengl_lmem_warmup.comp @@ -0,0 +1,47 @@ +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +// This shader is a workaround for a quirk in NVIDIA OpenGL drivers +// Shaders using local memory see a great performance benefit if a shader that was dispatched +// before it had more local memory allocated. +// This shader allocates the maximum local memory allowed on NVIDIA drivers to ensure that +// subsequent shaders see the performance boost. + +// NOTE: This shader does no actual meaningful work and returns immediately, +// it is simply a means to have the driver expect a shader using lots of local memory. + +#version 450 + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; + +layout(location = 0) uniform uint uniform_data; + +layout(binding = 0, rgba8) uniform writeonly restrict image2DArray dest_image; + +#define MAX_LMEM_SIZE 4080 // Size chosen to avoid errors in Nvidia's GLSL compiler +#define NUM_LMEM_CONSTANTS 1 +#define ARRAY_SIZE MAX_LMEM_SIZE - NUM_LMEM_CONSTANTS + +uint lmem_0[ARRAY_SIZE]; +const uvec4 constant_values[NUM_LMEM_CONSTANTS] = uvec4[](uvec4(0)); + +void main() { + const uint global_id = gl_GlobalInvocationID.x; + if (global_id <= 128) { + // Since the shader is called with a dispatch of 1x1x1 + // This should always be the case, and this shader will not actually execute + return; + } + for (uint t = 0; t < uniform_data; t++) { + const uint offset = (t * uniform_data); + lmem_0[offset] = t; + } + const uint offset = (gl_GlobalInvocationID.y * uniform_data + gl_GlobalInvocationID.x); + const uint value = lmem_0[offset]; + const uint const_value = constant_values[offset / 4][offset % 4]; + const uvec4 color = uvec4(value + const_value); + + // A "side-effect" is needed so the variables don't get optimized out, + // but this should never execute so there should be no clobbering of previously bound state. + imageStore(dest_image, ivec3(gl_GlobalInvocationID), color); +} diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index fc711c44a..d03288516 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -222,6 +222,7 @@ void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) { gpu.TickWork(); std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; + program_manager.LocalMemoryWarmup(); pipeline->SetEngine(maxwell3d, gpu_memory); pipeline->Configure(is_indexed); @@ -371,6 +372,7 @@ void RasterizerOpenGL::DispatchCompute() { if (!pipeline) { return; } + program_manager.LocalMemoryWarmup(); pipeline->SetEngine(kepler_compute, gpu_memory); pipeline->Configure(); const auto& qmd{kepler_compute->launch_description}; diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index 98841ae65..2f6ba6823 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp @@ -3,7 +3,9 @@ #include +#include "video_core/host_shaders/opengl_lmem_warmup_comp.h" #include "video_core/renderer_opengl/gl_shader_manager.h" +#include "video_core/renderer_opengl/gl_shader_util.h" namespace OpenGL { @@ -12,7 +14,8 @@ static constexpr std::array ASSEMBLY_PROGRAM_ENUMS{ GL_GEOMETRY_PROGRAM_NV, GL_FRAGMENT_PROGRAM_NV, }; -ProgramManager::ProgramManager(const Device& device) { +ProgramManager::ProgramManager(const Device& device) + : lmem_warmup_program(CreateProgram(HostShaders::OPENGL_LMEM_WARMUP_COMP, GL_COMPUTE_SHADER)) { glCreateProgramPipelines(1, &pipeline.handle); if (device.UseAssemblyShaders()) { glEnable(GL_COMPUTE_PROGRAM_NV); @@ -98,6 +101,11 @@ void ProgramManager::BindAssemblyPrograms(std::span current_programs{}; GLuint current_assembly_compute_program = 0; + OGLProgram lmem_warmup_program; }; } // namespace OpenGL From b198339580f1a54c4c670eb58593eb64e2ef945c Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sun, 25 Jun 2023 18:43:52 -0400 Subject: [PATCH 60/91] emit_glasm: Fix lmem size computation --- src/shader_recompiler/backend/glasm/emit_glasm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index fd4a61a4d..b795c0179 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp @@ -461,7 +461,7 @@ std::string EmitGLASM(const Profile& profile, const RuntimeInfo& runtime_info, I header += fmt::format("R{},", index); } if (program.local_memory_size > 0) { - header += fmt::format("lmem[{}],", program.local_memory_size); + header += fmt::format("lmem[{}],", Common::DivCeil(program.local_memory_size, 4U)); } if (program.info.uses_fswzadd) { header += "FSWZA[4],FSWZB[4],"; From 405eae3734dd6bfb259df0afceecf4de1f1262ce Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sun, 25 Jun 2023 18:59:33 -0400 Subject: [PATCH 61/91] shaders: Track local memory usage --- src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | 4 ++++ src/shader_recompiler/shader_info.h | 1 + src/video_core/renderer_opengl/gl_compute_pipeline.cpp | 1 + src/video_core/renderer_opengl/gl_compute_pipeline.h | 5 +++++ src/video_core/renderer_opengl/gl_graphics_pipeline.cpp | 1 + src/video_core/renderer_opengl/gl_graphics_pipeline.h | 5 +++++ src/video_core/renderer_opengl/gl_rasterizer.cpp | 8 ++++++-- 7 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp index 5a4195217..70292686f 100644 --- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp +++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp @@ -424,6 +424,10 @@ void VisitUsages(Info& info, IR::Inst& inst) { info.used_constant_buffer_types |= IR::Type::U32 | IR::Type::U32x2; info.used_storage_buffer_types |= IR::Type::U32 | IR::Type::U32x2 | IR::Type::U32x4; break; + case IR::Opcode::LoadLocal: + case IR::Opcode::WriteLocal: + info.uses_local_memory = true; + break; default: break; } diff --git a/src/shader_recompiler/shader_info.h b/src/shader_recompiler/shader_info.h index d308db942..b4b4afd37 100644 --- a/src/shader_recompiler/shader_info.h +++ b/src/shader_recompiler/shader_info.h @@ -172,6 +172,7 @@ struct Info { bool stores_indexed_attributes{}; bool stores_global_memory{}; + bool uses_local_memory{}; bool uses_fp16{}; bool uses_fp64{}; diff --git a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp index 3151c0db8..f9ca55c36 100644 --- a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp @@ -63,6 +63,7 @@ ComputePipeline::ComputePipeline(const Device& device, TextureCache& texture_cac writes_global_memory = !use_storage_buffers && std::ranges::any_of(info.storage_buffers_descriptors, [](const auto& desc) { return desc.is_written; }); + uses_local_memory = info.uses_local_memory; if (force_context_flush) { std::scoped_lock lock{built_mutex}; built_fence.Create(); diff --git a/src/video_core/renderer_opengl/gl_compute_pipeline.h b/src/video_core/renderer_opengl/gl_compute_pipeline.h index 9bcc72b59..c26b4fa5e 100644 --- a/src/video_core/renderer_opengl/gl_compute_pipeline.h +++ b/src/video_core/renderer_opengl/gl_compute_pipeline.h @@ -59,6 +59,10 @@ public: return writes_global_memory; } + [[nodiscard]] bool UsesLocalMemory() const noexcept { + return uses_local_memory; + } + void SetEngine(Tegra::Engines::KeplerCompute* kepler_compute_, Tegra::MemoryManager* gpu_memory_) { kepler_compute = kepler_compute_; @@ -84,6 +88,7 @@ private: bool use_storage_buffers{}; bool writes_global_memory{}; + bool uses_local_memory{}; std::mutex built_mutex; std::condition_variable built_condvar; diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp index c58f760b8..23a48c6fe 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp @@ -215,6 +215,7 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c writes_global_memory |= std::ranges::any_of( info.storage_buffers_descriptors, [](const auto& desc) { return desc.is_written; }); + uses_local_memory |= info.uses_local_memory; } ASSERT(num_textures <= MAX_TEXTURES); ASSERT(num_images <= MAX_IMAGES); diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.h b/src/video_core/renderer_opengl/gl_graphics_pipeline.h index 7bab3be0a..7b3d7eae8 100644 --- a/src/video_core/renderer_opengl/gl_graphics_pipeline.h +++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.h @@ -98,6 +98,10 @@ public: return writes_global_memory; } + [[nodiscard]] bool UsesLocalMemory() const noexcept { + return uses_local_memory; + } + [[nodiscard]] bool IsBuilt() noexcept; template @@ -146,6 +150,7 @@ private: bool use_storage_buffers{}; bool writes_global_memory{}; + bool uses_local_memory{}; static constexpr std::size_t XFB_ENTRY_STRIDE = 3; GLsizei num_xfb_attribs{}; diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index d03288516..edf527f2d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -222,7 +222,9 @@ void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) { gpu.TickWork(); std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; - program_manager.LocalMemoryWarmup(); + if (pipeline->UsesLocalMemory()) { + program_manager.LocalMemoryWarmup(); + } pipeline->SetEngine(maxwell3d, gpu_memory); pipeline->Configure(is_indexed); @@ -372,7 +374,9 @@ void RasterizerOpenGL::DispatchCompute() { if (!pipeline) { return; } - program_manager.LocalMemoryWarmup(); + if (pipeline->UsesLocalMemory()) { + program_manager.LocalMemoryWarmup(); + } pipeline->SetEngine(kepler_compute, gpu_memory); pipeline->Configure(); const auto& qmd{kepler_compute->launch_description}; From 4f160633d369b702a45ace9b6ff133312761c5f8 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sun, 25 Jun 2023 19:06:51 -0400 Subject: [PATCH 62/91] OpenGL: Limit lmem warmup to NVIDIA :frog: --- src/video_core/renderer_opengl/gl_device.cpp | 1 + src/video_core/renderer_opengl/gl_device.h | 5 +++++ .../renderer_opengl/gl_shader_manager.cpp | 13 +++++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 03d234f2f..33e63c17d 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -194,6 +194,7 @@ Device::Device(Core::Frontend::EmuWindow& emu_window) { has_bool_ref_bug = true; } } + has_lmem_perf_bug = is_nvidia; strict_context_required = emu_window.StrictContextRequired(); // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation. diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h index ad27264e5..a5a6bbbba 100644 --- a/src/video_core/renderer_opengl/gl_device.h +++ b/src/video_core/renderer_opengl/gl_device.h @@ -192,6 +192,10 @@ public: return supports_conditional_barriers; } + bool HasLmemPerfBug() const { + return has_lmem_perf_bug; + } + private: static bool TestVariableAoffi(); static bool TestPreciseBug(); @@ -238,6 +242,7 @@ private: bool can_report_memory{}; bool strict_context_required{}; bool supports_conditional_barriers{}; + bool has_lmem_perf_bug{}; std::string vendor_name; }; diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index 2f6ba6823..03d4b9d06 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp @@ -14,12 +14,15 @@ static constexpr std::array ASSEMBLY_PROGRAM_ENUMS{ GL_GEOMETRY_PROGRAM_NV, GL_FRAGMENT_PROGRAM_NV, }; -ProgramManager::ProgramManager(const Device& device) - : lmem_warmup_program(CreateProgram(HostShaders::OPENGL_LMEM_WARMUP_COMP, GL_COMPUTE_SHADER)) { +ProgramManager::ProgramManager(const Device& device) { glCreateProgramPipelines(1, &pipeline.handle); if (device.UseAssemblyShaders()) { glEnable(GL_COMPUTE_PROGRAM_NV); } + if (device.HasLmemPerfBug()) { + lmem_warmup_program = + CreateProgram(HostShaders::OPENGL_LMEM_WARMUP_COMP, GL_COMPUTE_SHADER); + } } void ProgramManager::BindComputeProgram(GLuint program) { @@ -102,8 +105,10 @@ void ProgramManager::BindAssemblyPrograms(std::span Date: Wed, 21 Jun 2023 05:48:04 +0100 Subject: [PATCH 63/91] Use safe reads in DMA engine --- src/video_core/engines/maxwell_dma.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index bc1eb41e7..a290d6ea7 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -130,7 +130,7 @@ void MaxwellDMA::Launch() { UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); read_buffer.resize_destructive(16); for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { - memory_manager.ReadBlockUnsafe( + memory_manager.ReadBlock( convert_linear_2_blocklinear_addr(regs.offset_in + offset), read_buffer.data(), read_buffer.size()); memory_manager.WriteBlockCached(regs.offset_out + offset, read_buffer.data(), @@ -142,8 +142,8 @@ void MaxwellDMA::Launch() { UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); read_buffer.resize_destructive(16); for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { - memory_manager.ReadBlockUnsafe(regs.offset_in + offset, read_buffer.data(), - read_buffer.size()); + memory_manager.ReadBlock(regs.offset_in + offset, read_buffer.data(), + read_buffer.size()); memory_manager.WriteBlockCached( convert_linear_2_blocklinear_addr(regs.offset_out + offset), read_buffer.data(), read_buffer.size()); @@ -151,8 +151,9 @@ void MaxwellDMA::Launch() { } else { if (!accelerate.BufferCopy(regs.offset_in, regs.offset_out, regs.line_length_in)) { read_buffer.resize_destructive(regs.line_length_in); - memory_manager.ReadBlockUnsafe(regs.offset_in, read_buffer.data(), - regs.line_length_in); + memory_manager.ReadBlock(regs.offset_in, read_buffer.data(), + regs.line_length_in, + VideoCommon::CacheType::NoBufferCache); memory_manager.WriteBlockCached(regs.offset_out, read_buffer.data(), regs.line_length_in); } From b6c6dcc5760ebaf08460c176c42d1c4729e2eb21 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sun, 25 Jun 2023 15:08:38 +0300 Subject: [PATCH 64/91] externals: Use cmake subdirectory --- .gitmodules | 4 ++-- externals/CMakeLists.txt | 2 +- externals/vma/{vma => VulkanMemoryAllocator} | 0 externals/vma/vma.cpp | 1 + src/video_core/vulkan_common/vulkan_device.cpp | 2 -- src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 2 -- src/video_core/vulkan_common/vulkan_wrapper.cpp | 2 -- 7 files changed, 4 insertions(+), 9 deletions(-) rename externals/vma/{vma => VulkanMemoryAllocator} (100%) diff --git a/.gitmodules b/.gitmodules index cc0e97a85..5a8169b44 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,6 +55,6 @@ [submodule "tzdb_to_nx"] path = externals/nx_tzdb/tzdb_to_nx url = https://github.com/lat9nq/tzdb_to_nx.git -[submodule "externals/vma/vma"] - path = externals/vma/vma +[submodule "VulkanMemoryAllocator"] + path = externals/vma/VulkanMemoryAllocator url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index ca4ebe4b9..0184289eb 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -145,7 +145,7 @@ add_subdirectory(nx_tzdb) # VMA add_library(vma vma/vma.cpp) -target_include_directories(vma PUBLIC ./vma/vma/include) +target_include_directories(vma PUBLIC ./vma/VulkanMemoryAllocator/include) target_link_libraries(vma PRIVATE Vulkan::Headers) if (NOT TARGET LLVM::Demangle) diff --git a/externals/vma/vma b/externals/vma/VulkanMemoryAllocator similarity index 100% rename from externals/vma/vma rename to externals/vma/VulkanMemoryAllocator diff --git a/externals/vma/vma.cpp b/externals/vma/vma.cpp index ff1acc320..1fe2cf52b 100644 --- a/externals/vma/vma.cpp +++ b/externals/vma/vma.cpp @@ -4,4 +4,5 @@ #define VMA_IMPLEMENTATION #define VMA_STATIC_VULKAN_FUNCTIONS 0 #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 + #include \ No newline at end of file diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 94dd1aa14..31226084f 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -22,8 +22,6 @@ #include #endif -#define VMA_STATIC_VULKAN_FUNCTIONS 0 -#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include namespace Vulkan { diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 70db41343..a2ef0efa4 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -15,8 +15,6 @@ #include "video_core/vulkan_common/vulkan_memory_allocator.h" #include "video_core/vulkan_common/vulkan_wrapper.h" -#define VMA_STATIC_VULKAN_FUNCTIONS 0 -#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include namespace Vulkan { diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index c01a9478e..28fcb21a0 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -12,8 +12,6 @@ #include "video_core/vulkan_common/vulkan_wrapper.h" -#define VMA_STATIC_VULKAN_FUNCTIONS 0 -#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include namespace Vulkan::vk { From 0f31039831688d347d12853fea991014cfb954ba Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 20 Jun 2023 17:23:20 -0400 Subject: [PATCH 65/91] android: Clean up file extension checks --- .../yuzu/yuzu_emu/fragments/SearchFragment.kt | 6 +--- .../main/java/org/yuzu/yuzu_emu/model/Game.kt | 2 +- .../org/yuzu/yuzu_emu/ui/main/MainActivity.kt | 4 +-- .../java/org/yuzu/yuzu_emu/utils/FileUtil.kt | 34 +++++-------------- .../org/yuzu/yuzu_emu/utils/GameHelper.kt | 23 ++++--------- 5 files changed, 19 insertions(+), 50 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt index dd6c895fd..f54dccc69 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt @@ -29,7 +29,6 @@ import org.yuzu.yuzu_emu.layout.AutofitGridLayoutManager import org.yuzu.yuzu_emu.model.Game import org.yuzu.yuzu_emu.model.GamesViewModel import org.yuzu.yuzu_emu.model.HomeViewModel -import org.yuzu.yuzu_emu.utils.FileUtil class SearchFragment : Fragment() { private var _binding: FragmentSearchBinding? = null @@ -128,10 +127,7 @@ class SearchFragment : Fragment() { R.id.chip_homebrew -> baseList.filter { it.isHomebrew } - R.id.chip_retail -> baseList.filter { - FileUtil.hasExtension(it.path, "xci") || - FileUtil.hasExtension(it.path, "nsp") - } + R.id.chip_retail -> baseList.filter { !it.isHomebrew } else -> baseList } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt index 6a048e39f..6527c64ab 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt @@ -43,7 +43,7 @@ class Game( companion object { val extensions: Set = HashSet( - listOf(".xci", ".nsp", ".nca", ".nro") + listOf("xci", "nsp", "nca", "nro") ) } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index cc1d87f1b..d5eb8c2eb 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt @@ -294,7 +294,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider { return@registerForActivityResult } - if (!FileUtil.hasExtension(result, "keys")) { + if (FileUtil.getExtension(result) != "keys") { MessageDialogFragment.newInstance( R.string.reading_keys_failure, R.string.install_prod_keys_failure_extension_description @@ -391,7 +391,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider { return@registerForActivityResult } - if (!FileUtil.hasExtension(result, "bin")) { + if (FileUtil.getExtension(result) != "bin") { MessageDialogFragment.newInstance( R.string.reading_keys_failure, R.string.install_amiibo_keys_failure_extension_description diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt index 9f3bbe56f..142af5f26 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt @@ -7,7 +7,6 @@ import android.content.Context import android.database.Cursor import android.net.Uri import android.provider.DocumentsContract -import android.provider.OpenableColumns import androidx.documentfile.provider.DocumentFile import java.io.BufferedInputStream import java.io.File @@ -185,19 +184,18 @@ object FileUtil { /** * Get file display name from given path - * @param path content uri path + * @param uri content uri * @return String display name */ - fun getFilename(context: Context, path: String): String { - val resolver = context.contentResolver + fun getFilename(uri: Uri): String { + val resolver = YuzuApplication.appContext.contentResolver val columns = arrayOf( DocumentsContract.Document.COLUMN_DISPLAY_NAME ) var filename = "" var c: Cursor? = null try { - val mUri = Uri.parse(path) - c = resolver.query(mUri, columns, null, null, null) + c = resolver.query(uri, columns, null, null, null) c!!.moveToNext() filename = c.getString(0) } catch (e: Exception) { @@ -326,25 +324,9 @@ object FileUtil { } } - fun hasExtension(path: String, extension: String): Boolean = - path.substring(path.lastIndexOf(".") + 1).contains(extension) - - fun hasExtension(uri: Uri, extension: String): Boolean { - val fileName: String? - val cursor = YuzuApplication.appContext.contentResolver.query(uri, null, null, null, null) - val nameIndex = cursor?.getColumnIndex(OpenableColumns.DISPLAY_NAME) - cursor?.moveToFirst() - - if (nameIndex == null) { - return false - } - - fileName = cursor.getString(nameIndex) - cursor.close() - - if (fileName == null) { - return false - } - return fileName.substring(fileName.lastIndexOf(".") + 1).contains(extension) + fun getExtension(uri: Uri): String { + val fileName = getFilename(uri) + return fileName.substring(fileName.lastIndexOf(".") + 1) + .lowercase() } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt index ee9f3e570..f8e7eeca7 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GameHelper.kt @@ -6,7 +6,6 @@ package org.yuzu.yuzu_emu.utils import android.content.SharedPreferences import android.net.Uri import androidx.preference.PreferenceManager -import java.util.* import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import org.yuzu.yuzu_emu.NativeLibrary @@ -33,15 +32,9 @@ object GameHelper { val children = FileUtil.listFiles(context, gamesUri) for (file in children) { if (!file.isDirectory) { - val filename = file.uri.toString() - val extensionStart = filename.lastIndexOf('.') - if (extensionStart > 0) { - val fileExtension = filename.substring(extensionStart) - - // Check that the file has an extension we care about before trying to read out of it. - if (Game.extensions.contains(fileExtension.lowercase(Locale.getDefault()))) { - games.add(getGame(filename)) - } + // Check that the file has an extension we care about before trying to read out of it. + if (Game.extensions.contains(FileUtil.getExtension(file.uri))) { + games.add(getGame(file.uri)) } } } @@ -59,21 +52,19 @@ object GameHelper { return games.toList() } - private fun getGame(filePath: String): Game { + private fun getGame(uri: Uri): Game { + val filePath = uri.toString() var name = NativeLibrary.getTitle(filePath) // If the game's title field is empty, use the filename. if (name.isEmpty()) { - name = filePath.substring(filePath.lastIndexOf("/") + 1) + name = FileUtil.getFilename(uri) } var gameId = NativeLibrary.getGameId(filePath) // If the game's ID field is empty, use the filename without extension. if (gameId.isEmpty()) { - gameId = filePath.substring( - filePath.lastIndexOf("/") + 1, - filePath.lastIndexOf(".") - ) + gameId = name.substring(0, name.lastIndexOf(".")) } val newGame = Game( From 9074a70b0180057d0cebcd667ad7fc813f1aca8c Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Mon, 26 Jun 2023 20:55:28 -0400 Subject: [PATCH 66/91] android: Fix size check for content uris Fix for checking file size for android content uris --- src/common/fs/fs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cpp index 1baf6d746..36e67c145 100644 --- a/src/common/fs/fs.cpp +++ b/src/common/fs/fs.cpp @@ -605,6 +605,12 @@ fs::file_type GetEntryType(const fs::path& path) { } u64 GetSize(const fs::path& path) { +#ifdef ANDROID + if (Android::IsContentUri(path)) { + return Android::GetSize(path); + } +#endif + std::error_code ec; const auto file_size = fs::file_size(path, ec); From 33cd3a0db0a6199bdc98f5f2d60a042cf8afa20c Mon Sep 17 00:00:00 2001 From: Alexandre Bouvier Date: Tue, 27 Jun 2023 23:39:29 +0200 Subject: [PATCH 67/91] gitmodules: normalize indentation and url --- .gitmodules | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5a8169b44..9f96b70be 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,35 +2,35 @@ # SPDX-License-Identifier: GPL-2.0-or-later [submodule "enet"] - path = externals/enet - url = https://github.com/lsalzman/enet.git + path = externals/enet + url = https://github.com/lsalzman/enet.git [submodule "inih"] - path = externals/inih/inih - url = https://github.com/benhoyt/inih.git + path = externals/inih/inih + url = https://github.com/benhoyt/inih.git [submodule "cubeb"] - path = externals/cubeb - url = https://github.com/mozilla/cubeb.git + path = externals/cubeb + url = https://github.com/mozilla/cubeb.git [submodule "dynarmic"] - path = externals/dynarmic - url = https://github.com/MerryMage/dynarmic.git + path = externals/dynarmic + url = https://github.com/merryhime/dynarmic.git [submodule "libusb"] path = externals/libusb/libusb url = https://github.com/libusb/libusb.git [submodule "discord-rpc"] - path = externals/discord-rpc - url = https://github.com/yuzu-emu/discord-rpc.git + path = externals/discord-rpc + url = https://github.com/yuzu-emu/discord-rpc.git [submodule "Vulkan-Headers"] - path = externals/Vulkan-Headers - url = https://github.com/KhronosGroup/Vulkan-Headers.git + path = externals/Vulkan-Headers + url = https://github.com/KhronosGroup/Vulkan-Headers.git [submodule "sirit"] - path = externals/sirit - url = https://github.com/yuzu-emu/sirit + path = externals/sirit + url = https://github.com/yuzu-emu/sirit.git [submodule "mbedtls"] - path = externals/mbedtls - url = https://github.com/yuzu-emu/mbedtls + path = externals/mbedtls + url = https://github.com/yuzu-emu/mbedtls.git [submodule "xbyak"] - path = externals/xbyak - url = https://github.com/herumi/xbyak.git + path = externals/xbyak + url = https://github.com/herumi/xbyak.git [submodule "opus"] path = externals/opus/opus url = https://github.com/xiph/opus.git @@ -45,16 +45,16 @@ url = https://github.com/FFmpeg/FFmpeg.git [submodule "vcpkg"] path = externals/vcpkg - url = https://github.com/Microsoft/vcpkg.git + url = https://github.com/microsoft/vcpkg.git [submodule "cpp-jwt"] path = externals/cpp-jwt url = https://github.com/arun11299/cpp-jwt.git [submodule "libadrenotools"] path = externals/libadrenotools - url = https://github.com/bylaws/libadrenotools + url = https://github.com/bylaws/libadrenotools.git [submodule "tzdb_to_nx"] path = externals/nx_tzdb/tzdb_to_nx url = https://github.com/lat9nq/tzdb_to_nx.git [submodule "VulkanMemoryAllocator"] path = externals/vma/VulkanMemoryAllocator - url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator + url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git From 30544fbfa53fb5866d104c3a0000419eada51558 Mon Sep 17 00:00:00 2001 From: german77 Date: Tue, 27 Jun 2023 15:55:23 -0600 Subject: [PATCH 68/91] yuzu: Fix clang format --- src/yuzu/configuration/configure_general.cpp | 6 ++++-- src/yuzu/main.cpp | 21 ++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index d74e663d4..2f55159f5 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -41,7 +41,8 @@ void ConfigureGeneral::SetConfiguration() { ui->toggle_background_pause->setChecked(UISettings::values.pause_when_in_background.GetValue()); ui->toggle_hide_mouse->setChecked(UISettings::values.hide_mouse.GetValue()); ui->toggle_controller_applet_disabled->setEnabled(runtime_lock); - ui->toggle_controller_applet_disabled->setChecked(UISettings::values.controller_applet_disabled.GetValue()); + ui->toggle_controller_applet_disabled->setChecked( + UISettings::values.controller_applet_disabled.GetValue()); ui->toggle_speed_limit->setChecked(Settings::values.use_speed_limit.GetValue()); ui->speed_limit->setValue(Settings::values.speed_limit.GetValue()); @@ -84,7 +85,8 @@ void ConfigureGeneral::ApplyConfiguration() { UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked(); UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked(); UISettings::values.hide_mouse = ui->toggle_hide_mouse->isChecked(); - UISettings::values.controller_applet_disabled = ui->toggle_controller_applet_disabled->isChecked(); + UISettings::values.controller_applet_disabled = + ui->toggle_controller_applet_disabled->isChecked(); // Guard if during game and set to game-specific value if (Settings::values.use_speed_limit.UsingGlobal()) { diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 24e59f646..e8418b302 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1707,16 +1707,17 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p system->SetFilesystem(vfs); system->SetAppletFrontendSet({ - std::make_unique(*this), // Amiibo Settings - (UISettings::values.controller_applet_disabled.GetValue() == true) ? nullptr : - std::make_unique(*this), // Controller Selector - std::make_unique(*this), // Error Display - nullptr, // Mii Editor - nullptr, // Parental Controls - nullptr, // Photo Viewer - std::make_unique(*this), // Profile Selector - std::make_unique(*this), // Software Keyboard - std::make_unique(*this), // Web Browser + std::make_unique(*this), // Amiibo Settings + (UISettings::values.controller_applet_disabled.GetValue() == true) + ? nullptr + : std::make_unique(*this), // Controller Selector + std::make_unique(*this), // Error Display + nullptr, // Mii Editor + nullptr, // Parental Controls + nullptr, // Photo Viewer + std::make_unique(*this), // Profile Selector + std::make_unique(*this), // Software Keyboard + std::make_unique(*this), // Web Browser }); const Core::SystemResultStatus result{ From 32475efbc4326a3e7a97883f39b21b91fd14af60 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 27 Jun 2023 23:34:16 +0200 Subject: [PATCH 69/91] settings: Catch runtime_error, fallback time zone Windows will let you select time zones that will fail in their own C++ implementation library. Evidently from the stack trace, we get a runtime error to work with, so catch it and use the fallback. --- src/common/settings.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 66dffc9bf..a1df69140 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include +#include #if __cpp_lib_chrono >= 201907L #include #endif @@ -25,9 +27,19 @@ std::string GetTimeZoneString() { if (time_zone_index == 0) { // Auto #if __cpp_lib_chrono >= 201907L const struct std::chrono::tzdb& time_zone_data = std::chrono::get_tzdb(); - const std::chrono::time_zone* current_zone = time_zone_data.current_zone(); - std::string_view current_zone_name = current_zone->name(); - location_name = current_zone_name; + try { + const std::chrono::time_zone* current_zone = time_zone_data.current_zone(); + std::string_view current_zone_name = current_zone->name(); + location_name = current_zone_name; + } catch (std::runtime_error& runtime_error) { + // VCRUNTIME will throw a runtime_error if the operating system's selected time zone + // cannot be found + location_name = Common::TimeZone::FindSystemTimeZone(); + LOG_WARNING(Common, + "Error occurred when trying to determine system time zone:\n{}\nFalling " + "back to hour offset \"{}\"", + runtime_error.what(), location_name); + } #else location_name = Common::TimeZone::FindSystemTimeZone(); #endif From e3c548d081cb9ad34f8eb8975a6ecb92e27fec6d Mon Sep 17 00:00:00 2001 From: Merry Date: Tue, 27 Jun 2023 23:51:49 +0100 Subject: [PATCH 70/91] arm_dynarmic_32: Remove disabling of block linking on arm64 --- src/core/arm/dynarmic/arm_dynarmic_32.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index 5acf9008d..3b82fb73c 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -322,11 +322,6 @@ std::shared_ptr ARM_Dynarmic_32::MakeJit(Common::PageTable* } } -#ifdef ARCHITECTURE_arm64 - // TODO: remove when fixed in dynarmic - config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking; -#endif - return std::make_unique(config); } From 21675c9b68741d15b678598aa555536bfc6a6f76 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 27 Jun 2023 19:13:54 -0400 Subject: [PATCH 71/91] settings: Clean up includes Adds since we are looking at C++ implementation version details. Also moves exception header includes into the if preprocessor command since we only use it there. --- src/common/settings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index a1df69140..6cbbea1b2 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -1,10 +1,11 @@ // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include +#include #if __cpp_lib_chrono >= 201907L #include +#include +#include #endif #include From 72e7f5b4dd08e9ea46ee049d8f2564a8808273d4 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sat, 3 Jun 2023 09:21:52 +0300 Subject: [PATCH 72/91] renderer_vulkan: Add suport for debug report callback --- .../renderer_vulkan/renderer_vulkan.cpp | 18 +++++- .../renderer_vulkan/renderer_vulkan.h | 5 +- .../vulkan_common/vulkan_debug_callback.cpp | 40 +++++++++++-- .../vulkan_common/vulkan_debug_callback.h | 4 +- .../vulkan_common/vulkan_device.cpp | 2 +- .../vulkan_common/vulkan_instance.cpp | 58 ++++++++++--------- .../vulkan_common/vulkan_wrapper.cpp | 14 +++++ src/video_core/vulkan_common/vulkan_wrapper.h | 9 +++ 8 files changed, 113 insertions(+), 37 deletions(-) diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index ddf28ca28..454bb66a4 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -12,6 +12,7 @@ #include #include "common/logging/log.h" +#include "common/polyfill_ranges.h" #include "common/scope_exit.h" #include "common/settings.h" #include "common/telemetry.h" @@ -65,6 +66,21 @@ std::string BuildCommaSeparatedExtensions( return fmt::format("{}", fmt::join(available_extensions, ",")); } +DebugCallback MakeDebugCallback(const vk::Instance& instance, const vk::InstanceDispatch& dld) { + if (!Settings::values.renderer_debug) { + return DebugCallback{}; + } + const std::optional properties = vk::EnumerateInstanceExtensionProperties(dld); + const auto it = std::ranges::find_if(*properties, [](const auto& prop) { + return std::strcmp(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, prop.extensionName) == 0; + }); + if (it != properties->end()) { + return CreateDebugUtilsCallback(instance); + } else { + return CreateDebugReportCallback(instance); + } +} + } // Anonymous namespace Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dld, @@ -87,7 +103,7 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_, cpu_memory(cpu_memory_), gpu(gpu_), library(OpenLibrary(context.get())), instance(CreateInstance(*library, dld, VK_API_VERSION_1_1, render_window.GetWindowInfo().type, Settings::values.renderer_debug.GetValue())), - debug_callback(Settings::values.renderer_debug ? CreateDebugCallback(instance) : nullptr), + debug_callback(MakeDebugCallback(instance, dld)), surface(CreateSurface(instance, render_window.GetWindowInfo())), device(CreateDevice(instance, dld, *surface)), memory_allocator(device), state_tracker(), scheduler(device, state_tracker), diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.h b/src/video_core/renderer_vulkan/renderer_vulkan.h index b2e8cbd1b..ca22c0baa 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.h +++ b/src/video_core/renderer_vulkan/renderer_vulkan.h @@ -5,6 +5,7 @@ #include #include +#include #include "common/dynamic_library.h" #include "video_core/renderer_base.h" @@ -33,6 +34,8 @@ class GPU; namespace Vulkan { +using DebugCallback = std::variant; + Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dld, VkSurfaceKHR surface); @@ -71,7 +74,7 @@ private: vk::InstanceDispatch dld; vk::Instance instance; - vk::DebugUtilsMessenger debug_callback; + DebugCallback debug_callback; vk::SurfaceKHR surface; ScreenInfo screen_info; diff --git a/src/video_core/vulkan_common/vulkan_debug_callback.cpp b/src/video_core/vulkan_common/vulkan_debug_callback.cpp index 9de484c29..67e8065a4 100644 --- a/src/video_core/vulkan_common/vulkan_debug_callback.cpp +++ b/src/video_core/vulkan_common/vulkan_debug_callback.cpp @@ -7,10 +7,10 @@ namespace Vulkan { namespace { -VkBool32 Callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity, - VkDebugUtilsMessageTypeFlagsEXT type, - const VkDebugUtilsMessengerCallbackDataEXT* data, - [[maybe_unused]] void* user_data) { +VkBool32 DebugUtilCallback(VkDebugUtilsMessageSeverityFlagBitsEXT severity, + VkDebugUtilsMessageTypeFlagsEXT type, + const VkDebugUtilsMessengerCallbackDataEXT* data, + [[maybe_unused]] void* user_data) { // Skip logging known false-positive validation errors switch (static_cast(data->messageIdNumber)) { #ifdef ANDROID @@ -62,9 +62,26 @@ VkBool32 Callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity, } return VK_FALSE; } + +VkBool32 DebugReportCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, + uint64_t object, size_t location, int32_t messageCode, + const char* pLayerPrefix, const char* pMessage, void* pUserData) { + const VkDebugReportFlagBitsEXT severity = static_cast(flags); + const std::string_view message{pMessage}; + if (severity & VK_DEBUG_REPORT_ERROR_BIT_EXT) { + LOG_CRITICAL(Render_Vulkan, "{}", message); + } else if (severity & VK_DEBUG_REPORT_WARNING_BIT_EXT) { + LOG_WARNING(Render_Vulkan, "{}", message); + } else if (severity & VK_DEBUG_REPORT_INFORMATION_BIT_EXT) { + LOG_INFO(Render_Vulkan, "{}", message); + } else if (severity & VK_DEBUG_REPORT_DEBUG_BIT_EXT) { + LOG_DEBUG(Render_Vulkan, "{}", message); + } + return VK_FALSE; +} } // Anonymous namespace -vk::DebugUtilsMessenger CreateDebugCallback(const vk::Instance& instance) { +vk::DebugUtilsMessenger CreateDebugUtilsCallback(const vk::Instance& instance) { return instance.CreateDebugUtilsMessenger(VkDebugUtilsMessengerCreateInfoEXT{ .sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, .pNext = nullptr, @@ -76,7 +93,18 @@ vk::DebugUtilsMessenger CreateDebugCallback(const vk::Instance& instance) { .messageType = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT, - .pfnUserCallback = Callback, + .pfnUserCallback = DebugUtilCallback, + .pUserData = nullptr, + }); +} + +vk::DebugReportCallback CreateDebugReportCallback(const vk::Instance& instance) { + return instance.CreateDebugReportCallback({ + .sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, + .pNext = nullptr, + .flags = VK_DEBUG_REPORT_DEBUG_BIT_EXT | VK_DEBUG_REPORT_INFORMATION_BIT_EXT | + VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT, + .pfnCallback = DebugReportCallback, .pUserData = nullptr, }); } diff --git a/src/video_core/vulkan_common/vulkan_debug_callback.h b/src/video_core/vulkan_common/vulkan_debug_callback.h index 71b1f69ec..a8af7b406 100644 --- a/src/video_core/vulkan_common/vulkan_debug_callback.h +++ b/src/video_core/vulkan_common/vulkan_debug_callback.h @@ -7,6 +7,8 @@ namespace Vulkan { -vk::DebugUtilsMessenger CreateDebugCallback(const vk::Instance& instance); +vk::DebugUtilsMessenger CreateDebugUtilsCallback(const vk::Instance& instance); + +vk::DebugReportCallback CreateDebugReportCallback(const vk::Instance& instance); } // namespace Vulkan diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index e4ca65b58..9743a82f5 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -349,7 +349,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR const bool is_s8gen2 = device_id == 0x43050a01; const bool is_arm = driver_id == VK_DRIVER_ID_ARM_PROPRIETARY; - if ((is_mvk || is_qualcomm || is_turnip) && !is_suitable) { + if ((is_mvk || is_qualcomm || is_turnip || is_arm) && !is_suitable) { LOG_WARNING(Render_Vulkan, "Unsuitable driver, continuing anyway"); } else if (!is_suitable) { throw vk::Exception(VK_ERROR_INCOMPATIBLE_DRIVER); diff --git a/src/video_core/vulkan_common/vulkan_instance.cpp b/src/video_core/vulkan_common/vulkan_instance.cpp index b6d83e446..7624a9b32 100644 --- a/src/video_core/vulkan_common/vulkan_instance.cpp +++ b/src/video_core/vulkan_common/vulkan_instance.cpp @@ -31,10 +31,34 @@ namespace Vulkan { namespace { + +[[nodiscard]] bool AreExtensionsSupported(const vk::InstanceDispatch& dld, + std::span extensions) { + const std::optional properties = vk::EnumerateInstanceExtensionProperties(dld); + if (!properties) { + LOG_ERROR(Render_Vulkan, "Failed to query extension properties"); + return false; + } + for (const char* extension : extensions) { + const auto it = std::ranges::find_if(*properties, [extension](const auto& prop) { + return std::strcmp(extension, prop.extensionName) == 0; + }); + if (it == properties->end()) { + LOG_ERROR(Render_Vulkan, "Required instance extension {} is not available", extension); + return false; + } + } + return true; +} + [[nodiscard]] std::vector RequiredExtensions( - Core::Frontend::WindowSystemType window_type, bool enable_validation) { + const vk::InstanceDispatch& dld, Core::Frontend::WindowSystemType window_type, + bool enable_validation) { std::vector extensions; extensions.reserve(6); +#ifdef __APPLE__ + extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); +#endif switch (window_type) { case Core::Frontend::WindowSystemType::Headless: break; @@ -66,35 +90,14 @@ namespace { extensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME); } if (enable_validation) { - extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); + const bool debug_utils = + AreExtensionsSupported(dld, std::array{VK_EXT_DEBUG_UTILS_EXTENSION_NAME}); + extensions.push_back(debug_utils ? VK_EXT_DEBUG_UTILS_EXTENSION_NAME + : VK_EXT_DEBUG_REPORT_EXTENSION_NAME); } - extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); - -#ifdef __APPLE__ - extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); -#endif return extensions; } -[[nodiscard]] bool AreExtensionsSupported(const vk::InstanceDispatch& dld, - std::span extensions) { - const std::optional properties = vk::EnumerateInstanceExtensionProperties(dld); - if (!properties) { - LOG_ERROR(Render_Vulkan, "Failed to query extension properties"); - return false; - } - for (const char* extension : extensions) { - const auto it = std::ranges::find_if(*properties, [extension](const auto& prop) { - return std::strcmp(extension, prop.extensionName) == 0; - }); - if (it == properties->end()) { - LOG_ERROR(Render_Vulkan, "Required instance extension {} is not available", extension); - return false; - } - } - return true; -} - [[nodiscard]] std::vector Layers(bool enable_validation) { std::vector layers; if (enable_validation) { @@ -138,7 +141,8 @@ vk::Instance CreateInstance(const Common::DynamicLibrary& library, vk::InstanceD LOG_ERROR(Render_Vulkan, "Failed to load Vulkan function pointers"); throw vk::Exception(VK_ERROR_INITIALIZATION_FAILED); } - const std::vector extensions = RequiredExtensions(window_type, enable_validation); + const std::vector extensions = + RequiredExtensions(dld, window_type, enable_validation); if (!AreExtensionsSupported(dld, extensions)) { throw vk::Exception(VK_ERROR_EXTENSION_NOT_PRESENT); } diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index 28fcb21a0..2fa29793a 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -259,7 +259,9 @@ bool Load(VkInstance instance, InstanceDispatch& dld) noexcept { // These functions may fail to load depending on the enabled extensions. // Don't return a failure on these. X(vkCreateDebugUtilsMessengerEXT); + X(vkCreateDebugReportCallbackEXT); X(vkDestroyDebugUtilsMessengerEXT); + X(vkDestroyDebugReportCallbackEXT); X(vkDestroySurfaceKHR); X(vkGetPhysicalDeviceFeatures2); X(vkGetPhysicalDeviceProperties2); @@ -481,6 +483,11 @@ void Destroy(VkInstance instance, VkDebugUtilsMessengerEXT handle, dld.vkDestroyDebugUtilsMessengerEXT(instance, handle, nullptr); } +void Destroy(VkInstance instance, VkDebugReportCallbackEXT handle, + const InstanceDispatch& dld) noexcept { + dld.vkDestroyDebugReportCallbackEXT(instance, handle, nullptr); +} + void Destroy(VkInstance instance, VkSurfaceKHR handle, const InstanceDispatch& dld) noexcept { dld.vkDestroySurfaceKHR(instance, handle, nullptr); } @@ -549,6 +556,13 @@ DebugUtilsMessenger Instance::CreateDebugUtilsMessenger( return DebugUtilsMessenger(object, handle, *dld); } +DebugReportCallback Instance::CreateDebugReportCallback( + const VkDebugReportCallbackCreateInfoEXT& create_info) const { + VkDebugReportCallbackEXT object; + Check(dld->vkCreateDebugReportCallbackEXT(handle, &create_info, nullptr, &object)); + return DebugReportCallback(object, handle, *dld); +} + void Image::SetObjectNameEXT(const char* name) const { SetObjectName(dld, owner, handle, VK_OBJECT_TYPE_IMAGE, name); } diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 44fce47a5..b5e70fcd4 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -164,8 +164,10 @@ struct InstanceDispatch { PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{}; PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT{}; + PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT{}; PFN_vkCreateDevice vkCreateDevice{}; PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT{}; + PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT{}; PFN_vkDestroyDevice vkDestroyDevice{}; PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR{}; PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties{}; @@ -366,6 +368,7 @@ void Destroy(VkDevice, VkSwapchainKHR, const DeviceDispatch&) noexcept; void Destroy(VkDevice, VkSemaphore, const DeviceDispatch&) noexcept; void Destroy(VkDevice, VkShaderModule, const DeviceDispatch&) noexcept; void Destroy(VkInstance, VkDebugUtilsMessengerEXT, const InstanceDispatch&) noexcept; +void Destroy(VkInstance, VkDebugReportCallbackEXT, const InstanceDispatch&) noexcept; void Destroy(VkInstance, VkSurfaceKHR, const InstanceDispatch&) noexcept; VkResult Free(VkDevice, VkDescriptorPool, Span, const DeviceDispatch&) noexcept; @@ -581,6 +584,7 @@ private: }; using DebugUtilsMessenger = Handle; +using DebugReportCallback = Handle; using DescriptorSetLayout = Handle; using DescriptorUpdateTemplate = Handle; using Pipeline = Handle; @@ -613,6 +617,11 @@ public: DebugUtilsMessenger CreateDebugUtilsMessenger( const VkDebugUtilsMessengerCreateInfoEXT& create_info) const; + /// Creates a debug report callback. + /// @throw Exception on creation failure. + DebugReportCallback CreateDebugReportCallback( + const VkDebugReportCallbackCreateInfoEXT& create_info) const; + /// Returns dispatch table. const InstanceDispatch& Dispatch() const noexcept { return *dld; From a9b44d37e101c646b00ca73dffa06edcb7627dcd Mon Sep 17 00:00:00 2001 From: GPUCode Date: Mon, 5 Jun 2023 18:58:21 +0300 Subject: [PATCH 73/91] renderer_vulkan: Don't add transform feedback flag if unsupported --- .../renderer_vulkan/vk_buffer_cache.cpp | 3 ++- .../renderer_vulkan/vk_staging_buffer_pool.cpp | 16 ++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 660f7c9ff..b72f95235 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -590,7 +590,8 @@ void BufferCacheRuntime::ReserveNullBuffer() { .pNext = nullptr, .flags = 0, .size = 4, - .usage = VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, + .usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_INDEX_BUFFER_BIT | + VK_BUFFER_USAGE_TRANSFER_DST_BIT, .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, diff --git a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp index 62b251a9b..ce92f66ab 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp @@ -38,18 +38,20 @@ size_t Region(size_t iterator) noexcept { StagingBufferPool::StagingBufferPool(const Device& device_, MemoryAllocator& memory_allocator_, Scheduler& scheduler_) : device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_} { - const VkBufferCreateInfo stream_ci = { + VkBufferCreateInfo stream_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, .size = STREAM_BUFFER_SIZE, .usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | - VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | - VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, + VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, }; + if (device.IsExtTransformFeedbackSupported()) { + stream_ci.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT; + } stream_buffer = memory_allocator.CreateBuffer(stream_ci, MemoryUsage::Stream); if (device.HasDebuggingToolAttached()) { stream_buffer.SetObjectNameEXT("Stream Buffer"); @@ -164,19 +166,21 @@ std::optional StagingBufferPool::TryGetReservedBuffer(size_t s StagingBufferRef StagingBufferPool::CreateStagingBuffer(size_t size, MemoryUsage usage, bool deferred) { const u32 log2 = Common::Log2Ceil64(size); - const VkBufferCreateInfo buffer_ci = { + VkBufferCreateInfo buffer_ci = { .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .pNext = nullptr, .flags = 0, .size = 1ULL << log2, .usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | - VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | - VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, + VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, .sharingMode = VK_SHARING_MODE_EXCLUSIVE, .queueFamilyIndexCount = 0, .pQueueFamilyIndices = nullptr, }; + if (device.IsExtTransformFeedbackSupported()) { + buffer_ci.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT; + } vk::Buffer buffer = memory_allocator.CreateBuffer(buffer_ci, usage); if (device.HasDebuggingToolAttached()) { ++buffer_index; From c339af37a73de144fbbad706e43aefe278640cd7 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Mon, 5 Jun 2023 19:03:16 +0300 Subject: [PATCH 74/91] renderer_vulkan: Respect viewport limit --- .../renderer_vulkan/vk_graphics_pipeline.cpp | 5 +++-- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 16 ++++++++++++---- src/video_core/vulkan_common/vulkan_device.h | 4 ++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index c1595642e..ad35cacac 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -652,13 +652,14 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { .pNext = nullptr, .negativeOneToOne = key.state.ndc_minus_one_to_one.Value() != 0 ? VK_TRUE : VK_FALSE, }; + const u32 num_viewports = std::min(device.GetMaxViewports(), Maxwell::NumViewports); VkPipelineViewportStateCreateInfo viewport_ci{ .sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, .pNext = nullptr, .flags = 0, - .viewportCount = Maxwell::NumViewports, + .viewportCount = num_viewports, .pViewports = nullptr, - .scissorCount = Maxwell::NumViewports, + .scissorCount = num_viewports, .pScissors = nullptr, }; if (device.IsNvViewportSwizzleSupported()) { diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 84e3a30cc..268b955fb 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -925,7 +925,7 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& reg } const bool is_rescaling{texture_cache.IsRescaling()}; const float scale = is_rescaling ? Settings::values.resolution_info.up_factor : 1.0f; - const std::array viewports{ + const std::array viewport_list{ GetViewportState(device, regs, 0, scale), GetViewportState(device, regs, 1, scale), GetViewportState(device, regs, 2, scale), GetViewportState(device, regs, 3, scale), GetViewportState(device, regs, 4, scale), GetViewportState(device, regs, 5, scale), @@ -935,7 +935,11 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& reg GetViewportState(device, regs, 12, scale), GetViewportState(device, regs, 13, scale), GetViewportState(device, regs, 14, scale), GetViewportState(device, regs, 15, scale), }; - scheduler.Record([viewports](vk::CommandBuffer cmdbuf) { cmdbuf.SetViewport(0, viewports); }); + scheduler.Record([this, viewport_list](vk::CommandBuffer cmdbuf) { + const u32 num_viewports = std::min(device.GetMaxViewports(), Maxwell::NumViewports); + const vk::Span viewports(viewport_list.data(), num_viewports); + cmdbuf.SetViewport(0, viewports); + }); } void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs) { @@ -948,7 +952,7 @@ void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs up_scale = Settings::values.resolution_info.up_scale; down_shift = Settings::values.resolution_info.down_shift; } - const std::array scissors{ + const std::array scissor_list{ GetScissorState(regs, 0, up_scale, down_shift), GetScissorState(regs, 1, up_scale, down_shift), GetScissorState(regs, 2, up_scale, down_shift), @@ -966,7 +970,11 @@ void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs GetScissorState(regs, 14, up_scale, down_shift), GetScissorState(regs, 15, up_scale, down_shift), }; - scheduler.Record([scissors](vk::CommandBuffer cmdbuf) { cmdbuf.SetScissor(0, scissors); }); + scheduler.Record([this, scissor_list](vk::CommandBuffer cmdbuf) { + const u32 num_scissors = std::min(device.GetMaxViewports(), Maxwell::NumViewports); + const vk::Span scissors(scissor_list.data(), num_scissors); + cmdbuf.SetScissor(0, scissors); + }); } void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs) { diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index b84af3dfb..8a05a4fab 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -588,6 +588,10 @@ public: return properties.properties.limits.maxVertexInputBindings; } + u32 GetMaxViewports() const { + return properties.properties.limits.maxViewports; + } + bool SupportsConditionalBarriers() const { return supports_conditional_barriers; } From 1522b956583aab463bd1576652d1794fe989437d Mon Sep 17 00:00:00 2001 From: GPUCode Date: Mon, 5 Jun 2023 19:04:22 +0300 Subject: [PATCH 75/91] renderer_vulkan: Bump minimum SPIRV version * 1.3 is guaranteed on all 1.1 drivers --- src/video_core/vulkan_common/vulkan_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 8a05a4fab..13ca24ef5 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -518,7 +518,7 @@ public: if (extensions.spirv_1_4) { return 0x00010400U; } - return 0x00010000U; + return 0x00010300U; } /// Returns true when a known debugging tool is attached. From 220a42896d350399f1f2d77432aa571ade3c9cdd Mon Sep 17 00:00:00 2001 From: GPUCode Date: Mon, 5 Jun 2023 19:07:05 +0300 Subject: [PATCH 76/91] renderer_vulkan: Don't assume debug tool with debug renderer * Causes crashes because mali drivers don't support debug utils --- src/video_core/vulkan_common/vulkan_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 13ca24ef5..7be631122 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -523,7 +523,7 @@ public: /// Returns true when a known debugging tool is attached. bool HasDebuggingToolAttached() const { - return has_renderdoc || has_nsight_graphics || Settings::values.renderer_debug.GetValue(); + return has_renderdoc || has_nsight_graphics; } /// @returns True if compute pipelines can cause crashing. From b8c96cee5f2eb0bd5ba9ef46746daec78ee3bb44 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Mon, 5 Jun 2023 19:27:36 +0300 Subject: [PATCH 77/91] renderer_vulkan: Add more feature checking --- .../renderer_vulkan/vk_pipeline_cache.cpp | 7 ++++--- src/video_core/vulkan_common/vulkan_device.cpp | 4 ++++ src/video_core/vulkan_common/vulkan_device.h | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 9f316113c..d600c4e61 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -309,7 +309,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device .support_int16 = device.IsShaderInt16Supported(), .support_int64 = device.IsShaderInt64Supported(), .support_vertex_instance_id = false, - .support_float_controls = true, + .support_float_controls = device.IsKhrShaderFloatControlsSupported(), .support_separate_denorm_behavior = float_control.denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL, .support_separate_rounding_mode = @@ -325,12 +325,13 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device .support_fp64_signed_zero_nan_preserve = float_control.shaderSignedZeroInfNanPreserveFloat64 != VK_FALSE, .support_explicit_workgroup_layout = device.IsKhrWorkgroupMemoryExplicitLayoutSupported(), - .support_vote = true, + .support_vote = device.IsSubgroupFeatureSupported(VK_SUBGROUP_FEATURE_VOTE_BIT), .support_viewport_index_layer_non_geometry = device.IsExtShaderViewportIndexLayerSupported(), .support_viewport_mask = device.IsNvViewportArray2Supported(), .support_typeless_image_loads = device.IsFormatlessImageLoadSupported(), - .support_demote_to_helper_invocation = true, + .support_demote_to_helper_invocation = + device.IsExtShaderDemoteToHelperInvocationSupported(), .support_int64_atomics = device.IsExtShaderAtomicInt64Supported(), .support_derivative_control = true, .support_geometry_shader_passthrough = device.IsNvGeometryShaderPassthroughSupported(), diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 9743a82f5..70436cf1c 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -905,6 +905,10 @@ bool Device::GetSuitability(bool requires_swapchain) { properties.driver.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES; SetNext(next, properties.driver); + // Retrieve subgroup properties. + properties.subgroup_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES; + SetNext(next, properties.subgroup_properties); + // Retrieve relevant extension properties. if (extensions.shader_float_controls) { properties.float_controls.sType = diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 7be631122..e05d04db3 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -323,6 +323,11 @@ public: return properties.subgroup_size_control.requiredSubgroupSizeStages & stage; } + /// Returns true if the device supports the provided subgroup feature. + bool IsSubgroupFeatureSupported(VkSubgroupFeatureFlagBits feature) const { + return properties.subgroup_properties.supportedOperations & feature; + } + /// Returns the maximum number of push descriptors. u32 MaxPushDescriptors() const { return properties.push_descriptor.maxPushDescriptors; @@ -388,6 +393,11 @@ public: return extensions.swapchain_mutable_format; } + /// Returns true if VK_KHR_shader_float_controls is enabled. + bool IsKhrShaderFloatControlsSupported() const { + return extensions.shader_float_controls; + } + /// Returns true if the device supports VK_KHR_workgroup_memory_explicit_layout. bool IsKhrWorkgroupMemoryExplicitLayoutSupported() const { return extensions.workgroup_memory_explicit_layout; @@ -487,6 +497,11 @@ public: return extensions.shader_stencil_export; } + /// Returns true if the device supports VK_EXT_shader_demote_to_helper_invocation + bool IsExtShaderDemoteToHelperInvocationSupported() const { + return extensions.shader_demote_to_helper_invocation; + } + /// Returns true if the device supports VK_EXT_conservative_rasterization. bool IsExtConservativeRasterizationSupported() const { return extensions.conservative_rasterization; @@ -684,6 +699,7 @@ private: struct Properties { VkPhysicalDeviceDriverProperties driver{}; + VkPhysicalDeviceSubgroupProperties subgroup_properties{}; VkPhysicalDeviceFloatControlsProperties float_controls{}; VkPhysicalDevicePushDescriptorPropertiesKHR push_descriptor{}; VkPhysicalDeviceSubgroupSizeControlProperties subgroup_size_control{}; From eac46ad7ceca5e35b396a8b80bfc38dc6ef1a4fe Mon Sep 17 00:00:00 2001 From: GPUCode Date: Tue, 6 Jun 2023 23:10:06 +0300 Subject: [PATCH 78/91] video_core: Add BCn decoding support --- externals/CMakeLists.txt | 3 + externals/bc_decoder/bc_decoder.cpp | 1522 +++++++++++++++++ externals/bc_decoder/bc_decoder.h | 43 + src/video_core/CMakeLists.txt | 6 +- .../renderer_vulkan/maxwell_to_vk.cpp | 20 + .../renderer_vulkan/vk_rasterizer.cpp | 7 + .../renderer_vulkan/vk_texture_cache.cpp | 4 + src/video_core/surface.cpp | 22 + src/video_core/surface.h | 2 + src/video_core/texture_cache/decode_bc.cpp | 129 ++ .../{decode_bc4.h => decode_bc.h} | 6 +- src/video_core/texture_cache/decode_bc4.cpp | 96 -- src/video_core/texture_cache/util.cpp | 24 +- src/video_core/textures/bcn.cpp | 1 - src/video_core/textures/bcn.h | 9 +- src/video_core/vulkan_common/vulkan_device.h | 15 +- 16 files changed, 1789 insertions(+), 120 deletions(-) create mode 100644 externals/bc_decoder/bc_decoder.cpp create mode 100644 externals/bc_decoder/bc_decoder.h create mode 100644 src/video_core/texture_cache/decode_bc.cpp rename src/video_core/texture_cache/{decode_bc4.h => decode_bc.h} (50%) delete mode 100644 src/video_core/texture_cache/decode_bc4.cpp diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 0184289eb..4ff588851 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -157,6 +157,9 @@ endif() add_library(stb stb/stb_dxt.cpp) target_include_directories(stb PUBLIC ./stb) +add_library(bc_decoder bc_decoder/bc_decoder.cpp) +target_include_directories(bc_decoder PUBLIC ./bc_decoder) + if (ANDROID) if (ARCHITECTURE_arm64) add_subdirectory(libadrenotools) diff --git a/externals/bc_decoder/bc_decoder.cpp b/externals/bc_decoder/bc_decoder.cpp new file mode 100644 index 000000000..536c44f34 --- /dev/null +++ b/externals/bc_decoder/bc_decoder.cpp @@ -0,0 +1,1522 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/) +// Copyright 2019 The SwiftShader Authors. All Rights Reserved. + +// This BCn Decoder is directly derivative of Swiftshader's BCn Decoder found at: https://github.com/google/swiftshader/blob/d070309f7d154d6764cbd514b1a5c8bfcef61d06/src/Device/BC_Decoder.cpp +// This file does not follow the Skyline code conventions but has certain Skyline specific code +// There are a lot of implicit and narrowing conversions in this file due to this (Warnings are disabled as a result) + +#include +#include +#include +#include + +namespace { + constexpr int BlockWidth = 4; + constexpr int BlockHeight = 4; + + struct BC_color { + void decode(uint8_t *dst, size_t x, size_t y, size_t dstW, size_t dstH, size_t dstPitch, size_t dstBpp, bool hasAlphaChannel, bool hasSeparateAlpha) const { + Color c[4]; + c[0].extract565(c0); + c[1].extract565(c1); + if (hasSeparateAlpha || (c0 > c1)) { + c[2] = ((c[0] * 2) + c[1]) / 3; + c[3] = ((c[1] * 2) + c[0]) / 3; + } else { + c[2] = (c[0] + c[1]) >> 1; + if (hasAlphaChannel) { + c[3].clearAlpha(); + } + } + + for (int j = 0; j < BlockHeight && (y + j) < dstH; j++) { + size_t dstOffset = j * dstPitch; + size_t idxOffset = j * BlockHeight; + for (size_t i = 0; i < BlockWidth && (x + i) < dstW; i++, idxOffset++, dstOffset += dstBpp) { + *reinterpret_cast(dst + dstOffset) = c[getIdx(idxOffset)].pack8888(); + } + } + } + + private: + struct Color { + Color() { + c[0] = c[1] = c[2] = 0; + c[3] = 0xFF000000; + } + + void extract565(const unsigned int c565) { + c[0] = ((c565 & 0x0000001F) << 3) | ((c565 & 0x0000001C) >> 2); + c[1] = ((c565 & 0x000007E0) >> 3) | ((c565 & 0x00000600) >> 9); + c[2] = ((c565 & 0x0000F800) >> 8) | ((c565 & 0x0000E000) >> 13); + } + + unsigned int pack8888() const { + return ((c[0] & 0xFF) << 16) | ((c[1] & 0xFF) << 8) | (c[2] & 0xFF) | c[3]; + } + + void clearAlpha() { + c[3] = 0; + } + + Color operator*(int factor) const { + Color res; + for (int i = 0; i < 4; ++i) { + res.c[i] = c[i] * factor; + } + return res; + } + + Color operator/(int factor) const { + Color res; + for (int i = 0; i < 4; ++i) { + res.c[i] = c[i] / factor; + } + return res; + } + + Color operator>>(int shift) const { + Color res; + for (int i = 0; i < 4; ++i) { + res.c[i] = c[i] >> shift; + } + return res; + } + + Color operator+(Color const &obj) const { + Color res; + for (int i = 0; i < 4; ++i) { + res.c[i] = c[i] + obj.c[i]; + } + return res; + } + + private: + int c[4]; + }; + + size_t getIdx(int i) const { + size_t offset = i << 1; // 2 bytes per index + return (idx & (0x3 << offset)) >> offset; + } + + unsigned short c0; + unsigned short c1; + unsigned int idx; + }; + static_assert(sizeof(BC_color) == 8, "BC_color must be 8 bytes"); + + struct BC_channel { + void decode(uint8_t *dst, size_t x, size_t y, size_t dstW, size_t dstH, size_t dstPitch, size_t dstBpp, size_t channel, bool isSigned) const { + int c[8] = {0}; + + if (isSigned) { + c[0] = static_cast(data & 0xFF); + c[1] = static_cast((data & 0xFF00) >> 8); + } else { + c[0] = static_cast(data & 0xFF); + c[1] = static_cast((data & 0xFF00) >> 8); + } + + if (c[0] > c[1]) { + for (int i = 2; i < 8; ++i) { + c[i] = ((8 - i) * c[0] + (i - 1) * c[1]) / 7; + } + } else { + for (int i = 2; i < 6; ++i) { + c[i] = ((6 - i) * c[0] + (i - 1) * c[1]) / 5; + } + c[6] = isSigned ? -128 : 0; + c[7] = isSigned ? 127 : 255; + } + + for (size_t j = 0; j < BlockHeight && (y + j) < dstH; j++) { + for (size_t i = 0; i < BlockWidth && (x + i) < dstW; i++) { + dst[channel + (i * dstBpp) + (j * dstPitch)] = static_cast(c[getIdx((j * BlockHeight) + i)]); + } + } + } + + private: + uint8_t getIdx(int i) const { + int offset = i * 3 + 16; + return static_cast((data & (0x7ull << offset)) >> offset); + } + + uint64_t data; + }; + static_assert(sizeof(BC_channel) == 8, "BC_channel must be 8 bytes"); + + struct BC_alpha { + void decode(uint8_t *dst, size_t x, size_t y, size_t dstW, size_t dstH, size_t dstPitch, size_t dstBpp) const { + dst += 3; // Write only to alpha (channel 3) + for (size_t j = 0; j < BlockHeight && (y + j) < dstH; j++, dst += dstPitch) { + uint8_t *dstRow = dst; + for (size_t i = 0; i < BlockWidth && (x + i) < dstW; i++, dstRow += dstBpp) { + *dstRow = getAlpha(j * BlockHeight + i); + } + } + } + + private: + uint8_t getAlpha(int i) const { + int offset = i << 2; + int alpha = (data & (0xFull << offset)) >> offset; + return static_cast(alpha | (alpha << 4)); + } + + uint64_t data; + }; + static_assert(sizeof(BC_alpha) == 8, "BC_alpha must be 8 bytes"); + + namespace BC6H { + static constexpr int MaxPartitions = 64; + + // @fmt:off + + static constexpr uint8_t PartitionTable2[MaxPartitions][16] = { + { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 }, + { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 }, + { 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1 }, + { 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1 }, + { 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1 }, + { 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1 }, + { 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1 }, + { 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 }, + { 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1 }, + { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 }, + { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0 }, + { 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0 }, + { 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 }, + { 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0 }, + { 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0 }, + { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 }, + { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1 }, + { 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0 }, + { 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0 }, + { 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0 }, + { 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1 }, + { 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 }, + { 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0 }, + { 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 }, + { 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0 }, + { 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0 }, + { 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 }, + { 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1 }, + { 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1 }, + { 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, + { 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0 }, + { 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0 }, + { 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 }, + { 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1 }, + { 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0 }, + { 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0 }, + { 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1 }, + { 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1 }, + { 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1 }, + { 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1 }, + { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 }, + { 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 }, + { 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0 }, + { 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1 }, + }; + + static constexpr uint8_t AnchorTable2[MaxPartitions] = { + 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, + 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, + 0xf, 0x2, 0x8, 0x2, 0x2, 0x8, 0x8, 0xf, + 0x2, 0x8, 0x2, 0x2, 0x8, 0x8, 0x2, 0x2, + 0xf, 0xf, 0x6, 0x8, 0x2, 0x8, 0xf, 0xf, + 0x2, 0x8, 0x2, 0x2, 0x2, 0xf, 0xf, 0x6, + 0x6, 0x2, 0x6, 0x8, 0xf, 0xf, 0x2, 0x2, + 0xf, 0xf, 0xf, 0xf, 0xf, 0x2, 0x2, 0xf, + }; + + // @fmt:on + + // 1.0f in half-precision floating point format + static constexpr uint16_t halfFloat1 = 0x3C00; + union Color { + struct RGBA { + uint16_t r = 0; + uint16_t g = 0; + uint16_t b = 0; + uint16_t a = halfFloat1; + + RGBA(uint16_t r, uint16_t g, uint16_t b) + : r(r), g(g), b(b) { + } + + RGBA &operator=(const RGBA &other) { + this->r = other.r; + this->g = other.g; + this->b = other.b; + this->a = halfFloat1; + + return *this; + } + }; + + Color(uint16_t r, uint16_t g, uint16_t b) + : rgba(r, g, b) { + } + + Color(int r, int g, int b) + : rgba((uint16_t) r, (uint16_t) g, (uint16_t) b) { + } + + Color() {} + + Color(const Color &other) { + this->rgba = other.rgba; + } + + Color &operator=(const Color &other) { + this->rgba = other.rgba; + + return *this; + } + + RGBA rgba; + uint16_t channel[4]; + }; + static_assert(sizeof(Color) == 8, "BC6h::Color must be 8 bytes long"); + + inline int32_t extendSign(int32_t val, size_t size) { + // Suppose we have a 2-bit integer being stored in 4 bit variable: + // x = 0b00AB + // + // In order to sign extend x, we need to turn the 0s into A's: + // x_extend = 0bAAAB + // + // We can do that by flipping A in x then subtracting 0b0010 from x. + // Suppose A is 1: + // x = 0b001B + // x_flip = 0b000B + // x_minus = 0b111B + // Since A is flipped to 0, subtracting the mask sets it and all the bits above it to 1. + // And if A is 0: + // x = 0b000B + // x_flip = 0b001B + // x_minus = 0b000B + // We unset the bit we flipped, and touch no other bit + uint16_t mask = 1u << (size - 1); + return (val ^ mask) - mask; + } + + static int constexpr RGBfChannels = 3; + struct RGBf { + uint16_t channel[RGBfChannels]; + size_t size[RGBfChannels]; + bool isSigned; + + RGBf() { + static_assert(RGBfChannels == 3, "RGBf must have exactly 3 channels"); + static_assert(sizeof(channel) / sizeof(channel[0]) == RGBfChannels, "RGBf must have exactly 3 channels"); + static_assert(sizeof(channel) / sizeof(channel[0]) == sizeof(size) / sizeof(size[0]), "RGBf requires equally sized arrays for channels and channel sizes"); + + for (int i = 0; i < RGBfChannels; i++) { + channel[i] = 0; + size[i] = 0; + } + + isSigned = false; + } + + void extendSign() { + for (int i = 0; i < RGBfChannels; i++) { + channel[i] = BC6H::extendSign(channel[i], size[i]); + } + } + + // Assuming this is the delta, take the base-endpoint and transform this into + // a proper endpoint. + // + // The final computed endpoint is truncated to the base-endpoint's size; + void resolveDelta(RGBf base) { + for (int i = 0; i < RGBfChannels; i++) { + size[i] = base.size[i]; + channel[i] = (base.channel[i] + channel[i]) & ((1 << base.size[i]) - 1); + } + + // Per the spec: + // "For signed formats, the results of the delta calculation must be sign + // extended as well." + if (isSigned) { + extendSign(); + } + } + + void unquantize() { + if (isSigned) { + unquantizeSigned(); + } else { + unquantizeUnsigned(); + } + } + + void unquantizeUnsigned() { + for (int i = 0; i < RGBfChannels; i++) { + if (size[i] >= 15 || channel[i] == 0) { + continue; + } else if (channel[i] == ((1u << size[i]) - 1)) { + channel[i] = 0xFFFFu; + } else { + // Need 32 bits to avoid overflow + uint32_t tmp = channel[i]; + channel[i] = (uint16_t) (((tmp << 16) + 0x8000) >> size[i]); + } + size[i] = 16; + } + } + + void unquantizeSigned() { + for (int i = 0; i < RGBfChannels; i++) { + if (size[i] >= 16 || channel[i] == 0) { + continue; + } + + int16_t value = (int16_t)channel[i]; + int32_t result = value; + bool signBit = value < 0; + if (signBit) { + value = -value; + } + + if (value >= ((1 << (size[i] - 1)) - 1)) { + result = 0x7FFF; + } else { + // Need 32 bits to avoid overflow + int32_t tmp = value; + result = (((tmp << 15) + 0x4000) >> (size[i] - 1)); + } + + if (signBit) { + result = -result; + } + + channel[i] = (uint16_t) result; + size[i] = 16; + } + } + }; + + struct Data { + uint64_t low64; + uint64_t high64; + + Data() = default; + + Data(uint64_t low64, uint64_t high64) + : low64(low64), high64(high64) { + } + + // Consumes the lowest N bits from from low64 and high64 where N is: + // abs(MSB - LSB) + // MSB and LSB come from the block description of the BC6h spec and specify + // the location of the bits in the returned bitstring. + // + // If MSB < LSB, then the bits are reversed. Otherwise, the bitstring is read and + // shifted without further modification. + // + uint32_t consumeBits(uint32_t MSB, uint32_t LSB) { + bool reversed = MSB < LSB; + if (reversed) { + std::swap(MSB, LSB); + } + assert(MSB - LSB + 1 < sizeof(uint32_t) * 8); + + uint32_t numBits = MSB - LSB + 1; + uint32_t mask = (1 << numBits) - 1; + // Read the low N bits + uint32_t bits = (low64 & mask); + + low64 >>= numBits; + // Put the low N bits of high64 into the high 64-N bits of low64 + low64 |= (high64 & mask) << (sizeof(high64) * 8 - numBits); + high64 >>= numBits; + + if (reversed) { + uint32_t tmp = 0; + for (uint32_t numSwaps = 0; numSwaps < numBits; numSwaps++) { + tmp <<= 1; + tmp |= (bits & 1); + bits >>= 1; + } + + bits = tmp; + } + + return bits << LSB; + } + }; + + struct IndexInfo { + uint64_t value; + int numBits; + }; + +// Interpolates between two endpoints, then does a final unquantization step + Color interpolate(RGBf e0, RGBf e1, const IndexInfo &index, bool isSigned) { + static constexpr uint32_t weights3[] = {0, 9, 18, 27, 37, 46, 55, 64}; + static constexpr uint32_t weights4[] = {0, 4, 9, 13, 17, 21, 26, 30, + 34, 38, 43, 47, 51, 55, 60, 64}; + static constexpr uint32_t const *weightsN[] = { + nullptr, nullptr, nullptr, weights3, weights4 + }; + auto weights = weightsN[index.numBits]; + assert(weights != nullptr); + Color color; + uint32_t e0Weight = 64 - weights[index.value]; + uint32_t e1Weight = weights[index.value]; + + for (int i = 0; i < RGBfChannels; i++) { + int32_t e0Channel = e0.channel[i]; + int32_t e1Channel = e1.channel[i]; + + if (isSigned) { + e0Channel = extendSign(e0Channel, 16); + e1Channel = extendSign(e1Channel, 16); + } + + int32_t e0Value = e0Channel * e0Weight; + int32_t e1Value = e1Channel * e1Weight; + + uint32_t tmp = ((e0Value + e1Value + 32) >> 6); + + // Need to unquantize value to limit it to the legal range of half-precision + // floats. We do this by scaling by 31/32 or 31/64 depending on if the value + // is signed or unsigned. + if (isSigned) { + tmp = ((tmp & 0x80000000) != 0) ? (((~tmp + 1) * 31) >> 5) | 0x8000 : (tmp * 31) >> 5; + // Don't return -0.0f, just normalize it to 0.0f. + if (tmp == 0x8000) + tmp = 0; + } else { + tmp = (tmp * 31) >> 6; + } + + color.channel[i] = (uint16_t) tmp; + } + + return color; + } + + enum DataType { + // Endpoints + EP0 = 0, + EP1 = 1, + EP2 = 2, + EP3 = 3, + Mode, + Partition, + End, + }; + + enum Channel { + R = 0, + G = 1, + B = 2, + None, + }; + + struct DeltaBits { + size_t channel[3]; + + constexpr DeltaBits() + : channel{0, 0, 0} { + } + + constexpr DeltaBits(size_t r, size_t g, size_t b) + : channel{r, g, b} { + } + }; + + struct ModeDesc { + int number; + bool hasDelta; + int partitionCount; + int endpointBits; + DeltaBits deltaBits; + + constexpr ModeDesc() + : number(-1), hasDelta(false), partitionCount(0), endpointBits(0) { + } + + constexpr ModeDesc(int number, bool hasDelta, int partitionCount, int endpointBits, DeltaBits deltaBits) + : number(number), hasDelta(hasDelta), partitionCount(partitionCount), endpointBits(endpointBits), deltaBits(deltaBits) { + } + }; + + struct BlockDesc { + DataType type; + Channel channel; + int MSB; + int LSB; + ModeDesc modeDesc; + + constexpr BlockDesc() + : type(End), channel(None), MSB(0), LSB(0), modeDesc() { + } + + constexpr BlockDesc(const DataType type, Channel channel, int MSB, int LSB, ModeDesc modeDesc) + : type(type), channel(channel), MSB(MSB), LSB(LSB), modeDesc(modeDesc) { + } + + constexpr BlockDesc(DataType type, Channel channel, int MSB, int LSB) + : type(type), channel(channel), MSB(MSB), LSB(LSB), modeDesc() { + } + }; + +// Turns a legal mode into an index into the BlockDesc table. +// Illegal or reserved modes return -1. + static int modeToIndex(uint8_t mode) { + if (mode <= 3) { + return mode; + } else if ((mode & 0x2) != 0) { + if (mode <= 18) { +// Turns 6 into 4, 7 into 5, 10 into 6, etc. + return (mode / 2) + 1 + (mode & 0x1); + } else if (mode == 22 || mode == 26 || mode == 30) { +// Turns 22 into 11, 26 into 12, etc. + return mode / 4 + 6; + } + } + + return -1; + } + +// Returns a description of the bitfields for each mode from the LSB +// to the MSB before the index data starts. +// +// The numbers come from the BC6h block description. Each BlockDesc in the +// {Type, Channel, MSB, LSB} +// * Type describes which endpoint this is, or if this is a mode, a partition +// number, or the end of the block description. +// * Channel describes one of the 3 color channels within an endpoint +// * MSB and LSB specificy: +// * The size of the bitfield being read +// * The position of the bitfield within the variable it is being read to +// * If the bitfield is stored in reverse bit order +// If MSB < LSB then the bitfield is stored in reverse order. The size of +// the bitfield is abs(MSB-LSB+1). And the position of the bitfield within +// the variable is min(LSB, MSB). +// +// Invalid or reserved modes return an empty list. + static constexpr int NumBlocks = 14; +// The largest number of descriptions within a block. + static constexpr int MaxBlockDescIndex = 26; + static constexpr BlockDesc blockDescs[NumBlocks][MaxBlockDescIndex] = { +// @fmt:off +// Mode 0, Index 0 +{ +{ Mode, None, 1, 0, { 0, true, 2, 10, { 5, 5, 5 } } }, +{ EP2, G, 4, 4 }, { EP2, B, 4, 4 }, { EP3, B, 4, 4 }, +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 4, 0 }, { EP3, G, 4, 4 }, { EP2, G, 3, 0 }, +{ EP1, G, 4, 0 }, { EP3, B, 0, 0 }, { EP3, G, 3, 0 }, +{ EP1, B, 4, 0 }, { EP3, B, 1, 1 }, { EP2, B, 3, 0 }, +{ EP2, R, 4, 0 }, { EP3, B, 2, 2 }, { EP3, R, 4, 0 }, +{ EP3, B, 3, 3 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 1, Index 1 +{ +{ Mode, None, 1, 0, { 1, true, 2, 7, { 6, 6, 6 } } }, +{ EP2, G, 5, 5 }, { EP3, G, 5, 4 }, { EP0, R, 6, 0 }, +{ EP3, B, 1, 0 }, { EP2, B, 4, 4 }, { EP0, G, 6, 0 }, +{ EP2, B, 5, 5 }, { EP3, B, 2, 2 }, { EP2, G, 4, 4 }, +{ EP0, B, 6, 0 }, { EP3, B, 3, 3 }, { EP3, B, 5, 5 }, +{ EP3, B, 4, 4 }, { EP1, R, 5, 0 }, { EP2, G, 3, 0 }, +{ EP1, G, 5, 0 }, { EP3, G, 3, 0 }, { EP1, B, 5, 0 }, +{ EP2, B, 3, 0 }, { EP2, R, 5, 0 }, { EP3, R, 5, 0 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 2, Index 2 +{ +{ Mode, None, 4, 0, { 2, true, 2, 11, { 5, 4, 4 } } }, +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 4, 0 }, { EP0, R, 10, 10 }, { EP2, G, 3, 0 }, +{ EP1, G, 3, 0 }, { EP0, G, 10, 10 }, { EP3, B, 0, 0 }, +{ EP3, G, 3, 0 }, { EP1, B, 3, 0 }, { EP0, B, 10, 10 }, +{ EP3, B, 1, 1 }, { EP2, B, 3, 0 }, { EP2, R, 4, 0 }, +{ EP3, B, 2, 2 }, { EP3, R, 4, 0 }, { EP3, B, 3, 3 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 3, Index 3 +{ +{ Mode, None, 4, 0, { 3, false, 1, 10, { 0, 0, 0 } } }, +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 9, 0 }, { EP1, G, 9, 0 }, { EP1, B, 9, 0 }, +{ End, None, 0, 0}, +}, +// Mode 6, Index 4 +{ +{ Mode, None, 4, 0, { 6, true, 2, 11, { 4, 5, 4 } } }, // 1 1 +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 3, 0 }, { EP0, R, 10, 10 }, { EP3, G, 4, 4 }, +{ EP2, G, 3, 0 }, { EP1, G, 4, 0 }, { EP0, G, 10, 10 }, +{ EP3, G, 3, 0 }, { EP1, B, 3, 0 }, { EP0, B, 10, 10 }, +{ EP3, B, 1, 1 }, { EP2, B, 3, 0 }, { EP2, R, 3, 0 }, +{ EP3, B, 0, 0 }, { EP3, B, 2, 2 }, { EP3, R, 3, 0 }, // 18 19 +{ EP2, G, 4, 4 }, { EP3, B, 3, 3 }, // 2 21 +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 7, Index 5 +{ +{ Mode, None, 4, 0, { 7, true, 1, 11, { 9, 9, 9 } } }, +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 8, 0 }, { EP0, R, 10, 10 }, { EP1, G, 8, 0 }, +{ EP0, G, 10, 10 }, { EP1, B, 8, 0 }, { EP0, B, 10, 10 }, +{ End, None, 0, 0}, +}, +// Mode 10, Index 6 +{ +{ Mode, None, 4, 0, { 10, true, 2, 11, { 4, 4, 5 } } }, +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 3, 0 }, { EP0, R, 10, 10 }, { EP2, B, 4, 4 }, +{ EP2, G, 3, 0 }, { EP1, G, 3, 0 }, { EP0, G, 10, 10 }, +{ EP3, B, 0, 0 }, { EP3, G, 3, 0 }, { EP1, B, 4, 0 }, +{ EP0, B, 10, 10 }, { EP2, B, 3, 0 }, { EP2, R, 3, 0 }, +{ EP3, B, 1, 1 }, { EP3, B, 2, 2 }, { EP3, R, 3, 0 }, +{ EP3, B, 4, 4 }, { EP3, B, 3, 3 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 11, Index 7 +{ +{ Mode, None, 4, 0, { 11, true, 1, 12, { 8, 8, 8 } } }, +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 7, 0 }, { EP0, R, 10, 11 }, { EP1, G, 7, 0 }, +{ EP0, G, 10, 11 }, { EP1, B, 7, 0 }, { EP0, B, 10, 11 }, +{ End, None, 0, 0}, +}, +// Mode 14, Index 8 +{ +{ Mode, None, 4, 0, { 14, true, 2, 9, { 5, 5, 5 } } }, +{ EP0, R, 8, 0 }, { EP2, B, 4, 4 }, { EP0, G, 8, 0 }, +{ EP2, G, 4, 4 }, { EP0, B, 8, 0 }, { EP3, B, 4, 4 }, +{ EP1, R, 4, 0 }, { EP3, G, 4, 4 }, { EP2, G, 3, 0 }, +{ EP1, G, 4, 0 }, { EP3, B, 0, 0 }, { EP3, G, 3, 0 }, +{ EP1, B, 4, 0 }, { EP3, B, 1, 1 }, { EP2, B, 3, 0 }, +{ EP2, R, 4, 0 }, { EP3, B, 2, 2 }, { EP3, R, 4, 0 }, +{ EP3, B, 3, 3 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 15, Index 9 +{ +{ Mode, None, 4, 0, { 15, true, 1, 16, { 4, 4, 4 } } }, +{ EP0, R, 9, 0 }, { EP0, G, 9, 0 }, { EP0, B, 9, 0 }, +{ EP1, R, 3, 0 }, { EP0, R, 10, 15 }, { EP1, G, 3, 0 }, +{ EP0, G, 10, 15 }, { EP1, B, 3, 0 }, { EP0, B, 10, 15 }, +{ End, None, 0, 0}, +}, +// Mode 18, Index 10 +{ +{ Mode, None, 4, 0, { 18, true, 2, 8, { 6, 5, 5 } } }, +{ EP0, R, 7, 0 }, { EP3, G, 4, 4 }, { EP2, B, 4, 4 }, +{ EP0, G, 7, 0 }, { EP3, B, 2, 2 }, { EP2, G, 4, 4 }, +{ EP0, B, 7, 0 }, { EP3, B, 3, 3 }, { EP3, B, 4, 4 }, +{ EP1, R, 5, 0 }, { EP2, G, 3, 0 }, { EP1, G, 4, 0 }, +{ EP3, B, 0, 0 }, { EP3, G, 3, 0 }, { EP1, B, 4, 0 }, +{ EP3, B, 1, 1 }, { EP2, B, 3, 0 }, { EP2, R, 5, 0 }, +{ EP3, R, 5, 0 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 22, Index 11 +{ +{ Mode, None, 4, 0, { 22, true, 2, 8, { 5, 6, 5 } } }, +{ EP0, R, 7, 0 }, { EP3, B, 0, 0 }, { EP2, B, 4, 4 }, +{ EP0, G, 7, 0 }, { EP2, G, 5, 5 }, { EP2, G, 4, 4 }, +{ EP0, B, 7, 0 }, { EP3, G, 5, 5 }, { EP3, B, 4, 4 }, +{ EP1, R, 4, 0 }, { EP3, G, 4, 4 }, { EP2, G, 3, 0 }, +{ EP1, G, 5, 0 }, { EP3, G, 3, 0 }, { EP1, B, 4, 0 }, +{ EP3, B, 1, 1 }, { EP2, B, 3, 0 }, { EP2, R, 4, 0 }, +{ EP3, B, 2, 2 }, { EP3, R, 4, 0 }, { EP3, B, 3, 3 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 26, Index 12 +{ +{ Mode, None, 4, 0, { 26, true, 2, 8, { 5, 5, 6 } } }, +{ EP0, R, 7, 0 }, { EP3, B, 1, 1 }, { EP2, B, 4, 4 }, +{ EP0, G, 7, 0 }, { EP2, B, 5, 5 }, { EP2, G, 4, 4 }, +{ EP0, B, 7, 0 }, { EP3, B, 5, 5 }, { EP3, B, 4, 4 }, +{ EP1, R, 4, 0 }, { EP3, G, 4, 4 }, { EP2, G, 3, 0 }, +{ EP1, G, 4, 0 }, { EP3, B, 0, 0 }, { EP3, G, 3, 0 }, +{ EP1, B, 5, 0 }, { EP2, B, 3, 0 }, { EP2, R, 4, 0 }, +{ EP3, B, 2, 2 }, { EP3, R, 4, 0 }, { EP3, B, 3, 3 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +}, +// Mode 30, Index 13 +{ +{ Mode, None, 4, 0, { 30, false, 2, 6, { 0, 0, 0 } } }, +{ EP0, R, 5, 0 }, { EP3, G, 4, 4 }, { EP3, B, 0, 0 }, +{ EP3, B, 1, 1 }, { EP2, B, 4, 4 }, { EP0, G, 5, 0 }, +{ EP2, G, 5, 5 }, { EP2, B, 5, 5 }, { EP3, B, 2, 2 }, +{ EP2, G, 4, 4 }, { EP0, B, 5, 0 }, { EP3, G, 5, 5 }, +{ EP3, B, 3, 3 }, { EP3, B, 5, 5 }, { EP3, B, 4, 4 }, +{ EP1, R, 5, 0 }, { EP2, G, 3, 0 }, { EP1, G, 5, 0 }, +{ EP3, G, 3, 0 }, { EP1, B, 5, 0 }, { EP2, B, 3, 0 }, +{ EP2, R, 5, 0 }, { EP3, R, 5, 0 }, +{ Partition, None, 4, 0 }, +{ End, None, 0, 0}, +} +// @fmt:on + }; + + struct Block { + uint64_t low64; + uint64_t high64; + + void decode(uint8_t *dst, size_t dstX, size_t dstY, size_t dstWidth, size_t dstHeight, size_t dstPitch, size_t dstBpp, bool isSigned) const { + uint8_t mode = 0; + Data data(low64, high64); + assert(dstBpp == sizeof(Color)); + + if ((data.low64 & 0x2) == 0) { + mode = data.consumeBits(1, 0); + } else { + mode = data.consumeBits(4, 0); + } + + int blockIndex = modeToIndex(mode); + // Handle illegal or reserved mode + if (blockIndex == -1) { + for (int y = 0; y < 4 && y + dstY < dstHeight; y++) { + for (int x = 0; x < 4 && x + dstX < dstWidth; x++) { + auto out = reinterpret_cast(dst + sizeof(Color) * x + dstPitch * y); + out->rgba = {0, 0, 0}; + } + } + return; + } + const BlockDesc *blockDesc = blockDescs[blockIndex]; + + RGBf e[4]; + e[0].isSigned = e[1].isSigned = e[2].isSigned = e[3].isSigned = isSigned; + + int partition = 0; + ModeDesc modeDesc; + for (int index = 0; blockDesc[index].type != End; index++) { + const BlockDesc desc = blockDesc[index]; + + switch (desc.type) { + case Mode: + modeDesc = desc.modeDesc; + assert(modeDesc.number == mode); + + e[0].size[0] = e[0].size[1] = e[0].size[2] = modeDesc.endpointBits; + for (int i = 0; i < RGBfChannels; i++) { + if (modeDesc.hasDelta) { + e[1].size[i] = e[2].size[i] = e[3].size[i] = modeDesc.deltaBits.channel[i]; + } else { + e[1].size[i] = e[2].size[i] = e[3].size[i] = modeDesc.endpointBits; + } + } + break; + case Partition: + partition |= data.consumeBits(desc.MSB, desc.LSB); + break; + case EP0: + case EP1: + case EP2: + case EP3: + e[desc.type].channel[desc.channel] |= data.consumeBits(desc.MSB, desc.LSB); + break; + default: + assert(false); + return; + } + } + + // Sign extension + if (isSigned) { + for (int ep = 0; ep < modeDesc.partitionCount * 2; ep++) { + e[ep].extendSign(); + } + } else if (modeDesc.hasDelta) { + // Don't sign-extend the base endpoint in an unsigned format. + for (int ep = 1; ep < modeDesc.partitionCount * 2; ep++) { + e[ep].extendSign(); + } + } + + // Turn the deltas into endpoints + if (modeDesc.hasDelta) { + for (int ep = 1; ep < modeDesc.partitionCount * 2; ep++) { + e[ep].resolveDelta(e[0]); + } + } + + for (int ep = 0; ep < modeDesc.partitionCount * 2; ep++) { + e[ep].unquantize(); + } + + // Get the indices, calculate final colors, and output + for (int y = 0; y < 4; y++) { + for (int x = 0; x < 4; x++) { + int pixelNum = x + y * 4; + IndexInfo idx; + bool isAnchor = false; + int firstEndpoint = 0; + // Bc6H can have either 1 or 2 petitions depending on the mode. + // The number of petitions affects the number of indices with implicit + // leading 0 bits and the number of bits per index. + if (modeDesc.partitionCount == 1) { + idx.numBits = 4; + // There's an implicit leading 0 bit for the first idx + isAnchor = (pixelNum == 0); + } else { + idx.numBits = 3; + // There are 2 indices with implicit leading 0-bits. + isAnchor = ((pixelNum == 0) || (pixelNum == AnchorTable2[partition])); + firstEndpoint = PartitionTable2[partition][pixelNum] * 2; + } + + idx.value = data.consumeBits(idx.numBits - isAnchor - 1, 0); + + // Don't exit the loop early, we need to consume these index bits regardless if + // we actually output them or not. + if ((y + dstY >= dstHeight) || (x + dstX >= dstWidth)) { + continue; + } + + Color color = interpolate(e[firstEndpoint], e[firstEndpoint + 1], idx, isSigned); + auto out = reinterpret_cast(dst + dstBpp * x + dstPitch * y); + *out = color; + } + } + } + }; + + } // namespace BC6H + + namespace BC7 { +// https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_texture_compression_bptc.txt +// https://docs.microsoft.com/en-us/windows/win32/direct3d11/bc7-format + + struct Bitfield { + int offset; + int count; + + constexpr Bitfield Then(const int bits) { return {offset + count, bits}; } + + constexpr bool operator==(const Bitfield &rhs) { + return offset == rhs.offset && count == rhs.count; + } + }; + + struct Mode { + const int IDX; // Mode index + const int NS; // Number of subsets in each partition + const int PB; // Partition bits + const int RB; // Rotation bits + const int ISB; // Index selection bits + const int CB; // Color bits + const int AB; // Alpha bits + const int EPB; // Endpoint P-bits + const int SPB; // Shared P-bits + const int IB; // Primary index bits per element + const int IBC; // Primary index bits total + const int IB2; // Secondary index bits per element + + constexpr int NumColors() const { return NS * 2; } + + constexpr Bitfield Partition() const { return {IDX + 1, PB}; } + + constexpr Bitfield Rotation() const { return Partition().Then(RB); } + + constexpr Bitfield IndexSelection() const { return Rotation().Then(ISB); } + + constexpr Bitfield Red(int idx) const { + return IndexSelection().Then(CB * idx).Then(CB); + } + + constexpr Bitfield Green(int idx) const { + return Red(NumColors() - 1).Then(CB * idx).Then(CB); + } + + constexpr Bitfield Blue(int idx) const { + return Green(NumColors() - 1).Then(CB * idx).Then(CB); + } + + constexpr Bitfield Alpha(int idx) const { + return Blue(NumColors() - 1).Then(AB * idx).Then(AB); + } + + constexpr Bitfield EndpointPBit(int idx) const { + return Alpha(NumColors() - 1).Then(EPB * idx).Then(EPB); + } + + constexpr Bitfield SharedPBit0() const { + return EndpointPBit(NumColors() - 1).Then(SPB); + } + + constexpr Bitfield SharedPBit1() const { + return SharedPBit0().Then(SPB); + } + + constexpr Bitfield PrimaryIndex(int offset, int count) const { + return SharedPBit1().Then(offset).Then(count); + } + + constexpr Bitfield SecondaryIndex(int offset, int count) const { + return SharedPBit1().Then(IBC + offset).Then(count); + } + }; + + static constexpr Mode Modes[] = { + // IDX NS PB RB ISB CB AB EPB SPB IB IBC, IB2 + /**/ {0x0, 0x3, 0x4, 0x0, 0x0, 0x4, 0x0, 0x1, 0x0, 0x3, 0x2d, 0x0}, +/**/ {0x1, 0x2, 0x6, 0x0, 0x0, 0x6, 0x0, 0x0, 0x1, 0x3, 0x2e, 0x0}, +/**/ {0x2, 0x3, 0x6, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x2, 0x1d, 0x0}, +/**/ {0x3, 0x2, 0x6, 0x0, 0x0, 0x7, 0x0, 0x1, 0x0, 0x2, 0x1e, 0x0}, +/**/ {0x4, 0x1, 0x0, 0x2, 0x1, 0x5, 0x6, 0x0, 0x0, 0x2, 0x1f, 0x3}, +/**/ {0x5, 0x1, 0x0, 0x2, 0x0, 0x7, 0x8, 0x0, 0x0, 0x2, 0x1f, 0x2}, +/**/ {0x6, 0x1, 0x0, 0x0, 0x0, 0x7, 0x7, 0x1, 0x0, 0x4, 0x3f, 0x0}, +/**/ {0x7, 0x2, 0x6, 0x0, 0x0, 0x5, 0x5, 0x1, 0x0, 0x2, 0x1e, 0x0}, +/**/ {-1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x0}, + }; + + static constexpr int MaxPartitions = 64; + static constexpr int MaxSubsets = 3; + + static constexpr uint8_t PartitionTable2[MaxPartitions][16] = { + {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1}, + {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1}, + {0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1}, + {0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1}, + {0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1}, + {0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1}, + {0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}, + {0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1}, + {0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0}, + {0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0}, + {0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1}, + {0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0}, + {0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0}, + {0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0}, + {0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0}, + {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}, + {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1}, + {0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0}, + {0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0}, + {0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0}, + {0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1}, + {0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1}, + {0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0}, + {0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0}, + {0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0}, + {0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1}, + {0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1}, + {0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0}, + {0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1}, + {0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1}, + {0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0}, + {0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1}, + {0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1}, + {0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1}, + {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1}, + {0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0}, + {0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1}, + }; + + static constexpr uint8_t PartitionTable3[MaxPartitions][16] = { + {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 1, 2, 2, 2, 2}, + {0, 0, 0, 1, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1}, + {0, 0, 0, 0, 2, 0, 0, 1, 2, 2, 1, 1, 2, 2, 1, 1}, + {0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 1, 1, 0, 1, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2}, + {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 2, 2}, + {0, 0, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2}, + {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2}, + {0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2}, + {0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}, + {0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 2, 2}, + {0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2}, + {0, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 0, 2, 2, 2, 0}, + {0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 2}, + {0, 1, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 0}, + {0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2}, + {0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1}, + {0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2, 0, 2, 2, 2}, + {0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 1, 2, 2, 2, 1}, + {0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 2, 0, 1, 2, 2}, + {0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 1, 0, 2, 2, 1, 0}, + {0, 1, 2, 2, 0, 1, 2, 2, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 1, 2, 0, 0, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2}, + {0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 2, 1, 0, 1, 1, 0}, + {0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 2, 1}, + {0, 0, 2, 2, 1, 1, 0, 2, 1, 1, 0, 2, 0, 0, 2, 2}, + {0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 2, 2, 2, 2}, + {0, 0, 1, 1, 0, 1, 2, 2, 0, 1, 2, 2, 0, 0, 1, 1}, + {0, 0, 0, 0, 2, 0, 0, 0, 2, 2, 1, 1, 2, 2, 2, 1}, + {0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 2, 2, 2}, + {0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 1, 2, 0, 0, 1, 1}, + {0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 2, 2, 0, 2, 2, 2}, + {0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0}, + {0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0}, + {0, 1, 2, 0, 2, 0, 1, 2, 1, 2, 0, 1, 0, 1, 2, 0}, + {0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 1}, + {0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 0, 1, 1}, + {0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1}, + {0, 0, 2, 2, 1, 1, 2, 2, 0, 0, 2, 2, 1, 1, 2, 2}, + {0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1}, + {0, 2, 2, 0, 1, 2, 2, 1, 0, 2, 2, 0, 1, 2, 2, 1}, + {0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 1}, + {0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1}, + {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 2, 2}, + {0, 2, 2, 2, 0, 1, 1, 1, 0, 2, 2, 2, 0, 1, 1, 1}, + {0, 0, 0, 2, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 2}, + {0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2}, + {0, 2, 2, 2, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2}, + {0, 0, 0, 2, 1, 1, 1, 2, 1, 1, 1, 2, 0, 0, 0, 2}, + {0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 2, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 2, 1, 1, 2}, + {0, 1, 1, 0, 0, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2}, + {0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 2}, + {0, 0, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 0, 0, 2, 2}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2}, + {0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1}, + {0, 2, 2, 2, 1, 2, 2, 2, 0, 2, 2, 2, 1, 2, 2, 2}, + {0, 1, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {0, 1, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 2, 2, 2, 0}, + }; + + static constexpr uint8_t AnchorTable2[MaxPartitions] = { +// @fmt:off +0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, +0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, +0xf, 0x2, 0x8, 0x2, 0x2, 0x8, 0x8, 0xf, +0x2, 0x8, 0x2, 0x2, 0x8, 0x8, 0x2, 0x2, +0xf, 0xf, 0x6, 0x8, 0x2, 0x8, 0xf, 0xf, +0x2, 0x8, 0x2, 0x2, 0x2, 0xf, 0xf, 0x6, +0x6, 0x2, 0x6, 0x8, 0xf, 0xf, 0x2, 0x2, +0xf, 0xf, 0xf, 0xf, 0xf, 0x2, 0x2, 0xf, +// @fmt:on + }; + + static constexpr uint8_t AnchorTable3a[MaxPartitions] = { +// @fmt:off +0x3, 0x3, 0xf, 0xf, 0x8, 0x3, 0xf, 0xf, +0x8, 0x8, 0x6, 0x6, 0x6, 0x5, 0x3, 0x3, +0x3, 0x3, 0x8, 0xf, 0x3, 0x3, 0x6, 0xa, +0x5, 0x8, 0x8, 0x6, 0x8, 0x5, 0xf, 0xf, +0x8, 0xf, 0x3, 0x5, 0x6, 0xa, 0x8, 0xf, +0xf, 0x3, 0xf, 0x5, 0xf, 0xf, 0xf, 0xf, +0x3, 0xf, 0x5, 0x5, 0x5, 0x8, 0x5, 0xa, +0x5, 0xa, 0x8, 0xd, 0xf, 0xc, 0x3, 0x3, +// @fmt:on + }; + + static constexpr uint8_t AnchorTable3b[MaxPartitions] = { +// @fmt:off +0xf, 0x8, 0x8, 0x3, 0xf, 0xf, 0x3, 0x8, +0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0x8, +0xf, 0x8, 0xf, 0x3, 0xf, 0x8, 0xf, 0x8, +0x3, 0xf, 0x6, 0xa, 0xf, 0xf, 0xa, 0x8, +0xf, 0x3, 0xf, 0xa, 0xa, 0x8, 0x9, 0xa, +0x6, 0xf, 0x8, 0xf, 0x3, 0x6, 0x6, 0x8, +0xf, 0x3, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, +0xf, 0xf, 0xf, 0xf, 0x3, 0xf, 0xf, 0x8, +// @fmt:on + }; + + struct Color { + struct RGB { + RGB() = default; + + RGB(uint8_t r, uint8_t g, uint8_t b) + : b(b), g(g), r(r) {} + + RGB(int r, int g, int b) + : b(static_cast(b)), g(static_cast(g)), r(static_cast(r)) {} + + RGB operator<<(int shift) const { return {r << shift, g << shift, b << shift}; } + + RGB operator>>(int shift) const { return {r >> shift, g >> shift, b >> shift}; } + + RGB operator|(int bits) const { return {r | bits, g | bits, b | bits}; } + + RGB operator|(const RGB &rhs) const { return {r | rhs.r, g | rhs.g, b | rhs.b}; } + + RGB operator+(const RGB &rhs) const { return {r + rhs.r, g + rhs.g, b + rhs.b}; } + + uint8_t b; + uint8_t g; + uint8_t r; + }; + + RGB rgb; + uint8_t a; + }; + + static_assert(sizeof(Color) == 4, "Color size must be 4 bytes"); + + struct Block { + constexpr uint64_t Get(const Bitfield &bf) const { + uint64_t mask = (1ULL << bf.count) - 1; + if (bf.offset + bf.count <= 64) { + return (low >> bf.offset) & mask; + } + if (bf.offset >= 64) { + return (high >> (bf.offset - 64)) & mask; + } + return ((low >> bf.offset) | (high << (64 - bf.offset))) & mask; + } + + const Mode &mode() const { + if ((low & 0b00000001) != 0) { + return Modes[0]; + } + if ((low & 0b00000010) != 0) { + return Modes[1]; + } + if ((low & 0b00000100) != 0) { + return Modes[2]; + } + if ((low & 0b00001000) != 0) { + return Modes[3]; + } + if ((low & 0b00010000) != 0) { + return Modes[4]; + } + if ((low & 0b00100000) != 0) { + return Modes[5]; + } + if ((low & 0b01000000) != 0) { + return Modes[6]; + } + if ((low & 0b10000000) != 0) { + return Modes[7]; + } + return Modes[8]; // Invalid mode + } + + struct IndexInfo { + uint64_t value; + int numBits; + }; + + uint8_t interpolate(uint8_t e0, uint8_t e1, const IndexInfo &index) const { + static constexpr uint16_t weights2[] = {0, 21, 43, 64}; + static constexpr uint16_t weights3[] = {0, 9, 18, 27, 37, 46, 55, 64}; + static constexpr uint16_t weights4[] = {0, 4, 9, 13, 17, 21, 26, 30, + 34, 38, 43, 47, 51, 55, 60, 64}; + static constexpr uint16_t const *weightsN[] = { + nullptr, nullptr, weights2, weights3, weights4 + }; + auto weights = weightsN[index.numBits]; + assert(weights != nullptr); + return (uint8_t) (((64 - weights[index.value]) * uint16_t(e0) + weights[index.value] * uint16_t(e1) + 32) >> 6); + } + + void decode(uint8_t *dst, size_t dstX, size_t dstY, size_t dstWidth, size_t dstHeight, size_t dstPitch) const { + auto const &mode = this->mode(); + + if (mode.IDX < 0) // Invalid mode: + { + for (size_t y = 0; y < 4 && y + dstY < dstHeight; y++) { + for (size_t x = 0; x < 4 && x + dstX < dstWidth; x++) { + auto out = reinterpret_cast(dst + sizeof(Color) * x + dstPitch * y); + out->rgb = {0, 0, 0}; + out->a = 0; + } + } + return; + } + + using Endpoint = std::array; + std::array subsets; + + for (size_t i = 0; i < mode.NS; i++) { + auto &subset = subsets[i]; + subset[0].rgb.r = Get(mode.Red(i * 2 + 0)); + subset[0].rgb.g = Get(mode.Green(i * 2 + 0)); + subset[0].rgb.b = Get(mode.Blue(i * 2 + 0)); + subset[0].a = (mode.AB > 0) ? Get(mode.Alpha(i * 2 + 0)) : 255; + + subset[1].rgb.r = Get(mode.Red(i * 2 + 1)); + subset[1].rgb.g = Get(mode.Green(i * 2 + 1)); + subset[1].rgb.b = Get(mode.Blue(i * 2 + 1)); + subset[1].a = (mode.AB > 0) ? Get(mode.Alpha(i * 2 + 1)) : 255; + } + + if (mode.SPB > 0) { + auto pbit0 = Get(mode.SharedPBit0()); + auto pbit1 = Get(mode.SharedPBit1()); + subsets[0][0].rgb = (subsets[0][0].rgb << 1) | pbit0; + subsets[0][1].rgb = (subsets[0][1].rgb << 1) | pbit0; + subsets[1][0].rgb = (subsets[1][0].rgb << 1) | pbit1; + subsets[1][1].rgb = (subsets[1][1].rgb << 1) | pbit1; + } + + if (mode.EPB > 0) { + for (size_t i = 0; i < mode.NS; i++) { + auto &subset = subsets[i]; + auto pbit0 = Get(mode.EndpointPBit(i * 2 + 0)); + auto pbit1 = Get(mode.EndpointPBit(i * 2 + 1)); + subset[0].rgb = (subset[0].rgb << 1) | pbit0; + subset[1].rgb = (subset[1].rgb << 1) | pbit1; + if (mode.AB > 0) { + subset[0].a = (subset[0].a << 1) | pbit0; + subset[1].a = (subset[1].a << 1) | pbit1; + } + } + } + + auto const colorBits = mode.CB + mode.SPB + mode.EPB; + auto const alphaBits = mode.AB + mode.SPB + mode.EPB; + + for (size_t i = 0; i < mode.NS; i++) { + auto &subset = subsets[i]; + subset[0].rgb = subset[0].rgb << (8 - colorBits); + subset[1].rgb = subset[1].rgb << (8 - colorBits); + subset[0].rgb = subset[0].rgb | (subset[0].rgb >> colorBits); + subset[1].rgb = subset[1].rgb | (subset[1].rgb >> colorBits); + + if (mode.AB > 0) { + subset[0].a = subset[0].a << (8 - alphaBits); + subset[1].a = subset[1].a << (8 - alphaBits); + subset[0].a = subset[0].a | (subset[0].a >> alphaBits); + subset[1].a = subset[1].a | (subset[1].a >> alphaBits); + } + } + + int colorIndexBitOffset = 0; + int alphaIndexBitOffset = 0; + for (int y = 0; y < 4; y++) { + for (int x = 0; x < 4; x++) { + auto texelIdx = y * 4 + x; + auto partitionIdx = Get(mode.Partition()); + assert(partitionIdx < MaxPartitions); + auto subsetIdx = subsetIndex(mode, partitionIdx, texelIdx); + assert(subsetIdx < MaxSubsets); + auto const &subset = subsets[subsetIdx]; + + auto anchorIdx = anchorIndex(mode, partitionIdx, subsetIdx); + auto isAnchor = anchorIdx == texelIdx; + auto colorIdx = colorIndex(mode, isAnchor, colorIndexBitOffset); + auto alphaIdx = alphaIndex(mode, isAnchor, alphaIndexBitOffset); + + if (y + dstY >= dstHeight || x + dstX >= dstWidth) { + // Don't be tempted to skip early at the loops: + // The calls to colorIndex() and alphaIndex() adjust bit + // offsets that need to be carefully tracked. + continue; + } + + Color output; + // Note: We flip r and b channels past this point as the texture storage is BGR while the output is RGB + output.rgb.r = interpolate(subset[0].rgb.b, subset[1].rgb.b, colorIdx); + output.rgb.g = interpolate(subset[0].rgb.g, subset[1].rgb.g, colorIdx); + output.rgb.b = interpolate(subset[0].rgb.r, subset[1].rgb.r, colorIdx); + output.a = interpolate(subset[0].a, subset[1].a, alphaIdx); + + switch (Get(mode.Rotation())) { + default: + break; + case 1: + std::swap(output.a, output.rgb.b); + break; + case 2: + std::swap(output.a, output.rgb.g); + break; + case 3: + std::swap(output.a, output.rgb.r); + break; + } + + auto out = reinterpret_cast(dst + sizeof(Color) * x + dstPitch * y); + *out = output; + } + } + } + + int subsetIndex(const Mode &mode, int partitionIdx, int texelIndex) const { + switch (mode.NS) { + default: + return 0; + case 2: + return PartitionTable2[partitionIdx][texelIndex]; + case 3: + return PartitionTable3[partitionIdx][texelIndex]; + } + } + + int anchorIndex(const Mode &mode, int partitionIdx, int subsetIdx) const { + // ARB_texture_compression_bptc states: + // "In partition zero, the anchor index is always index zero. + // In other partitions, the anchor index is specified by tables + // Table.A2 and Table.A3."" + // Note: This is really confusing - I believe they meant subset instead + // of partition here. + switch (subsetIdx) { + default: + return 0; + case 1: + return mode.NS == 2 ? AnchorTable2[partitionIdx] : AnchorTable3a[partitionIdx]; + case 2: + return AnchorTable3b[partitionIdx]; + } + } + + IndexInfo colorIndex(const Mode &mode, bool isAnchor, + int &indexBitOffset) const { + // ARB_texture_compression_bptc states: + // "The index value for interpolating color comes from the secondary + // index for the texel if the format has an index selection bit and its + // value is one and from the primary index otherwise."" + auto idx = Get(mode.IndexSelection()); + assert(idx <= 1); + bool secondary = idx == 1; + auto numBits = secondary ? mode.IB2 : mode.IB; + auto numReadBits = numBits - (isAnchor ? 1 : 0); + auto index = + Get(secondary ? mode.SecondaryIndex(indexBitOffset, numReadBits) + : mode.PrimaryIndex(indexBitOffset, numReadBits)); + indexBitOffset += numReadBits; + return {index, numBits}; + } + + IndexInfo alphaIndex(const Mode &mode, bool isAnchor, + int &indexBitOffset) const { + // ARB_texture_compression_bptc states: + // "The alpha index comes from the secondary index if the block has a + // secondary index and the block either doesn't have an index selection + // bit or that bit is zero and the primary index otherwise." + auto idx = Get(mode.IndexSelection()); + assert(idx <= 1); + bool secondary = (mode.IB2 != 0) && (idx == 0); + auto numBits = secondary ? mode.IB2 : mode.IB; + auto numReadBits = numBits - (isAnchor ? 1 : 0); + auto index = + Get(secondary ? mode.SecondaryIndex(indexBitOffset, numReadBits) + : mode.PrimaryIndex(indexBitOffset, numReadBits)); + indexBitOffset += numReadBits; + return {index, numBits}; + } + + // Assumes little-endian + uint64_t low; + uint64_t high; + }; + + } // namespace BC7 +} // anonymous namespace + +namespace bcn { + constexpr size_t R8Bpp{1}; //!< The amount of bytes per pixel in R8 + constexpr size_t R8g8Bpp{2}; //!< The amount of bytes per pixel in R8G8 + constexpr size_t R8g8b8a8Bpp{4}; //!< The amount of bytes per pixel in R8G8B8A8 + constexpr size_t R16g16b16a16Bpp{8}; //!< The amount of bytes per pixel in R16G16B16 + + void DecodeBc1(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height) { + const auto *color{reinterpret_cast(src)}; + size_t pitch{R8g8b8a8Bpp * width}; + color->decode(dst, x, y, width, height, pitch, R8g8b8a8Bpp, true, false); + } + + void DecodeBc2(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height) { + const auto *alpha{reinterpret_cast(src)}; + const auto *color{reinterpret_cast(src + 8)}; + size_t pitch{R8g8b8a8Bpp * width}; + color->decode(dst, x, y, width, height, pitch, R8g8b8a8Bpp, false, true); + alpha->decode(dst, x, y, width, height, pitch, R8g8b8a8Bpp); + } + + void DecodeBc3(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height) { + const auto *alpha{reinterpret_cast(src)}; + const auto *color{reinterpret_cast(src + 8)}; + size_t pitch{R8g8b8a8Bpp * width}; + color->decode(dst, x, y, width, height, pitch, R8g8b8a8Bpp, false, true); + alpha->decode(dst, x, y, width, height, pitch, R8g8b8a8Bpp, 3, false); + } + + void DecodeBc4(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned) { + const auto *red{reinterpret_cast(src)}; + size_t pitch{R8Bpp * width}; + red->decode(dst, x, y, width, height, pitch, R8Bpp, 0, isSigned); + } + + void DecodeBc5(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned) { + const auto *red{reinterpret_cast(src)}; + const auto *green{reinterpret_cast(src + 8)}; + size_t pitch{R8g8Bpp * width}; + red->decode(dst, x, y, width, height, pitch, R8g8Bpp, 0, isSigned); + green->decode(dst, x, y, width, height, pitch, R8g8Bpp, 1, isSigned); + } + + void DecodeBc6(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned) { + const auto *block{reinterpret_cast(src)}; + size_t pitch{R16g16b16a16Bpp * width}; + block->decode(dst, x, y, width, height, pitch, R16g16b16a16Bpp, isSigned); + } + + void DecodeBc7(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height) { + const auto *block{reinterpret_cast(src)}; + size_t pitch{R8g8b8a8Bpp * width}; + block->decode(dst, x, y, width, height, pitch); + } +} diff --git a/externals/bc_decoder/bc_decoder.h b/externals/bc_decoder/bc_decoder.h new file mode 100644 index 000000000..4f0ead7d3 --- /dev/null +++ b/externals/bc_decoder/bc_decoder.h @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/) + +#pragma once + +#include + +namespace bcn { + /** + * @brief Decodes a BC1 encoded image to R8G8B8A8 + */ + void DecodeBc1(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height); + + /** + * @brief Decodes a BC2 encoded image to R8G8B8A8 + */ + void DecodeBc2(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height); + + /** + * @brief Decodes a BC3 encoded image to R8G8B8A8 + */ + void DecodeBc3(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height); + + /** + * @brief Decodes a BC4 encoded image to R8 + */ + void DecodeBc4(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned); + + /** + * @brief Decodes a BC5 encoded image to R8G8 + */ + void DecodeBc5(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned); + + /** + * @brief Decodes a BC6 encoded image to R16G16B16A16 + */ + void DecodeBc6(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height, bool isSigned); + + /** + * @brief Decodes a BC7 encoded image to R8G8B8A8 + */ + void DecodeBc7(const uint8_t *src, uint8_t *dst, size_t x, size_t y, size_t width, size_t height); +} diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index e9e6f278d..3b2fe01da 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -220,8 +220,8 @@ add_library(video_core STATIC surface.h texture_cache/accelerated_swizzle.cpp texture_cache/accelerated_swizzle.h - texture_cache/decode_bc4.cpp - texture_cache/decode_bc4.h + texture_cache/decode_bc.cpp + texture_cache/decode_bc.h texture_cache/descriptor_table.h texture_cache/formatter.cpp texture_cache/formatter.h @@ -279,7 +279,7 @@ add_library(video_core STATIC create_target_directory_groups(video_core) target_link_libraries(video_core PUBLIC common core) -target_link_libraries(video_core PUBLIC glad shader_recompiler stb) +target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder) if (YUZU_USE_BUNDLED_FFMPEG AND NOT (WIN32 OR ANDROID)) add_dependencies(video_core ffmpeg-build) diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 9a0b10568..a8540339d 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp @@ -259,6 +259,26 @@ FormatInfo SurfaceFormat(const Device& device, FormatType format_type, bool with break; } } + // Transcode on hardware that doesn't support BCn natively + if (!device.IsOptimalBcnSupported() && VideoCore::Surface::IsPixelFormatBCn(pixel_format)) { + const bool is_srgb = with_srgb && VideoCore::Surface::IsPixelFormatSRGB(pixel_format); + if (pixel_format == PixelFormat::BC4_SNORM) { + tuple.format = VK_FORMAT_R8_SNORM; + } else if (pixel_format == PixelFormat::BC4_UNORM) { + tuple.format = VK_FORMAT_R8_UNORM; + } else if (pixel_format == PixelFormat::BC5_SNORM) { + tuple.format = VK_FORMAT_R8G8_SNORM; + } else if (pixel_format == PixelFormat::BC5_UNORM) { + tuple.format = VK_FORMAT_R8G8_UNORM; + } else if (pixel_format == PixelFormat::BC6H_SFLOAT || + pixel_format == PixelFormat::BC6H_UFLOAT) { + tuple.format = VK_FORMAT_R16G16B16A16_SFLOAT; + } else if (is_srgb) { + tuple.format = VK_FORMAT_A8B8G8R8_SRGB_PACK32; + } else { + tuple.format = VK_FORMAT_A8B8G8R8_UNORM_PACK32; + } + } const bool attachable = (tuple.usage & Attachable) != 0; const bool storage = (tuple.usage & Storage) != 0; diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 268b955fb..f7c0d939a 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -315,7 +315,14 @@ void RasterizerVulkan::Clear(u32 layer_count) { FlushWork(); gpu_memory->FlushCaching(); +#if ANDROID + if (Settings::IsGPULevelHigh()) { + // This is problematic on Android, disable on GPU Normal. + query_cache.UpdateCounters(); + } +#else query_cache.UpdateCounters(); +#endif auto& regs = maxwell3d->regs; const bool use_color = regs.clear_surface.R || regs.clear_surface.G || regs.clear_surface.B || diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index ce6acc30c..8385b5509 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -1279,6 +1279,10 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu flags |= VideoCommon::ImageFlagBits::Converted; flags |= VideoCommon::ImageFlagBits::CostlyLoad; } + if (IsPixelFormatBCn(info.format) && !runtime->device.IsOptimalBcnSupported()) { + flags |= VideoCommon::ImageFlagBits::Converted; + flags |= VideoCommon::ImageFlagBits::CostlyLoad; + } if (runtime->device.HasDebuggingToolAttached()) { original_image.SetObjectNameEXT(VideoCommon::Name(*this).c_str()); } diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index cb51529e4..e16cd5e73 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp @@ -269,6 +269,28 @@ bool IsPixelFormatASTC(PixelFormat format) { } } +bool IsPixelFormatBCn(PixelFormat format) { + switch (format) { + case PixelFormat::BC1_RGBA_UNORM: + case PixelFormat::BC2_UNORM: + case PixelFormat::BC3_UNORM: + case PixelFormat::BC4_UNORM: + case PixelFormat::BC4_SNORM: + case PixelFormat::BC5_UNORM: + case PixelFormat::BC5_SNORM: + case PixelFormat::BC1_RGBA_SRGB: + case PixelFormat::BC2_SRGB: + case PixelFormat::BC3_SRGB: + case PixelFormat::BC7_UNORM: + case PixelFormat::BC6H_UFLOAT: + case PixelFormat::BC6H_SFLOAT: + case PixelFormat::BC7_SRGB: + return true; + default: + return false; + } +} + bool IsPixelFormatSRGB(PixelFormat format) { switch (format) { case PixelFormat::A8B8G8R8_SRGB: diff --git a/src/video_core/surface.h b/src/video_core/surface.h index 0225d3287..9b9c4d9bc 100644 --- a/src/video_core/surface.h +++ b/src/video_core/surface.h @@ -501,6 +501,8 @@ SurfaceType GetFormatType(PixelFormat pixel_format); bool IsPixelFormatASTC(PixelFormat format); +bool IsPixelFormatBCn(PixelFormat format); + bool IsPixelFormatSRGB(PixelFormat format); bool IsPixelFormatInteger(PixelFormat format); diff --git a/src/video_core/texture_cache/decode_bc.cpp b/src/video_core/texture_cache/decode_bc.cpp new file mode 100644 index 000000000..3e26474a3 --- /dev/null +++ b/src/video_core/texture_cache/decode_bc.cpp @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include +#include + +#include "common/common_types.h" +#include "video_core/texture_cache/decode_bc.h" + +namespace VideoCommon { + +namespace { +constexpr u32 BLOCK_SIZE = 4; + +using VideoCore::Surface::PixelFormat; + +constexpr bool IsSigned(PixelFormat pixel_format) { + switch (pixel_format) { + case PixelFormat::BC4_SNORM: + case PixelFormat::BC4_UNORM: + case PixelFormat::BC5_SNORM: + case PixelFormat::BC5_UNORM: + case PixelFormat::BC6H_SFLOAT: + case PixelFormat::BC6H_UFLOAT: + return true; + default: + return false; + } +} + +constexpr u32 BlockSize(PixelFormat pixel_format) { + switch (pixel_format) { + case PixelFormat::BC1_RGBA_SRGB: + case PixelFormat::BC1_RGBA_UNORM: + case PixelFormat::BC4_SNORM: + case PixelFormat::BC4_UNORM: + return 8; + default: + return 16; + } +} +} // Anonymous namespace + +u32 ConvertedBytesPerBlock(VideoCore::Surface::PixelFormat pixel_format) { + switch (pixel_format) { + case PixelFormat::BC4_SNORM: + case PixelFormat::BC4_UNORM: + return 1; + case PixelFormat::BC5_SNORM: + case PixelFormat::BC5_UNORM: + return 2; + case PixelFormat::BC6H_SFLOAT: + case PixelFormat::BC6H_UFLOAT: + return 8; + default: + return 4; + } +} + +template +void DecompressBlocks(std::span input, std::span output, Extent3D extent, + bool is_signed = false) { + const u32 out_bpp = ConvertedBytesPerBlock(pixel_format); + const u32 block_width = std::min(extent.width, BLOCK_SIZE); + const u32 block_height = std::min(extent.height, BLOCK_SIZE); + const u32 pitch = extent.width * out_bpp; + size_t input_offset = 0; + size_t output_offset = 0; + for (u32 slice = 0; slice < extent.depth; ++slice) { + for (u32 y = 0; y < extent.height; y += block_height) { + size_t row_offset = 0; + for (u32 x = 0; x < extent.width; + x += block_width, row_offset += block_width * out_bpp) { + const u8* src = input.data() + input_offset; + u8* const dst = output.data() + output_offset + row_offset; + if constexpr (IsSigned(pixel_format)) { + decompress(src, dst, x, y, extent.width, extent.height, is_signed); + } else { + decompress(src, dst, x, y, extent.width, extent.height); + } + input_offset += BlockSize(pixel_format); + } + output_offset += block_height * pitch; + } + } +} + +void DecompressBCn(std::span input, std::span output, Extent3D extent, + VideoCore::Surface::PixelFormat pixel_format) { + switch (pixel_format) { + case PixelFormat::BC1_RGBA_UNORM: + case PixelFormat::BC1_RGBA_SRGB: + DecompressBlocks(input, output, extent); + break; + case PixelFormat::BC2_UNORM: + case PixelFormat::BC2_SRGB: + DecompressBlocks(input, output, extent); + break; + case PixelFormat::BC3_UNORM: + case PixelFormat::BC3_SRGB: + DecompressBlocks(input, output, extent); + break; + case PixelFormat::BC4_SNORM: + case PixelFormat::BC4_UNORM: + DecompressBlocks( + input, output, extent, pixel_format == PixelFormat::BC4_SNORM); + break; + case PixelFormat::BC5_SNORM: + case PixelFormat::BC5_UNORM: + DecompressBlocks( + input, output, extent, pixel_format == PixelFormat::BC5_SNORM); + break; + case PixelFormat::BC6H_SFLOAT: + case PixelFormat::BC6H_UFLOAT: + DecompressBlocks( + input, output, extent, pixel_format == PixelFormat::BC6H_SFLOAT); + break; + case PixelFormat::BC7_SRGB: + case PixelFormat::BC7_UNORM: + DecompressBlocks(input, output, extent); + break; + default: + LOG_WARNING(HW_GPU, "Unimplemented BCn decompression {}", pixel_format); + } +} + +} // namespace VideoCommon diff --git a/src/video_core/texture_cache/decode_bc4.h b/src/video_core/texture_cache/decode_bc.h similarity index 50% rename from src/video_core/texture_cache/decode_bc4.h rename to src/video_core/texture_cache/decode_bc.h index ab2f735be..41d1ec0a3 100644 --- a/src/video_core/texture_cache/decode_bc4.h +++ b/src/video_core/texture_cache/decode_bc.h @@ -6,10 +6,14 @@ #include #include "common/common_types.h" +#include "video_core/surface.h" #include "video_core/texture_cache/types.h" namespace VideoCommon { -void DecompressBC4(std::span data, Extent3D extent, std::span output); +[[nodiscard]] u32 ConvertedBytesPerBlock(VideoCore::Surface::PixelFormat pixel_format); + +void DecompressBCn(std::span input, std::span output, Extent3D extent, + VideoCore::Surface::PixelFormat pixel_format); } // namespace VideoCommon diff --git a/src/video_core/texture_cache/decode_bc4.cpp b/src/video_core/texture_cache/decode_bc4.cpp deleted file mode 100644 index ef98afdca..000000000 --- a/src/video_core/texture_cache/decode_bc4.cpp +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include -#include -#include - -#include "common/assert.h" -#include "common/common_types.h" -#include "video_core/texture_cache/decode_bc4.h" -#include "video_core/texture_cache/types.h" - -namespace VideoCommon { - -// https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_texture_compression_rgtc.txt -[[nodiscard]] constexpr u32 DecompressBlock(u64 bits, u32 x, u32 y) { - const u32 code_offset = 16 + 3 * (4 * y + x); - const u32 code = (bits >> code_offset) & 7; - const u32 red0 = (bits >> 0) & 0xff; - const u32 red1 = (bits >> 8) & 0xff; - if (red0 > red1) { - switch (code) { - case 0: - return red0; - case 1: - return red1; - case 2: - return (6 * red0 + 1 * red1) / 7; - case 3: - return (5 * red0 + 2 * red1) / 7; - case 4: - return (4 * red0 + 3 * red1) / 7; - case 5: - return (3 * red0 + 4 * red1) / 7; - case 6: - return (2 * red0 + 5 * red1) / 7; - case 7: - return (1 * red0 + 6 * red1) / 7; - } - } else { - switch (code) { - case 0: - return red0; - case 1: - return red1; - case 2: - return (4 * red0 + 1 * red1) / 5; - case 3: - return (3 * red0 + 2 * red1) / 5; - case 4: - return (2 * red0 + 3 * red1) / 5; - case 5: - return (1 * red0 + 4 * red1) / 5; - case 6: - return 0; - case 7: - return 0xff; - } - } - return 0; -} - -void DecompressBC4(std::span input, Extent3D extent, std::span output) { - UNIMPLEMENTED_IF_MSG(extent.width % 4 != 0, "Unaligned width={}", extent.width); - UNIMPLEMENTED_IF_MSG(extent.height % 4 != 0, "Unaligned height={}", extent.height); - static constexpr u32 BLOCK_SIZE = 4; - size_t input_offset = 0; - for (u32 slice = 0; slice < extent.depth; ++slice) { - for (u32 block_y = 0; block_y < extent.height / 4; ++block_y) { - for (u32 block_x = 0; block_x < extent.width / 4; ++block_x) { - u64 bits; - std::memcpy(&bits, &input[input_offset], sizeof(bits)); - input_offset += sizeof(bits); - - for (u32 y = 0; y < BLOCK_SIZE; ++y) { - for (u32 x = 0; x < BLOCK_SIZE; ++x) { - const u32 linear_z = slice; - const u32 linear_y = block_y * BLOCK_SIZE + y; - const u32 linear_x = block_x * BLOCK_SIZE + x; - const u32 offset_z = linear_z * extent.width * extent.height; - const u32 offset_y = linear_y * extent.width; - const u32 offset_x = linear_x; - const u32 output_offset = (offset_z + offset_y + offset_x) * 4ULL; - const u32 color = DecompressBlock(bits, x, y); - output[output_offset + 0] = static_cast(color); - output[output_offset + 1] = 0; - output[output_offset + 2] = 0; - output[output_offset + 3] = 0xff; - } - } - } - } - } -} - -} // namespace VideoCommon diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index f781cb7a0..9a618a57a 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -24,7 +24,7 @@ #include "video_core/engines/maxwell_3d.h" #include "video_core/memory_manager.h" #include "video_core/surface.h" -#include "video_core/texture_cache/decode_bc4.h" +#include "video_core/texture_cache/decode_bc.h" #include "video_core/texture_cache/format_lookup_table.h" #include "video_core/texture_cache/formatter.h" #include "video_core/texture_cache/samples_helper.h" @@ -61,8 +61,6 @@ using VideoCore::Surface::PixelFormatFromDepthFormat; using VideoCore::Surface::PixelFormatFromRenderTargetFormat; using VideoCore::Surface::SurfaceType; -constexpr u32 CONVERTED_BYTES_PER_BLOCK = BytesPerBlock(PixelFormat::A8B8G8R8_UNORM); - struct LevelInfo { Extent3D size; Extent3D block; @@ -612,7 +610,8 @@ u32 CalculateConvertedSizeBytes(const ImageInfo& info) noexcept { } return output_size; } - return NumBlocksPerLayer(info, TILE_SIZE) * info.resources.layers * CONVERTED_BYTES_PER_BLOCK; + return NumBlocksPerLayer(info, TILE_SIZE) * info.resources.layers * + ConvertedBytesPerBlock(info.format); } u32 CalculateLayerStride(const ImageInfo& info) noexcept { @@ -945,7 +944,8 @@ void ConvertImage(std::span input, const ImageInfo& info, std::span input, const ImageInfo& info, std::span input, const ImageInfo& info, std::span(copy.buffer_size); } else { - DecompressBC4(input_offset, copy.image_extent, output.subspan(output_offset)); - + const Extent3D image_extent{ + .width = copy.image_extent.width, + .height = copy.image_extent.height * copy.image_subresource.num_layers, + .depth = copy.image_extent.depth, + }; + DecompressBCn(input_offset, output.subspan(output_offset), image_extent, info.format); output_offset += copy.image_extent.width * copy.image_extent.height * - copy.image_subresource.num_layers * CONVERTED_BYTES_PER_BLOCK; + copy.image_subresource.num_layers * + ConvertedBytesPerBlock(info.format); } } } diff --git a/src/video_core/textures/bcn.cpp b/src/video_core/textures/bcn.cpp index 671212a49..16ddbe320 100644 --- a/src/video_core/textures/bcn.cpp +++ b/src/video_core/textures/bcn.cpp @@ -3,7 +3,6 @@ #include #include - #include "common/alignment.h" #include "video_core/textures/bcn.h" #include "video_core/textures/workers.h" diff --git a/src/video_core/textures/bcn.h b/src/video_core/textures/bcn.h index 6464af885..d5d2a16c9 100644 --- a/src/video_core/textures/bcn.h +++ b/src/video_core/textures/bcn.h @@ -4,14 +4,13 @@ #pragma once #include -#include + +#include "common/common_types.h" namespace Tegra::Texture::BCN { -void CompressBC1(std::span data, uint32_t width, uint32_t height, uint32_t depth, - std::span output); +void CompressBC1(std::span data, u32 width, u32 height, u32 depth, std::span output); -void CompressBC3(std::span data, uint32_t width, uint32_t height, uint32_t depth, - std::span output); +void CompressBC3(std::span data, u32 width, u32 height, u32 depth, std::span output); } // namespace Tegra::Texture::BCN diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index e05d04db3..1f17265d5 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -293,6 +293,11 @@ public: return features.features.textureCompressionASTC_LDR; } + /// Returns true if BCn is natively supported. + bool IsOptimalBcnSupported() const { + return features.features.textureCompressionBC; + } + /// Returns true if descriptor aliasing is natively supported. bool IsDescriptorAliasingSupported() const { return GetDriverID() != VK_DRIVER_ID_QUALCOMM_PROPRIETARY; @@ -423,6 +428,11 @@ public: return extensions.sampler_filter_minmax; } + /// Returns true if the device supports VK_EXT_shader_stencil_export. + bool IsExtShaderStencilExportSupported() const { + return extensions.shader_stencil_export; + } + /// Returns true if the device supports VK_EXT_depth_range_unrestricted. bool IsExtDepthRangeUnrestrictedSupported() const { return extensions.depth_range_unrestricted; @@ -492,11 +502,6 @@ public: return extensions.vertex_input_dynamic_state; } - /// Returns true if the device supports VK_EXT_shader_stencil_export. - bool IsExtShaderStencilExportSupported() const { - return extensions.shader_stencil_export; - } - /// Returns true if the device supports VK_EXT_shader_demote_to_helper_invocation bool IsExtShaderDemoteToHelperInvocationSupported() const { return extensions.shader_demote_to_helper_invocation; From ddcc95833660c57647d3e99dad76ecfa3b86ee8d Mon Sep 17 00:00:00 2001 From: GPUCode Date: Thu, 15 Jun 2023 12:17:46 +0300 Subject: [PATCH 79/91] renderer_vulkan: Prevent crashes when blitting depth stencil --- src/video_core/renderer_vulkan/blit_image.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video_core/renderer_vulkan/blit_image.cpp b/src/video_core/renderer_vulkan/blit_image.cpp index cf2964a3f..28d4b15a0 100644 --- a/src/video_core/renderer_vulkan/blit_image.cpp +++ b/src/video_core/renderer_vulkan/blit_image.cpp @@ -495,6 +495,9 @@ void BlitImageHelper::BlitDepthStencil(const Framebuffer* dst_framebuffer, const Region2D& dst_region, const Region2D& src_region, Tegra::Engines::Fermi2D::Filter filter, Tegra::Engines::Fermi2D::Operation operation) { + if (!device.IsExtShaderStencilExportSupported()) { + return; + } ASSERT(filter == Tegra::Engines::Fermi2D::Filter::Point); ASSERT(operation == Tegra::Engines::Fermi2D::Operation::SrcCopy); const BlitImagePipelineKey key{ From 4303ed614d0d758d9e9bcdef8afee3274769d2fb Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 28 Jun 2023 01:07:10 -0400 Subject: [PATCH 80/91] x64: Add detection of monitorx instructions monitorx introduces 2 instructions: MONITORX and MWAITX. --- src/common/telemetry.cpp | 1 + src/common/x64/cpu_detect.cpp | 1 + src/common/x64/cpu_detect.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/common/telemetry.cpp b/src/common/telemetry.cpp index 91352912d..929ed67e4 100644 --- a/src/common/telemetry.cpp +++ b/src/common/telemetry.cpp @@ -93,6 +93,7 @@ void AppendCPUInfo(FieldCollection& fc) { add_field("CPU_Extension_x64_GFNI", caps.gfni); add_field("CPU_Extension_x64_INVARIANT_TSC", caps.invariant_tsc); add_field("CPU_Extension_x64_LZCNT", caps.lzcnt); + add_field("CPU_Extension_x64_MONITORX", caps.monitorx); add_field("CPU_Extension_x64_MOVBE", caps.movbe); add_field("CPU_Extension_x64_PCLMULQDQ", caps.pclmulqdq); add_field("CPU_Extension_x64_POPCNT", caps.popcnt); diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index c998b1197..780120a5b 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -168,6 +168,7 @@ static CPUCaps Detect() { __cpuid(cpu_id, 0x80000001); caps.lzcnt = Common::Bit<5>(cpu_id[2]); caps.fma4 = Common::Bit<16>(cpu_id[2]); + caps.monitorx = Common::Bit<29>(cpu_id[2]); } if (max_ex_fn >= 0x80000007) { diff --git a/src/common/x64/cpu_detect.h b/src/common/x64/cpu_detect.h index 8253944d6..756459417 100644 --- a/src/common/x64/cpu_detect.h +++ b/src/common/x64/cpu_detect.h @@ -63,6 +63,7 @@ struct CPUCaps { bool gfni : 1; bool invariant_tsc : 1; bool lzcnt : 1; + bool monitorx : 1; bool movbe : 1; bool pclmulqdq : 1; bool popcnt : 1; From 3d868baaa44152e7a4bd8c64905443fd9a08adce Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 28 Jun 2023 01:07:59 -0400 Subject: [PATCH 81/91] x64: cpu_wait: Make use of MWAITX in MicroSleep MWAITX is equivalent to UMWAIT on Intel's Alder Lake CPUs. We can emulate TPAUSE by using MONITORX in conjunction with MWAITX to wait for 100K cycles. --- src/common/x64/cpu_wait.cpp | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/common/x64/cpu_wait.cpp b/src/common/x64/cpu_wait.cpp index c53dd4945..11b9c4d83 100644 --- a/src/common/x64/cpu_wait.cpp +++ b/src/common/x64/cpu_wait.cpp @@ -13,24 +13,30 @@ namespace Common::X64 { +namespace { + +// 100,000 cycles is a reasonable amount of time to wait to save on CPU resources. +// For reference: +// At 1 GHz, 100K cycles is 100us +// At 2 GHz, 100K cycles is 50us +// At 4 GHz, 100K cycles is 25us +constexpr auto PauseCycles = 100'000U; + +} // Anonymous namespace + #ifdef _MSC_VER __forceinline static void TPAUSE() { - // 100,000 cycles is a reasonable amount of time to wait to save on CPU resources. - // For reference: - // At 1 GHz, 100K cycles is 100us - // At 2 GHz, 100K cycles is 50us - // At 4 GHz, 100K cycles is 25us - static constexpr auto PauseCycles = 100'000; _tpause(0, FencedRDTSC() + PauseCycles); } + +__forceinline static void MWAITX() { + // monitor_var should be aligned to a cache line. + alignas(64) u64 monitor_var{}; + _mm_monitorx(&monitor_var, 0, 0); + _mm_mwaitx(/* extensions*/ 2, /* hints */ 0, /* cycles */ PauseCycles); +} #else static void TPAUSE() { - // 100,000 cycles is a reasonable amount of time to wait to save on CPU resources. - // For reference: - // At 1 GHz, 100K cycles is 100us - // At 2 GHz, 100K cycles is 50us - // At 4 GHz, 100K cycles is 25us - static constexpr auto PauseCycles = 100'000; const auto tsc = FencedRDTSC() + PauseCycles; const auto eax = static_cast(tsc & 0xFFFFFFFF); const auto edx = static_cast(tsc >> 32); @@ -40,9 +46,12 @@ static void TPAUSE() { void MicroSleep() { static const bool has_waitpkg = GetCPUCaps().waitpkg; + static const bool has_monitorx = GetCPUCaps().monitorx; if (has_waitpkg) { TPAUSE(); + } else if (has_monitorx) { + MWAITX(); } else { std::this_thread::yield(); } From 2b68a3cbbf144b97aa524eb1dd17aad34cdf1a67 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 28 Jun 2023 01:19:41 -0400 Subject: [PATCH 82/91] x64: cpu_wait: Remove magic values --- src/common/x64/cpu_wait.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/common/x64/cpu_wait.cpp b/src/common/x64/cpu_wait.cpp index 11b9c4d83..ea16c8490 100644 --- a/src/common/x64/cpu_wait.cpp +++ b/src/common/x64/cpu_wait.cpp @@ -26,21 +26,26 @@ constexpr auto PauseCycles = 100'000U; #ifdef _MSC_VER __forceinline static void TPAUSE() { - _tpause(0, FencedRDTSC() + PauseCycles); + static constexpr auto RequestC02State = 0U; + _tpause(RequestC02State, FencedRDTSC() + PauseCycles); } __forceinline static void MWAITX() { + static constexpr auto EnableWaitTimeFlag = 1U << 1; + static constexpr auto RequestC1State = 0U; + // monitor_var should be aligned to a cache line. alignas(64) u64 monitor_var{}; _mm_monitorx(&monitor_var, 0, 0); - _mm_mwaitx(/* extensions*/ 2, /* hints */ 0, /* cycles */ PauseCycles); + _mm_mwaitx(EnableWaitTimeFlag, RequestC1State, PauseCycles); } #else static void TPAUSE() { + static constexpr auto RequestC02State = 0U; const auto tsc = FencedRDTSC() + PauseCycles; const auto eax = static_cast(tsc & 0xFFFFFFFF); const auto edx = static_cast(tsc >> 32); - asm volatile("tpause %0" : : "r"(0), "d"(edx), "a"(eax)); + asm volatile("tpause %0" : : "r"(RequestC02State), "d"(edx), "a"(eax)); } #endif From 295fc7d0f8f0b6158307c5c9b11a60516f9eb221 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 28 Jun 2023 01:35:16 -0400 Subject: [PATCH 83/91] x64: cpu_wait: Implement MWAITX for non-MSVC compilers --- src/common/x64/cpu_wait.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/x64/cpu_wait.cpp b/src/common/x64/cpu_wait.cpp index ea16c8490..41d385f59 100644 --- a/src/common/x64/cpu_wait.cpp +++ b/src/common/x64/cpu_wait.cpp @@ -47,6 +47,16 @@ static void TPAUSE() { const auto edx = static_cast(tsc >> 32); asm volatile("tpause %0" : : "r"(RequestC02State), "d"(edx), "a"(eax)); } + +static void MWAITX() { + static constexpr auto EnableWaitTimeFlag = 1U << 1; + static constexpr auto RequestC1State = 0U; + + // monitor_var should be aligned to a cache line. + alignas(64) u64 monitor_var{}; + asm volatile("monitorx" : : "a"(&monitor_var), "c"(0), "d"(0)); + asm volatile("mwaitx" : : "a"(RequestC1State), "b"(PauseCycles), "c"(EnableWaitTimeFlag)); +} #endif void MicroSleep() { From df9685a21c105962e90dbd95133c5a1bcef7886f Mon Sep 17 00:00:00 2001 From: german77 Date: Wed, 28 Jun 2023 00:20:38 -0600 Subject: [PATCH 84/91] input_common: Remove duplicated DriverResult enum --- src/common/input.h | 2 + src/input_common/drivers/joycon.cpp | 35 ++- src/input_common/drivers/joycon.h | 3 +- src/input_common/helpers/joycon_driver.cpp | 129 +++++----- src/input_common/helpers/joycon_driver.h | 48 ++-- .../helpers/joycon_protocol/calibration.cpp | 53 ++-- .../helpers/joycon_protocol/calibration.h | 15 +- .../joycon_protocol/common_protocol.cpp | 102 ++++---- .../helpers/joycon_protocol/common_protocol.h | 44 ++-- .../joycon_protocol/generic_functions.cpp | 52 ++-- .../joycon_protocol/generic_functions.h | 41 ++-- .../helpers/joycon_protocol/irs.cpp | 70 +++--- .../helpers/joycon_protocol/irs.h | 22 +- .../helpers/joycon_protocol/joycon_types.h | 17 -- .../helpers/joycon_protocol/nfc.cpp | 231 +++++++++--------- .../helpers/joycon_protocol/nfc.h | 66 ++--- .../helpers/joycon_protocol/ringcon.cpp | 42 ++-- .../helpers/joycon_protocol/ringcon.h | 14 +- .../helpers/joycon_protocol/rumble.cpp | 5 +- .../helpers/joycon_protocol/rumble.h | 8 +- src/yuzu/configuration/configure_ringcon.cpp | 3 + 21 files changed, 523 insertions(+), 479 deletions(-) diff --git a/src/common/input.h b/src/common/input.h index ea30770ae..2c4ccea22 100644 --- a/src/common/input.h +++ b/src/common/input.h @@ -75,8 +75,10 @@ enum class DriverResult { ErrorWritingData, NoDeviceDetected, InvalidHandle, + InvalidParameters, NotSupported, Disabled, + Delayed, Unknown, }; diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp index 52494e0d9..0aca5a3a3 100644 --- a/src/input_common/drivers/joycon.cpp +++ b/src/input_common/drivers/joycon.cpp @@ -102,12 +102,12 @@ bool Joycons::IsDeviceNew(SDL_hid_device_info* device_info) const { Joycon::SerialNumber serial_number{}; const auto result = Joycon::JoyconDriver::GetDeviceType(device_info, type); - if (result != Joycon::DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return false; } const auto result2 = Joycon::JoyconDriver::GetSerialNumber(device_info, serial_number); - if (result2 != Joycon::DriverResult::Success) { + if (result2 != Common::Input::DriverResult::Success) { return false; } @@ -171,10 +171,10 @@ void Joycons::RegisterNewDevice(SDL_hid_device_info* device_info) { LOG_WARNING(Input, "No free handles available"); return; } - if (result == Joycon::DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = handle->RequestDeviceAccess(device_info); } - if (result == Joycon::DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { LOG_WARNING(Input, "Initialize device"); const std::size_t port = handle->GetDevicePort(); @@ -273,8 +273,7 @@ Common::Input::DriverResult Joycons::SetLeds(const PadIdentifier& identifier, led_config += led_status.led_3 ? 4 : 0; led_config += led_status.led_4 ? 8 : 0; - return static_cast( - handle->SetLedConfig(static_cast(led_config))); + return handle->SetLedConfig(static_cast(led_config)); } Common::Input::DriverResult Joycons::SetCameraFormat(const PadIdentifier& identifier, @@ -283,8 +282,8 @@ Common::Input::DriverResult Joycons::SetCameraFormat(const PadIdentifier& identi if (handle == nullptr) { return Common::Input::DriverResult::InvalidHandle; } - return static_cast(handle->SetIrsConfig( - Joycon::IrsMode::ImageTransfer, static_cast(camera_format))); + return handle->SetIrsConfig(Joycon::IrsMode::ImageTransfer, + static_cast(camera_format)); }; Common::Input::NfcState Joycons::SupportsNfc(const PadIdentifier& identifier_) const { @@ -351,7 +350,7 @@ Common::Input::NfcState Joycons::ReadMifareData(const PadIdentifier& identifier, std::vector read_data(read_request.size()); const auto result = handle->ReadMifareData(read_request, read_data); - if (result == Joycon::DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { for (std::size_t i = 0; i < read_request.size(); i++) { data.data[i] = { .command = static_cast(command), @@ -402,15 +401,15 @@ Common::Input::DriverResult Joycons::SetPollingMode(const PadIdentifier& identif switch (polling_mode) { case Common::Input::PollingMode::Active: - return static_cast(handle->SetActiveMode()); + return handle->SetActiveMode(); case Common::Input::PollingMode::Passive: - return static_cast(handle->SetPassiveMode()); + return handle->SetPassiveMode(); case Common::Input::PollingMode::IR: - return static_cast(handle->SetIrMode()); + return handle->SetIrMode(); case Common::Input::PollingMode::NFC: - return static_cast(handle->SetNfcMode()); + return handle->SetNfcMode(); case Common::Input::PollingMode::Ring: - return static_cast(handle->SetRingConMode()); + return handle->SetRingConMode(); default: return Common::Input::DriverResult::NotSupported; } @@ -828,13 +827,13 @@ std::string Joycons::JoyconName(Joycon::ControllerType type) const { } } -Common::Input::NfcState Joycons::TranslateDriverResult(Joycon::DriverResult result) const { +Common::Input::NfcState Joycons::TranslateDriverResult(Common::Input::DriverResult result) const { switch (result) { - case Joycon::DriverResult::Success: + case Common::Input::DriverResult::Success: return Common::Input::NfcState::Success; - case Joycon::DriverResult::Disabled: + case Common::Input::DriverResult::Disabled: return Common::Input::NfcState::WrongDeviceState; - case Joycon::DriverResult::NotSupported: + case Common::Input::DriverResult::NotSupported: return Common::Input::NfcState::NotSupported; default: return Common::Input::NfcState::Unknown; diff --git a/src/input_common/drivers/joycon.h b/src/input_common/drivers/joycon.h index 4c323d7d6..112e970e1 100644 --- a/src/input_common/drivers/joycon.h +++ b/src/input_common/drivers/joycon.h @@ -17,7 +17,6 @@ struct Color; struct MotionData; struct TagInfo; enum class ControllerType : u8; -enum class DriverResult; enum class IrsResolution; class JoyconDriver; } // namespace InputCommon::Joycon @@ -112,7 +111,7 @@ private: /// Returns the name of the device in text format std::string JoyconName(Joycon::ControllerType type) const; - Common::Input::NfcState TranslateDriverResult(Joycon::DriverResult result) const; + Common::Input::NfcState TranslateDriverResult(Common::Input::DriverResult result) const; std::jthread scan_thread; diff --git a/src/input_common/helpers/joycon_driver.cpp b/src/input_common/helpers/joycon_driver.cpp index ec984a647..cf51f3481 100644 --- a/src/input_common/helpers/joycon_driver.cpp +++ b/src/input_common/helpers/joycon_driver.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/input.h" #include "common/logging/log.h" #include "common/scope_exit.h" #include "common/swap.h" @@ -28,13 +29,13 @@ void JoyconDriver::Stop() { input_thread = {}; } -DriverResult JoyconDriver::RequestDeviceAccess(SDL_hid_device_info* device_info) { +Common::Input::DriverResult JoyconDriver::RequestDeviceAccess(SDL_hid_device_info* device_info) { std::scoped_lock lock{mutex}; handle_device_type = ControllerType::None; GetDeviceType(device_info, handle_device_type); if (handle_device_type == ControllerType::None) { - return DriverResult::UnsupportedControllerType; + return Common::Input::DriverResult::UnsupportedControllerType; } hidapi_handle->handle = @@ -43,15 +44,15 @@ DriverResult JoyconDriver::RequestDeviceAccess(SDL_hid_device_info* device_info) if (!hidapi_handle->handle) { LOG_ERROR(Input, "Yuzu can't gain access to this device: ID {:04X}:{:04X}.", device_info->vendor_id, device_info->product_id); - return DriverResult::HandleInUse; + return Common::Input::DriverResult::HandleInUse; } SDL_hid_set_nonblocking(hidapi_handle->handle, 1); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult JoyconDriver::InitializeDevice() { +Common::Input::DriverResult JoyconDriver::InitializeDevice() { if (!hidapi_handle->handle) { - return DriverResult::InvalidHandle; + return Common::Input::DriverResult::InvalidHandle; } std::scoped_lock lock{mutex}; disable_input_thread = true; @@ -87,7 +88,7 @@ DriverResult JoyconDriver::InitializeDevice() { rumble_protocol = std::make_unique(hidapi_handle); // Get fixed joycon info - if (generic_protocol->GetVersionNumber(version) != DriverResult::Success) { + if (generic_protocol->GetVersionNumber(version) != Common::Input::DriverResult::Success) { // If this command fails the device doesn't accept configuration commands input_only_device = true; } @@ -129,7 +130,7 @@ DriverResult JoyconDriver::InitializeDevice() { } disable_input_thread = false; - return DriverResult::Success; + return Common::Input::DriverResult::Success; } void JoyconDriver::InputThread(std::stop_token stop_token) { @@ -229,7 +230,7 @@ void JoyconDriver::OnNewData(std::span buffer) { if (!amiibo_detected) { Joycon::TagInfo tag_info; const auto result = nfc_protocol->GetTagInfo(tag_info); - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { joycon_poller->UpdateAmiibo(tag_info); amiibo_detected = true; } @@ -255,7 +256,7 @@ void JoyconDriver::OnNewData(std::span buffer) { } } -DriverResult JoyconDriver::SetPollingMode() { +Common::Input::DriverResult JoyconDriver::SetPollingMode() { SCOPE_EXIT({ disable_input_thread = false; }); disable_input_thread = true; @@ -270,7 +271,7 @@ DriverResult JoyconDriver::SetPollingMode() { } if (input_only_device) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (irs_protocol->IsEnabled()) { @@ -289,7 +290,7 @@ DriverResult JoyconDriver::SetPollingMode() { if (irs_enabled && supported_features.irs) { auto result = irs_protocol->EnableIrs(); - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { return result; } irs_protocol->DisableIrs(); @@ -299,7 +300,7 @@ DriverResult JoyconDriver::SetPollingMode() { if (nfc_enabled && supported_features.nfc) { auto result = nfc_protocol->EnableNfc(); - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { return result; } nfc_protocol->DisableNfc(); @@ -309,10 +310,10 @@ DriverResult JoyconDriver::SetPollingMode() { if (hidbus_enabled && supported_features.hidbus) { auto result = ring_protocol->EnableRingCon(); - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = ring_protocol->StartRingconPolling(); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { ring_connected = true; return result; } @@ -324,7 +325,7 @@ DriverResult JoyconDriver::SetPollingMode() { if (passive_enabled && supported_features.passive) { const auto result = generic_protocol->EnablePassiveMode(); - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { return result; } LOG_ERROR(Input, "Error enabling passive mode"); @@ -332,7 +333,7 @@ DriverResult JoyconDriver::SetPollingMode() { // Default Mode const auto result = generic_protocol->EnableActiveMode(); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { LOG_ERROR(Input, "Error enabling active mode"); } // Switch calls this function after enabling active mode @@ -396,26 +397,26 @@ bool JoyconDriver::IsPayloadCorrect(int status, std::span buffer) { return true; } -DriverResult JoyconDriver::SetVibration(const VibrationValue& vibration) { +Common::Input::DriverResult JoyconDriver::SetVibration(const VibrationValue& vibration) { std::scoped_lock lock{mutex}; if (disable_input_thread) { - return DriverResult::HandleInUse; + return Common::Input::DriverResult::HandleInUse; } return rumble_protocol->SendVibration(vibration); } -DriverResult JoyconDriver::SetLedConfig(u8 led_pattern) { +Common::Input::DriverResult JoyconDriver::SetLedConfig(u8 led_pattern) { std::scoped_lock lock{mutex}; if (disable_input_thread) { - return DriverResult::HandleInUse; + return Common::Input::DriverResult::HandleInUse; } return generic_protocol->SetLedPattern(led_pattern); } -DriverResult JoyconDriver::SetIrsConfig(IrsMode mode_, IrsResolution format_) { +Common::Input::DriverResult JoyconDriver::SetIrsConfig(IrsMode mode_, IrsResolution format_) { std::scoped_lock lock{mutex}; if (disable_input_thread) { - return DriverResult::HandleInUse; + return Common::Input::DriverResult::HandleInUse; } disable_input_thread = true; const auto result = irs_protocol->SetIrsConfig(mode_, format_); @@ -423,7 +424,7 @@ DriverResult JoyconDriver::SetIrsConfig(IrsMode mode_, IrsResolution format_) { return result; } -DriverResult JoyconDriver::SetPassiveMode() { +Common::Input::DriverResult JoyconDriver::SetPassiveMode() { std::scoped_lock lock{mutex}; motion_enabled = false; hidbus_enabled = false; @@ -433,7 +434,7 @@ DriverResult JoyconDriver::SetPassiveMode() { return SetPollingMode(); } -DriverResult JoyconDriver::SetActiveMode() { +Common::Input::DriverResult JoyconDriver::SetActiveMode() { if (is_ring_disabled_by_irs) { is_ring_disabled_by_irs = false; SetActiveMode(); @@ -449,11 +450,11 @@ DriverResult JoyconDriver::SetActiveMode() { return SetPollingMode(); } -DriverResult JoyconDriver::SetIrMode() { +Common::Input::DriverResult JoyconDriver::SetIrMode() { std::scoped_lock lock{mutex}; if (!supported_features.irs) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (ring_connected) { @@ -468,11 +469,11 @@ DriverResult JoyconDriver::SetIrMode() { return SetPollingMode(); } -DriverResult JoyconDriver::SetNfcMode() { +Common::Input::DriverResult JoyconDriver::SetNfcMode() { std::scoped_lock lock{mutex}; if (!supported_features.nfc) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } motion_enabled = true; @@ -483,11 +484,11 @@ DriverResult JoyconDriver::SetNfcMode() { return SetPollingMode(); } -DriverResult JoyconDriver::SetRingConMode() { +Common::Input::DriverResult JoyconDriver::SetRingConMode() { std::scoped_lock lock{mutex}; if (!supported_features.hidbus) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } motion_enabled = true; @@ -499,20 +500,20 @@ DriverResult JoyconDriver::SetRingConMode() { const auto result = SetPollingMode(); if (!ring_connected) { - return DriverResult::NoDeviceDetected; + return Common::Input::DriverResult::NoDeviceDetected; } return result; } -DriverResult JoyconDriver::StartNfcPolling() { +Common::Input::DriverResult JoyconDriver::StartNfcPolling() { std::scoped_lock lock{mutex}; if (!supported_features.nfc) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (!nfc_protocol->IsEnabled()) { - return DriverResult::Disabled; + return Common::Input::DriverResult::Disabled; } disable_input_thread = true; @@ -522,14 +523,14 @@ DriverResult JoyconDriver::StartNfcPolling() { return result; } -DriverResult JoyconDriver::StopNfcPolling() { +Common::Input::DriverResult JoyconDriver::StopNfcPolling() { std::scoped_lock lock{mutex}; if (!supported_features.nfc) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (!nfc_protocol->IsEnabled()) { - return DriverResult::Disabled; + return Common::Input::DriverResult::Disabled; } disable_input_thread = true; @@ -544,17 +545,17 @@ DriverResult JoyconDriver::StopNfcPolling() { return result; } -DriverResult JoyconDriver::ReadAmiiboData(std::vector& out_data) { +Common::Input::DriverResult JoyconDriver::ReadAmiiboData(std::vector& out_data) { std::scoped_lock lock{mutex}; if (!supported_features.nfc) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (!nfc_protocol->IsEnabled()) { - return DriverResult::Disabled; + return Common::Input::DriverResult::Disabled; } if (!amiibo_detected) { - return DriverResult::ErrorWritingData; + return Common::Input::DriverResult::ErrorWritingData; } out_data.resize(0x21C); @@ -565,17 +566,17 @@ DriverResult JoyconDriver::ReadAmiiboData(std::vector& out_data) { return result; } -DriverResult JoyconDriver::WriteNfcData(std::span data) { +Common::Input::DriverResult JoyconDriver::WriteNfcData(std::span data) { std::scoped_lock lock{mutex}; if (!supported_features.nfc) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (!nfc_protocol->IsEnabled()) { - return DriverResult::Disabled; + return Common::Input::DriverResult::Disabled; } if (!amiibo_detected) { - return DriverResult::ErrorWritingData; + return Common::Input::DriverResult::ErrorWritingData; } disable_input_thread = true; @@ -585,18 +586,18 @@ DriverResult JoyconDriver::WriteNfcData(std::span data) { return result; } -DriverResult JoyconDriver::ReadMifareData(std::span data, - std::span out_data) { +Common::Input::DriverResult JoyconDriver::ReadMifareData(std::span data, + std::span out_data) { std::scoped_lock lock{mutex}; if (!supported_features.nfc) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (!nfc_protocol->IsEnabled()) { - return DriverResult::Disabled; + return Common::Input::DriverResult::Disabled; } if (!amiibo_detected) { - return DriverResult::ErrorWritingData; + return Common::Input::DriverResult::ErrorWritingData; } disable_input_thread = true; @@ -606,17 +607,17 @@ DriverResult JoyconDriver::ReadMifareData(std::span data, return result; } -DriverResult JoyconDriver::WriteMifareData(std::span data) { +Common::Input::DriverResult JoyconDriver::WriteMifareData(std::span data) { std::scoped_lock lock{mutex}; if (!supported_features.nfc) { - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } if (!nfc_protocol->IsEnabled()) { - return DriverResult::Disabled; + return Common::Input::DriverResult::Disabled; } if (!amiibo_detected) { - return DriverResult::ErrorWritingData; + return Common::Input::DriverResult::ErrorWritingData; } disable_input_thread = true; @@ -675,8 +676,8 @@ void JoyconDriver::SetCallbacks(const JoyconCallbacks& callbacks) { joycon_poller->SetCallbacks(callbacks); } -DriverResult JoyconDriver::GetDeviceType(SDL_hid_device_info* device_info, - ControllerType& controller_type) { +Common::Input::DriverResult JoyconDriver::GetDeviceType(SDL_hid_device_info* device_info, + ControllerType& controller_type) { static constexpr std::array, 6> supported_devices{ std::pair{0x2006, ControllerType::Left}, {0x2007, ControllerType::Right}, @@ -686,25 +687,25 @@ DriverResult JoyconDriver::GetDeviceType(SDL_hid_device_info* device_info, controller_type = ControllerType::None; if (device_info->vendor_id != nintendo_vendor_id) { - return DriverResult::UnsupportedControllerType; + return Common::Input::DriverResult::UnsupportedControllerType; } for (const auto& [product_id, type] : supported_devices) { if (device_info->product_id == static_cast(product_id)) { controller_type = type; - return Joycon::DriverResult::Success; + return Common::Input::DriverResult::Success; } } - return Joycon::DriverResult::UnsupportedControllerType; + return Common::Input::DriverResult::UnsupportedControllerType; } -DriverResult JoyconDriver::GetSerialNumber(SDL_hid_device_info* device_info, - SerialNumber& serial_number) { +Common::Input::DriverResult JoyconDriver::GetSerialNumber(SDL_hid_device_info* device_info, + SerialNumber& serial_number) { if (device_info->serial_number == nullptr) { - return DriverResult::Unknown; + return Common::Input::DriverResult::Unknown; } std::memcpy(&serial_number, device_info->serial_number, 15); - return Joycon::DriverResult::Success; + return Common::Input::DriverResult::Success; } } // namespace InputCommon::Joycon diff --git a/src/input_common/helpers/joycon_driver.h b/src/input_common/helpers/joycon_driver.h index 45b32d2f8..335e12cc3 100644 --- a/src/input_common/helpers/joycon_driver.h +++ b/src/input_common/helpers/joycon_driver.h @@ -11,6 +11,10 @@ #include "input_common/helpers/joycon_protocol/joycon_types.h" +namespace Common::Input { +enum class DriverResult; +} + namespace InputCommon::Joycon { class CalibrationProtocol; class GenericProtocol; @@ -26,8 +30,8 @@ public: ~JoyconDriver(); - DriverResult RequestDeviceAccess(SDL_hid_device_info* device_info); - DriverResult InitializeDevice(); + Common::Input::DriverResult RequestDeviceAccess(SDL_hid_device_info* device_info); + Common::Input::DriverResult InitializeDevice(); void Stop(); bool IsConnected() const; @@ -41,31 +45,31 @@ public: SerialNumber GetSerialNumber() const; SerialNumber GetHandleSerialNumber() const; - DriverResult SetVibration(const VibrationValue& vibration); - DriverResult SetLedConfig(u8 led_pattern); - DriverResult SetIrsConfig(IrsMode mode_, IrsResolution format_); - DriverResult SetPassiveMode(); - DriverResult SetActiveMode(); - DriverResult SetIrMode(); - DriverResult SetNfcMode(); - DriverResult SetRingConMode(); - DriverResult StartNfcPolling(); - DriverResult StopNfcPolling(); - DriverResult ReadAmiiboData(std::vector& out_data); - DriverResult WriteNfcData(std::span data); - DriverResult ReadMifareData(std::span request, - std::span out_data); - DriverResult WriteMifareData(std::span request); + Common::Input::DriverResult SetVibration(const VibrationValue& vibration); + Common::Input::DriverResult SetLedConfig(u8 led_pattern); + Common::Input::DriverResult SetIrsConfig(IrsMode mode_, IrsResolution format_); + Common::Input::DriverResult SetPassiveMode(); + Common::Input::DriverResult SetActiveMode(); + Common::Input::DriverResult SetIrMode(); + Common::Input::DriverResult SetNfcMode(); + Common::Input::DriverResult SetRingConMode(); + Common::Input::DriverResult StartNfcPolling(); + Common::Input::DriverResult StopNfcPolling(); + Common::Input::DriverResult ReadAmiiboData(std::vector& out_data); + Common::Input::DriverResult WriteNfcData(std::span data); + Common::Input::DriverResult ReadMifareData(std::span request, + std::span out_data); + Common::Input::DriverResult WriteMifareData(std::span request); void SetCallbacks(const JoyconCallbacks& callbacks); // Returns device type from hidapi handle - static DriverResult GetDeviceType(SDL_hid_device_info* device_info, - ControllerType& controller_type); + static Common::Input::DriverResult GetDeviceType(SDL_hid_device_info* device_info, + ControllerType& controller_type); // Returns serial number from hidapi handle - static DriverResult GetSerialNumber(SDL_hid_device_info* device_info, - SerialNumber& serial_number); + static Common::Input::DriverResult GetSerialNumber(SDL_hid_device_info* device_info, + SerialNumber& serial_number); private: struct SupportedFeatures { @@ -84,7 +88,7 @@ private: void OnNewData(std::span buffer); /// Updates device configuration to enable or disable features - DriverResult SetPollingMode(); + Common::Input::DriverResult SetPollingMode(); /// Returns true if input thread is valid and doesn't need to be stopped bool IsInputThreadValid() const; diff --git a/src/input_common/helpers/joycon_protocol/calibration.cpp b/src/input_common/helpers/joycon_protocol/calibration.cpp index d8f040f75..1300ecaf5 100644 --- a/src/input_common/helpers/joycon_protocol/calibration.cpp +++ b/src/input_common/helpers/joycon_protocol/calibration.cpp @@ -3,6 +3,7 @@ #include +#include "common/input.h" #include "input_common/helpers/joycon_protocol/calibration.h" #include "input_common/helpers/joycon_protocol/joycon_types.h" @@ -11,28 +12,29 @@ namespace InputCommon::Joycon { CalibrationProtocol::CalibrationProtocol(std::shared_ptr handle) : JoyconCommonProtocol(std::move(handle)) {} -DriverResult CalibrationProtocol::GetLeftJoyStickCalibration(JoyStickCalibration& calibration) { +Common::Input::DriverResult CalibrationProtocol::GetLeftJoyStickCalibration( + JoyStickCalibration& calibration) { ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; JoystickLeftSpiCalibration spi_calibration{}; bool has_user_calibration = false; calibration = {}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = HasUserCalibration(SpiAddress::USER_LEFT_MAGIC, has_user_calibration); } // Read User defined calibration - if (result == DriverResult::Success && has_user_calibration) { + if (result == Common::Input::DriverResult::Success && has_user_calibration) { result = ReadSPI(SpiAddress::USER_LEFT_DATA, spi_calibration); } // Read Factory calibration - if (result == DriverResult::Success && !has_user_calibration) { + if (result == Common::Input::DriverResult::Success && !has_user_calibration) { result = ReadSPI(SpiAddress::FACT_LEFT_DATA, spi_calibration); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { calibration.x.center = GetXAxisCalibrationValue(spi_calibration.center); calibration.y.center = GetYAxisCalibrationValue(spi_calibration.center); calibration.x.min = GetXAxisCalibrationValue(spi_calibration.min); @@ -47,28 +49,29 @@ DriverResult CalibrationProtocol::GetLeftJoyStickCalibration(JoyStickCalibration return result; } -DriverResult CalibrationProtocol::GetRightJoyStickCalibration(JoyStickCalibration& calibration) { +Common::Input::DriverResult CalibrationProtocol::GetRightJoyStickCalibration( + JoyStickCalibration& calibration) { ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; JoystickRightSpiCalibration spi_calibration{}; bool has_user_calibration = false; calibration = {}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = HasUserCalibration(SpiAddress::USER_RIGHT_MAGIC, has_user_calibration); } // Read User defined calibration - if (result == DriverResult::Success && has_user_calibration) { + if (result == Common::Input::DriverResult::Success && has_user_calibration) { result = ReadSPI(SpiAddress::USER_RIGHT_DATA, spi_calibration); } // Read Factory calibration - if (result == DriverResult::Success && !has_user_calibration) { + if (result == Common::Input::DriverResult::Success && !has_user_calibration) { result = ReadSPI(SpiAddress::FACT_RIGHT_DATA, spi_calibration); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { calibration.x.center = GetXAxisCalibrationValue(spi_calibration.center); calibration.y.center = GetYAxisCalibrationValue(spi_calibration.center); calibration.x.min = GetXAxisCalibrationValue(spi_calibration.min); @@ -83,28 +86,28 @@ DriverResult CalibrationProtocol::GetRightJoyStickCalibration(JoyStickCalibratio return result; } -DriverResult CalibrationProtocol::GetImuCalibration(MotionCalibration& calibration) { +Common::Input::DriverResult CalibrationProtocol::GetImuCalibration(MotionCalibration& calibration) { ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; ImuSpiCalibration spi_calibration{}; bool has_user_calibration = false; calibration = {}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = HasUserCalibration(SpiAddress::USER_IMU_MAGIC, has_user_calibration); } // Read User defined calibration - if (result == DriverResult::Success && has_user_calibration) { + if (result == Common::Input::DriverResult::Success && has_user_calibration) { result = ReadSPI(SpiAddress::USER_IMU_DATA, spi_calibration); } // Read Factory calibration - if (result == DriverResult::Success && !has_user_calibration) { + if (result == Common::Input::DriverResult::Success && !has_user_calibration) { result = ReadSPI(SpiAddress::FACT_IMU_DATA, spi_calibration); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { calibration.accelerometer[0].offset = spi_calibration.accelerometer_offset[0]; calibration.accelerometer[1].offset = spi_calibration.accelerometer_offset[1]; calibration.accelerometer[2].offset = spi_calibration.accelerometer_offset[2]; @@ -127,8 +130,8 @@ DriverResult CalibrationProtocol::GetImuCalibration(MotionCalibration& calibrati return result; } -DriverResult CalibrationProtocol::GetRingCalibration(RingCalibration& calibration, - s16 current_value) { +Common::Input::DriverResult CalibrationProtocol::GetRingCalibration(RingCalibration& calibration, + s16 current_value) { constexpr s16 DefaultRingRange{800}; // TODO: Get default calibration form ring itself @@ -144,15 +147,15 @@ DriverResult CalibrationProtocol::GetRingCalibration(RingCalibration& calibratio .max_value = ring_data_max, .min_value = ring_data_min, }; - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult CalibrationProtocol::HasUserCalibration(SpiAddress address, - bool& has_user_calibration) { +Common::Input::DriverResult CalibrationProtocol::HasUserCalibration(SpiAddress address, + bool& has_user_calibration) { MagicSpiCalibration spi_magic{}; - const DriverResult result{ReadSPI(address, spi_magic)}; + const Common::Input::DriverResult result{ReadSPI(address, spi_magic)}; has_user_calibration = false; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { has_user_calibration = spi_magic.first == CalibrationMagic::USR_MAGIC_0 && spi_magic.second == CalibrationMagic::USR_MAGIC_1; } diff --git a/src/input_common/helpers/joycon_protocol/calibration.h b/src/input_common/helpers/joycon_protocol/calibration.h index c6fd0f729..82d94b366 100644 --- a/src/input_common/helpers/joycon_protocol/calibration.h +++ b/src/input_common/helpers/joycon_protocol/calibration.h @@ -12,8 +12,11 @@ #include "input_common/helpers/joycon_protocol/common_protocol.h" -namespace InputCommon::Joycon { +namespace Common::Input { enum class DriverResult; +} + +namespace InputCommon::Joycon { struct JoyStickCalibration; struct IMUCalibration; struct JoyconHandle; @@ -31,30 +34,30 @@ public: * @param is_factory_calibration if true factory values will be returned * @returns JoyStickCalibration of the left joystick */ - DriverResult GetLeftJoyStickCalibration(JoyStickCalibration& calibration); + Common::Input::DriverResult GetLeftJoyStickCalibration(JoyStickCalibration& calibration); /** * Sends a request to obtain the right stick calibration from memory * @param is_factory_calibration if true factory values will be returned * @returns JoyStickCalibration of the right joystick */ - DriverResult GetRightJoyStickCalibration(JoyStickCalibration& calibration); + Common::Input::DriverResult GetRightJoyStickCalibration(JoyStickCalibration& calibration); /** * Sends a request to obtain the motion calibration from memory * @returns ImuCalibration of the motion sensor */ - DriverResult GetImuCalibration(MotionCalibration& calibration); + Common::Input::DriverResult GetImuCalibration(MotionCalibration& calibration); /** * Calculates on run time the proper calibration of the ring controller * @returns RingCalibration of the ring sensor */ - DriverResult GetRingCalibration(RingCalibration& calibration, s16 current_value); + Common::Input::DriverResult GetRingCalibration(RingCalibration& calibration, s16 current_value); private: /// Returns true if the specified address corresponds to the magic value of user calibration - DriverResult HasUserCalibration(SpiAddress address, bool& has_user_calibration); + Common::Input::DriverResult HasUserCalibration(SpiAddress address, bool& has_user_calibration); /// Converts a raw calibration block to an u16 value containing the x axis value u16 GetXAxisCalibrationValue(std::span block) const; diff --git a/src/input_common/helpers/joycon_protocol/common_protocol.cpp b/src/input_common/helpers/joycon_protocol/common_protocol.cpp index 88f4cec1c..e10d15c18 100644 --- a/src/input_common/helpers/joycon_protocol/common_protocol.cpp +++ b/src/input_common/helpers/joycon_protocol/common_protocol.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/input.h" #include "common/logging/log.h" #include "input_common/helpers/joycon_protocol/common_protocol.h" @@ -21,10 +22,10 @@ void JoyconCommonProtocol::SetNonBlocking() { SDL_hid_set_nonblocking(hidapi_handle->handle, 1); } -DriverResult JoyconCommonProtocol::GetDeviceType(ControllerType& controller_type) { +Common::Input::DriverResult JoyconCommonProtocol::GetDeviceType(ControllerType& controller_type) { const auto result = ReadSPI(SpiAddress::DEVICE_TYPE, controller_type); - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { // Fallback to 3rd party pro controllers if (controller_type == ControllerType::None) { controller_type = ControllerType::Pro; @@ -34,12 +35,13 @@ DriverResult JoyconCommonProtocol::GetDeviceType(ControllerType& controller_type return result; } -DriverResult JoyconCommonProtocol::CheckDeviceAccess(SDL_hid_device_info* device_info) { +Common::Input::DriverResult JoyconCommonProtocol::CheckDeviceAccess( + SDL_hid_device_info* device_info) { ControllerType controller_type{ControllerType::None}; const auto result = GetDeviceType(controller_type); - if (result != DriverResult::Success || controller_type == ControllerType::None) { - return DriverResult::UnsupportedControllerType; + if (result != Common::Input::DriverResult::Success || controller_type == ControllerType::None) { + return Common::Input::DriverResult::UnsupportedControllerType; } hidapi_handle->handle = @@ -48,30 +50,30 @@ DriverResult JoyconCommonProtocol::CheckDeviceAccess(SDL_hid_device_info* device if (!hidapi_handle->handle) { LOG_ERROR(Input, "Yuzu can't gain access to this device: ID {:04X}:{:04X}.", device_info->vendor_id, device_info->product_id); - return DriverResult::HandleInUse; + return Common::Input::DriverResult::HandleInUse; } SetNonBlocking(); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult JoyconCommonProtocol::SetReportMode(ReportMode report_mode) { +Common::Input::DriverResult JoyconCommonProtocol::SetReportMode(ReportMode report_mode) { const std::array buffer{static_cast(report_mode)}; return SendSubCommand(SubCommand::SET_REPORT_MODE, buffer); } -DriverResult JoyconCommonProtocol::SendRawData(std::span buffer) { +Common::Input::DriverResult JoyconCommonProtocol::SendRawData(std::span buffer) { const auto result = SDL_hid_write(hidapi_handle->handle, buffer.data(), buffer.size()); if (result == -1) { - return DriverResult::ErrorWritingData; + return Common::Input::DriverResult::ErrorWritingData; } - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult JoyconCommonProtocol::GetSubCommandResponse(SubCommand sc, - SubCommandResponse& output) { +Common::Input::DriverResult JoyconCommonProtocol::GetSubCommandResponse( + SubCommand sc, SubCommandResponse& output) { constexpr int timeout_mili = 66; constexpr int MaxTries = 3; int tries = 0; @@ -84,16 +86,17 @@ DriverResult JoyconCommonProtocol::GetSubCommandResponse(SubCommand sc, LOG_ERROR(Input, "No response from joycon"); } if (tries++ > MaxTries) { - return DriverResult::Timeout; + return Common::Input::DriverResult::Timeout; } } while (output.input_report.report_mode != ReportMode::SUBCMD_REPLY && output.sub_command != sc); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, std::span buffer, - SubCommandResponse& output) { +Common::Input::DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, + std::span buffer, + SubCommandResponse& output) { SubCommandPacket packet{ .output_report = OutputReport::RUMBLE_AND_SUBCMD, .packet_counter = GetCounter(), @@ -102,26 +105,28 @@ DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, std::span packet.command_data.size()) { - return DriverResult::InvalidParameters; + return Common::Input::DriverResult::InvalidParameters; } memcpy(packet.command_data.data(), buffer.data(), buffer.size()); auto result = SendData(packet); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } return GetSubCommandResponse(sc, output); } -DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, std::span buffer) { +Common::Input::DriverResult JoyconCommonProtocol::SendSubCommand(SubCommand sc, + std::span buffer) { SubCommandResponse output{}; return SendSubCommand(sc, buffer, output); } -DriverResult JoyconCommonProtocol::SendMCUCommand(SubCommand sc, std::span buffer) { +Common::Input::DriverResult JoyconCommonProtocol::SendMCUCommand(SubCommand sc, + std::span buffer) { SubCommandPacket packet{ .output_report = OutputReport::MCU_DATA, .packet_counter = GetCounter(), @@ -130,7 +135,7 @@ DriverResult JoyconCommonProtocol::SendMCUCommand(SubCommand sc, std::span packet.command_data.size()) { - return DriverResult::InvalidParameters; + return Common::Input::DriverResult::InvalidParameters; } memcpy(packet.command_data.data(), buffer.data(), buffer.size()); @@ -138,7 +143,7 @@ DriverResult JoyconCommonProtocol::SendMCUCommand(SubCommand sc, std::span buffer) { +Common::Input::DriverResult JoyconCommonProtocol::SendVibrationReport(std::span buffer) { VibrationPacket packet{ .output_report = OutputReport::RUMBLE_ONLY, .packet_counter = GetCounter(), @@ -146,7 +151,7 @@ DriverResult JoyconCommonProtocol::SendVibrationReport(std::span buffe }; if (buffer.size() > packet.vibration_data.size()) { - return DriverResult::InvalidParameters; + return Common::Input::DriverResult::InvalidParameters; } memcpy(packet.vibration_data.data(), buffer.data(), buffer.size()); @@ -154,7 +159,8 @@ DriverResult JoyconCommonProtocol::SendVibrationReport(std::span buffe return SendData(packet); } -DriverResult JoyconCommonProtocol::ReadRawSPI(SpiAddress addr, std::span output) { +Common::Input::DriverResult JoyconCommonProtocol::ReadRawSPI(SpiAddress addr, + std::span output) { constexpr std::size_t HeaderSize = 5; constexpr std::size_t MaxTries = 5; std::size_t tries = 0; @@ -168,36 +174,36 @@ DriverResult JoyconCommonProtocol::ReadRawSPI(SpiAddress addr, std::span out memcpy(buffer.data(), &packet_data, sizeof(ReadSpiPacket)); do { const auto result = SendSubCommand(SubCommand::SPI_FLASH_READ, buffer, response); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ > MaxTries) { - return DriverResult::Timeout; + return Common::Input::DriverResult::Timeout; } } while (response.spi_address != addr); if (response.command_data.size() < packet_data.size + HeaderSize) { - return DriverResult::WrongReply; + return Common::Input::DriverResult::WrongReply; } // Remove header from output memcpy(output.data(), response.command_data.data() + HeaderSize, packet_data.size); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult JoyconCommonProtocol::EnableMCU(bool enable) { +Common::Input::DriverResult JoyconCommonProtocol::EnableMCU(bool enable) { const std::array mcu_state{static_cast(enable ? 1 : 0)}; const auto result = SendSubCommand(SubCommand::SET_MCU_STATE, mcu_state); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { LOG_ERROR(Input, "Failed with error {}", result); } return result; } -DriverResult JoyconCommonProtocol::ConfigureMCU(const MCUConfig& config) { +Common::Input::DriverResult JoyconCommonProtocol::ConfigureMCU(const MCUConfig& config) { LOG_DEBUG(Input, "ConfigureMCU"); std::array config_buffer; memcpy(config_buffer.data(), &config, sizeof(MCUConfig)); @@ -205,15 +211,15 @@ DriverResult JoyconCommonProtocol::ConfigureMCU(const MCUConfig& config) { const auto result = SendSubCommand(SubCommand::SET_MCU_CONFIG, config_buffer); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { LOG_ERROR(Input, "Failed with error {}", result); } return result; } -DriverResult JoyconCommonProtocol::GetMCUDataResponse(ReportMode report_mode, - MCUCommandResponse& output) { +Common::Input::DriverResult JoyconCommonProtocol::GetMCUDataResponse(ReportMode report_mode, + MCUCommandResponse& output) { constexpr int TimeoutMili = 200; constexpr int MaxTries = 9; int tries = 0; @@ -226,17 +232,18 @@ DriverResult JoyconCommonProtocol::GetMCUDataResponse(ReportMode report_mode, LOG_ERROR(Input, "No response from joycon attempt {}", tries); } if (tries++ > MaxTries) { - return DriverResult::Timeout; + return Common::Input::DriverResult::Timeout; } } while (output.input_report.report_mode != report_mode || output.mcu_report == MCUReport::EmptyAwaitingCmd); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult JoyconCommonProtocol::SendMCUData(ReportMode report_mode, MCUSubCommand sc, - std::span buffer, - MCUCommandResponse& output) { +Common::Input::DriverResult JoyconCommonProtocol::SendMCUData(ReportMode report_mode, + MCUSubCommand sc, + std::span buffer, + MCUCommandResponse& output) { SubCommandPacket packet{ .output_report = OutputReport::MCU_DATA, .packet_counter = GetCounter(), @@ -245,23 +252,24 @@ DriverResult JoyconCommonProtocol::SendMCUData(ReportMode report_mode, MCUSubCom }; if (buffer.size() > packet.command_data.size()) { - return DriverResult::InvalidParameters; + return Common::Input::DriverResult::InvalidParameters; } memcpy(packet.command_data.data(), buffer.data(), buffer.size()); auto result = SendData(packet); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } result = GetMCUDataResponse(report_mode, output); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult JoyconCommonProtocol::WaitSetMCUMode(ReportMode report_mode, MCUMode mode) { +Common::Input::DriverResult JoyconCommonProtocol::WaitSetMCUMode(ReportMode report_mode, + MCUMode mode) { MCUCommandResponse output{}; constexpr std::size_t MaxTries{16}; std::size_t tries{}; @@ -269,17 +277,17 @@ DriverResult JoyconCommonProtocol::WaitSetMCUMode(ReportMode report_mode, MCUMod do { const auto result = SendMCUData(report_mode, MCUSubCommand::SetDeviceMode, {}, output); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ > MaxTries) { - return DriverResult::WrongReply; + return Common::Input::DriverResult::WrongReply; } } while (output.mcu_report != MCUReport::StateReport || output.mcu_data[6] != static_cast(mode)); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } // crc-8-ccitt / polynomial 0x07 look up table diff --git a/src/input_common/helpers/joycon_protocol/common_protocol.h b/src/input_common/helpers/joycon_protocol/common_protocol.h index 411ec018a..dd667ca2b 100644 --- a/src/input_common/helpers/joycon_protocol/common_protocol.h +++ b/src/input_common/helpers/joycon_protocol/common_protocol.h @@ -38,30 +38,30 @@ public: * Sends a request to obtain the joycon type from device * @returns controller type of the joycon */ - DriverResult GetDeviceType(ControllerType& controller_type); + Common::Input::DriverResult GetDeviceType(ControllerType& controller_type); /** * Verifies and sets the joycon_handle if device is valid * @param device info from the driver * @returns success if the device is valid */ - DriverResult CheckDeviceAccess(SDL_hid_device_info* device); + Common::Input::DriverResult CheckDeviceAccess(SDL_hid_device_info* device); /** * Sends a request to set the polling mode of the joycon * @param report_mode polling mode to be set */ - DriverResult SetReportMode(Joycon::ReportMode report_mode); + Common::Input::DriverResult SetReportMode(Joycon::ReportMode report_mode); /** * Sends data to the joycon device * @param buffer data to be send */ - DriverResult SendRawData(std::span buffer); + Common::Input::DriverResult SendRawData(std::span buffer); template requires std::is_trivially_copyable_v - DriverResult SendData(const Output& output) { + Common::Input::DriverResult SendData(const Output& output) { std::array buffer; std::memcpy(buffer.data(), &output, sizeof(Output)); return SendRawData(buffer); @@ -72,7 +72,8 @@ public: * @param sub_command type of data to be returned * @returns a buffer containing the response */ - DriverResult GetSubCommandResponse(SubCommand sub_command, SubCommandResponse& output); + Common::Input::DriverResult GetSubCommandResponse(SubCommand sub_command, + SubCommandResponse& output); /** * Sends a sub command to the device and waits for it's reply @@ -80,35 +81,35 @@ public: * @param buffer data to be send * @returns output buffer containing the response */ - DriverResult SendSubCommand(SubCommand sc, std::span buffer, - SubCommandResponse& output); + Common::Input::DriverResult SendSubCommand(SubCommand sc, std::span buffer, + SubCommandResponse& output); /** * Sends a sub command to the device and waits for it's reply and ignores the output * @param sc sub command to be send * @param buffer data to be send */ - DriverResult SendSubCommand(SubCommand sc, std::span buffer); + Common::Input::DriverResult SendSubCommand(SubCommand sc, std::span buffer); /** * Sends a mcu command to the device * @param sc sub command to be send * @param buffer data to be send */ - DriverResult SendMCUCommand(SubCommand sc, std::span buffer); + Common::Input::DriverResult SendMCUCommand(SubCommand sc, std::span buffer); /** * Sends vibration data to the joycon * @param buffer data to be send */ - DriverResult SendVibrationReport(std::span buffer); + Common::Input::DriverResult SendVibrationReport(std::span buffer); /** * Reads the SPI memory stored on the joycon * @param Initial address location * @returns output buffer containing the response */ - DriverResult ReadRawSPI(SpiAddress addr, std::span output); + Common::Input::DriverResult ReadRawSPI(SpiAddress addr, std::span output); /** * Reads the SPI memory stored on the joycon @@ -117,37 +118,38 @@ public: */ template requires std::is_trivially_copyable_v - DriverResult ReadSPI(SpiAddress addr, Output& output) { + Common::Input::DriverResult ReadSPI(SpiAddress addr, Output& output) { std::array buffer; output = {}; const auto result = ReadRawSPI(addr, buffer); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } std::memcpy(&output, buffer.data(), sizeof(Output)); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } /** * Enables MCU chip on the joycon * @param enable if true the chip will be enabled */ - DriverResult EnableMCU(bool enable); + Common::Input::DriverResult EnableMCU(bool enable); /** * Configures the MCU to the corresponding mode * @param MCUConfig configuration */ - DriverResult ConfigureMCU(const MCUConfig& config); + Common::Input::DriverResult ConfigureMCU(const MCUConfig& config); /** * Waits until there's MCU data available. On timeout returns error * @param report mode of the expected reply * @returns a buffer containing the response */ - DriverResult GetMCUDataResponse(ReportMode report_mode_, MCUCommandResponse& output); + Common::Input::DriverResult GetMCUDataResponse(ReportMode report_mode_, + MCUCommandResponse& output); /** * Sends data to the MCU chip and waits for it's reply @@ -156,15 +158,15 @@ public: * @param buffer data to be send * @returns output buffer containing the response */ - DriverResult SendMCUData(ReportMode report_mode, MCUSubCommand sc, std::span buffer, - MCUCommandResponse& output); + Common::Input::DriverResult SendMCUData(ReportMode report_mode, MCUSubCommand sc, + std::span buffer, MCUCommandResponse& output); /** * Wait's until the MCU chip is on the specified mode * @param report mode of the expected reply * @param MCUMode configuration */ - DriverResult WaitSetMCUMode(ReportMode report_mode, MCUMode mode); + Common::Input::DriverResult WaitSetMCUMode(ReportMode report_mode, MCUMode mode); /** * Calculates the checksum from the MCU data diff --git a/src/input_common/helpers/joycon_protocol/generic_functions.cpp b/src/input_common/helpers/joycon_protocol/generic_functions.cpp index 548a4b9e3..e9a056448 100644 --- a/src/input_common/helpers/joycon_protocol/generic_functions.cpp +++ b/src/input_common/helpers/joycon_protocol/generic_functions.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/input.h" #include "common/logging/log.h" #include "input_common/helpers/joycon_protocol/generic_functions.h" @@ -9,73 +10,74 @@ namespace InputCommon::Joycon { GenericProtocol::GenericProtocol(std::shared_ptr handle) : JoyconCommonProtocol(std::move(handle)) {} -DriverResult GenericProtocol::EnablePassiveMode() { +Common::Input::DriverResult GenericProtocol::EnablePassiveMode() { ScopedSetBlocking sb(this); return SetReportMode(ReportMode::SIMPLE_HID_MODE); } -DriverResult GenericProtocol::EnableActiveMode() { +Common::Input::DriverResult GenericProtocol::EnableActiveMode() { ScopedSetBlocking sb(this); return SetReportMode(ReportMode::STANDARD_FULL_60HZ); } -DriverResult GenericProtocol::SetLowPowerMode(bool enable) { +Common::Input::DriverResult GenericProtocol::SetLowPowerMode(bool enable) { ScopedSetBlocking sb(this); const std::array buffer{static_cast(enable ? 1 : 0)}; return SendSubCommand(SubCommand::LOW_POWER_MODE, buffer); } -DriverResult GenericProtocol::TriggersElapsed() { +Common::Input::DriverResult GenericProtocol::TriggersElapsed() { ScopedSetBlocking sb(this); return SendSubCommand(SubCommand::TRIGGERS_ELAPSED, {}); } -DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) { +Common::Input::DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) { ScopedSetBlocking sb(this); SubCommandResponse output{}; const auto result = SendSubCommand(SubCommand::REQ_DEV_INFO, {}, output); device_info = {}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { device_info = output.device_info; } return result; } -DriverResult GenericProtocol::GetControllerType(ControllerType& controller_type) { +Common::Input::DriverResult GenericProtocol::GetControllerType(ControllerType& controller_type) { return GetDeviceType(controller_type); } -DriverResult GenericProtocol::EnableImu(bool enable) { +Common::Input::DriverResult GenericProtocol::EnableImu(bool enable) { ScopedSetBlocking sb(this); const std::array buffer{static_cast(enable ? 1 : 0)}; return SendSubCommand(SubCommand::ENABLE_IMU, buffer); } -DriverResult GenericProtocol::SetImuConfig(GyroSensitivity gsen, GyroPerformance gfrec, - AccelerometerSensitivity asen, - AccelerometerPerformance afrec) { +Common::Input::DriverResult GenericProtocol::SetImuConfig(GyroSensitivity gsen, + GyroPerformance gfrec, + AccelerometerSensitivity asen, + AccelerometerPerformance afrec) { ScopedSetBlocking sb(this); const std::array buffer{static_cast(gsen), static_cast(asen), static_cast(gfrec), static_cast(afrec)}; return SendSubCommand(SubCommand::SET_IMU_SENSITIVITY, buffer); } -DriverResult GenericProtocol::GetBattery(u32& battery_level) { +Common::Input::DriverResult GenericProtocol::GetBattery(u32& battery_level) { // This function is meant to request the high resolution battery status battery_level = 0; - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } -DriverResult GenericProtocol::GetColor(Color& color) { +Common::Input::DriverResult GenericProtocol::GetColor(Color& color) { ScopedSetBlocking sb(this); std::array buffer{}; const auto result = ReadRawSPI(SpiAddress::COLOR_DATA, buffer); color = {}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { color.body = static_cast((buffer[0] << 16) | (buffer[1] << 8) | buffer[2]); color.buttons = static_cast((buffer[3] << 16) | (buffer[4] << 8) | buffer[5]); color.left_grip = static_cast((buffer[6] << 16) | (buffer[7] << 8) | buffer[8]); @@ -85,26 +87,26 @@ DriverResult GenericProtocol::GetColor(Color& color) { return result; } -DriverResult GenericProtocol::GetSerialNumber(SerialNumber& serial_number) { +Common::Input::DriverResult GenericProtocol::GetSerialNumber(SerialNumber& serial_number) { ScopedSetBlocking sb(this); std::array buffer{}; const auto result = ReadRawSPI(SpiAddress::SERIAL_NUMBER, buffer); serial_number = {}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { memcpy(serial_number.data(), buffer.data() + 1, sizeof(SerialNumber)); } return result; } -DriverResult GenericProtocol::GetTemperature(u32& temperature) { +Common::Input::DriverResult GenericProtocol::GetTemperature(u32& temperature) { // Not all devices have temperature sensor temperature = 25; - return DriverResult::NotSupported; + return Common::Input::DriverResult::NotSupported; } -DriverResult GenericProtocol::GetVersionNumber(FirmwareVersion& version) { +Common::Input::DriverResult GenericProtocol::GetVersionNumber(FirmwareVersion& version) { DeviceInfo device_info{}; const auto result = GetDeviceInfo(device_info); @@ -113,23 +115,23 @@ DriverResult GenericProtocol::GetVersionNumber(FirmwareVersion& version) { return result; } -DriverResult GenericProtocol::SetHomeLight() { +Common::Input::DriverResult GenericProtocol::SetHomeLight() { ScopedSetBlocking sb(this); static constexpr std::array buffer{0x0f, 0xf0, 0x00}; return SendSubCommand(SubCommand::SET_HOME_LIGHT, buffer); } -DriverResult GenericProtocol::SetLedBusy() { - return DriverResult::NotSupported; +Common::Input::DriverResult GenericProtocol::SetLedBusy() { + return Common::Input::DriverResult::NotSupported; } -DriverResult GenericProtocol::SetLedPattern(u8 leds) { +Common::Input::DriverResult GenericProtocol::SetLedPattern(u8 leds) { ScopedSetBlocking sb(this); const std::array buffer{leds}; return SendSubCommand(SubCommand::SET_PLAYER_LIGHTS, buffer); } -DriverResult GenericProtocol::SetLedBlinkPattern(u8 leds) { +Common::Input::DriverResult GenericProtocol::SetLedBlinkPattern(u8 leds) { return SetLedPattern(static_cast(leds << 4)); } diff --git a/src/input_common/helpers/joycon_protocol/generic_functions.h b/src/input_common/helpers/joycon_protocol/generic_functions.h index 424831e81..90fcd17f6 100644 --- a/src/input_common/helpers/joycon_protocol/generic_functions.h +++ b/src/input_common/helpers/joycon_protocol/generic_functions.h @@ -11,6 +11,10 @@ #include "input_common/helpers/joycon_protocol/common_protocol.h" #include "input_common/helpers/joycon_protocol/joycon_types.h" +namespace Common::Input { +enum class DriverResult; +} + namespace InputCommon::Joycon { /// Joycon driver functions that easily implemented @@ -20,34 +24,34 @@ public: /// Enables passive mode. This mode only sends button data on change. Sticks will return digital /// data instead of analog. Motion will be disabled - DriverResult EnablePassiveMode(); + Common::Input::DriverResult EnablePassiveMode(); /// Enables active mode. This mode will return the current status every 5-15ms - DriverResult EnableActiveMode(); + Common::Input::DriverResult EnableActiveMode(); /// Enables or disables the low power mode - DriverResult SetLowPowerMode(bool enable); + Common::Input::DriverResult SetLowPowerMode(bool enable); /// Unknown function used by the switch - DriverResult TriggersElapsed(); + Common::Input::DriverResult TriggersElapsed(); /** * Sends a request to obtain the joycon firmware and mac from handle * @returns controller device info */ - DriverResult GetDeviceInfo(DeviceInfo& controller_type); + Common::Input::DriverResult GetDeviceInfo(DeviceInfo& controller_type); /** * Sends a request to obtain the joycon type from handle * @returns controller type of the joycon */ - DriverResult GetControllerType(ControllerType& controller_type); + Common::Input::DriverResult GetControllerType(ControllerType& controller_type); /** * Enables motion input * @param enable if true motion data will be enabled */ - DriverResult EnableImu(bool enable); + Common::Input::DriverResult EnableImu(bool enable); /** * Configures the motion sensor with the specified parameters @@ -56,59 +60,60 @@ public: * @param asen accelerometer sensitivity in G force * @param afrec accelerometer frequency in hertz */ - DriverResult SetImuConfig(GyroSensitivity gsen, GyroPerformance gfrec, - AccelerometerSensitivity asen, AccelerometerPerformance afrec); + Common::Input::DriverResult SetImuConfig(GyroSensitivity gsen, GyroPerformance gfrec, + AccelerometerSensitivity asen, + AccelerometerPerformance afrec); /** * Request battery level from the device * @returns battery level */ - DriverResult GetBattery(u32& battery_level); + Common::Input::DriverResult GetBattery(u32& battery_level); /** * Request joycon colors from the device * @returns colors of the body and buttons */ - DriverResult GetColor(Color& color); + Common::Input::DriverResult GetColor(Color& color); /** * Request joycon serial number from the device * @returns 16 byte serial number */ - DriverResult GetSerialNumber(SerialNumber& serial_number); + Common::Input::DriverResult GetSerialNumber(SerialNumber& serial_number); /** * Request joycon serial number from the device * @returns 16 byte serial number */ - DriverResult GetTemperature(u32& temperature); + Common::Input::DriverResult GetTemperature(u32& temperature); /** * Request joycon serial number from the device * @returns 16 byte serial number */ - DriverResult GetVersionNumber(FirmwareVersion& version); + Common::Input::DriverResult GetVersionNumber(FirmwareVersion& version); /** * Sets home led behaviour */ - DriverResult SetHomeLight(); + Common::Input::DriverResult SetHomeLight(); /** * Sets home led into a slow breathing state */ - DriverResult SetLedBusy(); + Common::Input::DriverResult SetLedBusy(); /** * Sets the 4 player leds on the joycon on a solid state * @params bit flag containing the led state */ - DriverResult SetLedPattern(u8 leds); + Common::Input::DriverResult SetLedPattern(u8 leds); /** * Sets the 4 player leds on the joycon on a blinking state * @returns bit flag containing the led state */ - DriverResult SetLedBlinkPattern(u8 leds); + Common::Input::DriverResult SetLedBlinkPattern(u8 leds); }; } // namespace InputCommon::Joycon diff --git a/src/input_common/helpers/joycon_protocol/irs.cpp b/src/input_common/helpers/joycon_protocol/irs.cpp index 731fd5981..68b0589e3 100644 --- a/src/input_common/helpers/joycon_protocol/irs.cpp +++ b/src/input_common/helpers/joycon_protocol/irs.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include +#include "common/input.h" #include "common/logging/log.h" #include "input_common/helpers/joycon_protocol/irs.h" @@ -10,21 +10,21 @@ namespace InputCommon::Joycon { IrsProtocol::IrsProtocol(std::shared_ptr handle) : JoyconCommonProtocol(std::move(handle)) {} -DriverResult IrsProtocol::EnableIrs() { +Common::Input::DriverResult IrsProtocol::EnableIrs() { LOG_INFO(Input, "Enable IRS"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = SetReportMode(ReportMode::NFC_IR_MODE_60HZ); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = EnableMCU(true); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitSetMCUMode(ReportMode::NFC_IR_MODE_60HZ, MCUMode::Standby); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { const MCUConfig config{ .command = MCUCommand::ConfigureMCU, .sub_command = MCUSubCommand::SetMCUMode, @@ -34,16 +34,16 @@ DriverResult IrsProtocol::EnableIrs() { result = ConfigureMCU(config); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitSetMCUMode(ReportMode::NFC_IR_MODE_60HZ, MCUMode::IR); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = ConfigureIrs(); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WriteRegistersStep1(); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WriteRegistersStep2(); } @@ -52,12 +52,12 @@ DriverResult IrsProtocol::EnableIrs() { return result; } -DriverResult IrsProtocol::DisableIrs() { +Common::Input::DriverResult IrsProtocol::DisableIrs() { LOG_DEBUG(Input, "Disable IRS"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = EnableMCU(false); } @@ -66,7 +66,7 @@ DriverResult IrsProtocol::DisableIrs() { return result; } -DriverResult IrsProtocol::SetIrsConfig(IrsMode mode, IrsResolution format) { +Common::Input::DriverResult IrsProtocol::SetIrsConfig(IrsMode mode, IrsResolution format) { irs_mode = mode; switch (format) { case IrsResolution::Size320x240: @@ -103,10 +103,10 @@ DriverResult IrsProtocol::SetIrsConfig(IrsMode mode, IrsResolution format) { return EnableIrs(); } - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult IrsProtocol::RequestImage(std::span buffer) { +Common::Input::DriverResult IrsProtocol::RequestImage(std::span buffer) { const u8 next_packet_fragment = static_cast((packet_fragment + 1) % (static_cast(fragments) + 1)); @@ -129,7 +129,7 @@ DriverResult IrsProtocol::RequestImage(std::span buffer) { return RequestFrame(packet_fragment); } -DriverResult IrsProtocol::ConfigureIrs() { +Common::Input::DriverResult IrsProtocol::ConfigureIrs() { LOG_DEBUG(Input, "Configure IRS"); constexpr std::size_t max_tries = 28; SubCommandResponse output{}; @@ -152,20 +152,20 @@ DriverResult IrsProtocol::ConfigureIrs() { do { const auto result = SendSubCommand(SubCommand::SET_MCU_CONFIG, request_data, output); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ >= max_tries) { - return DriverResult::WrongReply; + return Common::Input::DriverResult::WrongReply; } } while (output.command_data[0] != 0x0b); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult IrsProtocol::WriteRegistersStep1() { +Common::Input::DriverResult IrsProtocol::WriteRegistersStep1() { LOG_DEBUG(Input, "WriteRegistersStep1"); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; constexpr std::size_t max_tries = 28; SubCommandResponse output{}; std::size_t tries = 0; @@ -197,7 +197,7 @@ DriverResult IrsProtocol::WriteRegistersStep1() { mcu_request[36] = CalculateMCU_CRC8(mcu_request.data(), 36); mcu_request[37] = 0xFF; - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } @@ -205,26 +205,26 @@ DriverResult IrsProtocol::WriteRegistersStep1() { result = SendSubCommand(SubCommand::SET_MCU_CONFIG, request_data, output); // First time we need to set the report mode - if (result == DriverResult::Success && tries == 0) { + if (result == Common::Input::DriverResult::Success && tries == 0) { result = SendMCUCommand(SubCommand::SET_REPORT_MODE, mcu_request); } - if (result == DriverResult::Success && tries == 0) { + if (result == Common::Input::DriverResult::Success && tries == 0) { GetSubCommandResponse(SubCommand::SET_MCU_CONFIG, output); } - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ >= max_tries) { - return DriverResult::WrongReply; + return Common::Input::DriverResult::WrongReply; } } while (!(output.command_data[0] == 0x13 && output.command_data[2] == 0x07) && output.command_data[0] != 0x23); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult IrsProtocol::WriteRegistersStep2() { +Common::Input::DriverResult IrsProtocol::WriteRegistersStep2() { LOG_DEBUG(Input, "WriteRegistersStep2"); constexpr std::size_t max_tries = 28; SubCommandResponse output{}; @@ -255,18 +255,18 @@ DriverResult IrsProtocol::WriteRegistersStep2() { do { const auto result = SendSubCommand(SubCommand::SET_MCU_CONFIG, request_data, output); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ >= max_tries) { - return DriverResult::WrongReply; + return Common::Input::DriverResult::WrongReply; } } while (output.command_data[0] != 0x13 && output.command_data[0] != 0x23); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult IrsProtocol::RequestFrame(u8 frame) { +Common::Input::DriverResult IrsProtocol::RequestFrame(u8 frame) { std::array mcu_request{}; mcu_request[3] = frame; mcu_request[36] = CalculateMCU_CRC8(mcu_request.data(), 36); @@ -274,7 +274,7 @@ DriverResult IrsProtocol::RequestFrame(u8 frame) { return SendMCUCommand(SubCommand::SET_REPORT_MODE, mcu_request); } -DriverResult IrsProtocol::ResendFrame(u8 frame) { +Common::Input::DriverResult IrsProtocol::ResendFrame(u8 frame) { std::array mcu_request{}; mcu_request[1] = 0x1; mcu_request[2] = frame; diff --git a/src/input_common/helpers/joycon_protocol/irs.h b/src/input_common/helpers/joycon_protocol/irs.h index 76dfa02ea..714cbb6b2 100644 --- a/src/input_common/helpers/joycon_protocol/irs.h +++ b/src/input_common/helpers/joycon_protocol/irs.h @@ -13,19 +13,23 @@ #include "input_common/helpers/joycon_protocol/common_protocol.h" #include "input_common/helpers/joycon_protocol/joycon_types.h" +namespace Common::Input { +enum class DriverResult; +} + namespace InputCommon::Joycon { class IrsProtocol final : private JoyconCommonProtocol { public: explicit IrsProtocol(std::shared_ptr handle); - DriverResult EnableIrs(); + Common::Input::DriverResult EnableIrs(); - DriverResult DisableIrs(); + Common::Input::DriverResult DisableIrs(); - DriverResult SetIrsConfig(IrsMode mode, IrsResolution format); + Common::Input::DriverResult SetIrsConfig(IrsMode mode, IrsResolution format); - DriverResult RequestImage(std::span buffer); + Common::Input::DriverResult RequestImage(std::span buffer); std::vector GetImage() const; @@ -34,13 +38,13 @@ public: bool IsEnabled() const; private: - DriverResult ConfigureIrs(); + Common::Input::DriverResult ConfigureIrs(); - DriverResult WriteRegistersStep1(); - DriverResult WriteRegistersStep2(); + Common::Input::DriverResult WriteRegistersStep1(); + Common::Input::DriverResult WriteRegistersStep2(); - DriverResult RequestFrame(u8 frame); - DriverResult ResendFrame(u8 frame); + Common::Input::DriverResult RequestFrame(u8 frame); + Common::Input::DriverResult ResendFrame(u8 frame); IrsMode irs_mode{IrsMode::ImageTransfer}; IrsResolution resolution{IrsResolution::Size40x30}; diff --git a/src/input_common/helpers/joycon_protocol/joycon_types.h b/src/input_common/helpers/joycon_protocol/joycon_types.h index e0e431156..77a43c67a 100644 --- a/src/input_common/helpers/joycon_protocol/joycon_types.h +++ b/src/input_common/helpers/joycon_protocol/joycon_types.h @@ -402,23 +402,6 @@ enum class ExternalDeviceId : u16 { Starlink = 0x2800, }; -enum class DriverResult { - Success, - WrongReply, - Timeout, - InvalidParameters, - UnsupportedControllerType, - HandleInUse, - ErrorReadingData, - ErrorWritingData, - NoDeviceDetected, - InvalidHandle, - NotSupported, - Disabled, - Delayed, - Unknown, -}; - struct MotionSensorCalibration { s16 offset; s16 scale; diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp index 261f46255..09953394b 100644 --- a/src/input_common/helpers/joycon_protocol/nfc.cpp +++ b/src/input_common/helpers/joycon_protocol/nfc.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include +#include "common/input.h" #include "common/logging/log.h" #include "input_common/helpers/joycon_protocol/nfc.h" @@ -10,21 +10,21 @@ namespace InputCommon::Joycon { NfcProtocol::NfcProtocol(std::shared_ptr handle) : JoyconCommonProtocol(std::move(handle)) {} -DriverResult NfcProtocol::EnableNfc() { +Common::Input::DriverResult NfcProtocol::EnableNfc() { LOG_INFO(Input, "Enable NFC"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = SetReportMode(ReportMode::NFC_IR_MODE_60HZ); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = EnableMCU(true); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitSetMCUMode(ReportMode::NFC_IR_MODE_60HZ, MCUMode::Standby); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { const MCUConfig config{ .command = MCUCommand::ConfigureMCU, .sub_command = MCUSubCommand::SetMCUMode, @@ -34,32 +34,32 @@ DriverResult NfcProtocol::EnableNfc() { result = ConfigureMCU(config); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitSetMCUMode(ReportMode::NFC_IR_MODE_60HZ, MCUMode::NFC); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::Ready); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStopPollingRequest(output); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::Ready); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { is_enabled = true; } return result; } -DriverResult NfcProtocol::DisableNfc() { +Common::Input::DriverResult NfcProtocol::DisableNfc() { LOG_DEBUG(Input, "Disable NFC"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = EnableMCU(false); } @@ -69,60 +69,60 @@ DriverResult NfcProtocol::DisableNfc() { return result; } -DriverResult NfcProtocol::StartNFCPollingMode() { +Common::Input::DriverResult NfcProtocol::StartNFCPollingMode() { LOG_DEBUG(Input, "Start NFC polling Mode"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStartPollingRequest(output); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::Polling); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { is_polling = true; } return result; } -DriverResult NfcProtocol::StopNFCPollingMode() { +Common::Input::DriverResult NfcProtocol::StopNFCPollingMode() { LOG_DEBUG(Input, "Stop NFC polling Mode"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStopPollingRequest(output); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::WriteReady); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { is_polling = false; } return result; } -DriverResult NfcProtocol::GetTagInfo(Joycon::TagInfo& tag_info) { +Common::Input::DriverResult NfcProtocol::GetTagInfo(Joycon::TagInfo& tag_info) { if (update_counter++ < AMIIBO_UPDATE_DELAY) { - return DriverResult::Delayed; + return Common::Input::DriverResult::Delayed; } update_counter = 0; LOG_DEBUG(Input, "Scan for amiibos"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; TagFoundData tag_data{}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = IsTagInRange(tag_data); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { tag_info = { .uuid_length = tag_data.uuid_size, .protocol = 1, @@ -147,59 +147,59 @@ DriverResult NfcProtocol::GetTagInfo(Joycon::TagInfo& tag_info) { return result; } -DriverResult NfcProtocol::ReadAmiibo(std::vector& data) { +Common::Input::DriverResult NfcProtocol::ReadAmiibo(std::vector& data) { LOG_DEBUG(Input, "Scan for amiibos"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; TagFoundData tag_data{}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = IsTagInRange(tag_data, 7); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = GetAmiiboData(data); } return result; } -DriverResult NfcProtocol::WriteAmiibo(std::span data) { +Common::Input::DriverResult NfcProtocol::WriteAmiibo(std::span data) { LOG_DEBUG(Input, "Write amiibo"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; TagUUID tag_uuid = GetTagUUID(data); TagFoundData tag_data{}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = IsTagInRange(tag_data, 7); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { if (tag_data.uuid != tag_uuid) { - result = DriverResult::InvalidParameters; + result = Common::Input::DriverResult::InvalidParameters; } } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStopPollingRequest(output); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::Ready); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStartPollingRequest(output, true); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::WriteReady); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WriteAmiiboData(tag_uuid, data); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::WriteDone); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStopPollingRequest(output); } @@ -207,64 +207,65 @@ DriverResult NfcProtocol::WriteAmiibo(std::span data) { return result; } -DriverResult NfcProtocol::ReadMifare(std::span read_request, - std::span out_data) { +Common::Input::DriverResult NfcProtocol::ReadMifare(std::span read_request, + std::span out_data) { LOG_DEBUG(Input, "Read mifare"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; TagFoundData tag_data{}; MifareUUID tag_uuid{}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = IsTagInRange(tag_data, 7); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { memcpy(tag_uuid.data(), tag_data.uuid.data(), sizeof(MifareUUID)); result = GetMifareData(tag_uuid, read_request, out_data); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStopPollingRequest(output); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::Ready); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStartPollingRequest(output, true); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::WriteReady); } return result; } -DriverResult NfcProtocol::WriteMifare(std::span write_request) { +Common::Input::DriverResult NfcProtocol::WriteMifare( + std::span write_request) { LOG_DEBUG(Input, "Write mifare"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; TagFoundData tag_data{}; MifareUUID tag_uuid{}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = IsTagInRange(tag_data, 7); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { memcpy(tag_uuid.data(), tag_data.uuid.data(), sizeof(MifareUUID)); result = WriteMifareData(tag_uuid, write_request); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStopPollingRequest(output); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::Ready); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { MCUCommandResponse output{}; result = SendStartPollingRequest(output, true); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = WaitUntilNfcIs(NFCStatus::WriteReady); } return result; @@ -277,17 +278,17 @@ bool NfcProtocol::HasAmiibo() { update_counter = 0; ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; TagFoundData tag_data{}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = IsTagInRange(tag_data, 7); } - return result == DriverResult::Success; + return result == Common::Input::DriverResult::Success; } -DriverResult NfcProtocol::WaitUntilNfcIs(NFCStatus status) { +Common::Input::DriverResult NfcProtocol::WaitUntilNfcIs(NFCStatus status) { constexpr std::size_t timeout_limit = 10; MCUCommandResponse output{}; std::size_t tries = 0; @@ -295,30 +296,31 @@ DriverResult NfcProtocol::WaitUntilNfcIs(NFCStatus status) { do { auto result = SendNextPackageRequest(output, {}); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ > timeout_limit) { - return DriverResult::Timeout; + return Common::Input::DriverResult::Timeout; } } while (output.mcu_report != MCUReport::NFCState || (output.mcu_data[1] << 8) + output.mcu_data[0] != 0x0500 || output.mcu_data[5] != 0x31 || output.mcu_data[6] != static_cast(status)); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult NfcProtocol::IsTagInRange(TagFoundData& data, std::size_t timeout_limit) { +Common::Input::DriverResult NfcProtocol::IsTagInRange(TagFoundData& data, + std::size_t timeout_limit) { MCUCommandResponse output{}; std::size_t tries = 0; do { const auto result = SendNextPackageRequest(output, {}); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ > timeout_limit) { - return DriverResult::Timeout; + return Common::Input::DriverResult::Timeout; } } while (output.mcu_report != MCUReport::NFCState || (output.mcu_data[1] << 8) + output.mcu_data[0] != 0x0500 || @@ -328,10 +330,10 @@ DriverResult NfcProtocol::IsTagInRange(TagFoundData& data, std::size_t timeout_l data.uuid_size = std::min(output.mcu_data[14], static_cast(sizeof(TagUUID))); memcpy(data.uuid.data(), output.mcu_data.data() + 15, data.uuid.size()); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult NfcProtocol::GetAmiiboData(std::vector& ntag_data) { +Common::Input::DriverResult NfcProtocol::GetAmiiboData(std::vector& ntag_data) { constexpr std::size_t timeout_limit = 60; MCUCommandResponse output{}; std::size_t tries = 0; @@ -340,7 +342,7 @@ DriverResult NfcProtocol::GetAmiiboData(std::vector& ntag_data) { std::size_t ntag_buffer_pos = 0; auto result = SendReadAmiiboRequest(output, NFCPages::Block135); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } @@ -349,14 +351,14 @@ DriverResult NfcProtocol::GetAmiiboData(std::vector& ntag_data) { result = SendNextPackageRequest(output, package_index); const auto nfc_status = static_cast(output.mcu_data[6]); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if ((output.mcu_report == MCUReport::NFCReadData || output.mcu_report == MCUReport::NFCState) && nfc_status == NFCStatus::TagLost) { - return DriverResult::ErrorReadingData; + return Common::Input::DriverResult::ErrorReadingData; } if (output.mcu_report == MCUReport::NFCReadData && output.mcu_data[1] == 0x07) { @@ -375,14 +377,15 @@ DriverResult NfcProtocol::GetAmiiboData(std::vector& ntag_data) { if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::LastPackage) { LOG_INFO(Input, "Finished reading amiibo"); - return DriverResult::Success; + return Common::Input::DriverResult::Success; } } - return DriverResult::Timeout; + return Common::Input::DriverResult::Timeout; } -DriverResult NfcProtocol::WriteAmiiboData(const TagUUID& tag_uuid, std::span data) { +Common::Input::DriverResult NfcProtocol::WriteAmiiboData(const TagUUID& tag_uuid, + std::span data) { constexpr std::size_t timeout_limit = 60; const auto nfc_data = MakeAmiiboWritePackage(tag_uuid, data); const std::vector nfc_buffer_data = SerializeWritePackage(nfc_data); @@ -397,7 +400,7 @@ DriverResult NfcProtocol::WriteAmiiboData(const TagUUID& tag_uuid, std::span(output.mcu_data[6]); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if ((output.mcu_report == MCUReport::NFCReadData || output.mcu_report == MCUReport::NFCState) && nfc_status == NFCStatus::TagLost) { - return DriverResult::ErrorReadingData; + return Common::Input::DriverResult::ErrorReadingData; } if (output.mcu_report == MCUReport::NFCReadData && output.mcu_data[1] == 0x07) { @@ -442,7 +445,7 @@ DriverResult NfcProtocol::WriteAmiiboData(const TagUUID& tag_uuid, std::span read_request, - std::span out_data) { +Common::Input::DriverResult NfcProtocol::GetMifareData( + const MifareUUID& tag_uuid, std::span read_request, + std::span out_data) { constexpr std::size_t timeout_limit = 60; const auto nfc_data = MakeMifareReadPackage(tag_uuid, read_request); const std::vector nfc_buffer_data = SerializeMifareReadPackage(nfc_data); std::span buffer(nfc_buffer_data); - DriverResult result = DriverResult::Success; + Common::Input::DriverResult result = Common::Input::DriverResult::Success; MCUCommandResponse output{}; u8 block_id = 1; u8 package_index = 0; @@ -486,7 +489,7 @@ DriverResult NfcProtocol::GetMifareData(const MifareUUID& tag_uuid, const auto nfc_status = static_cast(output.mcu_data[6]); if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { - return DriverResult::ErrorReadingData; + return Common::Input::DriverResult::ErrorReadingData; } // Increase position when data is confirmed by the joycon @@ -498,7 +501,7 @@ DriverResult NfcProtocol::GetMifareData(const MifareUUID& tag_uuid, } } - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } @@ -507,12 +510,12 @@ DriverResult NfcProtocol::GetMifareData(const MifareUUID& tag_uuid, result = SendNextPackageRequest(output, package_index); const auto nfc_status = static_cast(output.mcu_data[6]); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { - return DriverResult::ErrorReadingData; + return Common::Input::DriverResult::ErrorReadingData; } if (output.mcu_report == MCUReport::NFCState && output.mcu_data[1] == 0x10) { @@ -538,13 +541,13 @@ DriverResult NfcProtocol::GetMifareData(const MifareUUID& tag_uuid, return result; } -DriverResult NfcProtocol::WriteMifareData(const MifareUUID& tag_uuid, - std::span write_request) { +Common::Input::DriverResult NfcProtocol::WriteMifareData( + const MifareUUID& tag_uuid, std::span write_request) { constexpr std::size_t timeout_limit = 60; const auto nfc_data = MakeMifareWritePackage(tag_uuid, write_request); const std::vector nfc_buffer_data = SerializeMifareWritePackage(nfc_data); std::span buffer(nfc_buffer_data); - DriverResult result = DriverResult::Success; + Common::Input::DriverResult result = Common::Input::DriverResult::Success; MCUCommandResponse output{}; u8 block_id = 1; u8 package_index = 0; @@ -566,7 +569,7 @@ DriverResult NfcProtocol::WriteMifareData(const MifareUUID& tag_uuid, const auto nfc_status = static_cast(output.mcu_data[6]); if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { - return DriverResult::ErrorReadingData; + return Common::Input::DriverResult::ErrorReadingData; } // Increase position when data is confirmed by the joycon @@ -578,7 +581,7 @@ DriverResult NfcProtocol::WriteMifareData(const MifareUUID& tag_uuid, } } - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } @@ -587,12 +590,12 @@ DriverResult NfcProtocol::WriteMifareData(const MifareUUID& tag_uuid, result = SendNextPackageRequest(output, package_index); const auto nfc_status = static_cast(output.mcu_data[6]); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (output.mcu_report == MCUReport::NFCState && nfc_status == NFCStatus::TagLost) { - return DriverResult::ErrorReadingData; + return Common::Input::DriverResult::ErrorReadingData; } if (output.mcu_report == MCUReport::NFCState && output.mcu_data[1] == 0x10) { @@ -609,8 +612,8 @@ DriverResult NfcProtocol::WriteMifareData(const MifareUUID& tag_uuid, return result; } -DriverResult NfcProtocol::SendStartPollingRequest(MCUCommandResponse& output, - bool is_second_attempt) { +Common::Input::DriverResult NfcProtocol::SendStartPollingRequest(MCUCommandResponse& output, + bool is_second_attempt) { NFCRequestState request{ .command_argument = NFCCommand::StartPolling, .block_id = {}, @@ -635,7 +638,7 @@ DriverResult NfcProtocol::SendStartPollingRequest(MCUCommandResponse& output, output); } -DriverResult NfcProtocol::SendStopPollingRequest(MCUCommandResponse& output) { +Common::Input::DriverResult NfcProtocol::SendStopPollingRequest(MCUCommandResponse& output) { NFCRequestState request{ .command_argument = NFCCommand::StopPolling, .block_id = {}, @@ -653,7 +656,8 @@ DriverResult NfcProtocol::SendStopPollingRequest(MCUCommandResponse& output) { output); } -DriverResult NfcProtocol::SendNextPackageRequest(MCUCommandResponse& output, u8 packet_id) { +Common::Input::DriverResult NfcProtocol::SendNextPackageRequest(MCUCommandResponse& output, + u8 packet_id) { NFCRequestState request{ .command_argument = NFCCommand::StartWaitingRecieve, .block_id = {}, @@ -671,7 +675,8 @@ DriverResult NfcProtocol::SendNextPackageRequest(MCUCommandResponse& output, u8 output); } -DriverResult NfcProtocol::SendReadAmiiboRequest(MCUCommandResponse& output, NFCPages ntag_pages) { +Common::Input::DriverResult NfcProtocol::SendReadAmiiboRequest(MCUCommandResponse& output, + NFCPages ntag_pages) { NFCRequestState request{ .command_argument = NFCCommand::ReadNtag, .block_id = {}, @@ -696,8 +701,8 @@ DriverResult NfcProtocol::SendReadAmiiboRequest(MCUCommandResponse& output, NFCP output); } -DriverResult NfcProtocol::SendWriteAmiiboRequest(MCUCommandResponse& output, - const TagUUID& tag_uuid) { +Common::Input::DriverResult NfcProtocol::SendWriteAmiiboRequest(MCUCommandResponse& output, + const TagUUID& tag_uuid) { NFCRequestState request{ .command_argument = NFCCommand::ReadNtag, .block_id = {}, @@ -722,9 +727,10 @@ DriverResult NfcProtocol::SendWriteAmiiboRequest(MCUCommandResponse& output, output); } -DriverResult NfcProtocol::SendWriteDataAmiiboRequest(MCUCommandResponse& output, u8 block_id, - bool is_last_packet, - std::span data) { +Common::Input::DriverResult NfcProtocol::SendWriteDataAmiiboRequest(MCUCommandResponse& output, + u8 block_id, + bool is_last_packet, + std::span data) { const auto data_size = std::min(data.size(), sizeof(NFCRequestState::raw_data)); NFCRequestState request{ .command_argument = NFCCommand::WriteNtag, @@ -745,8 +751,9 @@ DriverResult NfcProtocol::SendWriteDataAmiiboRequest(MCUCommandResponse& output, output); } -DriverResult NfcProtocol::SendReadDataMifareRequest(MCUCommandResponse& output, u8 block_id, - bool is_last_packet, std::span data) { +Common::Input::DriverResult NfcProtocol::SendReadDataMifareRequest(MCUCommandResponse& output, + u8 block_id, bool is_last_packet, + std::span data) { const auto data_size = std::min(data.size(), sizeof(NFCRequestState::raw_data)); NFCRequestState request{ .command_argument = NFCCommand::Mifare, diff --git a/src/input_common/helpers/joycon_protocol/nfc.h b/src/input_common/helpers/joycon_protocol/nfc.h index 0be95e40e..22db95170 100644 --- a/src/input_common/helpers/joycon_protocol/nfc.h +++ b/src/input_common/helpers/joycon_protocol/nfc.h @@ -13,30 +13,34 @@ #include "input_common/helpers/joycon_protocol/common_protocol.h" #include "input_common/helpers/joycon_protocol/joycon_types.h" +namespace Common::Input { +enum class DriverResult; +} + namespace InputCommon::Joycon { class NfcProtocol final : private JoyconCommonProtocol { public: explicit NfcProtocol(std::shared_ptr handle); - DriverResult EnableNfc(); + Common::Input::DriverResult EnableNfc(); - DriverResult DisableNfc(); + Common::Input::DriverResult DisableNfc(); - DriverResult StartNFCPollingMode(); + Common::Input::DriverResult StartNFCPollingMode(); - DriverResult StopNFCPollingMode(); + Common::Input::DriverResult StopNFCPollingMode(); - DriverResult GetTagInfo(Joycon::TagInfo& tag_info); + Common::Input::DriverResult GetTagInfo(Joycon::TagInfo& tag_info); - DriverResult ReadAmiibo(std::vector& data); + Common::Input::DriverResult ReadAmiibo(std::vector& data); - DriverResult WriteAmiibo(std::span data); + Common::Input::DriverResult WriteAmiibo(std::span data); - DriverResult ReadMifare(std::span read_request, - std::span out_data); + Common::Input::DriverResult ReadMifare(std::span read_request, + std::span out_data); - DriverResult WriteMifare(std::span write_request); + Common::Input::DriverResult WriteMifare(std::span write_request); bool HasAmiibo(); @@ -54,37 +58,41 @@ private: TagUUID uuid; }; - DriverResult WaitUntilNfcIs(NFCStatus status); + Common::Input::DriverResult WaitUntilNfcIs(NFCStatus status); - DriverResult IsTagInRange(TagFoundData& data, std::size_t timeout_limit = 1); + Common::Input::DriverResult IsTagInRange(TagFoundData& data, std::size_t timeout_limit = 1); - DriverResult GetAmiiboData(std::vector& data); + Common::Input::DriverResult GetAmiiboData(std::vector& data); - DriverResult WriteAmiiboData(const TagUUID& tag_uuid, std::span data); + Common::Input::DriverResult WriteAmiiboData(const TagUUID& tag_uuid, std::span data); - DriverResult GetMifareData(const MifareUUID& tag_uuid, - std::span read_request, - std::span out_data); + Common::Input::DriverResult GetMifareData(const MifareUUID& tag_uuid, + std::span read_request, + std::span out_data); - DriverResult WriteMifareData(const MifareUUID& tag_uuid, - std::span write_request); + Common::Input::DriverResult WriteMifareData(const MifareUUID& tag_uuid, + std::span write_request); - DriverResult SendStartPollingRequest(MCUCommandResponse& output, - bool is_second_attempt = false); + Common::Input::DriverResult SendStartPollingRequest(MCUCommandResponse& output, + bool is_second_attempt = false); - DriverResult SendStopPollingRequest(MCUCommandResponse& output); + Common::Input::DriverResult SendStopPollingRequest(MCUCommandResponse& output); - DriverResult SendNextPackageRequest(MCUCommandResponse& output, u8 packet_id); + Common::Input::DriverResult SendNextPackageRequest(MCUCommandResponse& output, u8 packet_id); - DriverResult SendReadAmiiboRequest(MCUCommandResponse& output, NFCPages ntag_pages); + Common::Input::DriverResult SendReadAmiiboRequest(MCUCommandResponse& output, + NFCPages ntag_pages); - DriverResult SendWriteAmiiboRequest(MCUCommandResponse& output, const TagUUID& tag_uuid); + Common::Input::DriverResult SendWriteAmiiboRequest(MCUCommandResponse& output, + const TagUUID& tag_uuid); - DriverResult SendWriteDataAmiiboRequest(MCUCommandResponse& output, u8 block_id, - bool is_last_packet, std::span data); + Common::Input::DriverResult SendWriteDataAmiiboRequest(MCUCommandResponse& output, u8 block_id, + bool is_last_packet, + std::span data); - DriverResult SendReadDataMifareRequest(MCUCommandResponse& output, u8 block_id, - bool is_last_packet, std::span data); + Common::Input::DriverResult SendReadDataMifareRequest(MCUCommandResponse& output, u8 block_id, + bool is_last_packet, + std::span data); std::vector SerializeWritePackage(const NFCWritePackage& package) const; diff --git a/src/input_common/helpers/joycon_protocol/ringcon.cpp b/src/input_common/helpers/joycon_protocol/ringcon.cpp index 190cef812..f31ff6b34 100644 --- a/src/input_common/helpers/joycon_protocol/ringcon.cpp +++ b/src/input_common/helpers/joycon_protocol/ringcon.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/input.h" #include "common/logging/log.h" #include "input_common/helpers/joycon_protocol/ringcon.h" @@ -9,18 +10,18 @@ namespace InputCommon::Joycon { RingConProtocol::RingConProtocol(std::shared_ptr handle) : JoyconCommonProtocol(std::move(handle)) {} -DriverResult RingConProtocol::EnableRingCon() { +Common::Input::DriverResult RingConProtocol::EnableRingCon() { LOG_DEBUG(Input, "Enable Ringcon"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = SetReportMode(ReportMode::STANDARD_FULL_60HZ); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = EnableMCU(true); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { const MCUConfig config{ .command = MCUCommand::ConfigureMCU, .sub_command = MCUSubCommand::SetDeviceMode, @@ -33,12 +34,12 @@ DriverResult RingConProtocol::EnableRingCon() { return result; } -DriverResult RingConProtocol::DisableRingCon() { +Common::Input::DriverResult RingConProtocol::DisableRingCon() { LOG_DEBUG(Input, "Disable RingCon"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = EnableMCU(false); } @@ -47,27 +48,27 @@ DriverResult RingConProtocol::DisableRingCon() { return result; } -DriverResult RingConProtocol::StartRingconPolling() { +Common::Input::DriverResult RingConProtocol::StartRingconPolling() { LOG_DEBUG(Input, "Enable Ringcon"); ScopedSetBlocking sb(this); - DriverResult result{DriverResult::Success}; + Common::Input::DriverResult result{Common::Input::DriverResult::Success}; bool is_connected = false; - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { result = IsRingConnected(is_connected); } - if (result == DriverResult::Success && is_connected) { + if (result == Common::Input::DriverResult::Success && is_connected) { LOG_INFO(Input, "Ringcon detected"); result = ConfigureRing(); } - if (result == DriverResult::Success) { + if (result == Common::Input::DriverResult::Success) { is_enabled = true; } return result; } -DriverResult RingConProtocol::IsRingConnected(bool& is_connected) { +Common::Input::DriverResult RingConProtocol::IsRingConnected(bool& is_connected) { LOG_DEBUG(Input, "IsRingConnected"); constexpr std::size_t max_tries = 28; SubCommandResponse output{}; @@ -77,20 +78,20 @@ DriverResult RingConProtocol::IsRingConnected(bool& is_connected) { do { const auto result = SendSubCommand(SubCommand::GET_EXTERNAL_DEVICE_INFO, {}, output); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } if (tries++ >= max_tries) { - return DriverResult::NoDeviceDetected; + return Common::Input::DriverResult::NoDeviceDetected; } } while (output.external_device_id != ExternalDeviceId::RingController); is_connected = true; - return DriverResult::Success; + return Common::Input::DriverResult::Success; } -DriverResult RingConProtocol::ConfigureRing() { +Common::Input::DriverResult RingConProtocol::ConfigureRing() { LOG_DEBUG(Input, "ConfigureRing"); static constexpr std::array ring_config{ @@ -98,9 +99,10 @@ DriverResult RingConProtocol::ConfigureRing() { 0x00, 0x00, 0x00, 0x0A, 0x64, 0x0B, 0xE6, 0xA9, 0x22, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xA8, 0xE1, 0x34, 0x36}; - const DriverResult result = SendSubCommand(SubCommand::SET_EXTERNAL_FORMAT_CONFIG, ring_config); + const Common::Input::DriverResult result = + SendSubCommand(SubCommand::SET_EXTERNAL_FORMAT_CONFIG, ring_config); - if (result != DriverResult::Success) { + if (result != Common::Input::DriverResult::Success) { return result; } diff --git a/src/input_common/helpers/joycon_protocol/ringcon.h b/src/input_common/helpers/joycon_protocol/ringcon.h index 6e858f3fc..9f0888de3 100644 --- a/src/input_common/helpers/joycon_protocol/ringcon.h +++ b/src/input_common/helpers/joycon_protocol/ringcon.h @@ -13,24 +13,28 @@ #include "input_common/helpers/joycon_protocol/common_protocol.h" #include "input_common/helpers/joycon_protocol/joycon_types.h" +namespace Common::Input { +enum class DriverResult; +} + namespace InputCommon::Joycon { class RingConProtocol final : private JoyconCommonProtocol { public: explicit RingConProtocol(std::shared_ptr handle); - DriverResult EnableRingCon(); + Common::Input::DriverResult EnableRingCon(); - DriverResult DisableRingCon(); + Common::Input::DriverResult DisableRingCon(); - DriverResult StartRingconPolling(); + Common::Input::DriverResult StartRingconPolling(); bool IsEnabled() const; private: - DriverResult IsRingConnected(bool& is_connected); + Common::Input::DriverResult IsRingConnected(bool& is_connected); - DriverResult ConfigureRing(); + Common::Input::DriverResult ConfigureRing(); bool is_enabled{}; }; diff --git a/src/input_common/helpers/joycon_protocol/rumble.cpp b/src/input_common/helpers/joycon_protocol/rumble.cpp index 63b60c946..7647f505e 100644 --- a/src/input_common/helpers/joycon_protocol/rumble.cpp +++ b/src/input_common/helpers/joycon_protocol/rumble.cpp @@ -4,6 +4,7 @@ #include #include +#include "common/input.h" #include "common/logging/log.h" #include "input_common/helpers/joycon_protocol/rumble.h" @@ -12,14 +13,14 @@ namespace InputCommon::Joycon { RumbleProtocol::RumbleProtocol(std::shared_ptr handle) : JoyconCommonProtocol(std::move(handle)) {} -DriverResult RumbleProtocol::EnableRumble(bool is_enabled) { +Common::Input::DriverResult RumbleProtocol::EnableRumble(bool is_enabled) { LOG_DEBUG(Input, "Enable Rumble"); ScopedSetBlocking sb(this); const std::array buffer{static_cast(is_enabled ? 1 : 0)}; return SendSubCommand(SubCommand::ENABLE_VIBRATION, buffer); } -DriverResult RumbleProtocol::SendVibration(const VibrationValue& vibration) { +Common::Input::DriverResult RumbleProtocol::SendVibration(const VibrationValue& vibration) { std::array buffer{}; if (vibration.high_amplitude <= 0.0f && vibration.low_amplitude <= 0.0f) { diff --git a/src/input_common/helpers/joycon_protocol/rumble.h b/src/input_common/helpers/joycon_protocol/rumble.h index 6c12b7925..5e50e531a 100644 --- a/src/input_common/helpers/joycon_protocol/rumble.h +++ b/src/input_common/helpers/joycon_protocol/rumble.h @@ -13,15 +13,19 @@ #include "input_common/helpers/joycon_protocol/common_protocol.h" #include "input_common/helpers/joycon_protocol/joycon_types.h" +namespace Common::Input { +enum class DriverResult; +} + namespace InputCommon::Joycon { class RumbleProtocol final : private JoyconCommonProtocol { public: explicit RumbleProtocol(std::shared_ptr handle); - DriverResult EnableRumble(bool is_enabled); + Common::Input::DriverResult EnableRumble(bool is_enabled); - DriverResult SendVibration(const VibrationValue& vibration); + Common::Input::DriverResult SendVibration(const VibrationValue& vibration); private: u16 EncodeHighFrequency(f32 frequency) const; diff --git a/src/yuzu/configuration/configure_ringcon.cpp b/src/yuzu/configuration/configure_ringcon.cpp index 71afbc423..f83705544 100644 --- a/src/yuzu/configuration/configure_ringcon.cpp +++ b/src/yuzu/configuration/configure_ringcon.cpp @@ -305,6 +305,9 @@ void ConfigureRingController::EnableRingController() { QMessageBox::warning(this, dialog_title, tr("The current mapped device doesn't have a ring attached")); break; + case Common::Input::DriverResult::InvalidHandle: + QMessageBox::warning(this, dialog_title, tr("The current mapped device is not connected")); + break; default: QMessageBox::warning(this, dialog_title, tr("Unexpected driver result %1").arg(static_cast(result))); From b76b698c173a58d19b7e7425768b6402ef68023e Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Wed, 28 Jun 2023 16:15:18 -0400 Subject: [PATCH 85/91] android: Android 14 support Specifies the permissions needed for the changes to foreground services in Android 14. --- src/android/app/build.gradle.kts | 4 ++-- src/android/app/src/main/AndroidManifest.xml | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index bab4f4d0f..9a47e2bd8 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -26,7 +26,7 @@ val autoVersion = (((System.currentTimeMillis() / 1000) - 1451606400) / 10).toIn android { namespace = "org.yuzu.yuzu_emu" - compileSdkVersion = "android-33" + compileSdkVersion = "android-34" ndkVersion = "25.2.9519653" buildFeatures { @@ -51,7 +51,7 @@ android { // TODO If this is ever modified, change application_id in strings.xml applicationId = "org.yuzu.yuzu_emu" minSdk = 30 - targetSdk = 33 + targetSdk = 34 versionName = getGitVersion() // If you want to use autoVersion for the versionCode, create a property in local.properties diff --git a/src/android/app/src/main/AndroidManifest.xml b/src/android/app/src/main/AndroidManifest.xml index e31ad69e2..51d949d65 100644 --- a/src/android/app/src/main/AndroidManifest.xml +++ b/src/android/app/src/main/AndroidManifest.xml @@ -13,6 +13,7 @@ SPDX-License-Identifier: GPL-3.0-or-later + @@ -69,7 +70,9 @@ SPDX-License-Identifier: GPL-3.0-or-later android:resource="@xml/nfc_tech_filter" /> - + + + Date: Wed, 28 Jun 2023 20:10:27 -0300 Subject: [PATCH 86/91] Blacklist EDS3 blending from new AMD drivers --- src/video_core/vulkan_common/vulkan_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 70436cf1c..421e71e5a 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -528,6 +528,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR } sets_per_pool = 64; + if (extensions.extended_dynamic_state3 && is_amd_driver && + properties.properties.driverVersion >= VK_MAKE_API_VERSION(0, 2, 0, 270)) { + LOG_WARNING(Render_Vulkan, + "AMD drivers after 23.5.2 have broken extendedDynamicState3ColorBlendEquation"); + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; + dynamic_state3_blending = false; + } if (is_amd_driver) { // AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2. sets_per_pool = 96; From ac755476cdaa8bace9c86183125d34dbe4c8cee9 Mon Sep 17 00:00:00 2001 From: german77 Date: Wed, 28 Jun 2023 08:38:45 -0600 Subject: [PATCH 87/91] input_common: Allow timeouts to happen while scanning for a ring --- src/input_common/helpers/joycon_protocol/common_protocol.cpp | 2 +- src/input_common/helpers/joycon_protocol/ringcon.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/input_common/helpers/joycon_protocol/common_protocol.cpp b/src/input_common/helpers/joycon_protocol/common_protocol.cpp index e10d15c18..a6eecf980 100644 --- a/src/input_common/helpers/joycon_protocol/common_protocol.cpp +++ b/src/input_common/helpers/joycon_protocol/common_protocol.cpp @@ -75,7 +75,7 @@ Common::Input::DriverResult JoyconCommonProtocol::SendRawData(std::span Date: Thu, 29 Jun 2023 11:58:45 +0200 Subject: [PATCH 88/91] Texture cache: Fix YFC regression due to code testing --- src/video_core/texture_cache/texture_cache.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index d3f03a995..485f6b6f3 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -598,14 +598,6 @@ void TextureCache

::UnmapGPUMemory(size_t as_id, GPUVAddr gpu_addr, size_t siz [&](ImageId id, Image&) { deleted_images.push_back(id); }); for (const ImageId id : deleted_images) { Image& image = slot_images[id]; - if (True(image.flags & ImageFlagBits::CpuModified)) { - return; - } - image.flags |= ImageFlagBits::CpuModified; - if (True(image.flags & ImageFlagBits::Tracked)) { - UntrackImage(image, id); - } - /* if (True(image.flags & ImageFlagBits::Remapped)) { continue; } @@ -613,7 +605,6 @@ void TextureCache

::UnmapGPUMemory(size_t as_id, GPUVAddr gpu_addr, size_t siz if (True(image.flags & ImageFlagBits::Tracked)) { UntrackImage(image, id); } - */ } } From 13506e7782d2f8e5704d0369819bdae37c9b31af Mon Sep 17 00:00:00 2001 From: Abandoned Cart Date: Thu, 29 Jun 2023 07:19:44 -0400 Subject: [PATCH 89/91] android: Suppress a known incompatibility Android Gradle plugin 8.0.2 is designed for API 33, but a newer plugin hasn't been released yet. The warning message is rather extravagant, but also suggests adding this property if you are aware of the risks. --- src/android/gradle.properties | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/android/gradle.properties b/src/android/gradle.properties index e2f278f33..4fca1b576 100644 --- a/src/android/gradle.properties +++ b/src/android/gradle.properties @@ -15,3 +15,6 @@ android.useAndroidX=true kotlin.code.style=official kotlin.parallel.tasks.in.project=true android.defaults.buildfeatures.buildconfig=true + +# Android Gradle plugin 8.0.2 +android.suppressUnsupportedCompileSdk=34 From 596a6132b974dd73935854d8f51842424e058be8 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Thu, 29 Jun 2023 17:23:29 +0200 Subject: [PATCH 90/91] AccelerateDMA: Don't accelerate 3D texture DMA operations --- src/video_core/texture_cache/texture_cache.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index d3f03a995..0330415b7 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -879,6 +879,10 @@ ImageId TextureCache

::DmaImageId(const Tegra::DMA::ImageOperand& operand, boo return NULL_IMAGE_ID; } auto& image = slot_images[image_id]; + if (image.info.type == ImageType::e3D) { + // Don't accelerate 3D images. + return NULL_IMAGE_ID; + } if (!is_upload && !image.info.dma_downloaded) { // Force a full sync. image.info.dma_downloaded = true; From 8857911216f16a098231c25e0d2992ab67e33f83 Mon Sep 17 00:00:00 2001 From: zhaobot <50136859+zhaobot@users.noreply.github.com> Date: Sat, 1 Jul 2023 11:41:49 +0800 Subject: [PATCH 91/91] Update translations (2023-07-01) (#10972) Co-authored-by: The yuzu Community --- dist/languages/ca.ts | 1308 ++++++++++++++++++-------------- dist/languages/cs.ts | 1294 +++++++++++++++++-------------- dist/languages/da.ts | 1284 +++++++++++++++++-------------- dist/languages/de.ts | 1472 +++++++++++++++++++---------------- dist/languages/el.ts | 1294 +++++++++++++++++-------------- dist/languages/es.ts | 1292 +++++++++++++++++-------------- dist/languages/fr.ts | 1289 +++++++++++++++++-------------- dist/languages/id.ts | 1340 +++++++++++++++++--------------- dist/languages/it.ts | 1332 +++++++++++++++++--------------- dist/languages/ja_JP.ts | 1352 ++++++++++++++++++--------------- dist/languages/ko_KR.ts | 1357 ++++++++++++++++++--------------- dist/languages/nb.ts | 1288 +++++++++++++++++-------------- dist/languages/nl.ts | 1296 +++++++++++++++++-------------- dist/languages/pl.ts | 1368 ++++++++++++++++++--------------- dist/languages/pt_BR.ts | 1342 +++++++++++++++++--------------- dist/languages/pt_PT.ts | 1344 +++++++++++++++++--------------- dist/languages/ru_RU.ts | 1314 ++++++++++++++++++-------------- dist/languages/sv.ts | 1284 +++++++++++++++++-------------- dist/languages/tr_TR.ts | 1288 +++++++++++++++++-------------- dist/languages/uk.ts | 1306 +++++++++++++++++-------------- dist/languages/vi.ts | 1322 +++++++++++++++++--------------- dist/languages/vi_VN.ts | 1322 +++++++++++++++++--------------- dist/languages/zh_CN.ts | 1288 +++++++++++++++++-------------- dist/languages/zh_TW.ts | 1602 +++++++++++++++++++++------------------ 24 files changed, 17612 insertions(+), 14366 deletions(-) diff --git a/dist/languages/ca.ts b/dist/languages/ca.ts index 7964da0d2..770b80a96 100644 --- a/dist/languages/ca.ts +++ b/dist/languages/ca.ts @@ -249,42 +249,42 @@ This would ban both their forum username and their IP address. Yes The game gets past the intro/menu and into gameplay - + Sí El joc supera la introducció/menú i entra en la part jugable. No The game crashes or freezes while loading or using the menu - + No El joc pot fallar o es bloqueja mentre es carrega o s'utilitza el menú <html><head/><body><p>Does the game reach gameplay?</p></body></html> - + <html><head/><body><p>El joc arriba a ser jugable?</p></body></html> Yes The game works without crashes - + Sí El joc funciona sense errors No The game crashes or freezes during gameplay - + No El joc pot fallar o es pot bloquejar durant la part jugable. <html><head/><body><p>Does the game work without crashing, freezing or locking up during gameplay?</p></body></html> - + <html><head/><body><p>Funciona el joc sense fallar, bloquejar-se o en bucle durant la part jugable?</p></body></html> Yes The game can be finished without any workarounds - + Sí El joc es pot acabar sense ninguna configuració extra especifica . No The game can't progress past a certain area - + No El joc no pot avançar més enllà d'una zona determinada @@ -294,12 +294,12 @@ This would ban both their forum username and their IP address. Major The game has major graphical errors - + Important El joc té errors gràfics importants Minor The game has minor graphical errors - + Menys important El joc té errors gràfics menors @@ -1126,78 +1126,78 @@ This would ban both their forum username and their IP address. Configuració de yuzu - - + + Audio Àudio - - + + CPU CPU - + Debug Depuració - + Filesystem Sistema de fitxers - - + + General General - - + + Graphics Gràfics - + GraphicsAdvanced GràficsAvançat - + Hotkeys Tecles d'accés ràpid - - + + Controls Controls - + Profiles Perfils - + Network Xarxa - - + + System Sistema - + Game List Llista de jocs - + Web Web @@ -1391,17 +1391,22 @@ This would ban both their forum username and their IP address. Ocultar el cursor del ratolí en cas d'inactivitat - + + Disable controller applet + + + + Reset All Settings Reiniciar tots els paràmetres - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Això restablirà tota la configuració i eliminarà totes les configuracions dels jocs. No eliminarà ni els directoris de jocs, ni els perfils, ni els perfils dels controladors. Procedir? @@ -1689,43 +1694,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Color de fons: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Assembly Shaders, només NVIDIA) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1849,37 +1854,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Filtrat anisotròpic: - + Automatic Automàtic - + Default Valor predeterminat - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2262,7 +2287,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Configurar @@ -2329,22 +2354,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Activar desplaçament del ratolí - - - - Mouse sensitivity - Sensibilitat del ratolí - - - - % - % - - - + Motion / Touch Moviment / Tàctil @@ -2456,7 +2466,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Palanca esquerra @@ -2550,14 +2560,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2576,7 +2586,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Més @@ -2589,15 +2599,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2654,247 +2664,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Palanca dreta - - - - + + Mouse panning + + + + + Configure + Configurar + + + + + + Clear Esborrar - - - - - + + + + + [not set] [no establert] - - - + + + Invert button Botó d'inversió - - + + Toggle button Botó commutador - + Turbo button - - + + Invert axis Invertir eixos - - - + + + Set threshold Configurar llindar - - + + Choose a value between 0% and 100% Esculli un valor entre 0% i 100% - + Toggle axis - + Set gyro threshold Configurar llindar giroscopi - + Calibrate sensor - + Map Analog Stick Configuració de palanca analògica - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Després de prémer D'acord, primer moveu el joystick horitzontalment i després verticalment. Per invertir els eixos, primer moveu el joystick verticalment i després horitzontalment. - + Center axis Centrar eixos - - + + Deadzone: %1% Zona morta: %1% - - + + Modifier Range: %1% Rang del modificador: %1% - - + + Pro Controller Controlador Pro - + Dual Joycons Joycons duals - + Left Joycon Joycon esquerra - + Right Joycon Joycon dret - + Handheld Portàtil - + GameCube Controller Controlador de GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Controlador NES - + SNES Controller Controlador SNES - + N64 Controller Controlador N64 - + Sega Genesis Sega Genesis - + Start / Pause Inici / Pausa - + Z Z - + Control Stick Palanca de control - + C-Stick C-Stick - + Shake! Sacseja! - + [waiting] [esperant] - + New Profile Nou perfil - + Enter a profile name: Introdueixi un nom de perfil: - - + + Create Input Profile Crear perfil d'entrada - + The given profile name is not valid! El nom de perfil introduït no és vàlid! - + Failed to create the input profile "%1" Error al crear el perfil d'entrada "%1" - + Delete Input Profile Eliminar perfil d'entrada - + Failed to delete the input profile "%1" Error al eliminar el perfil d'entrada "%1" - + Load Input Profile Carregar perfil d'entrada - + Failed to load the input profile "%1" Error al carregar el perfil d'entrada "%1" - + Save Input Profile Guardar perfil d'entrada - + Failed to save the input profile "%1" Error al guardar el perfil d'entrada "%1" @@ -3073,6 +3093,81 @@ Per invertir els eixos, primer moveu el joystick verticalment i després horitzo La prova del UDP o la configuració de la calibració està en curs.<br>Si us plau, esperi a que acabi el procés. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Valor predeterminat + + ConfigureNetwork @@ -3149,47 +3244,47 @@ Per invertir els eixos, primer moveu el joystick verticalment i després horitzo Desenvolupador - + Add-Ons Complements - + General General - + System Sistema - + CPU CPU - + Graphics Gràfics - + Adv. Graphics Gràfics avanç. - + Audio Àudio - + Input Profiles - + Properties Propietats @@ -3391,7 +3486,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3428,7 +3523,7 @@ UUID: %2 - + Enable @@ -3495,12 +3590,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [esperant] @@ -4610,560 +4710,575 @@ Arrossegui els punts per a canviar la posició, o faci doble clic a les cel·les GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Es recullen dades anònimes</a> per ajudar a millorar yuzu. <br/><br/>Desitja compartir les seves dades d'ús amb nosaltres? - + Telemetry Telemetria - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Carregant Web applet... - - + + Disable Web Applet Desactivar el Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Desactivar l'Applet Web pot provocar comportaments indefinits i només hauria d'utilitzar-se amb Super Mario 3D All-Stars. Estàs segur de que vols desactivar l'Applet Web? (Això pot ser reactivat als paràmetres Debug.) - + The amount of shaders currently being built La quantitat de shaders que s'estan compilant actualment - + The current selected resolution scaling multiplier. El multiplicador d'escala de resolució seleccionat actualment. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocitat d'emulació actual. Valors superiors o inferiors a 100% indiquen que l'emulació s'està executant més ràpidament o més lentament que a la Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Quants fotogrames per segon està mostrant el joc actualment. Això variarà d'un joc a un altre i d'una escena a una altra. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Temps que costa emular un fotograma de la Switch, sense tenir en compte la limitació de fotogrames o la sincronització vertical. Per a una emulació òptima, aquest valor hauria de ser com a màxim de 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files &Esborrar arxius recents - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Continuar - + &Pause &Pausar - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu està executant un joc - - - + Warning Outdated Game Format Advertència format del joc desfasat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Està utilitzant el format de directori de ROM deconstruït per a aquest joc, que és un format desactualitzat que ha sigut reemplaçat per altres, com NCA, NAX, XCI o NSP. Els directoris de ROM deconstruïts careixen d'icones, metadades i suport d'actualitzacions.<br><br>Per a obtenir una explicació dels diversos formats de Switch que suporta yuzu,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>faci una ullada a la nostra wiki</a>. Aquest missatge no es tornarà a mostrar. - - + + Error while loading ROM! Error carregant la ROM! - + The ROM format is not supported. El format de la ROM no està suportat. - + An error occurred initializing the video core. S'ha produït un error inicialitzant el nucli de vídeo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu ha trobat un error mentre executava el nucli de vídeo. Això sol ser causat per controladors de la GPU obsolets, inclosos els integrats. Si us plau, consulti el registre per a més detalls. Per obtenir més informació sobre com accedir al registre, consulti la següent pàgina: <a href='https://yuzu-emu.org/help/reference/log-files/'>Com carregar el fitxer de registre</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Error al carregar la ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Si us plau, segueixi <a href='https://yuzu-emu.org/help/quickstart/'>la guia d'inici de yuzu</a> per a bolcar de nou els seus fitxers.<br>Pot consultar la wiki de yuzu wiki</a> o el Discord de yuzu</a> per obtenir ajuda. - + An unknown error occurred. Please see the log for more details. S'ha produït un error desconegut. Si us plau, consulti el registre per a més detalls. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + S'està tancant el programari - + Save Data Dades de partides guardades - + Mod Data Dades de mods - + Error Opening %1 Folder Error obrint la carpeta %1 - - + + Folder does not exist! La carpeta no existeix! - + Error Opening Transferable Shader Cache Error obrint la cache transferible de shaders - + Failed to create the shader cache directory for this title. No s'ha pogut crear el directori de la cache dels shaders per aquest títol. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry Eliminar entrada - - - - - - + + + + + + Successfully Removed S'ha eliminat correctament - + Successfully removed the installed base game. S'ha eliminat correctament el joc base instal·lat. - + The base game is not installed in the NAND and cannot be removed. El joc base no està instal·lat a la NAND i no pot ser eliminat. - + Successfully removed the installed update. S'ha eliminat correctament l'actualització instal·lada. - + There is no update installed for this title. No hi ha cap actualització instal·lada per aquest títol. - + There are no DLC installed for this title. No hi ha cap DLC instal·lat per aquest títol. - + Successfully removed %1 installed DLC. S'ha eliminat correctament %1 DLC instal·lat/s. - + Delete OpenGL Transferable Shader Cache? Desitja eliminar la cache transferible de shaders d'OpenGL? - + Delete Vulkan Transferable Shader Cache? Desitja eliminar la cache transferible de shaders de Vulkan? - + Delete All Transferable Shader Caches? Desitja eliminar totes les caches transferibles de shaders? - + Remove Custom Game Configuration? Desitja eliminar la configuració personalitzada del joc? - + Remove Cache Storage? - + Remove File Eliminar arxiu - - + + Error Removing Transferable Shader Cache Error eliminant la cache transferible de shaders - - + + A shader cache for this title does not exist. No existeix una cache de shaders per aquest títol. - + Successfully removed the transferable shader cache. S'ha eliminat correctament la cache transferible de shaders. - + Failed to remove the transferable shader cache. No s'ha pogut eliminar la cache transferible de shaders. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches Error al eliminar les caches de shaders transferibles - + Successfully removed the transferable shader caches. Caches de shaders transferibles eliminades correctament. - + Failed to remove the transferable shader cache directory. No s'ha pogut eliminar el directori de caches de shaders transferibles. - - + + Error Removing Custom Configuration Error eliminant la configuració personalitzada - + A custom configuration for this title does not exist. No existeix una configuració personalitzada per aquest joc. - + Successfully removed the custom game configuration. S'ha eliminat correctament la configuració personalitzada del joc. - + Failed to remove the custom game configuration. No s'ha pogut eliminar la configuració personalitzada del joc. - - + + RomFS Extraction Failed! La extracció de RomFS ha fallat! - + There was an error copying the RomFS files or the user cancelled the operation. S'ha produït un error copiant els arxius RomFS o l'usuari ha cancel·lat la operació. - + Full Completa - + Skeleton Esquelet - + Select RomFS Dump Mode Seleccioni el mode de bolcat de RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Si us plau, seleccioni la forma en que desitja bolcar la RomFS.<br>Completa copiarà tots els arxius al nou directori mentre que<br>esquelet només crearà l'estructura de directoris. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root No hi ha suficient espai lliure a %1 per extreure el RomFS. Si us plau, alliberi espai o esculli un altre directori de bolcat a Emulació > Configuració > Sistema > Sistema d'arxius > Carpeta arrel de bolcat - + Extracting RomFS... Extraient RomFS... - - + + Cancel Cancel·la - + RomFS Extraction Succeeded! Extracció de RomFS completada correctament! - + The operation completed successfully. L'operació s'ha completat correctament. - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Error obrint %1 - + Select Directory Seleccionar directori - + Properties Propietats - + The game properties could not be loaded. Les propietats del joc no s'han pogut carregar. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Executable de Switch (%1);;Tots els Arxius (*.*) - + Load File Carregar arxiu - + Open Extracted ROM Directory Obrir el directori de la ROM extreta - + Invalid Directory Selected Directori seleccionat invàlid - + The directory you have selected does not contain a 'main' file. El directori que ha seleccionat no conté un arxiu 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Arxiu de Switch Instal·lable (*.nca *.nsp *.xci);;Arxiu de Continguts Nintendo (*.nca);;Paquet d'enviament Nintendo (*.nsp);;Imatge de Cartutx NX (*.xci) - + Install Files Instal·lar arxius - + %n file(s) remaining %n arxiu(s) restants%n arxiu(s) restants - + Installing file "%1"... Instal·lant arxiu "%1"... - - + + Install Results Resultats instal·lació - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Per evitar possibles conflictes, no recomanem als usuaris que instal·lin jocs base a la NAND. Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i DLCs. - + %n file(s) were newly installed %n nou(s) arxiu(s) s'ha(n) instal·lat @@ -5171,7 +5286,7 @@ Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i - + %n file(s) were overwritten %n arxiu(s) s'han sobreescrit @@ -5179,7 +5294,7 @@ Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i - + %n file(s) failed to install %n arxiu(s) no s'han instal·lat @@ -5187,388 +5302,312 @@ Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i - + System Application Aplicació del sistema - + System Archive Arxiu del sistema - + System Application Update Actualització de l'aplicació del sistema - + Firmware Package (Type A) Paquet de firmware (Tipus A) - + Firmware Package (Type B) Paquet de firmware (Tipus B) - + Game Joc - + Game Update Actualització de joc - + Game DLC DLC del joc - + Delta Title Títol delta - + Select NCA Install Type... Seleccioni el tipus d'instal·lació NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Seleccioni el tipus de títol que desitja instal·lar aquest NCA com a: (En la majoria dels casos, el valor predeterminat 'Joc' està bé.) - + Failed to Install Ha fallat la instal·lació - + The title type you selected for the NCA is invalid. El tipus de títol seleccionat per el NCA és invàlid. - + File not found Arxiu no trobat - + File "%1" not found Arxiu "%1" no trobat - + OK D'acord - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Falta el compte de yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Per tal d'enviar un cas de prova de compatibilitat de joc, ha de vincular el seu compte de yuzu.<br><br/>Per a vincular el seu compte de yuzu, vagi a Emulació & gt; Configuració & gt; Web. - + Error opening URL Error obrint URL - + Unable to open the URL "%1". No es pot obrir la URL "%1". - + TAS Recording Gravació TAS - + Overwrite file of player 1? Sobreescriure l'arxiu del jugador 1? - + Invalid config detected Configuració invàlida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. El controlador del mode portàtil no es pot fer servir en el mode acoblat. Es seleccionarà el controlador Pro en el seu lloc. - - + + Amiibo Amiibo - - + + The current amiibo has been removed L'amiibo actual ha sigut eliminat - + Error Error - - + + The current game is not looking for amiibos El joc actual no està buscant amiibos - + Amiibo File (%1);; All Files (*.*) Arxiu Amiibo (%1);; Tots els Arxius (*.*) - + Load Amiibo Carregar Amiibo - + Error loading Amiibo data Error al carregar les dades d'Amiibo - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Capture Screenshot Captura de pantalla - + PNG Image (*.png) Imatge PNG (*.png) - + TAS state: Running %1/%2 Estat TAS: executant %1/%2 - + TAS state: Recording %1 Estat TAS: gravant %1 - + TAS state: Idle %1/%2 Estat TAS: inactiu %1/%2 - + TAS State: Invalid Estat TAS: invàlid - + &Stop Running &Parar l'execució - + &Start &Iniciar - + Stop R&ecording Parar g&ravació - + R&ecord G&ravar - + Building: %n shader(s) Construint: %n shader(s)Construint: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escala: %1x - + Speed: %1% / %2% Velocitat: %1% / %2% - + Speed: %1% Velocitat: %1% - + Game: %1 FPS (Unlocked) Joc: %1 FPS (desbloquejat) - + Game: %1 FPS Joc: %1 FPS - + Frame: %1 ms Fotograma: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU ALTA - - - - GPU EXTREME - GPU EXTREMA - - - - GPU ERROR - ERROR GPU - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - MÉS PROPER - - - - - BILINEAR - BILINEAL - - - - BICUBIC - BICÚBIC - - - - GAUSSIAN - GAUSSIÀ - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA SENSE AA - - FXAA - FXAA - - - - SMAA - - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Confirmi la clau de rederivació - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5585,37 +5624,37 @@ i opcionalment faci còpies de seguretat. Això eliminarà els arxius de les claus generats automàticament i tornarà a executar el mòdul de derivació de claus. - + Missing fuses Falten fusibles - + - Missing BOOT0 - Falta BOOT0 - + - Missing BCPKG2-1-Normal-Main - Falta BCPKG2-1-Normal-Main - + - Missing PRODINFO - Falta PRODINFO - + Derivation Components Missing Falten components de derivació - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Falten les claus d'encriptació. <br>Si us plau, segueixi <a href='https://yuzu-emu.org/help/quickstart/'>la guia ràpida de yuzu</a> per a obtenir totes les seves claus, firmware i jocs.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5624,49 +5663,49 @@ Això pot prendre fins a un minut depenent del rendiment del seu sistema. - + Deriving Keys Derivant claus - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Seleccioni el destinatari per a bolcar el RomFS - + Please select which RomFS you would like to dump. Si us plau, seleccioni quin RomFS desitja bolcar. - + Are you sure you want to close yuzu? Està segur de que vol tancar yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Està segur de que vol aturar l'emulació? Qualsevol progrés no guardat es perdrà. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5674,48 +5713,143 @@ Would you like to bypass this and exit anyway? Desitja tancar-lo de totes maneres? + + + None + Cap + + + + FXAA + FXAA + + + + SMAA + + + + + Nearest + + + + + Bilinear + Bilineal + + + + Bicubic + Bicúbic + + + + Gaussian + Gaussià + + + + ScaleForce + ScaleForce + + + + Docked + Acoblada + + + + Handheld + Portàtil + + + + Normal + + + + + High + + + + + Extreme + + + + + Vulkan + + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL no disponible! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. yuzu no ha estat compilat amb suport per OpenGL. - - + + Error while initializing OpenGL! Error al inicialitzar OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. La seva GPU no suporta OpenGL, o no té instal·lat els últims controladors gràfics. - + Error while initializing OpenGL 4.6! Error inicialitzant OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 La seva GPU no suporta OpenGL 4.6, o no té instal·lats els últims controladors gràfics.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 És possible que la seva GPU no suporti una o més extensions necessàries d'OpenGL. Si us plau, asseguris de tenir els últims controladors de la tarjeta gràfica.<br><br>GL Renderer:<br>%1<br><br>Extensions no suportades:<br>%2 @@ -6068,138 +6202,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Captura de pantalla - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen Pantalla Completa - + Load File Carregar arxiu - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6938,30 +7072,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [no establert] @@ -6972,14 +7106,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Eix %1%2 @@ -6990,320 +7124,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [desconegut] - - + + Left Esquerra - - + + Right Dreta - - + + Down Avall - - + + Up Amunt - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Inici - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Cercle - + Cross Creu - + Square Cuadrat - + Triangle Triangle - + Share Compartir - + Options Opcions - + [undefined] [indefinit] - + %1%2 %1%2 - - + + [invalid] [invàlid] - - + + %1%2Hat %3 %1%2Rotació %3 - - + - + + %1%2Axis %3 %1%2Eix %3 - - + + %1%2Axis %3,%4,%5 %1%2Eixos %3,%4,%5 - - + + %1%2Motion %3 %1%2Moviment %3 - - + + %1%2Button %3 %1%2Botó %3 - - + + [unused] [sense ús] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Més - + Minus Menys - - + + Home Inici - + Capture Captura - + Touch Tàctil - + Wheel Indicates the mouse wheel Roda - + Backward Enrere - + Forward Endavant - + Task Tasca - + Extra Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/cs.ts b/dist/languages/cs.ts index 486a812d9..a932dabed 100644 --- a/dist/languages/cs.ts +++ b/dist/languages/cs.ts @@ -1118,78 +1118,78 @@ Tato možnost zlepšuje rychlost díky závislosti na sémantice cmpxchg pro zaj Nastavení yuzu. - - + + Audio Zvuk - - + + CPU CPU - + Debug Ladění - + Filesystem Souborový systém - - + + General Obecné - - + + Graphics Grafika - + GraphicsAdvanced GrafickyPokročilé - + Hotkeys Zkratky - - + + Controls Ovládání - + Profiles Profily - + Network Síť - - + + System Systém - + Game List Seznam her - + Web Web @@ -1383,17 +1383,22 @@ Tato možnost zlepšuje rychlost díky závislosti na sémantice cmpxchg pro zaj Skrýt myš při neaktivitě - + + Disable controller applet + + + + Reset All Settings Resetovat všechna nastavení - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Toto vyresetuje všechna nastavení a odstraní konfigurace pro jednotlivé hry. Složky s hrami a profily zůstanou zachovány. Přejete si pokračovat? @@ -1552,7 +1557,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib 1X (720p/1080p) - + 1X (720p/1080p) @@ -1637,12 +1642,12 @@ Immediate (no synchronization) just presents whatever is available and can exhib FXAA - + FXAA SMAA - + SMAA @@ -1681,43 +1686,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Barva Pozadí: - + GLASM (Assembly Shaders, NVIDIA Only) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1841,37 +1846,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Anizotropní filtrování: - + Automatic - + Default Výchozí - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2254,7 +2279,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Nastavení @@ -2321,22 +2346,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Povolit naklánění myší - - - - Mouse sensitivity - Citlivost myši - - - - % - % - - - + Motion / Touch Pohyb / Dotyk @@ -2448,7 +2458,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Levá Páčka @@ -2542,14 +2552,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2568,7 +2578,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Plus @@ -2581,15 +2591,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2646,247 +2656,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Pravá páčka - - - - + + Mouse panning + + + + + Configure + Nastavení + + + + + + Clear Vyčistit - - - - - + + + + + [not set] [nenastaveno] - - - + + + Invert button - - + + Toggle button Přepnout tlačítko - + Turbo button - - + + Invert axis Převrátit osy - - - + + + Set threshold - - + + Choose a value between 0% and 100% - + Toggle axis - + Set gyro threshold - + Calibrate sensor - + Map Analog Stick Namapovat analogovou páčku - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Po stisknutí OK nejprve posuňte joystick horizontálně, poté vertikálně. Pro převrácení os nejprve posuňte joystick vertikálně, poté horizontálně. - + Center axis - - + + Deadzone: %1% Deadzone: %1% - - + + Modifier Range: %1% Rozsah modifikátoru: %1% - - + + Pro Controller Pro Controller - + Dual Joycons Dual Joycons - + Left Joycon Levý Joycon - + Right Joycon Pravý Joycon - + Handheld V rukou - + GameCube Controller Ovladač GameCube - + Poke Ball Plus - + NES Controller - + SNES Controller - + N64 Controller - + Sega Genesis - + Start / Pause Start / Pause - + Z Z - + Control Stick Control Stick - + C-Stick C-Stick - + Shake! Shake! - + [waiting] [čekání] - + New Profile Nový profil - + Enter a profile name: Zadejte název profilu: - - + + Create Input Profile Vytvořit profil vstupu - + The given profile name is not valid! Zadaný název profilu není platný! - + Failed to create the input profile "%1" Nepodařilo se vytvořit profil vstupu "%1" - + Delete Input Profile Odstranit profil vstupu - + Failed to delete the input profile "%1" Nepodařilo se odstranit profil vstupu "%1" - + Load Input Profile Načíst profil vstupu - + Failed to load the input profile "%1" Nepodařilo se načíst profil vstupu "%1" - + Save Input Profile Uložit profil vstupu - + Failed to save the input profile "%1" Nepodařilo se uložit profil vstupu "%1" @@ -3065,6 +3085,81 @@ Pro převrácení os nejprve posuňte joystick vertikálně, poté horizontáln Probíhá test UDP nebo konfigurace kalibrace.<br>Prosím vyčkejte na dokončení. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Výchozí + + ConfigureNetwork @@ -3141,47 +3236,47 @@ Pro převrácení os nejprve posuňte joystick vertikálně, poté horizontáln Vývojář - + Add-Ons Doplňky - + General Obecné - + System Systém - + CPU CPU - + Graphics Grafika - + Adv. Graphics Pokroč. grafika - + Audio Zvuk - + Input Profiles - + Properties Vlastnosti @@ -3383,7 +3478,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3420,7 +3515,7 @@ UUID: %2 - + Enable @@ -3487,12 +3582,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [čekání] @@ -4602,958 +4702,897 @@ Táhněte body pro změnu pozice nebo dvojitě klikněte na buňky tabulky pro z GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymní data jsou sbírána</a> pro vylepšení yuzu. <br/><br/>Chcete s námi sdílet anonymní data? - + Telemetry Telemetry - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Načítání Web Appletu... - - + + Disable Web Applet Zakázat Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Počet aktuálně sestavovaných shaderů - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Aktuální emulační rychlost. Hodnoty vyšší než 100% indikují, že emulace běží rychleji nebo pomaleji než na Switchi. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Kolik snímků za sekundu aktuálně hra zobrazuje. Tohle závisí na hře od hry a scény od scény. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Čas potřebný na emulaci framu scény, nepočítá se limit nebo v-sync. Pro plnou rychlost by se tohle mělo pohybovat okolo 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files &Vymazat poslední soubory - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Pokračovat - + &Pause &Pauza - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - - - - + Warning Outdated Game Format Varování Zastaralý Formát Hry - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Používáte rozbalený formát hry, který je zastaralý a byl nahrazen jinými jako NCA, NAX, XCI, nebo NSP. Rozbalená ROM nemá ikony, metadata, a podporu updatů.<br><br>Pro vysvětlení všech možných podporovaných typů, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>zkoukni naší wiki</a>. Tato zpráva se nebude znova zobrazovat. - - + + Error while loading ROM! Chyba při načítání ROM! - + The ROM format is not supported. Tento formát ROM není podporován. - + An error occurred initializing the video core. Nastala chyba při inicializaci jádra videa. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Chyba při načítání ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Pro extrakci souborů postupujte podle <a href='https://yuzu-emu.org/help/quickstart/'>rychlého průvodce yuzu</a>. Nápovědu naleznete na <br>wiki</a> nebo na Discordu</a>. - + An unknown error occurred. Please see the log for more details. Nastala chyba. Koukni do logu. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + Save Data Uložit data - + Mod Data Módovat Data - + Error Opening %1 Folder Chyba otevírání složky %1 - - + + Folder does not exist! Složka neexistuje! - + Error Opening Transferable Shader Cache Chyba při otevírání přenositelné mezipaměti shaderů - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry Odebrat položku - - - - - - + + + + + + Successfully Removed Úspěšně odebráno - + Successfully removed the installed base game. Úspěšně odebrán nainstalovaný základ hry. - + The base game is not installed in the NAND and cannot be removed. Základ hry není nainstalovaný na NAND a nemůže být odstraněn. - + Successfully removed the installed update. Úspěšně odebrána nainstalovaná aktualizace. - + There is no update installed for this title. Není nainstalovaná žádná aktualizace pro tento titul. - + There are no DLC installed for this title. Není nainstalované žádné DLC pro tento titul. - + Successfully removed %1 installed DLC. Úspěšně odstraněno %1 nainstalovaných DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? Odstranit vlastní konfiguraci hry? - + Remove Cache Storage? - + Remove File Odstranit soubor - - + + Error Removing Transferable Shader Cache Chyba při odstraňování přenositelné mezipaměti shaderů - - + + A shader cache for this title does not exist. Mezipaměť shaderů pro tento titul neexistuje. - + Successfully removed the transferable shader cache. Přenositelná mezipaměť shaderů úspěšně odstraněna - + Failed to remove the transferable shader cache. Nepodařilo se odstranit přenositelnou mezipaměť shaderů - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Chyba při odstraňování vlastní konfigurace hry - + A custom configuration for this title does not exist. Vlastní konfigurace hry pro tento titul neexistuje. - + Successfully removed the custom game configuration. Úspěšně odstraněna vlastní konfigurace hry. - + Failed to remove the custom game configuration. Nepodařilo se odstranit vlastní konfiguraci hry. - - + + RomFS Extraction Failed! Extrakce RomFS se nepovedla! - + There was an error copying the RomFS files or the user cancelled the operation. Nastala chyba při kopírování RomFS souborů, nebo uživatel operaci zrušil. - + Full Plný - + Skeleton Kostra - + Select RomFS Dump Mode Vyber RomFS Dump Mode - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Vyber jak by si chtěl RomFS vypsat.<br>Plné zkopíruje úplně všechno, ale<br>kostra zkopíruje jen strukturu složky. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Extrahuji RomFS... - - + + Cancel Zrušit - + RomFS Extraction Succeeded! Extrakce RomFS se povedla! - + The operation completed successfully. Operace byla dokončena úspěšně. - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Chyba při otevírání %1 - + Select Directory Vybraná Složka - + Properties Vlastnosti - + The game properties could not be loaded. Herní vlastnosti nemohly být načteny. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Executable (%1);;Všechny soubory (*.*) - + Load File Načíst soubor - + Open Extracted ROM Directory Otevřít složku s extrahovanou ROM - + Invalid Directory Selected Vybraná složka je neplatná - + The directory you have selected does not contain a 'main' file. Složka kterou jste vybrali neobsahuje soubor "main" - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Instalovatelný soubor pro Switch (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Instalovat Soubory - + %n file(s) remaining - + Installing file "%1"... Instalování souboru "%1"... - - + + Install Results Výsledek instalace - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Abychom předešli možným konfliktům, nedoporučujeme uživatelům instalovat základní hry na paměť NAND. Tuto funkci prosím používejte pouze k instalaci aktualizací a DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Systémová Aplikace - + System Archive Systémový archív - + System Application Update Systémový Update Aplikace - + Firmware Package (Type A) Firmware-ový baliček (Typu A) - + Firmware Package (Type B) Firmware-ový baliček (Typu B) - + Game Hra - + Game Update Update Hry - + Game DLC Herní DLC - + Delta Title Delta Title - + Select NCA Install Type... Vyberte typ instalace NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vyberte typ title-u, který chcete nainstalovat tenhle NCA jako: (Většinou základní "game" stačí.) - + Failed to Install Chyba v instalaci - + The title type you selected for the NCA is invalid. Tento typ pro tento NCA není platný. - + File not found Soubor nenalezen - + File "%1" not found Soubor "%1" nenalezen - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Chybí účet yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Pro přidání recenze kompatibility je třeba mít účet yuzu<br><br/>Pro nalinkování yuzu účtu jdi do Emulace &gt; Konfigurace &gt; Web. - + Error opening URL Chyba při otevírání URL - + Unable to open the URL "%1". Nelze otevřít URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected Zjištěno neplatné nastavení - + Handheld controller can't be used on docked mode. Pro controller will be selected. Ruční ovladač nelze používat v dokovacím režimu. Bude vybrán ovladač Pro Controller. - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Soubor Amiibo (%1);; Všechny Soubory (*.*) - + Load Amiibo Načíst Amiibo - + Error loading Amiibo data Chyba načítání Amiiba - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Capture Screenshot Pořídit Snímek Obrazovky - + PNG Image (*.png) PNG Image (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start &Start - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Rychlost: %1% / %2% - + Speed: %1% Rychlost: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Hra: %1 FPS - + Frame: %1 ms Frame: %1 ms - - GPU NORMAL - GPU NORMÁLNÍ + + %1 %2 + %1 %2 - - GPU HIGH - GPU VYSOKÝ - - - - GPU EXTREME - GPU EXTRÉMNÍ - - - - GPU ERROR - GPU ERROR - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - - - - - - BILINEAR - - - - - BICUBIC - - - - - GAUSSIAN - - - - - SCALEFORCE - - - - + + FSR - - + NO AA - - FXAA - - - - - SMAA - - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Potvďte Rederivaci Klíčů - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5570,37 +5609,37 @@ a udělejte si zálohu. Toto vymaže věechny vaše automaticky generované klíče a znova spustí modul derivace klíčů. - + Missing fuses Chybí Fuses - + - Missing BOOT0 - Chybí BOOT0 - + - Missing BCPKG2-1-Normal-Main - Chybí BCPKG2-1-Normal-Main - + - Missing PRODINFO - Chybí PRODINFO - + Derivation Components Missing Chybé odvozené komponenty - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5609,49 +5648,49 @@ Tohle může zabrat až minutu podle výkonu systému. - + Deriving Keys Derivuji Klíče - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Vyberte Cíl vypsaní RomFS - + Please select which RomFS you would like to dump. Vyberte, kterou RomFS chcete vypsat. - + Are you sure you want to close yuzu? Jste si jist, že chcete zavřít yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Jste si jist, že chcete ukončit emulaci? Jakýkolic neuložený postup bude ztracen. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5659,48 +5698,143 @@ Would you like to bypass this and exit anyway? Opravdu si přejete ukončit tuto aplikaci? + + + None + Žádné + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + + + + + Bicubic + + + + + Gaussian + + + + + ScaleForce + + + + + Docked + Zadokovaná + + + + Handheld + Příruční + + + + Normal + + + + + High + + + + + Extreme + + + + + Vulkan + Vulkan + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL není k dispozici! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. yuzu nebylo sestaveno s OpenGL podporou. - - + + Error while initializing OpenGL! Chyba při inicializaci OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Vaše grafická karta pravděpodobně nepodporuje OpenGL nebo nejsou nainstalovány nejnovější ovladače. - + Error while initializing OpenGL 4.6! Chyba při inicializaci OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Vaše grafická karta pravděpodobně nepodporuje OpenGL 4.6 nebo nejsou nainstalovány nejnovější ovladače.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Vaše grafická karta pravděpodobně nepodporuje jedno nebo více rozšíření OpenGL. Ujistěte se prosím, že jsou nainstalovány nejnovější ovladače.<br><br>GL Renderer:<br>%1<br><br>Nepodporované rozšíření:<br>%2 @@ -6053,138 +6187,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Pořídit Snímek Obrazovky - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen Celá Obrazovka - + Load File Načíst soubor - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6280,7 +6414,7 @@ Debug Message: Search - + Hledat @@ -6922,30 +7056,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [Nenastaveno] @@ -6956,14 +7090,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Osa %1%2 @@ -6974,320 +7108,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [Neznámá] - - + + Left Doleva - - + + Right Doprava - - + + Down Dolů - - + + Up Nahoru - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 - + L2 - + L3 - + R1 - + R2 - + R3 - + Circle - + Cross - + Square - + Triangle - + Share - + Options - + [undefined] - + %1%2 %1%2 - - + + [invalid] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 - - + + %1%2Button %3 - - + + [unused] [nepoužito] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Plus - + Minus Minus - - + + Home Home - + Capture Capture - + Touch Dotyk - + Wheel Indicates the mouse wheel - + Backward - + Forward - + Task - + Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/da.ts b/dist/languages/da.ts index 082f839cf..7a16e813c 100644 --- a/dist/languages/da.ts +++ b/dist/languages/da.ts @@ -1134,78 +1134,78 @@ Dette vil bandlyse både vedkommendes forum-brugernavn og IP-adresse.yuzu Konfiguration - - + + Audio Lyd - - + + CPU CPU - + Debug Fejlfind - + Filesystem Filsystem - - + + General Generelt - - + + Graphics Grafik - + GraphicsAdvanced GrafikAvanceret - + Hotkeys Genvejstaster - - + + Controls Styring - + Profiles Profiler - + Network Netværk - - + + System System - + Game List Spilliste - + Web Net @@ -1399,17 +1399,22 @@ Dette vil bandlyse både vedkommendes forum-brugernavn og IP-adresse.Skjul mus ved inaktivitet - + + Disable controller applet + + + + Reset All Settings Nulstil Alle Indstillinger - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? dette nulstiller alle indstillinger og fjerner alle pr-spil-konfigurationer. Dette vil ikke slette spilmapper, -profiler, eller input-profiler. Fortsæt? @@ -1697,43 +1702,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Baggrundsfarve: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Assembly-Shadere, kun NVIDIA) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1857,37 +1862,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Anisotropisk Filtrering: - + Automatic - + Default Standard - + 2x - + 4x - + 8x - + 16x @@ -2270,7 +2295,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Konfigurér @@ -2337,22 +2362,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Aktivér kig med mus - - - - Mouse sensitivity - Mus-følsomhed - - - - % - % - - - + Motion / Touch Bevægelse / Berøring @@ -2464,7 +2474,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Venstre Styrepind @@ -2558,14 +2568,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2584,7 +2594,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Plus @@ -2597,15 +2607,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2662,247 +2672,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Højre Styrepind - - - - + + Mouse panning + + + + + Configure + Konfigurér + + + + + + Clear Ryd - - - - - + + + + + [not set] [ikke indstillet] - - - + + + Invert button - - + + Toggle button Funktionsskifteknap - + Turbo button - - + + Invert axis Omvend akser - - - + + + Set threshold Angiv tærskel - - + + Choose a value between 0% and 100% Vælg en værdi imellem 0% og 100% - + Toggle axis - + Set gyro threshold - + Calibrate sensor - + Map Analog Stick Tilsted Analog Pind - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Bevæg, efter tryk på OK, først din styrepind vandret og så lodret. Bevæg, for at omvende akserne, først din styrepind lodret og så vandret. - + Center axis - - + + Deadzone: %1% Dødzone: %1% - - + + Modifier Range: %1% Forandringsrækkevidde: %1% - - + + Pro Controller Pro-Styringsenhed - + Dual Joycons Dobbelt-Joycon - + Left Joycon Venstre Joycon - + Right Joycon Højre Joycon - + Handheld Håndholdt - + GameCube Controller GameCube-Styringsenhed - + Poke Ball Plus - + NES Controller - + SNES Controller - + N64 Controller - + Sega Genesis - + Start / Pause Start / Pause - + Z Z - + Control Stick Styrepind - + C-Stick C-Pind - + Shake! Ryst! - + [waiting] [venter] - + New Profile Ny Profil - + Enter a profile name: Indtast et profilnavn: - - + + Create Input Profile Opret Input-Profil - + The given profile name is not valid! Det angivne profilnavn er ikke gyldigt! - + Failed to create the input profile "%1" Oprettelse af input-profil "%1" mislykkedes - + Delete Input Profile Slet Input-Profil - + Failed to delete the input profile "%1" Sletning af input-profil "%1" mislykkedes - + Load Input Profile Indlæs Input-Profil - + Failed to load the input profile "%1" Indlæsning af input-profil "%1" mislykkedes - + Save Input Profile Gem Input-Profil - + Failed to save the input profile "%1" Lagring af input-profil "%1" mislykkedes @@ -3081,6 +3101,81 @@ Bevæg, for at omvende akserne, først din styrepind lodret og så vandret.UDP-Afprøvnings- eller -kalibreringskonfiguration er i gang.<br>vent venligst på, at de bliver færdige. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Standard + + ConfigureNetwork @@ -3157,47 +3252,47 @@ Bevæg, for at omvende akserne, først din styrepind lodret og så vandret.Udvikler - + Add-Ons Tilføjelser - + General Generelt - + System System - + CPU CPU - + Graphics Grafik - + Adv. Graphics - + Audio Lyd - + Input Profiles - + Properties Egenskaber @@ -3399,7 +3494,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3436,7 +3531,7 @@ UUID: %2 - + Enable @@ -3503,12 +3598,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [venter] @@ -4618,956 +4718,895 @@ Træk punkter, for at skifte position, eller dobbeltklik i tabelceller, for at r GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonym data indsamles</a>, for at hjælp med, at forbedre yuzu. <br/><br/>Kunne du tænke dig, at dele dine brugsdata med os? - + Telemetry Telemetri - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Indlæser Net-Applet... - - + + Disable Web Applet Deaktivér Net-Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Aktuel emuleringshastighed. Værdier højere eller lavere end 100% indikerer, at emulering kører hurtigere eller langsommere end en Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue - + &Pause - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - - - - + Warning Outdated Game Format Advarsel, Forældet Spilformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. - - + + Error while loading ROM! Fejl under indlæsning af ROM! - + The ROM format is not supported. ROM-formatet understøttes ikke. - + An error occurred initializing the video core. Der skete en fejl under initialisering af video-kerne. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. - + (64-bit) - + (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit - + Closing software... - + Save Data - + Mod Data - + Error Opening %1 Folder Fejl ved Åbning af %1 Mappe - - + + Folder does not exist! Mappe eksisterer ikke! - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry - - - - - - + + + + + + Successfully Removed - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File - - + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! RomFS-Udpakning Mislykkedes! - + There was an error copying the RomFS files or the user cancelled the operation. Der skete en fejl ved kopiering af RomFS-filerne, eller brugeren afbrød opgaven. - + Full Fuld - + Skeleton Skelet - + Select RomFS Dump Mode Vælg RomFS-Nedfældelsestilstand - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Udpakker RomFS... - - + + Cancel Afbryd - + RomFS Extraction Succeeded! RomFS-Udpakning Lykkedes! - + The operation completed successfully. Fuldførelse af opgaven lykkedes. - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Fejl ved Åbning af %1 - + Select Directory Vælg Mappe - + Properties Egenskaber - + The game properties could not be loaded. Spil-egenskaberne kunne ikke indlæses. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch-Eksekverbar (%1);;Alle filer (*.*) - + Load File Indlæs Fil - + Open Extracted ROM Directory Åbn Udpakket ROM-Mappe - + Invalid Directory Selected Ugyldig Mappe Valgt - + The directory you have selected does not contain a 'main' file. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files - + %n file(s) remaining - + Installing file "%1"... Installér fil "%1"... - - + + Install Results - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Systemapplikation - + System Archive Systemarkiv - + System Application Update Systemapplikationsopdatering - + Firmware Package (Type A) Firmwarepakke (Type A) - + Firmware Package (Type B) Firmwarepakke (Type B) - + Game Spil - + Game Update Spilopdatering - + Game DLC Spiludvidelse - + Delta Title Delta-Titel - + Select NCA Install Type... Vælg NCA-Installationstype... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) - + Failed to Install Installation mislykkedes - + The title type you selected for the NCA is invalid. - + File not found Fil ikke fundet - + File "%1" not found Fil "%1" ikke fundet - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Manglende yuzu-Konto - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. - + Error opening URL - + Unable to open the URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo-Fil (%1);; Alle Filer (*.*) - + Load Amiibo Indlæs Amiibo - + Error loading Amiibo data Fejl ved indlæsning af Amiibo-data - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Capture Screenshot Optag Skærmbillede - + PNG Image (*.png) PNG-Billede (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Hastighed: %1% / %2% - + Speed: %1% Hastighed: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Spil: %1 FPS - + Frame: %1 ms Billede: %1 ms - - GPU NORMAL + + %1 %2 - - GPU HIGH - - - - - GPU EXTREME - - - - - GPU ERROR - - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - - - - - VULKAN - - - - - NULL - - - - - NEAREST - - - - - - BILINEAR - - - - - BICUBIC - - - - - GAUSSIAN - - - - - SCALEFORCE - - - - + + FSR - - + NO AA - - FXAA - FXAA - - - - SMAA - - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5578,133 +5617,228 @@ This will delete your autogenerated key files and re-run the key derivation modu - + Missing fuses - + - Missing BOOT0 - + - Missing BCPKG2-1-Normal-Main - + - Missing PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. - + Deriving Keys - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target - + Please select which RomFS you would like to dump. - + Are you sure you want to close yuzu? Er du sikker på, at du vil lukke yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Er du sikker på, at du vil stoppe emulereingen? Enhver ulagret data, vil gå tabt. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? + + + None + Ingen + + + + FXAA + FXAA + + + + SMAA + + + + + Nearest + + + + + Bilinear + Bilineær + + + + Bicubic + Bikubisk + + + + Gaussian + Gausisk + + + + ScaleForce + ScaleForce + + + + Docked + Dokket + + + + Handheld + Håndholdt + + + + Normal + + + + + High + + + + + Extreme + + + + + Vulkan + + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. - - + + Error while initializing OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. - + Error while initializing OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 @@ -6057,138 +6191,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Optag Skærmbillede - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen Fuldskærm - + Load File Indlæs Fil - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6922,30 +7056,30 @@ p, li { white-space: pre-wrap; } - + Shift Skift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [ikke indstillet] @@ -6956,14 +7090,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Akse %1%2 @@ -6974,320 +7108,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [ukendt] - - + + Left Venstre - - + + Right Højre - - + + Down ed - - + + Up Op - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 - + L2 - + L3 - + R1 - + R2 - + R3 - + Circle - + Cross - + Square - + Triangle - + Share - + Options - + [undefined] - + %1%2 - - + + [invalid] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 - - + + %1%2Button %3 - - + + [unused] [ubrugt] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Plus - + Minus Minus - - + + Home Hjem - + Capture Optag - + Touch Berøring - + Wheel Indicates the mouse wheel - + Backward - + Forward - + Task - + Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/de.ts b/dist/languages/de.ts index 817f03fb8..500dce5f2 100644 --- a/dist/languages/de.ts +++ b/dist/languages/de.ts @@ -138,7 +138,7 @@ p, li { white-space: pre-wrap; } When you block a player, you will no longer receive chat messages from them.<br><br>Are you sure you would like to block %1? - + Wenn du einen Spieler blockierst, wirst du keine Chatnachricht mehr von Ihm erhalten. <br><br> Bist du sicher mit der Blockierung von %1? @@ -212,7 +212,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. %1 - %2 (%3/%4 members) - connected - + %1 - %2 (%3/%4 Mitglieder) - verbunden @@ -251,22 +251,22 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. No The game doesn't get past the "Launching..." screen - + Das Spiel kommt nicht über den "Starten..."-Bildschirm hinaus Yes The game gets past the intro/menu and into gameplay - + Ja Das Spiel kommt über das Intro/Menü hinaus und ins Gameplay No The game crashes or freezes while loading or using the menu - + Nein das Spiel stürzt ab oder friert ein während des Ladens des Menüs. <html><head/><body><p>Does the game reach gameplay?</p></body></html> - + <html><head/><body><p>Erreicht das Spiel den Spielverlauf?</p></body></html> @@ -276,12 +276,12 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. No The game crashes or freezes during gameplay - Nein Das Spiel funktioniert nicht fehlerfrei. (Stürzt ab oder freezed) + Nein Das Spiel stürzt ab oder freezed während des spielen. <html><head/><body><p>Does the game work without crashing, freezing or locking up during gameplay?</p></body></html> - + <html><head/><body><p>Funktioniert das Spiel ohne Abstürze, einfrieren oder dass es sich während des Spielverlaufs aufhängt?</p></body></html> @@ -296,7 +296,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. <html><head/><body><p>Is the game completely playable from start to finish?</p></body></html> - + <html><head/><body><p>Ist das Spiel komplett spielbar von Anfang bis Ende?</p></body></html> @@ -316,7 +316,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. <html><head/><body><p>Does the game have any graphical glitches?</p></body></html> - + <html><head/><body><p>Hat das Spiel irgendwelche grafischen Störungen?</p></body></html> @@ -336,7 +336,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. <html><head/><body><p>Does the game have any audio glitches / missing effects?</p></body></html> - + <html><head/><body><p>Hat das Spiel irgendwelche Tonstörungen / fehlende Effekte?</p></body></html> @@ -390,7 +390,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Sound Output Mode: - + Tonausgangsmodus: @@ -577,7 +577,8 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. <div>This option improves the speed of 32 bits ASIMD floating-point functions by running with incorrect rounding modes.</div> - + +Diese Option steigert die Geschwindigkeit von 32-Bit-ASMID-Gleitkomma-Funktionen indem diese mit ungenauen Rundungsmodellen laufen. @@ -602,19 +603,23 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. <div>This option improves speed by eliminating a safety check before every memory read/write in guest. Disabling it may allow a game to read/write the emulator's memory.</div> - + +<div>Diese option verbessert die Geschwindigkeit durch ausschalten eines Sicherheits Check, bevor jeder speicher lesen/schreiben im Gast. Ausschalten erlaubt den Spiel vielleicht den Emulators Speicher zu lesen/schreiben.</div> + Disable address space checks - + Adressraumprüfungen deaktivieren <div>This option improves speed by relying only on the semantics of cmpxchg to ensure safety of exclusive access instructions. Please note this may result in deadlocks and other race conditions.</div> - + + <div>Diese Option verbessert die Geschwindigkeit, indem sie sich nur auf die Semantik von cmpxchg (compare and swap) verlässt, um die Sicherheit von Anweisungen mit exklusivem Zugriff zu gewährleisten. Bitte beachten Sie, dass dies zu Deadlocks und anderen Race Conditions führen kann.</div> + @@ -647,7 +652,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. <html><head/><body><p><span style=" font-weight:600;">For debugging only.</span><br/>If you're not sure what these do, keep all of these enabled. <br/>These settings, when disabled, only take effect when CPU Debugging is enabled. </p></body></html> - + <html><head/><body><p><span style=" font-weight:600;">Nur für debugging.</span><br/>Wenn du nicht sicher bist was sie tun, dann lasse sie alle an. <br/>Diese Einstellung wenn ausgeschaltet, funktionieren nur wen CPU debugging an ist.</p></body></html> @@ -774,12 +779,14 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. - + + <div style="white-space: nowrap">Diese Optimierung verschnellert Zugriff auf den Speicher durch ein Gast programm.</div> + <div style="white-space: nowrap"> Enable Host MMU Emulation (general memory instructions) - + Aktiviert Host MMU Emulation (Generale Speicher Anweisung) @@ -788,7 +795,11 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. - + +<div style="white-space: nowrap"> Diese Optimierung beschleunigt exklusive Speicherzugriffe durch das Gastprogramm.</div> +<div style="white-space: nowrap"> Die Aktivierung führt dazu, dass gastexklusive Speicherlese- und -schreibvorgänge direkt im Speicher erfolgen und die MMU des Hosts verwendet wird.</div> +<div style="white-space: nowrap"> Die Deaktivierung dieser Funktion zwingt alle exklusiven Speicherzugriffe zur Verwendung der Software-MMU-Emulation.</div> + @@ -801,12 +812,15 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. - + +<div style="white-space: nowrap"> Diese Optimierung beschleunigt exklusive Speicherzugriffe durch das Gastprogramm.</div> +<div style="white-space: nowrap"> Durch die Aktivierung wird der Overhead von Fastmem-Fehlern bei exklusiven Speicherzugriffen reduziert.</div> + Enable recompilation of exclusive memory instructions - + Neukompilierung von Anweisungen mit exklusivem Speicher aktivieren @@ -814,12 +828,15 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. - + +<div style="white-space: nowrap"> Diese Optimierung beschleunigt die Speicherzugriffe, indem sie ungültige Speicherzugriffe zulässt.</div> +<div style="white-space: nowrap"> Die Aktivierung reduziert den Overhead aller Speicherzugriffe und hat keine Auswirkungen auf Programme, die nicht auf ungültigen Speicher zugreifen.</div> + Enable fallbacks for invalid memory accesses - + Fallbacks für ungültige Speicherzugriffe einschalten @@ -902,7 +919,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. When checked, it enables Nsight Aftermath crash dumps - + Wenn diese Option aktiviert ist, werden Nsight Aftermath-Crash-Dumps zugelassen. @@ -912,7 +929,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. When checked, it will dump all the original assembler shaders from the disk shader cache or game as found - + Wenn diese Option aktiviert ist, werden alle Original-Assembler-Shader aus dem Festplatten-Shader-Cache oder welche von dem Spiel gefunden gefunden gedumpt. @@ -922,7 +939,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. When checked, it will dump all the macro programs of the GPU - + Wenn diese Option aktiviert ist, werden alle Makroprogramme der GPU gedumpt @@ -942,7 +959,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. When checked, it disables the macro HLE functions. Enabling this makes games run slower - + When checked, it disables the macro HLE functions. Enabling this makes games run slower @@ -962,7 +979,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. When checked, it executes shaders without loop logic changes - + Wenn diese Option aktiviert ist, werden Shader ohne Änderungen der looplogik ausgeführt. @@ -977,7 +994,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Enable Verbose Reporting Services** - + Ausführliche Berichtsdienste aktivieren** @@ -987,17 +1004,17 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Aktivieren Sie diese Option, um den zuletzt generierten Audio-Log auf der Konsole auszugeben. Betrifft nur Spiele, die den Audio-Renderer verwenden. Dump Audio Commands To Console** - + Audio-Befehle auf die Konsole als Dump abspeichern** Create Minidump After Crash - + Minidump nach Absturz erstellen @@ -1027,7 +1044,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Enable All Controller Types - + Aktiviere alle Arten von Controllern @@ -1037,12 +1054,12 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Enables yuzu to check for a working Vulkan environment when the program starts up. Disable this if this is causing issues with external programs seeing yuzu. - + Ermöglicht es yuzu, beim Programmstart nach einer funktionierenden Vulkan-Umgebung zu suchen. Deaktivieren Sie dies, wenn dies zu Problemen mit externen Programmen führt, die yuzu sehen. Perform Startup Vulkan Check - + Vulkan-Prüfung beim Start durchführen @@ -1067,7 +1084,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. MiniDump creation not compiled - + MiniDump-Erstellung nicht kompiliert @@ -1115,78 +1132,78 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren.yuzu-Konfiguration - - + + Audio Audio - - + + CPU CPU - + Debug Debug - + Filesystem Dateisystem - - + + General Allgemein - - + + Graphics Grafik - + GraphicsAdvanced GraphicsAdvanced - + Hotkeys Hotkeys - - + + Controls Steuerung - + Profiles Nutzer - + Network Netzwerk - - + + System System - + Game List Spieleliste - + Web Web @@ -1380,17 +1397,22 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren.Mauszeiger verstecken - + + Disable controller applet + + + + Reset All Settings Setze alle Einstellungen zurück - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Hierdurch werden alle Einstellungen zurückgesetzt und alle spielspezifischen Konfigurationen gelöscht. Spiel-Ordner, Profile oder Eingabeprofile werden nicht gelöscht. Fortfahren? @@ -1464,7 +1486,10 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. - + FIFO (VSync) lässt keine Bilder fallen und zeigt kein Tearing, ist aber durch die Bildwiederholfrequenz begrenzt. +FIFO Relaxed ist ähnlich wie FIFO, lässt aber Tearing zu, wenn es sich von einer Verlangsamung erholt. +Mailbox kann eine geringere Latenz als FIFO haben und zeigt kein Tearing, kann aber Bilder fallen lassen. +Immediate (keine Synchronisierung) zeigt direkt, was verfügbar ist und kann Tearing zeigen. @@ -1594,7 +1619,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib Window Adapting Filter: - + Bildschirmanpassungsfilter: @@ -1678,43 +1703,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Hintergrundfarbe: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Assembly Shaders, Nur NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Experimentell, Nur Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off Aus - + VSync Off Vsync Aus - + Recommended Empfohlen - + On An - + VSync On Vsync An @@ -1789,12 +1814,12 @@ Immediate (no synchronization) just presents whatever is available and can exhib Uses reactive flushing instead of predictive flushing. Allowing a more accurate syncing of memory. - + Verwendet reaktives Flushing anstelle von prädiktivem Flushing. Ermöglicht eine genauere Synchronisierung des Speichers. Enable Reactive Flushing - + Aktiviere Reactives Flushing @@ -1809,7 +1834,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib Enables Fast GPU Time. This option will force most games to run at their highest native resolution. - + Aktiviert Schnelle GPU-Zeit. Diese Option zwingt die meisten Spiele dazu, mit ihrer höchsten nativen Auflösung zu laufen. @@ -1819,7 +1844,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib Enables GPU vendor-specific pipeline cache. This option can improve shader loading time significantly in cases where the Vulkan driver does not store pipeline cache files internally. - + Aktiviert den GPU-anbieterspezifischen Pipeline-Cache. Diese Option kann die Shader-Ladezeit in Fällen, in denen der Vulkan-Treiber die Pipeline-Cache-Dateien nicht intern speichert, erheblich verbessern. @@ -1830,45 +1855,66 @@ Immediate (no synchronization) just presents whatever is available and can exhib Enable compute pipelines, required by some games. This setting only exists for Intel proprietary drivers, and may crash if enabled. Compute pipelines are always enabled on all other drivers. - + Aktiviert Compute Pipelines, die von einigen Spielen benötigt werden. Diese Einstellung existiert nur für proprietäre Intel-Treiber und kann bei Aktivierung zum Absturz führen. +Compute-Pipelines sind bei allen anderen Treibern immer aktiviert. Enable Compute Pipelines (Intel Vulkan only) + Aktiviere Compute Pipelines (nur Intel Vulkan) + + + + Run the game at normal speed during video playback, even when the framerate is unlocked. + Lasse das Spiel in der normalen Geschwindigkeit abspielen, trotz freigeschalteter Bildrade (FPS) + + + + Sync to framerate of video playback + Synchronisiere die Bildrate mit der Zwischensequenz + + + + Improves rendering of transparency effects in specific games. + Verbessert das Rendering von Transparenzeffekten in bestimmten Spielen. + + + + Barrier feedback loops - + Anisotropic Filtering: Anisotrope Filterung: - + Automatic Automatisch - + Default Standard - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -1951,12 +1997,12 @@ Compute pipelines are always enabled on all other drivers. Conflicting Button Sequence - + Widersprüchliche Tastenfolge The default button sequence is already assigned to: %1 - + Die Standard Tastenfolge ist bereits belegt von: %1 @@ -2251,7 +2297,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Konfigurieren @@ -2285,7 +2331,7 @@ Compute pipelines are always enabled on all other drivers. Enable XInput 8 player support (disables web applet) - + Unterstützung für XInput 8-Player aktivieren (deaktiviert das Web-Applet) @@ -2310,7 +2356,7 @@ Compute pipelines are always enabled on all other drivers. Allows unlimited uses of the same Amiibo in games that would otherwise limit you to one use. - + Ermöglicht die unbegrenzte Nutzung des gleichen Amiibo's welches andernfalls durch das Spiel limitiert wird. @@ -2318,22 +2364,7 @@ Compute pipelines are always enabled on all other drivers. Zufällige Amiibo-ID verwenden - - Enable mouse panning - Maus-Panning aktivieren - - - - Mouse sensitivity - Maus-Empfindlichkeit - - - - % - % - - - + Motion / Touch Bewegung / Touch @@ -2445,7 +2476,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Linker Analogstick @@ -2539,14 +2570,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2565,7 +2596,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Plus @@ -2578,15 +2609,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2643,247 +2674,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Rechter Analogstick - - - - + + Mouse panning + + + + + Configure + Konfigurieren + + + + + + Clear Löschen - - - - - + + + + + [not set] [nicht belegt] - - - + + + Invert button Knopf invertieren - - + + Toggle button Taste umschalten - + Turbo button Turbo Knopf - - + + Invert axis Achsen umkehren - - - + + + Set threshold - + Schwellwert festlegen - - + + Choose a value between 0% and 100% Wert zwischen 0% und 100% wählen - + Toggle axis - + Set gyro threshold - + Gyro-Schwelle einstellen - + Calibrate sensor Kalibriere den Sensor - + Map Analog Stick Analog-Stick festlegen - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Nach dem Drücken von OK den Joystick zuerst horizontal, dann vertikal bewegen. Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizontal. - + Center axis Achse zentrieren - - + + Deadzone: %1% Deadzone: %1% - - + + Modifier Range: %1% Modifikator-Radius: %1% - - + + Pro Controller Pro Controller - + Dual Joycons Zwei Joycons - + Left Joycon Linker Joycon - + Right Joycon Rechter Joycon - + Handheld Handheld - + GameCube Controller GameCube-Controller - + Poke Ball Plus Poke-Ball Plus - + NES Controller NES Controller - + SNES Controller SNES Controller - + N64 Controller N64 Controller - + Sega Genesis Sega Genesis - + Start / Pause Start / Pause - + Z Z - + Control Stick Analog Stick - + C-Stick C-Stick - + Shake! Schütteln! - + [waiting] [wartet] - + New Profile Neues Profil - + Enter a profile name: Profilnamen eingeben: - - + + Create Input Profile Eingabeprofil erstellen - + The given profile name is not valid! Angegebener Profilname ist nicht gültig! - + Failed to create the input profile "%1" Erstellen des Eingabeprofils "%1" ist fehlgeschlagen - + Delete Input Profile Eingabeprofil löschen - + Failed to delete the input profile "%1" Löschen des Eingabeprofils "%1" ist fehlgeschlagen - + Load Input Profile Eingabeprofil laden - + Failed to load the input profile "%1" Laden des Eingabeprofils "%1" ist fehlgeschlagen - + Save Input Profile Eingabeprofil speichern - + Failed to save the input profile "%1" Speichern des Eingabeprofils "%1" ist fehlgeschlagen @@ -3062,6 +3103,81 @@ Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizonta UDP-Test oder Kalibration wird gerade durchgeführt.<br>Bitte warte einen Moment. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Aktiviere + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Standard + + ConfigureNetwork @@ -3138,47 +3254,47 @@ Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizonta Entwickler - + Add-Ons Add-Ons - + General Allgemeines - + System System - + CPU CPU - + Graphics Grafik - + Adv. Graphics Erw. Grafik - + Audio Audio - + Input Profiles Eingabe-Profile - + Properties Einstellungen @@ -3344,12 +3460,12 @@ Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizonta Error resizing user image - + Fehler bei der Größenänderung des Benutzerbildes Unable to resize image - + Die Bildgröße kann nicht angepasst werden. @@ -3380,13 +3496,13 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. Virtual Ring Sensor Parameters - + Parameter für den virtuellen Ringsensor @@ -3417,14 +3533,14 @@ UUID: %2 - + Enable Aktiviere Ring Sensor Value - + Ringsensor-Wert @@ -3461,7 +3577,7 @@ UUID: %2 Error enabling ring input - + Fehler beim Aktivieren des Ring-Inputs @@ -3484,12 +3600,17 @@ UUID: %2 - - Unexpected driver result %1 + + The current mapped device is not connected - + + Unexpected driver result %1 + Unerwartetes Treiber Ergebnis %1 + + + [waiting] [wartet] @@ -3910,7 +4031,7 @@ UUID: %2 Warning: "%1" is not a valid language for region "%2" - + Achtung: "%1" ist keine valide Sprache für die Region "%2" @@ -3923,17 +4044,17 @@ UUID: %2 <html><head/><body><p>Reads controller input from scripts in the same format as TAS-nx scripts.<br/>For a more detailed explanation, please consult the <a href="https://yuzu-emu.org/help/feature/tas/"><span style=" text-decoration: underline; color:#039be5;">help page</span></a> on the yuzu website.</p></body></html> - + <html><head/><body><p>Liest Controller-Eingaben von Skripten im gleichen Format wie TAS-nx-Skripte.<br/>Für eine detailliertere Erklärung, konsultiere bitte die <a href="https://yuzu-emu.org/help/feature/tas/"><span style=" text-decoration: underline; color:#039be5;"> Hilfe Seite </span></a> auf der yuzu website.</p></body></html> To check which hotkeys control the playback/recording, please refer to the Hotkey settings (Configure -> General -> Hotkeys). - + Um zu überprüfen, welche Hotkeys die Wiedergabe/Aufnahme steuern, sehen Sie bitte in den Hotkey-Einstellungen nach (Konfigurieren -> Allgemein -> Hotkeys). WARNING: This is an experimental feature.<br/>It will not play back scripts frame perfectly with the current, imperfect syncing method. - + ACHTUNG: Dies ist ein experimentes Feature.<br/>Es wird scripts nicht perfekt mit der momentanen, unperfekten Synchronisationsmethode abspielen. @@ -4555,7 +4676,7 @@ Ziehe die Punkte mit deiner Maus, um ihre Position zu ändern. Doppelklicke auf <html><head/><body><p>Server address of the host</p></body></html> - + <html><head/><body><p>Serveradresse des Hosts</p></body></html> @@ -4599,559 +4720,576 @@ Ziehe die Punkte mit deiner Maus, um ihre Position zu ändern. Doppelklicke auf GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonyme Daten werden gesammelt,</a> um yuzu zu verbessern.<br/><br/>Möchstest du deine Nutzungsdaten mit uns teilen? - + Telemetry Telemetrie - + Broken Vulkan Installation Detected Defekte Vulkan-Installation erkannt - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. + Vulkan Initialisierung fehlgeschlagen.<br><br>Klicken Sie auf <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>für Instruktionen zur Problembehebung.</a>. + + + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Lade Web-Applet... - - + + Disable Web Applet Deaktiviere die Web Applikation - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Wie viele Shader im Moment kompiliert werden - + The current selected resolution scaling multiplier. - + Der momentan ausgewählte Auflösungsskalierung Multiplikator. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Derzeitige Emulations-Geschwindigkeit. Werte höher oder niedriger als 100% zeigen, dass die Emulation scheller oder langsamer läuft als auf einer Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Wie viele Bilder pro Sekunde angezeigt werden variiert von Spiel zu Spiel und von Szene zu Szene. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Zeit, die gebraucht wurde, um einen Switch-Frame zu emulieren, ohne Framelimit oder V-Sync. Für eine Emulation bei voller Geschwindigkeit sollte dieser Wert bei höchstens 16.67ms liegen. - + + Unmute + Ton aktivieren + + + + Mute + Stummschalten + + + + Reset Volume + Ton zurücksetzen + + + &Clear Recent Files &Zuletzt geladene Dateien leeren - + Emulated mouse is enabled Emulierte Maus ist aktiviert - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + Echte Mauseingabe und Mausschwenken sind nicht kompatibel. Bitte deaktivieren Sie die emulierte Maus in den erweiterten Eingabeeinstellungen, um das Schwenken der Maus zu ermöglichen. - + &Continue &Fortsetzen - + &Pause &Pause - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu betreibt ein Speil - - - + Warning Outdated Game Format Warnung veraltetes Spielformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Du nutzt eine entpackte ROM-Ordnerstruktur für dieses Spiel, welches ein veraltetes Format ist und von anderen Formaten wie NCA, NAX, XCI oder NSP überholt wurde. Entpackte ROM-Ordner unterstützen keine Icons, Metadaten oder Updates.<br><br><a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Unser Wiki</a> enthält eine Erklärung der verschiedenen Formate, die yuzu unterstützt. Diese Nachricht wird nicht noch einmal angezeigt. - - + + Error while loading ROM! ROM konnte nicht geladen werden! - + The ROM format is not supported. ROM-Format wird nicht unterstützt. - + An error occurred initializing the video core. Beim Initialisieren des Video-Kerns ist ein Fehler aufgetreten. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Yuzu ist auf einen Fehler gestoßen beim Ausführen des Videokerns. +Dies ist in der Regel auf veraltete GPU Treiber zurückzuführen, integrierte GPUs eingeschlossen. +Bitte öffnen Sie die Log Datei für weitere Informationen. Für weitere Informationen wie Sie auf die Log Datei zugreifen, öffnen Sie bitte die folgende Seite: <a href='https://yuzu-emu.org/help/reference/log-files/'>Wie wird eine Log Datei hochgeladen?</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. ROM konnte nicht geladen werden! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Bitte folge der <a href='https://yuzu-emu.org/help/quickstart/'>yuzu-Schnellstart-Anleitung</a> um deine Dateien zu extrahieren.<br>Hilfe findest du im yuzu-Wiki</a> oder dem yuzu-Discord</a>. - + An unknown error occurred. Please see the log for more details. Ein unbekannter Fehler ist aufgetreten. Bitte prüfe die Log-Dateien auf mögliche Fehlermeldungen. - + (64-bit) (64-Bit) - + (32-bit) (32-Bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Schließe Software... - + Save Data Speicherdaten - + Mod Data Mod-Daten - + Error Opening %1 Folder Konnte Verzeichnis %1 nicht öffnen - - + + Folder does not exist! Verzeichnis existiert nicht! - + Error Opening Transferable Shader Cache Fehler beim Öffnen des transferierbaren Shader-Caches - + Failed to create the shader cache directory for this title. Fehler beim erstellen des Shader-Cache-Ordner für den ausgewählten Titel. - + Error Removing Contents Fehler beim Entfernen des Inhalts - + Error Removing Update Fehler beim Entfernen des Updates - + Error Removing DLC Fehler beim Entfernen des DLCs - + Remove Installed Game Contents? Installierten Spiele-Content entfernen? - + Remove Installed Game Update? Installierte Spiele-Updates entfernen? - + Remove Installed Game DLC? Installierte Spiele-DLCs entfernen? - + Remove Entry Eintrag entfernen - - - - - - + + + + + + Successfully Removed Erfolgreich entfernt - + Successfully removed the installed base game. Das Spiel wurde entfernt. - + The base game is not installed in the NAND and cannot be removed. Das Spiel ist nicht im NAND installiert und kann somit nicht entfernt werden. - + Successfully removed the installed update. Das Update wurde entfernt. - + There is no update installed for this title. Es ist kein Update für diesen Titel installiert. - + There are no DLC installed for this title. Es sind keine DLC für diesen Titel installiert. - + Successfully removed %1 installed DLC. %1 DLC entfernt. - + Delete OpenGL Transferable Shader Cache? Transferierbaren OpenGL Shader Cache löschen? - + Delete Vulkan Transferable Shader Cache? Transferierbaren Vulkan Shader Cache löschen? - + Delete All Transferable Shader Caches? Alle transferierbaren Shader Caches löschen? - + Remove Custom Game Configuration? Spiel-Einstellungen entfernen? - + Remove Cache Storage? Cache-Speicher entfernen? - + Remove File Datei entfernen - - + + Error Removing Transferable Shader Cache Fehler beim Entfernen - - + + A shader cache for this title does not exist. Es existiert kein Shader-Cache für diesen Titel. - + Successfully removed the transferable shader cache. Der transferierbare Shader-Cache wurde entfernt. - + Failed to remove the transferable shader cache. Konnte den transferierbaren Shader-Cache nicht entfernen. - + Error Removing Vulkan Driver Pipeline Cache Fehler beim Entfernen des Vulkan-Pipeline-Cache - + Failed to remove the driver pipeline cache. Fehler beim Entfernen des Driver-Pipeline-Cache - - + + Error Removing Transferable Shader Caches Fehler beim Entfernen der transferierbaren Shader Caches - + Successfully removed the transferable shader caches. - + Die übertragbaren Shader-Caches wurden erfolgreich entfernt. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Fehler beim Entfernen - + A custom configuration for this title does not exist. Es existieren keine Spiel-Einstellungen für dieses Spiel. - + Successfully removed the custom game configuration. Die Spiel-Einstellungen wurden entfernt. - + Failed to remove the custom game configuration. Die Spiel-Einstellungen konnten nicht entfernt werden. - - + + RomFS Extraction Failed! RomFS-Extraktion fehlgeschlagen! - + There was an error copying the RomFS files or the user cancelled the operation. Das RomFS konnte wegen eines Fehlers oder Abbruchs nicht kopiert werden. - + Full Komplett - + Skeleton Nur Ordnerstruktur - + Select RomFS Dump Mode RomFS Extraktions-Modus auswählen - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Bitte wähle, wie das RomFS gespeichert werden soll.<br>"Full" wird alle Dateien des Spiels extrahieren, während <br>"Skeleton" nur die Ordnerstruktur erstellt. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Es ist nicht genügend Speicher (%1) vorhanden um das RomFS zu entpacken. Bitte sorge für genügend Speicherplatze oder wähle ein anderes Verzeichnis aus. (Emulation > Konfiguration > System > Dateisystem > Dump Root) - + Extracting RomFS... RomFS wird extrahiert... - - + + Cancel Abbrechen - + RomFS Extraction Succeeded! RomFS wurde extrahiert! - + The operation completed successfully. Der Vorgang wurde erfolgreich abgeschlossen. - - - - - + + + + + Create Shortcut Verknüpfung erstellen - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon Icon erstellen - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Symboldatei konnte nicht erstellt werden. Der Pfad "%1" existiert nicht oder kann nicht erstellt werden. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Verknüpfung konnte nicht unter %1 erstellt werden. - + Successfully created a shortcut to %1 - + Verknüpfung wurde erfolgreich erstellt unter %1 - + Error Opening %1 Fehler beim Öffnen von %1 - + Select Directory Verzeichnis auswählen - + Properties Einstellungen - + The game properties could not be loaded. Spiel-Einstellungen konnten nicht geladen werden. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch-Programme (%1);;Alle Dateien (*.*) - + Load File Datei laden - + Open Extracted ROM Directory Öffne das extrahierte ROM-Verzeichnis - + Invalid Directory Selected Ungültiges Verzeichnis ausgewählt - + The directory you have selected does not contain a 'main' file. Das Verzeichnis, das du ausgewählt hast, enthält keine 'main'-Datei. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installierbares Switch-Programm (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submissions Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Dateien installieren - + %n file(s) remaining %n Datei verbleibend%n Dateien verbleibend - + Installing file "%1"... Datei "%1" wird installiert... - - + + Install Results NAND-Installation - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Um Konflikte zu vermeiden, raten wir Nutzern davon ab, Spiele im NAND zu installieren. Bitte nutze diese Funktion nur zum Installieren von Updates und DLC. - + %n file(s) were newly installed %n file was newly installed @@ -5159,400 +5297,324 @@ Bitte nutze diese Funktion nur zum Installieren von Updates und DLC. - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Systemanwendung - + System Archive Systemarchiv - + System Application Update Systemanwendungsupdate - + Firmware Package (Type A) Firmware-Paket (Typ A) - + Firmware Package (Type B) Firmware-Paket (Typ B) - + Game Spiel - + Game Update Spiel-Update - + Game DLC Spiel-DLC - + Delta Title Delta-Titel - + Select NCA Install Type... Wähle den NCA-Installationstyp aus... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Bitte wähle, als was diese NCA installiert werden soll: (In den meisten Fällen sollte die Standardeinstellung 'Spiel' ausreichen.) - + Failed to Install Installation fehlgeschlagen - + The title type you selected for the NCA is invalid. Der Titel-Typ, den du für diese NCA ausgewählt hast, ist ungültig. - + File not found Datei nicht gefunden - + File "%1" not found Datei "%1" nicht gefunden - + OK OK - - + + Hardware requirements not met Hardwareanforderungen nicht erfüllt - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Dein System erfüllt nicht die empfohlenen Mindestanforderungen der Hardware. Meldung der Komptabilität wurde deaktiviert. - + Missing yuzu Account Fehlender yuzu-Account - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Um einen Kompatibilitätsbericht abzuschicken, musst du einen yuzu-Account mit yuzu verbinden.<br><br/>Um einen yuzu-Account zu verbinden, prüfe die Einstellungen unter Emulation &gt; Konfiguration &gt; Web. - + Error opening URL Fehler beim Öffnen der URL - + Unable to open the URL "%1". URL "%1" kann nicht geöffnet werden. - + TAS Recording TAS Aufnahme - + Overwrite file of player 1? Datei von Spieler 1 überschreiben? - + Invalid config detected Ungültige Konfiguration erkannt - + Handheld controller can't be used on docked mode. Pro controller will be selected. Handheld-Controller können nicht im Dock verwendet werden. Der Pro-Controller wird verwendet. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Das aktuelle Amiibo wurde entfernt - + Error Fehler - - + + The current game is not looking for amiibos Das aktuelle Spiel sucht nicht nach Amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo-Datei (%1);; Alle Dateien (*.*) - + Load Amiibo Amiibo laden - + Error loading Amiibo data Fehler beim Laden der Amiibo-Daten - + The selected file is not a valid amiibo Die ausgewählte Datei ist keine gültige Amiibo - + The selected file is already on use Die ausgewählte Datei wird bereits verwendet - + An unknown error occurred Ein unbekannter Fehler ist aufgetreten - + Capture Screenshot Screenshot aufnehmen - + PNG Image (*.png) PNG Bild (*.png) - + TAS state: Running %1/%2 TAS Zustand: Läuft %1/%2 - + TAS state: Recording %1 TAS Zustand: Aufnahme %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid TAS Zustand: Ungültig - + &Stop Running - + &Start &Start - + Stop R&ecording - + Aufnahme stoppen - + R&ecord - + Aufnahme - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Skalierung: %1x - + Speed: %1% / %2% Geschwindigkeit: %1% / %2% - + Speed: %1% Geschwindigkeit: %1% - + Game: %1 FPS (Unlocked) Spiel: %1 FPS (Unbegrenzt) - + Game: %1 FPS Spiel: %1 FPS - + Frame: %1 ms Frame: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU HOCH - - - - GPU EXTREME - GPU EXTREM - - - - GPU ERROR - GPU FEHLER - - - - DOCKED - DOCKED - - - - HANDHELD - HANDHELD - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - NÄCHSTER - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BIKUBISCH - - - - GAUSSIAN - GAUSSIAN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA KEIN AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE LAUTSTÄRKE: STUMM - + VOLUME: %1% Volume percentage (e.g. 50%) LAUTSTÄRKE: %1% - + Confirm Key Rederivation Schlüsselableitung bestätigen - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5565,37 +5627,37 @@ This will delete your autogenerated key files and re-run the key derivation modu Dieser Prozess wird die generierten Schlüsseldateien löschen und die Schlüsselableitung neu starten. - + Missing fuses Fuses fehlen - + - Missing BOOT0 - BOOT0 fehlt - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main fehlt - + - Missing PRODINFO - PRODINFO fehlt - + Derivation Components Missing Derivationskomponenten fehlen - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Die Verschlüsselungsschlüssel fehlen. <br>Bitte folgen Sie <a href='https://yuzu-emu.org/help/quickstart/'>dem Yuzu Schnellstart Guide</a> um ihre benötigten Schlüssel, Firmware und Spiele zu erhalten.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5603,49 +5665,49 @@ on your system's performance. Dies könnte, je nach Leistung deines Systems, bis zu einer Minute dauern. - + Deriving Keys Schlüsselableitung - + System Archive Decryption Failed - + Die Systemarchiventschlüsselung ist gescheitert. - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target RomFS wählen - + Please select which RomFS you would like to dump. Wähle, welches RomFS du speichern möchtest. - + Are you sure you want to close yuzu? Bist du sicher, dass du yuzu beenden willst? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Bist du sicher, dass du die Emulation stoppen willst? Jeder nicht gespeicherte Fortschritt geht verloren. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5653,48 +5715,143 @@ Would you like to bypass this and exit anyway? Möchtest du dies umgehen und sie trotzdem beenden? + + + None + Keiner + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bikubisch + + + + Gaussian + Gaussian + + + + ScaleForce + ScaleForce + + + + Docked + Im Dock + + + + Handheld + Handheld + + + + Normal + Normal + + + + High + Hoch + + + + Extreme + + + + + Vulkan + Vulkan + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL nicht verfügbar! - + OpenGL shared contexts are not supported. - + Gemeinsame OpenGL-Kontexte werden nicht unterstützt. - + yuzu has not been compiled with OpenGL support. yuzu wurde nicht mit OpenGL-Unterstützung kompiliert. - - + + Error while initializing OpenGL! Fehler beim Initialisieren von OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Deine Grafikkarte unterstützt kein OpenGL oder du hast nicht den neusten Treiber installiert. - + Error while initializing OpenGL 4.6! Fehler beim Initialisieren von OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Deine Grafikkarte unterstützt OpenGL 4.6 nicht, oder du benutzt nicht die neuste Treiberversion.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Deine Grafikkarte unterstützt anscheinend nicht eine oder mehrere von yuzu benötigten OpenGL-Erweiterungen. Bitte stelle sicher, dass du den neusten Grafiktreiber installiert hast.<br><br>GL Renderer:<br>%1<br><br>Nicht unterstützte Erweiterungen:<br>%2 @@ -5903,7 +6060,7 @@ Möchtest du dies umgehen und sie trotzdem beenden? Game functions with minor graphical or audio glitches and is playable from start to finish. - + Das Spiel funktioniert mit minimalen grafischen oder Tonstörungen und ist komplett spielbar. @@ -5913,7 +6070,7 @@ Möchtest du dies umgehen und sie trotzdem beenden? Game loads, but is unable to progress past the Start Screen. - + Das Spiel lädt, ist jedoch nicht im Stande den Startbildschirm zu passieren. @@ -5949,7 +6106,7 @@ Möchtest du dies umgehen und sie trotzdem beenden? %1 of %n result(s) - %1 von %n Ergebnis%1 von %n Ergebnisse + %1 von %n Ergebnis%1 von %n Ergebnisse(n) @@ -6047,138 +6204,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute Audio aktivieren / deaktivieren - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Hauptfenster - + Audio Volume Down Lautstärke verringern - + Audio Volume Up Lautstärke erhöhen - + Capture Screenshot Screenshot aufnehmen - + Change Adapting Filter Adaptiven Filter ändern - + Change Docked Mode - + Change GPU Accuracy GPU-Genauigkeit ändern - + Continue/Pause Emulation Emulation fortsetzen/pausieren - + Exit Fullscreen Vollbild verlassen - + Exit yuzu yuzu verlassen - + Fullscreen Vollbild - + Load File Datei laden - + Load/Remove Amiibo Amiibo laden/entfernen - + Restart Emulation Emulation neustarten - + Stop Emulation Emulation stoppen - + TAS Record TAS aufnehmen - + TAS Reset TAS neustarten - + TAS Start/Stop TAS starten/stoppen - + Toggle Filter Bar - + Filterleiste umschalten - + Toggle Framerate Limit Aktiviere Bildraten Limitierung - + Toggle Mouse Panning - + Mausschwenk umschalten - + Toggle Status Bar @@ -6587,7 +6744,7 @@ Debug Message: R&ecord - + Aufnahme @@ -6789,7 +6946,8 @@ Eventuell hat dieser den Raum verlassen. No valid network interface is selected. Please go to Configure -> System -> Network and make a selection. - + Es ist keine gültige Netzwerkschnittstelle ausgewählt. +Bitte gehen Sie zu Konfigurieren -> System -> Netzwerk und treffen Sie eine Auswahl. @@ -6917,30 +7075,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Strg - + Alt Alt - - - - + + + + [not set] [nicht gesetzt] @@ -6951,14 +7109,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Achse %1%2 @@ -6969,320 +7127,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [unbekannt] - - + + Left Links - - + + Right Rechts - - + + Down Runter - - + + Up Hoch - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Kreis - + Cross Kreuz - + Square Quadrat - + Triangle Dreieck - + Share Teilen - + Options Optionen - + [undefined] [undefiniert] - + %1%2 %1%2 - - + + [invalid] [ungültig] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 %1%2Achse %3 - - + + %1%2Axis %3,%4,%5 %1%2Achse %3,%4,%5 - - + + %1%2Motion %3 %1%2Bewegung %3 - - + + %1%2Button %3 %1%2Knopf %3 - - + + [unused] [unbenutzt] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Stick L - + Stick R Stick R - + Plus Plus - + Minus Minus - - + + Home Home - + Capture Screenshot - + Touch Touch - + Wheel Indicates the mouse wheel Mausrad - + Backward Rückwärts - + Forward Vorwärts - + Task Aufgabe - + Extra Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 @@ -7362,7 +7520,7 @@ p, li { white-space: pre-wrap; } Mount Amiibo - + Amiibo einbinden diff --git a/dist/languages/el.ts b/dist/languages/el.ts index 2d16da565..712f5241e 100644 --- a/dist/languages/el.ts +++ b/dist/languages/el.ts @@ -485,7 +485,7 @@ This would ban both their forum username and their IP address. Auto - + Αυτόματη @@ -513,7 +513,7 @@ This would ban both their forum username and their IP address. Auto - + Αυτόματη @@ -1126,78 +1126,78 @@ This would ban both their forum username and their IP address. Διαμόρφωση yuzu - - + + Audio Ήχος - - + + CPU CPU - + Debug Αποσφαλμάτωση - + Filesystem Σύστημα Αρχείων - - + + General Γενικά - - + + Graphics Γραφικά - + GraphicsAdvanced - + Hotkeys Πλήκτρα Συντόμευσης - - + + Controls Χειρισμός - + Profiles Τα προφίλ - + Network Δίκτυο - - + + System Σύστημα - + Game List Λίστα Παιχνιδιών - + Web Ιστός @@ -1391,17 +1391,22 @@ This would ban both their forum username and their IP address. Απόκρυψη δρομέα ποντικιού στην αδράνεια - + + Disable controller applet + + + + Reset All Settings Επαναφορά Όλων των Ρυθμίσεων - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Επαναφέρει όλες τις ρυθμίσεις και καταργεί όλες τις επιλογές ανά παιχνίδι. Δεν θα διαγράψει καταλόγους παιχνιδιών, προφίλ ή προφίλ εισόδου. Συνέχιση; @@ -1689,43 +1694,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Χρώμα Φόντου: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Shaders Γλώσσας Μηχανής, μόνο NVIDIA) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1849,37 +1854,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Ανισοτροπικό Φιλτράρισμα: - + Automatic Αυτόματα - + Default Προεπιλεγμένο - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2262,7 +2287,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Διαμόρφωση @@ -2329,22 +2354,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Ενεργοποιήστε τη μετατόπιση του ποντικιού - - - - Mouse sensitivity - Ευαισθησία ποντικιού - - - - % - % - - - + Motion / Touch @@ -2456,7 +2466,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Αριστερό Stick @@ -2550,14 +2560,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2576,7 +2586,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Συν @@ -2589,15 +2599,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2654,247 +2664,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Δεξιός Μοχλός - - - - + + Mouse panning + + + + + Configure + Διαμόρφωση + + + + + + Clear Καθαρισμός - - - - - + + + + + [not set] [άδειο] - - - + + + Invert button Κουμπί αντιστροφής - - + + Toggle button Κουμπί εναλλαγής - + Turbo button - - + + Invert axis Αντιστροφή άξονα - - - + + + Set threshold Ορισμός ορίου - - + + Choose a value between 0% and 100% Επιλέξτε μια τιμή μεταξύ 0% και 100% - + Toggle axis Εναλλαγή αξόνων - + Set gyro threshold Ρύθμιση κατωφλίου γυροσκοπίου - + Calibrate sensor - + Map Analog Stick Χαρτογράφηση Αναλογικού Stick - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Αφού πατήσετε OK, μετακινήστε πρώτα το joystick σας οριζόντια και μετά κατακόρυφα. Για να αντιστρέψετε τους άξονες, μετακινήστε πρώτα το joystick κατακόρυφα και μετά οριζόντια. - + Center axis Κεντρικός άξονας - - + + Deadzone: %1% Νεκρή Ζώνη: %1% - - + + Modifier Range: %1% Εύρος Τροποποιητή: %1% - - + + Pro Controller Pro Controller - + Dual Joycons Διπλά Joycons - + Left Joycon Αριστερό Joycon - + Right Joycon Δεξί Joycon - + Handheld Handheld - + GameCube Controller Χειριστήριο GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Χειριστήριο NES - + SNES Controller Χειριστήριο SNES - + N64 Controller Χειριστήριο N64 - + Sega Genesis Sega Genesis - + Start / Pause - + Z Z - + Control Stick - + C-Stick C-Stick - + Shake! - + [waiting] [αναμονή] - + New Profile Νέο Προφίλ - + Enter a profile name: Εισαγάγετε ένα όνομα προφίλ: - - + + Create Input Profile Δημιουργία Προφίλ Χειρισμού - + The given profile name is not valid! Το όνομα του προφίλ δεν είναι έγκυρο! - + Failed to create the input profile "%1" Η δημιουργία του προφίλ χειρισμού "%1" απέτυχε - + Delete Input Profile Διαγραφή Προφίλ Χειρισμού - + Failed to delete the input profile "%1" Η διαγραφή του προφίλ χειρισμού "%1" απέτυχε - + Load Input Profile Φόρτωση Προφίλ Χειρισμού - + Failed to load the input profile "%1" Η φόρτωση του προφίλ χειρισμού "%1" απέτυχε - + Save Input Profile Αποθήκευση Προφίλ Χειρισμού - + Failed to save the input profile "%1" Η αποθήκευση του προφίλ χειρισμού "%1" απέτυχε @@ -3073,6 +3093,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Η δοκιμή UDP ή η διαμόρφωση βαθμονόμησης είναι σε εξέλιξη.<br>Παρακαλώ περιμένετε να τελειώσουν. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Προεπιλεγμένο + + ConfigureNetwork @@ -3149,47 +3244,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Προγραμματιστής - + Add-Ons Πρόσθετα - + General Γενικά - + System Σύστημα - + CPU CPU - + Graphics Γραφικά - + Adv. Graphics Προχ. Γραφικά - + Audio Ήχος - + Input Profiles - + Properties Ιδιότητες @@ -3391,7 +3486,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3428,7 +3523,7 @@ UUID: %2 - + Enable @@ -3495,12 +3590,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [αναμονή] @@ -3530,7 +3630,7 @@ UUID: %2 Auto - + Αυτόματη @@ -4609,105 +4709,120 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? - + Telemetry Τηλεμετρία - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... - - + + Disable Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Πόσα καρέ ανά δευτερόλεπτο εμφανίζει το παιχνίδι αυτή τη στιγμή. Αυτό διαφέρει από παιχνίδι σε παιχνίδι και από σκηνή σε σκηνή. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Συνέχεια - + &Pause &Παύση - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - - - - + Warning Outdated Game Format - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Μη μεταφρασμένη συμβολοσειρά @@ -4715,855 +4830,779 @@ Drag points to change position, or double-click table cells to edit values. - - + + Error while loading ROM! Σφάλμα κατά τη φόρτωση της ROM! - + The ROM format is not supported. - + An error occurred initializing the video core. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Εμφανίστηκε ένα απροσδιόριστο σφάλμα. Ανατρέξτε στο αρχείο καταγραφής για περισσότερες λεπτομέρειες. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + Save Data Αποθήκευση δεδομένων - + Mod Data - + Error Opening %1 Folder - - + + Folder does not exist! Ο φάκελος δεν υπάρχει! - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry - - - - - - + + + + + + Successfully Removed - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File Αφαίρεση Αρχείου - - + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! - + There was an error copying the RomFS files or the user cancelled the operation. - + Full - + Skeleton - + Select RomFS Dump Mode Επιλογή λειτουργίας απόρριψης RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Μη αποθηκευμένη μετάφραση. Παρακαλούμε επιλέξτε τον τρόπο με τον οποίο θα θέλατε να γίνει η απόρριψη της RomFS.<br> Η επιλογή Πλήρης θα αντιγράψει όλα τα αρχεία στο νέο κατάλογο, ενώ η επιλογή <br> Σκελετός θα δημιουργήσει μόνο τη δομή του καταλόγου. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... - - + + Cancel Ακύρωση - + RomFS Extraction Succeeded! - + The operation completed successfully. Η επέμβαση ολοκληρώθηκε με επιτυχία. - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 - + Select Directory Επιλογή καταλόγου - + Properties Ιδιότητες - + The game properties could not be loaded. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. - + Load File Φόρτωση αρχείου - + Open Extracted ROM Directory - + Invalid Directory Selected - + The directory you have selected does not contain a 'main' file. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files - + %n file(s) remaining - + Installing file "%1"... - - + + Install Results Αποτελέσματα εγκατάστασης - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Εφαρμογή συστήματος - + System Archive - + System Application Update - + Firmware Package (Type A) - + Firmware Package (Type B) - + Game Παιχνίδι - + Game Update Ενημέρωση παιχνιδιού - + Game DLC DLC παιχνιδιού - + Delta Title - + Select NCA Install Type... Επιλέξτε τον τύπο εγκατάστασης NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) - + Failed to Install - + The title type you selected for the NCA is invalid. - + File not found Το αρχείο δεν βρέθηκε - + File "%1" not found Το αρχείο "%1" δεν βρέθηκε - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. - + Error opening URL Σφάλμα κατα το άνοιγμα του URL - + Unable to open the URL "%1". Αδυναμία ανοίγματος του URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo Amiibo - - + + The current amiibo has been removed - + Error Σφάλμα - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) - + Load Amiibo Φόρτωση Amiibo - + Error loading Amiibo data Σφάλμα φόρτωσης δεδομένων Amiibo - + The selected file is not a valid amiibo Το επιλεγμένο αρχείο δεν αποτελεί έγκυρο amiibo - + The selected file is already on use Το επιλεγμένο αρχείο χρησιμοποιείται ήδη - + An unknown error occurred - + Capture Screenshot Λήψη στιγμιότυπου οθόνης - + PNG Image (*.png) Εικόνα PBG (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start &Έναρξη - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Κλίμακα: %1x - + Speed: %1% / %2% Ταχύτητα: %1% / %2% - + Speed: %1% Ταχύτητα: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS - + Frame: %1 ms Καρέ: %1 ms - - GPU NORMAL - + + %1 %2 + %1 %2 - - GPU HIGH - - - - - GPU EXTREME - - - - - GPU ERROR - - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - - - - - - BILINEAR - - - - - BICUBIC - - - - - GAUSSIAN - - - - - SCALEFORCE - - - - + + FSR FSR - - + NO AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5574,133 +5613,228 @@ This will delete your autogenerated key files and re-run the key derivation modu - + Missing fuses - + - Missing BOOT0 - Λείπει το BOOT0 - + - Missing BCPKG2-1-Normal-Main - Λείπει το BCPKG2-1-Normal-Main - + - Missing PRODINFO - Λείπει το PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. - + Deriving Keys - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target - + Please select which RomFS you would like to dump. - + Are you sure you want to close yuzu? Είστε σίγουροι ότι θέλετε να κλείσετε το yuzu; - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? + + + None + Κανένα + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Διγραμμικό + + + + Bicubic + Δικυβικό + + + + Gaussian + Gaussian + + + + ScaleForce + ScaleForce + + + + Docked + Docked + + + + Handheld + Handheld + + + + Normal + + + + + High + + + + + Extreme + + + + + Vulkan + Vulkan + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! Το OpenGL δεν είναι διαθέσιμο! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. - - + + Error while initializing OpenGL! Σφάλμα κατα την αρχικοποίηση του OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. - + Error while initializing OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 @@ -6053,138 +6187,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Λήψη στιγμιότυπου οθόνης - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen Πλήρη Οθόνη - + Load File Φόρτωση αρχείου - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6280,7 +6414,7 @@ Debug Message: Search - + Αναζήτηση @@ -6921,30 +7055,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [μη ορισμένο] @@ -6955,14 +7089,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Άξονας%1%2 @@ -6973,320 +7107,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [άγνωστο] - - + + Left Αριστερά - - + + Right Δεξιά - - + + Down Κάτω - - + + Up Πάνω - + Z Z - + R R - + L L - + A A - + B B - + X Χ - + Y Υ - + Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle - + Cross - + Square - + Triangle - + Share - + Options - + [undefined] - + %1%2 - - + + [invalid] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 - - + + %1%2Button %3 - - + + [unused] [άδειο] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Συν - + Minus Μείον - - + + Home Αρχική - + Capture Στιγμιότυπο - + Touch - + Wheel Indicates the mouse wheel - + Backward - + Forward - + Task - + Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/es.ts b/dist/languages/es.ts index f57671af8..7032c726e 100644 --- a/dist/languages/es.ts +++ b/dist/languages/es.ts @@ -1137,78 +1137,78 @@ Esto banearía su nombre del foro y su dirección IP. Configuración de yuzu - - + + Audio Audio - - + + CPU CPU - + Debug Depuración - + Filesystem Sistema de archivos - - + + General General - - + + Graphics Gráficos - + GraphicsAdvanced Gráficosavanzados - + Hotkeys Teclas de acceso rápido - - + + Controls Controles - + Profiles Perfiles - + Network Red - - + + System Sistema - + Game List Lista de juegos - + Web Web @@ -1402,17 +1402,22 @@ Esto banearía su nombre del foro y su dirección IP. Ocultar el cursor en caso de inactividad. - + + Disable controller applet + Desactivar applet de control + + + Reset All Settings Reiniciar todos los ajustes - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Esto reiniciará y eliminará todas las configuraciones de los juegos. No eliminará ni los directorios de juego, ni los perfiles, ni los perfiles de los mandos. ¿Continuar? @@ -1703,43 +1708,43 @@ Inmediato (sin sincronización) sólo muestra lo que está disponible y puede mo Color de fondo: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Shaders de ensamblado, sólo NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Experimental, sólo Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off Desactivado - + VSync Off VSync Desactivado - + Recommended Recomendado - + On Activado - + VSync On VSync Activado @@ -1864,37 +1869,57 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers.Activar canalizaciones de cómputo (sólo Intel Vulkan) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + Corre el juego a la velocidad normal durante la reproducción de vídeos, incluso cuando no hay límite de fotogramas. + + + + Sync to framerate of video playback + Sincronizar a fotogramas de reproducción de vídeo + + + + Improves rendering of transparency effects in specific games. + Mejora la renderización de los efectos de transparencia en ciertos juegos. + + + + Barrier feedback loops + Bucles de feedback de barrera + + + Anisotropic Filtering: Filtrado anisotrópico: - + Automatic Automático - + Default Valor predeterminado - + 2x x2 - + 4x x4 - + 8x x8 - + 16x x16 @@ -2277,7 +2302,7 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers. - + Configure Configurar @@ -2344,22 +2369,7 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers.Usar un ID de Amiibo aleatorio - - Enable mouse panning - Activar desplazamiento del ratón - - - - Mouse sensitivity - Sensibilidad del ratón - - - - % - % - - - + Motion / Touch Movimiento / táctil @@ -2471,7 +2481,7 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers. - + Left Stick Palanca izquierda @@ -2565,14 +2575,14 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers. - + L L - + ZL ZL @@ -2591,7 +2601,7 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers. - + Plus Más @@ -2604,15 +2614,15 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers. - - + + R R - + ZR ZR @@ -2669,247 +2679,257 @@ Las canalizaciones de cómputo están siempre activadas en los otros drivers. - + Right Stick Palanca derecha - - - - + + Mouse panning + Desplazamiento del ratón + + + + Configure + Configurar + + + + + + Clear Borrar - - - - - + + + + + [not set] [no definido] - - - + + + Invert button Invertir botón - - + + Toggle button Alternar botón - + Turbo button Botón turbo - - + + Invert axis Invertir ejes - - - + + + Set threshold Configurar umbral - - + + Choose a value between 0% and 100% Seleccione un valor entre 0% y 100%. - + Toggle axis Alternar ejes - + Set gyro threshold Configurar umbral del Giroscopio - + Calibrate sensor Calibrar sensor - + Map Analog Stick Configuración de palanca analógico - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Después de pulsar OK, mueve primero el joystick de manera horizontal, y luego verticalmente. Para invertir los ejes, mueve primero el joystick de manera vertical, y luego horizontalmente. - + Center axis Centrar ejes - - + + Deadzone: %1% Punto muerto: %1% - - + + Modifier Range: %1% Rango del modificador: %1% - - + + Pro Controller Controlador Pro - + Dual Joycons Joycons duales - + Left Joycon Joycon izquierdo - + Right Joycon Joycon derecho - + Handheld Portátil - + GameCube Controller Controlador de GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Controlador NES - + SNES Controller Controlador SNES - + N64 Controller Controlador N64 - + Sega Genesis Sega Genesis - + Start / Pause Inicio / Pausa - + Z Z - + Control Stick Palanca de control - + C-Stick C-Stick - + Shake! ¡Agita! - + [waiting] [esperando] - + New Profile Nuevo perfil - + Enter a profile name: Introduce un nombre de perfil: - - + + Create Input Profile Crear perfil de entrada - + The given profile name is not valid! ¡El nombre de perfil introducido no es válido! - + Failed to create the input profile "%1" Error al crear el perfil de entrada "%1" - + Delete Input Profile Eliminar perfil de entrada - + Failed to delete the input profile "%1" Error al eliminar el perfil de entrada "%1" - + Load Input Profile Cargar perfil de entrada - + Failed to load the input profile "%1" Error al cargar el perfil de entrada "%1" - + Save Input Profile Guardar perfil de entrada - + Failed to save the input profile "%1" Error al guardar el perfil de entrada "%1" @@ -3088,6 +3108,81 @@ Para invertir los ejes, mueve primero el joystick de manera vertical, y luego ho La prueba de UDP o la configuración de la calibración está en curso.<br>Por favor, espera a que termine el proceso. + + ConfigureMousePanning + + + Configure mouse panning + Configurar desplazamiento del ratón + + + + Enable + Activar + + + + Can be toggled via a hotkey + Puede ser activada con una tecla de acceso rápido + + + + Sensitivity + Sensibilidad + + + + + Horizontal + Horizontal + + + + + + + + + % + % + + + + + Vertical + Vertical + + + + Deadzone counterweight + Contrapeso de la zona muerta + + + + Counteracts a game's built-in deadzone + Contrarresta la zona muerta por defecto de un juego + + + + Stick decay + Decaída del stick + + + + Strength + Fuerza + + + + Minimum + Mínimo + + + + Default + Predeterminado + + ConfigureNetwork @@ -3164,47 +3259,47 @@ Para invertir los ejes, mueve primero el joystick de manera vertical, y luego ho Desarrollador - + Add-Ons Extras / Add-Ons - + General General - + System Sistema - + CPU CPU - + Graphics Gráficos - + Adv. Graphics Gráficos avanz. - + Audio Audio - + Input Profiles Perfiles de entrada - + Properties Propiedades @@ -3407,8 +3502,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Si quieres usar este control configura el jugador 1 como el control derecho y el jugador 2 como joycon dual antes de iniciar el juego para permitir al control ser detectado apropiadamente. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + Para usar el Ring-Con, configura al jugador 1 como el Joy-Con derecho (tanto físico como emulado) y al jugador 2 como el Joy-Con izquierdo (tanto físico como emulado) antes de correr el juego. @@ -3444,7 +3539,7 @@ UUID: %2 - + Enable Activar @@ -3511,12 +3606,17 @@ UUID: %2 El dispositivo de entrada actual no tiene el Ring incorporado - + + The current mapped device is not connected + + + + Unexpected driver result %1 Resultado inesperado del driver %1 - + [waiting] [esperando] @@ -4626,560 +4726,575 @@ Arrastra los puntos para cambiar de posición, o haz doble clic en las celdas de GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Los datos de uso anónimos se recogen</a> para ayudar a mejorar yuzu. <br/><br/>¿Deseas compartir tus datos de uso con nosotros? - + Telemetry Telemetría - + Broken Vulkan Installation Detected Se ha detectado una instalación corrupta de Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. La inicialización de Vulkan ha fallado durante la ejecución. Haz clic <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>aquí para más información sobre como arreglar el problema</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + Ejecutando un juego + + + Loading Web Applet... Cargando Web applet... - - + + Disable Web Applet Desactivar Web applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Deshabilitar el Applet Web puede causar comportamientos imprevistos y debería solo ser usado con Super Mario 3D All-Stars. ¿Estas seguro que quieres deshabilitar el Applet Web? (Puede ser reactivado en las configuraciones de Depuración.) - + The amount of shaders currently being built La cantidad de shaders que se están construyendo actualmente - + The current selected resolution scaling multiplier. El multiplicador de escala de resolución seleccionado actualmente. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. La velocidad de emulación actual. Los valores superiores o inferiores al 100% indican que la emulación se está ejecutando más rápido o más lento que en una Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. La cantidad de fotogramas por segundo que se está mostrando el juego actualmente. Esto variará de un juego a otro y de una escena a otra. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tiempo que lleva emular un fotograma de la Switch, sin tener en cuenta la limitación de fotogramas o sincronización vertical. Para una emulación óptima, este valor debería ser como máximo de 16.67 ms. - + + Unmute + Desmutear + + + + Mute + Mutear + + + + Reset Volume + Restablecer Volumen + + + &Clear Recent Files &Eliminar archivos recientes - + Emulated mouse is enabled El ratón emulado está activado - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. La entrada de un ratón real y la panoramización del ratón son incompatibles. Por favor, desactive el ratón emulado en la configuración avanzada de entrada para permitir así la panoramización del ratón. - + &Continue &Continuar - + &Pause &Pausar - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu está ejecutando un juego - - - + Warning Outdated Game Format Advertencia: formato del juego obsoleto - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Está utilizando el formato de directorio de ROM deconstruido para este juego, que es un formato desactualizado que ha sido reemplazado por otros, como los NCA, NAX, XCI o NSP. Los directorios de ROM deconstruidos carecen de íconos, metadatos y soporte de actualizaciones.<br><br>Para ver una explicación de los diversos formatos de Switch que soporta yuzu,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>echa un vistazo a nuestra wiki</a>. Este mensaje no se volverá a mostrar. - - + + Error while loading ROM! ¡Error al cargar la ROM! - + The ROM format is not supported. El formato de la ROM no es compatible. - + An error occurred initializing the video core. Se ha producido un error al inicializar el núcleo de video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu ha encontrado un error al ejecutar el núcleo de video. Esto suele ocurrir al no tener los controladores de la GPU actualizados, incluyendo los integrados. Por favor, revisa el registro para más detalles. Para más información sobre cómo acceder al registro, por favor, consulta la siguiente página: <a href='https://yuzu-emu.org/help/reference/log-files/'>Como cargar el archivo de registro</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. ¡Error al cargar la ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Por favor, sigue <a href='https://yuzu-emu.org/help/quickstart/'>la guía de inicio rápido de yuzu</a> para revolcar los archivos.<br>Puedes consultar la wiki de yuzu</a> o el Discord de yuzu</a> para obtener ayuda. - + An unknown error occurred. Please see the log for more details. Error desconocido. Por favor, consulte el archivo de registro para ver más detalles. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Cerrando software... - + Save Data Datos de guardado - + Mod Data Datos de mods - + Error Opening %1 Folder Error al abrir la carpeta %1 - - + + Folder does not exist! ¡La carpeta no existe! - + Error Opening Transferable Shader Cache Error al abrir el caché transferible de shaders - + Failed to create the shader cache directory for this title. No se pudo crear el directorio de la caché de los shaders para este título. - + Error Removing Contents Error al eliminar el contenido - + Error Removing Update Error al eliminar la actualización - + Error Removing DLC Error al eliminar el DLC - + Remove Installed Game Contents? ¿Eliminar contenido del juego instalado? - + Remove Installed Game Update? ¿Eliminar actualización del juego instalado? - + Remove Installed Game DLC? ¿Eliminar el DLC del juego instalado? - + Remove Entry Eliminar entrada - - - - - - + + + + + + Successfully Removed Se ha eliminado con éxito - + Successfully removed the installed base game. Se ha eliminado con éxito el juego base instalado. - + The base game is not installed in the NAND and cannot be removed. El juego base no está instalado en el NAND y no se puede eliminar. - + Successfully removed the installed update. Se ha eliminado con éxito la actualización instalada. - + There is no update installed for this title. No hay ninguna actualización instalada para este título. - + There are no DLC installed for this title. No hay ningún DLC instalado para este título. - + Successfully removed %1 installed DLC. Se ha eliminado con éxito %1 DLC instalado(s). - + Delete OpenGL Transferable Shader Cache? ¿Deseas eliminar el caché transferible de shaders de OpenGL? - + Delete Vulkan Transferable Shader Cache? ¿Deseas eliminar el caché transferible de shaders de Vulkan? - + Delete All Transferable Shader Caches? ¿Deseas eliminar todo el caché transferible de shaders? - + Remove Custom Game Configuration? ¿Deseas eliminar la configuración personalizada del juego? - + Remove Cache Storage? - + ¿Quitar almacenamiento de caché? - + Remove File Eliminar archivo - - + + Error Removing Transferable Shader Cache Error al eliminar la caché de shaders transferibles - - + + A shader cache for this title does not exist. No existe caché de shaders para este título. - + Successfully removed the transferable shader cache. El caché de shaders transferibles se ha eliminado con éxito. - + Failed to remove the transferable shader cache. No se ha podido eliminar la caché de shaders transferibles. - + Error Removing Vulkan Driver Pipeline Cache Error al eliminar la caché de canalización del controlador Vulkan - + Failed to remove the driver pipeline cache. No se ha podido eliminar la caché de canalización del controlador. - - + + Error Removing Transferable Shader Caches Error al eliminar las cachés de shaders transferibles - + Successfully removed the transferable shader caches. Cachés de shaders transferibles eliminadas con éxito. - + Failed to remove the transferable shader cache directory. No se ha podido eliminar el directorio de cachés de shaders transferibles. - - + + Error Removing Custom Configuration Error al eliminar la configuración personalizada del juego - + A custom configuration for this title does not exist. No existe una configuración personalizada para este título. - + Successfully removed the custom game configuration. Se eliminó con éxito la configuración personalizada del juego. - + Failed to remove the custom game configuration. No se ha podido eliminar la configuración personalizada del juego. - - + + RomFS Extraction Failed! ¡La extracción de RomFS ha fallado! - + There was an error copying the RomFS files or the user cancelled the operation. Se ha producido un error al copiar los archivos RomFS o el usuario ha cancelado la operación. - + Full Completo - + Skeleton En secciones - + Select RomFS Dump Mode Elegir método de volcado de RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Por favor, selecciona el método en que quieres volcar el RomFS.<br>Completo copiará todos los archivos al nuevo directorio <br> mientras que en secciones solo creará la estructura del directorio. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root No hay suficiente espacio en %1 para extraer el RomFS. Por favor, libera espacio o elige otro directorio de volcado en Emulación > Configuración > Sistema > Sistema de archivos > Raíz de volcado - + Extracting RomFS... Extrayendo RomFS... - - + + Cancel Cancelar - + RomFS Extraction Succeeded! ¡La extracción RomFS ha tenido éxito! - + The operation completed successfully. La operación se completó con éxito. - - - - - + + + + + Create Shortcut Crear acceso directo - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Esto creará un acceso directo a la AppImage actual. Esto puede no funcionar bien si se actualiza. ¿Continuar? - + Cannot create shortcut on desktop. Path "%1" does not exist. No se puede crear un acceso directo en el escritorio. La ruta "%1" no existe. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. No se puede crear un acceso directo en el menú de aplicaciones. La ruta "%1" no existe y no se puede crear. - + Create Icon Crear icono - + Cannot create icon file. Path "%1" does not exist and cannot be created. No se puede crear el archivo de icono. La ruta "%1" no existe y no se ha podido crear. - + Start %1 with the yuzu Emulator Iniciar %1 con el Emulador yuzu - + Failed to create a shortcut at %1 Error al crear un acceso directo en %1 - + Successfully created a shortcut to %1 Se ha creado un acceso directo a %1 - + Error Opening %1 Error al intentar abrir %1 - + Select Directory Seleccionar directorio - + Properties Propiedades - + The game properties could not be loaded. No se pueden cargar las propiedades del juego. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Ejecutable de Switch (%1);;Todos los archivos (*.*) - + Load File Cargar archivo - + Open Extracted ROM Directory Abrir el directorio de la ROM extraída - + Invalid Directory Selected Directorio seleccionado no válido - + The directory you have selected does not contain a 'main' file. El directorio que ha seleccionado no contiene ningún archivo 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Archivo de Switch Instalable (*.nca *.nsp *.xci);;Archivo de contenidos de Nintendo (*.nca);;Paquete de envío de Nintendo (*.nsp);;Imagen de cartucho NX (*.xci) - + Install Files Instalar archivos - + %n file(s) remaining %n archivo(s) restantes%n archivo(s) restantes%n archivo(s) restantes - + Installing file "%1"... Instalando el archivo "%1"... - - + + Install Results Instalar resultados - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Para evitar posibles conflictos, no se recomienda a los usuarios que instalen juegos base en el NAND. Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + %n file(s) were newly installed %n archivo(s) recién instalado/s @@ -5188,7 +5303,7 @@ Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + %n file(s) were overwritten %n archivo(s) recién sobreescrito/s @@ -5197,7 +5312,7 @@ Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + %n file(s) failed to install %n archivo(s) no se instaló/instalaron @@ -5206,388 +5321,312 @@ Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + System Application Aplicación del sistema - + System Archive Archivo del sistema - + System Application Update Actualización de la aplicación del sistema - + Firmware Package (Type A) Paquete de firmware (Tipo A) - + Firmware Package (Type B) Paquete de firmware (Tipo B) - + Game Juego - + Game Update Actualización de juego - + Game DLC DLC del juego - + Delta Title Titulo delta - + Select NCA Install Type... Seleccione el tipo de instalación NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Seleccione el tipo de título en el que deseas instalar este NCA como: (En la mayoría de los casos, el 'Juego' predeterminado está bien). - + Failed to Install Fallo en la instalación - + The title type you selected for the NCA is invalid. El tipo de título que seleccionó para el NCA no es válido. - + File not found Archivo no encontrado - + File "%1" not found Archivo "%1" no encontrado - + OK Aceptar - - + + Hardware requirements not met No se cumplen los requisitos de hardware - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. El sistema no cumple con los requisitos de hardware recomendados. Los informes de compatibilidad se han desactivado. - + Missing yuzu Account Falta la cuenta de Yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Para enviar un caso de prueba de compatibilidad de juegos, debes vincular tu cuenta de yuzu.<br><br/> Para vincular tu cuenta de yuzu, ve a Emulación &gt; Configuración &gt; Web. - + Error opening URL Error al abrir la URL - + Unable to open the URL "%1". No se puede abrir la URL "%1". - + TAS Recording Grabación TAS - + Overwrite file of player 1? ¿Sobrescribir archivo del jugador 1? - + Invalid config detected Configuración no válida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. El controlador del modo portátil no puede ser usado en el modo sobremesa. Se seleccionará el controlador Pro en su lugar. - - + + Amiibo Amiibo - - + + The current amiibo has been removed El amiibo actual ha sido eliminado - + Error Error - - + + The current game is not looking for amiibos El juego actual no está buscando amiibos - + Amiibo File (%1);; All Files (*.*) Archivo amiibo (%1);; Todos los archivos (*.*) - + Load Amiibo Cargar amiibo - + Error loading Amiibo data Error al cargar los datos Amiibo - + The selected file is not a valid amiibo El archivo seleccionado no es un amiibo válido - + The selected file is already on use El archivo seleccionado ya se encuentra en uso - + An unknown error occurred Ha ocurrido un error inesperado - + Capture Screenshot Captura de pantalla - + PNG Image (*.png) Imagen PNG (*.png) - + TAS state: Running %1/%2 Estado TAS: ejecutando %1/%2 - + TAS state: Recording %1 Estado TAS: grabando %1 - + TAS state: Idle %1/%2 Estado TAS: inactivo %1/%2 - + TAS State: Invalid Estado TAS: nulo - + &Stop Running &Parar de ejecutar - + &Start &Iniciar - + Stop R&ecording Pausar g&rabación - + R&ecord G&rabar - + Building: %n shader(s) Creando: %n shader(s)Construyendo: %n shader(s)Construyendo: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escalado: %1x - + Speed: %1% / %2% Velocidad: %1% / %2% - + Speed: %1% Velocidad: %1% - + Game: %1 FPS (Unlocked) Juego: %1 FPS (desbloqueado) - + Game: %1 FPS Juego: %1 FPS - + Frame: %1 ms Fotogramas: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU ALTA - - - - GPU EXTREME - GPU EXTREMA - - - - GPU ERROR - GPU ERROR - - - - DOCKED - SOBREMESA - - - - HANDHELD - PORTÁTIL - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - PRÓXIMO - - - - - BILINEAR - BILINEAL - - - - BICUBIC - BICÚBICO - - - - GAUSSIAN - GAUSSIANO - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA NO AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE VOLUMEN: SILENCIO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUMEN: %1% - + Confirm Key Rederivation Confirmar la clave de rederivación - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5604,37 +5643,37 @@ es lo que quieres hacer si es necesario. Esto eliminará los archivos de las claves generadas automáticamente y volverá a ejecutar el módulo de derivación de claves. - + Missing fuses Faltan fuses - + - Missing BOOT0 - Falta BOOT0 - + - Missing BCPKG2-1-Normal-Main - Falta BCPKG2-1-Normal-Main - + - Missing PRODINFO - Falta PRODINFO - + Derivation Components Missing Faltan componentes de derivación - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Faltan las claves de encriptación. <br>Por favor, sigue <a href='https://yuzu-emu.org/help/quickstart/'>la guía rápida de yuzu</a> para obtener todas tus claves, firmware y juegos.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5643,49 +5682,49 @@ Esto puede llevar unos minutos dependiendo del rendimiento de su sistema. - + Deriving Keys Obtención de claves - + System Archive Decryption Failed Desencriptación del Sistema de Archivos Fallida - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Las claves de encriptación no han podido desencriptar el firmware. <br>Por favor, siga<a href='https://yuzu-emu.org/help/quickstart/'>la guía de inicio rápido de yuzu</a> para obtener todas tus claves, firmware y juegos. - + Select RomFS Dump Target Selecciona el destinatario para volcar el RomFS - + Please select which RomFS you would like to dump. Por favor, seleccione los RomFS que deseas volcar. - + Are you sure you want to close yuzu? ¿Estás seguro de que quieres cerrar yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. ¿Estás seguro de que quieres detener la emulación? Cualquier progreso no guardado se perderá. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5693,48 +5732,143 @@ Would you like to bypass this and exit anyway? ¿Quieres salir de todas formas? + + + None + Ninguno + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + Mas cercano + + + + Bilinear + Bilineal + + + + Bicubic + Bicúbico + + + + Gaussian + Gaussiano + + + + ScaleForce + ScaleForce + + + + Docked + Sobremesa + + + + Handheld + Portátil + + + + Normal + Normal + + + + High + Alto + + + + Extreme + Extremo + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + Null + + + + GLSL + GLSL + + + + GLASM + GLASM + + + + SPIRV + SPIRV + GRenderWindow - - + + OpenGL not available! ¡OpenGL no está disponible! - + OpenGL shared contexts are not supported. Los contextos compartidos de OpenGL no son compatibles. - + yuzu has not been compiled with OpenGL support. yuzu no ha sido compilado con soporte de OpenGL. - - + + Error while initializing OpenGL! ¡Error al inicializar OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Tu GPU no soporta OpenGL, o no tienes instalados los últimos controladores gráficos. - + Error while initializing OpenGL 4.6! ¡Error al iniciar OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Tu GPU no soporta OpenGL 4.6, o no tienes instalado el último controlador de la tarjeta gráfica.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Es posible que la GPU no soporte una o más extensiones necesarias de OpenGL . Por favor, asegúrate de tener los últimos controladores de la tarjeta gráfica.<br><br>GL Renderer:<br>%1<br><br>Extensiones no soportadas:<br>%2 @@ -5794,7 +5928,7 @@ Would you like to bypass this and exit anyway? Remove Cache Storage - + Quitar almacenamiento de caché @@ -6088,138 +6222,138 @@ Mensaje de depuración: Hotkeys - + Audio Mute/Unmute Activar/Desactivar audio - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Ventana principal - + Audio Volume Down Bajar volumen del audio - + Audio Volume Up Subir volumen del audio - + Capture Screenshot Captura de pantalla - + Change Adapting Filter Cambiar filtro adaptable - + Change Docked Mode Cambiar a modo sobremesa - + Change GPU Accuracy Cambiar precisión de GPU - + Continue/Pause Emulation Continuar/Pausar emulación - + Exit Fullscreen Salir de pantalla completa - + Exit yuzu Cerrar yuzu - + Fullscreen Pantalla completa - + Load File Cargar archivo - + Load/Remove Amiibo Cargar/Eliminar Amiibo - + Restart Emulation Reiniciar emulación - + Stop Emulation Detener emulación - + TAS Record Grabar TAS - + TAS Reset Reiniciar TAS - + TAS Start/Stop Iniciar/detener TAS - + Toggle Filter Bar Alternar barra de filtro - + Toggle Framerate Limit Alternar limite de fotogramas - + Toggle Mouse Panning Alternar desplazamiento del ratón - + Toggle Status Bar Alternar barra de estado @@ -6962,30 +7096,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [no definido] @@ -6996,14 +7130,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Eje %1%2 @@ -7014,320 +7148,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [desconocido] - - + + Left Izquierda - - + + Right Derecha - - + + Down Abajo - - + + Up Arriba - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Comenzar - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Círculo - + Cross Cruz - + Square Cuadrado - + Triangle Triángulo - + Share Compartir - + Options Opciones - + [undefined] [sin definir] - + %1%2 %1%2 - - + + [invalid] [inválido] - - + + %1%2Hat %3 %1%2Rotación %3 - - + - + + %1%2Axis %3 %1%2Eje %3 - - + + %1%2Axis %3,%4,%5 %1%2Eje %3,%4,%5 - - + + %1%2Motion %3 %1%2Movimiento %3 - - + + %1%2Button %3 %1%2Botón %3 - - + + [unused] [no usado] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Palanca L - + Stick R Palanca R - + Plus Más - + Minus Menos - - + + Home Inicio - + Capture Captura - + Touch Táctil - + Wheel Indicates the mouse wheel Rueda - + Backward Atrás - + Forward Adelante - + Task Tarea - + Extra Extra - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3Rotación %4 - - + + %1%2%3Axis %4 %1%2%3Axis %4 - - + + %1%2%3Button %4 %1%2%3Botón %4 diff --git a/dist/languages/fr.ts b/dist/languages/fr.ts index 0046c3128..49d30137f 100644 --- a/dist/languages/fr.ts +++ b/dist/languages/fr.ts @@ -1136,78 +1136,78 @@ Cette option améliore la vitesse en réduisant la précision des instructions f Configuration de yuzu - - + + Audio Son - - + + CPU CPU - + Debug Débogage - + Filesystem Système de fichiers - - + + General Général - - + + Graphics Vidéo - + GraphicsAdvanced Graphismes avancés - + Hotkeys Raccourcis clavier - - + + Controls Contrôles - + Profiles Profils - + Network Réseau - - + + System Système - + Game List Liste des jeux - + Web Web @@ -1401,17 +1401,22 @@ Cette option améliore la vitesse en réduisant la précision des instructions f Cacher la souris en cas d'inactivité - + + Disable controller applet + Désactiver l'applet du contrôleur + + + Reset All Settings Réinitialiser tous les paramètres - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Ceci réinitialise tout les paramètres et supprime toutes les configurations par jeu. Cela ne va pas supprimer les répertoires de jeu, les profils, ou les profils d'entrée. Continuer ? @@ -1702,43 +1707,43 @@ Immédiat (sans synchronisation) présente simplement ce qui est disponible et p Couleur de L’arrière plan : - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Shaders en Assembleur, NVIDIA Seulement) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Expérimental, Mesa seulement) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off Désactivé - + VSync Off VSync Désactivée - + Recommended Recommandé - + On Activé - + VSync On VSync Activée @@ -1863,37 +1868,58 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes.Activer les pipelines de calcul (uniquement pour Intel Vulkan) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + Éxécuter le jeu à une vitesse normale pendant la relecture du vidéo, +même-ci la fréquence d'image est dévérouillée. + + + + Sync to framerate of video playback + Synchro la fréquence d'image de la relecture du vidéo + + + + Improves rendering of transparency effects in specific games. + Améliore le rendu des effets de transparence dans des jeux spécifiques. + + + + Barrier feedback loops + Boucles de rétroaction de barrière + + + Anisotropic Filtering: Filtrage anisotropique : - + Automatic Automatique - + Default Défaut - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2276,7 +2302,7 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes. - + Configure Configurer @@ -2343,22 +2369,7 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes.Utiliser un ID d'Amiibo aléatoire - - Enable mouse panning - Activer le mouvement panorama avec la souris - - - - Mouse sensitivity - Sensibilité de la souris - - - - % - % - - - + Motion / Touch La motion / Toucher @@ -2470,7 +2481,7 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes. - + Left Stick Stick Gauche @@ -2564,14 +2575,14 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes. - + L L - + ZL ZL @@ -2590,7 +2601,7 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes. - + Plus Plus @@ -2603,15 +2614,15 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes. - - + + R R - + ZR ZR @@ -2668,247 +2679,257 @@ Les pipelines de calcul sont toujours activés sur tous les autres pilotes. - + Right Stick Stick Droit - - - - + + Mouse panning + Panoramique de la souris + + + + Configure + Configurer + + + + + + Clear Effacer - - - - - + + + + + [not set] [non défini] - - - + + + Invert button Inverser les boutons - - + + Toggle button Bouton d'activation - + Turbo button Bouton Turbo - - + + Invert axis Inverser l'axe - - - + + + Set threshold Définir le seuil - - + + Choose a value between 0% and 100% Choisissez une valeur entre 0% et 100% - + Toggle axis Basculer les axes - + Set gyro threshold Définir le seuil du gyroscope - + Calibrate sensor Calibrer le capteur - + Map Analog Stick Mapper le stick analogique - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Après avoir appuyé sur OK, bougez d'abord votre joystick horizontalement, puis verticalement. Pour inverser les axes, bougez d'abord votre joystick verticalement, puis horizontalement. - + Center axis Axe central - - + + Deadzone: %1% Zone morte : %1% - - + + Modifier Range: %1% Modification de la course : %1% - - + + Pro Controller Pro Controller - + Dual Joycons Deux Joycons - + Left Joycon Joycon de gauche - + Right Joycon Joycon de droit - + Handheld Mode Portable - + GameCube Controller Manette GameCube - + Poke Ball Plus Poké Ball Plus - + NES Controller Manette NES - + SNES Controller Manette SNES - + N64 Controller Manette N64 - + Sega Genesis Sega Genesis - + Start / Pause Start / Pause - + Z Z - + Control Stick Stick de contrôle - + C-Stick C-Stick - + Shake! Secouez ! - + [waiting] [en attente] - + New Profile Nouveau Profil - + Enter a profile name: Entrez un nom de profil : - - + + Create Input Profile Créer un profil d'entrée - + The given profile name is not valid! Le nom de profil donné est invalide ! - + Failed to create the input profile "%1" Échec de la création du profil d'entrée "%1" - + Delete Input Profile Supprimer le profil d'entrée - + Failed to delete the input profile "%1" Échec de la suppression du profil d'entrée "%1" - + Load Input Profile Charger le profil d'entrée - + Failed to load the input profile "%1" Échec du chargement du profil d'entrée "%1" - + Save Input Profile Sauvegarder le profil d'entrée - + Failed to save the input profile "%1" Échec de la sauvegarde du profil d'entrée "%1" @@ -3087,6 +3108,81 @@ Pour inverser les axes, bougez d'abord votre joystick verticalement, puis h Le test UDP ou la configuration de l'étalonnage est en cours.<br>Veuillez attendre qu'ils se terminent. + + ConfigureMousePanning + + + Configure mouse panning + Configurer le panoramique de la souris + + + + Enable + Activer + + + + Can be toggled via a hotkey + Peut être activé/désactivé via un raccourci clavier + + + + Sensitivity + Sensibilité + + + + + Horizontal + Horizontal + + + + + + + + + % + % + + + + + Vertical + Vertical + + + + Deadzone counterweight + Contrepoids de zone morte + + + + Counteracts a game's built-in deadzone + Contrebalance la zone morte intégrée d'un jeu + + + + Stick decay + Dégradation du stick + + + + Strength + Force + + + + Minimum + Minimum + + + + Default + Défaut + + ConfigureNetwork @@ -3163,47 +3259,47 @@ Pour inverser les axes, bougez d'abord votre joystick verticalement, puis h Développeur - + Add-Ons Extensions - + General Général - + System Système - + CPU CPU - + Graphics Graphiques - + Adv. Graphics Adv. Graphiques - + Audio Audio - + Input Profiles Profils d'entrée - + Properties Propriétés @@ -3406,8 +3502,8 @@ UUID : %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Si vous souhaitez utiliser cette manette, configurez le joueur 1 comme manette droite et le joueur 2 comme double joycon avant de lancer le jeu pour permettre à cette manette d'être détectée correctement. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + Pour utiliser le Ring-Con, configurez le joueur 1 comme Joy-Con droit (à la fois physique et émulé), et le joueur 2 comme Joy-Con gauche (gauche physique et double émulé) avant de démarrer le jeu. @@ -3443,7 +3539,7 @@ UUID : %2 - + Enable Activer @@ -3510,12 +3606,17 @@ UUID : %2 L'appareil actuellement mappé n'a pas d'anneau attaché - + + The current mapped device is not connected + L'appareil actuellement mappé n'est pas connecté + + + Unexpected driver result %1 Résultat de pilote inattendu %1 - + [waiting] [En attente] @@ -4625,959 +4726,898 @@ Faites glisser les points pour modifier la position ou double-cliquez sur les ce GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Des données anonymes sont collectées</a> pour aider à améliorer yuzu. <br/><br/>Voulez-vous partager vos données d'utilisations avec nous ? - + Telemetry Télémétrie - + Broken Vulkan Installation Detected Installation Vulkan Cassée Détectée - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. L'initialisation de Vulkan a échoué lors du démarrage.<br><br>Cliquez <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>ici pour obtenir des instructions pour résoudre le problème</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + Exécution d'un jeu + + + Loading Web Applet... Chargement du Web Applet... - - + + Disable Web Applet Désactiver l'applet web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) La désactivation de l'applet Web peut entraîner un comportement indéfini et ne doit être utilisée qu'avec Super Mario 3D All-Stars. Voulez-vous vraiment désactiver l'applet Web ? (Cela peut être réactivé dans les paramètres de débogage.) - + The amount of shaders currently being built La quantité de shaders en cours de construction - + The current selected resolution scaling multiplier. Le multiplicateur de mise à l'échelle de résolution actuellement sélectionné. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Valeur actuelle de la vitesse de l'émulation. Des valeurs plus hautes ou plus basses que 100% indique que l'émulation fonctionne plus vite ou plus lentement qu'une véritable Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Combien d'image par seconde le jeu est en train d'afficher. Ceci vas varier de jeu en jeu et de scènes en scènes. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Temps pris pour émuler une image par seconde de la switch, sans compter le limiteur d'image par seconde ou la synchronisation verticale. Pour une émulation à pleine vitesse, ceci devrait être au maximum à 16.67 ms. - + + Unmute + Remettre le son + + + + Mute + Couper le son + + + + Reset Volume + Réinitialiser le volume + + + &Clear Recent Files &Effacer les fichiers récents - + Emulated mouse is enabled La souris émulée est activée - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. La saisie réelle de la souris et le panoramique de la souris sont incompatibles. Veuillez désactiver la souris émulée dans les paramètres avancés d'entrée pour permettre le panoramique de la souris. - + &Continue &Continuer - + &Pause &Pause - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu exécute un jeu - - - + Warning Outdated Game Format Avertissement : Le Format de jeu est dépassé - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Vous utilisez un format de ROM déconstruite pour ce jeu, qui est donc un format dépassé qui à été remplacer par d'autre. Par exemple les formats NCA, NAX, XCI, ou NSP. Les destinations de ROM déconstruites manque des icônes, des métadonnée et du support de mise à jour.<br><br>Pour une explication des divers formats Switch que yuzu supporte, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Regardez dans le wiki</a>. Ce message ne sera pas montré une autre fois. - - + + Error while loading ROM! Erreur lors du chargement de la ROM ! - + The ROM format is not supported. Le format de la ROM n'est pas supporté. - + An error occurred initializing the video core. Une erreur s'est produite lors de l'initialisation du noyau dédié à la vidéo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu a rencontré une erreur en exécutant le cœur vidéo. Cela est généralement causé par des pilotes graphiques trop anciens. Veuillez consulter les logs pour plus d'informations. Pour savoir comment accéder aux logs, veuillez vous référer à la page suivante : <a href='https://yuzu-emu.org/help/reference/log-files/'>Comment partager un fichier de log </a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Erreur lors du chargement de la ROM ! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Veuillez suivre <a href='https://yuzu-emu.org/help/quickstart/'>le guide de démarrage rapide yuzu</a> pour retransférer vos fichiers.<br>Vous pouvez vous référer au wiki yuzu</a> ou le Discord yuzu</a> pour de l'assistance. - + An unknown error occurred. Please see the log for more details. Une erreur inconnue est survenue. Veuillez consulter le journal des logs pour plus de détails. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Fermeture du logiciel... - + Save Data Enregistrer les données - + Mod Data Donnés du Mod - + Error Opening %1 Folder Erreur dans l'ouverture du dossier %1. - - + + Folder does not exist! Le dossier n'existe pas ! - + Error Opening Transferable Shader Cache Erreur lors de l'ouverture des Shader Cache Transferable - + Failed to create the shader cache directory for this title. Impossible de créer le dossier de cache du shader pour ce jeu. - + Error Removing Contents Erreur en enlevant le contenu - + Error Removing Update Erreur en enlevant la Mise à Jour - + Error Removing DLC Erreur en enlevant le DLC - + Remove Installed Game Contents? Enlever les données du jeu installé ? - + Remove Installed Game Update? Enlever la mise à jour du jeu installé ? - + Remove Installed Game DLC? Enlever le DLC du jeu installé ? - + Remove Entry Supprimer l'entrée - - - - - - + + + + + + Successfully Removed Supprimé avec succès - + Successfully removed the installed base game. Suppression du jeu de base installé avec succès. - + The base game is not installed in the NAND and cannot be removed. Le jeu de base n'est pas installé dans la NAND et ne peut pas être supprimé. - + Successfully removed the installed update. Suppression de la mise à jour installée avec succès. - + There is no update installed for this title. Il n'y a pas de mise à jour installée pour ce titre. - + There are no DLC installed for this title. Il n'y a pas de DLC installé pour ce titre. - + Successfully removed %1 installed DLC. Suppression de %1 DLC installé(s) avec succès. - + Delete OpenGL Transferable Shader Cache? Supprimer la Cache OpenGL de Shader Transférable? - + Delete Vulkan Transferable Shader Cache? Supprimer la Cache Vulkan de Shader Transférable? - + Delete All Transferable Shader Caches? Supprimer Toutes les Caches de Shader Transférable? - + Remove Custom Game Configuration? Supprimer la configuration personnalisée du jeu? - + Remove Cache Storage? Supprimer le stockage du cache ? - + Remove File Supprimer fichier - - + + Error Removing Transferable Shader Cache Erreur lors de la suppression du cache de shader transférable - - + + A shader cache for this title does not exist. Un shader cache pour ce titre n'existe pas. - + Successfully removed the transferable shader cache. Suppression du cache de shader transférable avec succès. - + Failed to remove the transferable shader cache. Échec de la suppression du cache de shader transférable. - + Error Removing Vulkan Driver Pipeline Cache Erreur lors de la suppression du cache de pipeline de pilotes Vulkan - + Failed to remove the driver pipeline cache. Échec de la suppression du cache de pipeline de pilotes. - - + + Error Removing Transferable Shader Caches Erreur durant la Suppression des Caches de Shader Transférable - + Successfully removed the transferable shader caches. Suppression des caches de shader transférable effectuée avec succès. - + Failed to remove the transferable shader cache directory. Impossible de supprimer le dossier de la cache de shader transférable. - - + + Error Removing Custom Configuration Erreur lors de la suppression de la configuration personnalisée - + A custom configuration for this title does not exist. Il n'existe pas de configuration personnalisée pour ce titre. - + Successfully removed the custom game configuration. Suppression de la configuration de jeu personnalisée avec succès. - + Failed to remove the custom game configuration. Échec de la suppression de la configuration personnalisée du jeu. - - + + RomFS Extraction Failed! L'extraction de la RomFS a échoué ! - + There was an error copying the RomFS files or the user cancelled the operation. Une erreur s'est produite lors de la copie des fichiers RomFS ou l'utilisateur a annulé l'opération. - + Full Plein - + Skeleton Squelette - + Select RomFS Dump Mode Sélectionnez le mode d'extraction de la RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Veuillez sélectionner la manière dont vous souhaitez que le fichier RomFS soit extrait.<br>Full copiera tous les fichiers dans le nouveau répertoire, tandis que<br>skeleton créera uniquement la structure de répertoires. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Il n'y a pas assez d'espace libre dans %1 pour extraire la RomFS. Veuillez libérer de l'espace ou sélectionner un autre dossier d'extraction dans Émulation > Configurer > Système > Système de fichiers > Extraire la racine - + Extracting RomFS... Extraction de la RomFS ... - - + + Cancel Annuler - + RomFS Extraction Succeeded! Extraction de la RomFS réussi ! - + The operation completed successfully. L'opération s'est déroulée avec succès. - - - - - + + + + + Create Shortcut Créer un raccourci - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Cela créera un raccourci vers l'AppImage actuelle. Cela peut ne pas fonctionner correctement si vous mettez à jour. Continuer ? - + Cannot create shortcut on desktop. Path "%1" does not exist. Impossible de créer un raccourci sur le bureau. Le chemin "%1" n'existe pas. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Impossible de créer un raccourci dans le menu des applications. Le chemin "%1" n'existe pas et ne peut pas être créé. - + Create Icon Créer une icône - + Cannot create icon file. Path "%1" does not exist and cannot be created. Impossible de créer le fichier d'icône. Le chemin "%1" n'existe pas et ne peut pas être créé. - + Start %1 with the yuzu Emulator Démarrer %1 avec l'émulateur Yuzu - + Failed to create a shortcut at %1 Impossible de créer un raccourci vers %1 - + Successfully created a shortcut to %1 Création réussie d'un raccourci vers %1 - + Error Opening %1 Erreur lors de l'ouverture %1 - + Select Directory Sélectionner un répertoire - + Properties Propriétés - + The game properties could not be loaded. Les propriétés du jeu n'ont pas pu être chargées. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Exécutable Switch (%1);;Tous les fichiers (*.*) - + Load File Charger un fichier - + Open Extracted ROM Directory Ouvrir le dossier des ROM extraites - + Invalid Directory Selected Destination sélectionnée invalide - + The directory you have selected does not contain a 'main' file. Le répertoire que vous avez sélectionné ne contient pas de fichier "main". - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Fichier Switch installable (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installer les fichiers - + %n file(s) remaining %n fichier restant%n fichiers restants%n fichiers restants - + Installing file "%1"... Installation du fichier "%1" ... - - + + Install Results Résultats d'installation - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Pour éviter d'éventuels conflits, nous déconseillons aux utilisateurs d'installer des jeux de base sur la NAND. Veuillez n'utiliser cette fonctionnalité que pour installer des mises à jour et des DLC. - + %n file(s) were newly installed %n fichier a été nouvellement installé%n fichiers ont été nouvellement installés%n fichiers ont été nouvellement installés - + %n file(s) were overwritten %n fichier a été écrasé%n fichiers ont été écrasés%n fichiers ont été écrasés - + %n file(s) failed to install %n fichier n'a pas pu être installé%n fichiers n'ont pas pu être installés%n fichiers n'ont pas pu être installés - + System Application Application Système - + System Archive Archive Système - + System Application Update Mise à jour de l'application système - + Firmware Package (Type A) Paquet micrologiciel (Type A) - + Firmware Package (Type B) Paquet micrologiciel (Type B) - + Game Jeu - + Game Update Mise à jour de jeu - + Game DLC DLC de jeu - + Delta Title Titre Delta - + Select NCA Install Type... Sélectionner le type d'installation du NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Veuillez sélectionner le type de titre auquel vous voulez installer ce NCA : (Dans la plupart des cas, le titre par défaut : 'Jeu' est correct.) - + Failed to Install Échec de l'installation - + The title type you selected for the NCA is invalid. Le type de titre que vous avez sélectionné pour le NCA n'est pas valide. - + File not found Fichier non trouvé - + File "%1" not found Fichier "%1" non trouvé - + OK OK - - + + Hardware requirements not met Éxigences matérielles non respectées - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Votre système ne correspond pas aux éxigences matérielles. Les rapports de comptabilité ont été désactivés. - + Missing yuzu Account Compte yuzu manquant - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Pour soumettre un test de compatibilité pour un jeu, vous devez lier votre compte yuzu.<br><br/>Pour lier votre compte yuzu, aller à Emulation &gt; Configuration&gt; Web. - + Error opening URL Erreur lors de l'ouverture de l'URL - + Unable to open the URL "%1". Impossible d'ouvrir l'URL "%1". - + TAS Recording Enregistrement TAS - + Overwrite file of player 1? Écraser le fichier du joueur 1 ? - + Invalid config detected Configuration invalide détectée - + Handheld controller can't be used on docked mode. Pro controller will be selected. Contrôleur portable ne peut pas être utilisé en mode téléviseur. La manette Pro sera sélectionnée. - - + + Amiibo Amiibo - - + + The current amiibo has been removed L'amiibo actuel a été retiré - + Error Erreur - - + + The current game is not looking for amiibos Le jeu actuel ne cherche pas d'amiibos. - + Amiibo File (%1);; All Files (*.*) Fichier Amiibo (%1);; Tous les fichiers (*.*) - + Load Amiibo Charger un Amiibo - + Error loading Amiibo data Erreur lors du chargement des données Amiibo - + The selected file is not a valid amiibo Le fichier choisi n'est pas un amiibo valide - + The selected file is already on use Le fichier sélectionné est déjà utilisé - + An unknown error occurred Une erreur inconnue s'est produite - + Capture Screenshot Capture d'écran - + PNG Image (*.png) Image PNG (*.png) - + TAS state: Running %1/%2 État du TAS : En cours d'exécution %1/%2 - + TAS state: Recording %1 État du TAS : Enregistrement %1 - + TAS state: Idle %1/%2 État du TAS : Inactif %1:%2 - + TAS State: Invalid État du TAS : Invalide - + &Stop Running &Stopper l'exécution - + &Start &Start - + Stop R&ecording Stopper l'en&registrement - + R&ecord En&registrer - + Building: %n shader(s) Compilation: %n shaderCompilation : %n shadersCompilation : %n shaders - + Scale: %1x %1 is the resolution scaling factor Échelle : %1x - + Speed: %1% / %2% Vitesse : %1% / %2% - + Speed: %1% Vitesse : %1% - + Game: %1 FPS (Unlocked) Jeu : %1 IPS (Débloqué) - + Game: %1 FPS Jeu : %1 FPS - + Frame: %1 ms Frame : %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU HAUT - - - - GPU EXTREME - GPU EXTRÊME - - - - GPU ERROR - GPU ERREUR - - - - DOCKED - MODE TV - - - - HANDHELD - PORTABLE - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - PLUS PROCHE - - - - - BILINEAR - BILINÉAIRE - - - - BICUBIC - BICUBIQUE - - - - GAUSSIAN - GAUSSIEN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA AUCUN AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE VOLUME: MUET - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Confirmer la réinstallation de la clé - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5594,37 +5634,37 @@ et éventuellement faites des sauvegardes. Cela supprimera vos fichiers de clé générés automatiquement et ré exécutera le module d'installation de clé. - + Missing fuses Fusibles manquants - + - Missing BOOT0 - BOOT0 manquant - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main manquant - + - Missing PRODINFO - PRODINFO manquant - + Derivation Components Missing Composants de dérivation manquants - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Les clés de chiffrement sont manquantes. <br>Veuillez suivre <a href='https://yuzu-emu.org/help/quickstart/'>le guide de démarrage rapide yuzu</a> pour obtenir tous vos clés, firmware et jeux.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5633,49 +5673,49 @@ Cela peut prendre jusqu'à une minute en fonction des performances de votre système. - + Deriving Keys Installation des clés - + System Archive Decryption Failed Échec du déchiffrement de l'archive système. - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Les clés de chiffrement n'ont pas réussi à déchiffrer le firmware. <br>Veuillez suivre <a href='https://yuzu-emu.org/help/quickstart/'>le guide de démarrage rapide du yuzu</a> pour obtenir toutes vos clés, firmware et jeux. - + Select RomFS Dump Target Sélectionner la cible d'extraction du RomFS - + Please select which RomFS you would like to dump. Veuillez sélectionner quel RomFS vous voulez extraire. - + Are you sure you want to close yuzu? Êtes vous sûr de vouloir fermer yuzu ? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Êtes-vous sûr d'arrêter l'émulation ? Tout progrès non enregistré sera perdu. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5683,48 +5723,143 @@ Would you like to bypass this and exit anyway? Voulez-vous ignorer ceci and quitter quand même ? + + + None + Aucune + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + Le plus proche + + + + Bilinear + Bilinéaire + + + + Bicubic + Bicubique + + + + Gaussian + Gaussien + + + + ScaleForce + ScaleForce + + + + Docked + Mode TV + + + + Handheld + Mode Portable + + + + Normal + Normal + + + + High + Haut + + + + Extreme + Extême + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + Nul + + + + GLSL + GLSL + + + + GLASM + GLASM + + + + SPIRV + SPIRV + GRenderWindow - - + + OpenGL not available! OpenGL n'est pas disponible ! - + OpenGL shared contexts are not supported. Les contextes OpenGL partagés ne sont pas pris en charge. - + yuzu has not been compiled with OpenGL support. yuzu n'a pas été compilé avec le support OpenGL. - - + + Error while initializing OpenGL! Erreur lors de l'initialisation d'OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Votre GPU peut ne pas prendre en charge OpenGL, ou vous n'avez pas les derniers pilotes graphiques. - + Error while initializing OpenGL 4.6! Erreur lors de l'initialisation d'OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Votre GPU peut ne pas prendre en charge OpenGL 4.6 ou vous ne disposez pas du dernier pilote graphique: %1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Votre GPU peut ne pas prendre en charge une ou plusieurs extensions OpenGL requises. Veuillez vous assurer que vous disposez du dernier pilote graphique.<br><br>GL Renderer :<br>%1<br><br>Extensions non prises en charge :<br>%2 @@ -6078,138 +6213,138 @@ Message de débogage : Hotkeys - + Audio Mute/Unmute Désactiver/Activer le Son - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Fenêtre Principale - + Audio Volume Down Baisser le volume audio - + Audio Volume Up Augmenter le volume audio - + Capture Screenshot Prendre une capture d'ecran - + Change Adapting Filter Modifier le filtre d'adaptation - + Change Docked Mode Changer le mode de la station d'accueil - + Change GPU Accuracy Modifier la précision du GPU - + Continue/Pause Emulation Continuer/Suspendre l'Émulation - + Exit Fullscreen Quitter le plein écran - + Exit yuzu Quitter yuzu - + Fullscreen Plein écran - + Load File Charger un fichier - + Load/Remove Amiibo Charger/Supprimer un Amiibo - + Restart Emulation Redémarrer l'Émulation - + Stop Emulation Arrêter l'Émulation - + TAS Record Enregistrement TAS - + TAS Reset Réinitialiser le TAS - + TAS Start/Stop Démarrer/Arrêter le TAS - + Toggle Filter Bar Activer la barre de filtre - + Toggle Framerate Limit Activer la limite de fréquence d'images - + Toggle Mouse Panning Activer le panoramique de la souris - + Toggle Status Bar Activer la barre d'état @@ -6952,30 +7087,30 @@ p, li { white-space: pre-wrap; } - + Shift Maj - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [non défini] @@ -6986,14 +7121,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Axe %1%2 @@ -7004,320 +7139,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [inconnu] - - + + Left Gauche - - + + Right Droite - - + + Down Bas - - + + Up Haut - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Cercle - + Cross Croix - + Square Carré - + Triangle Triangle - + Share Partager - + Options Options - + [undefined] [non défini] - + %1%2 %1%2 - - + + [invalid] [invalide] - - + + %1%2Hat %3 %1%2Chapeau %3 - - + - + + %1%2Axis %3 %1%2Axe %3 - - + + %1%2Axis %3,%4,%5 %1%2Axe %3,%4,%5 - - + + %1%2Motion %3 %1%2Mouvement %3 - - + + %1%2Button %3 %1%2Bouton %3 - - + + [unused] [inutilisé] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Stick Gauche - + Stick R Stick Droit - + Plus Plus - + Minus Moins - - + + Home Home - + Capture Capturer - + Touch Tactile - + Wheel Indicates the mouse wheel Molette - + Backward Reculer - + Forward Avancer - + Task Tâche - + Extra Extra - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3Chapeau %4 - - + + %1%2%3Axis %4 %1%2%3Axe %4 - - + + %1%2%3Button %4 %1%2%3Bouton %4 diff --git a/dist/languages/id.ts b/dist/languages/id.ts index eefc9de49..374b18402 100644 --- a/dist/languages/id.ts +++ b/dist/languages/id.ts @@ -1093,78 +1093,78 @@ Memungkinkan berbagai macam optimasi IR. Komfigurasi yuzu - - + + Audio Audio - - + + CPU CPU - + Debug Awakutu - + Filesystem Sistem berkas - - + + General Umum - - + + Graphics Grafis - + GraphicsAdvanced GrafisLanjutan - + Hotkeys Pintasan - - + + Controls Kendali - + Profiles Profil - + Network Jaringan - - + + System Sistem - + Game List Daftar Permainan - + Web Jejaring @@ -1358,17 +1358,22 @@ Memungkinkan berbagai macam optimasi IR. Sembunyikan mouse saat tidak aktif - + + Disable controller applet + + + + Reset All Settings Atur Ulang Semua Pengaturan - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? @@ -1656,43 +1661,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Warna Latar: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Shader perakit, hanya NVIDIA) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1816,37 +1821,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Anisotropic Filtering: - + Automatic Otomatis - + Default Bawaan - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2229,7 +2254,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Konfigurasi @@ -2296,22 +2321,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Nyalakan geseran tetikus - - - - Mouse sensitivity - Sensitivitas mouse - - - - % - % - - - + Motion / Touch Gerakan / Sentuhan @@ -2423,7 +2433,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Stik Kiri @@ -2517,14 +2527,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2543,7 +2553,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Tambah @@ -2556,15 +2566,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2621,247 +2631,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Stik Kanan - - - - + + Mouse panning + + + + + Configure + Konfigurasi + + + + + + Clear Bersihkan - - - - - + + + + + [not set] [belum diatur] - - - + + + Invert button Balikkan tombol - - + + Toggle button Atur tombol - + Turbo button - - + + Invert axis Balikkan poros - - - + + + Set threshold Atur batasan - - + + Choose a value between 0% and 100% Pilih sebuah angka diantara 0% dan 100% - + Toggle axis - + Set gyro threshold - + Calibrate sensor - + Map Analog Stick Petakan Stik Analog - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Setelah menekan OK, pertama gerakkan joystik secara mendatar, lalu tegak lurus. Untuk membalikkan sumbu, pertama gerakkan joystik secara tegak lurus, lalu mendatar. - + Center axis - - + + Deadzone: %1% Titik Mati: %1% - - + + Modifier Range: %1% Rentang Pengubah: %1% - - + + Pro Controller Kontroler Pro - + Dual Joycons Joycon Dual - + Left Joycon Joycon Kiri - + Right Joycon Joycon Kanan - + Handheld Jinjing - + GameCube Controller Kontroler GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Kontroler NES - + SNES Controller Kontroler SNES - + N64 Controller Kontroler N64 - + Sega Genesis Sega Genesis - + Start / Pause Mulai / Jeda - + Z Z - + Control Stick Stik Kendali - + C-Stick C-Stick - + Shake! Getarkan! - + [waiting] [menunggu] - + New Profile Profil Baru - + Enter a profile name: Masukkan nama profil: - - + + Create Input Profile Ciptakan Profil Masukan - + The given profile name is not valid! Nama profil yang diberi tidak sah! - + Failed to create the input profile "%1" Gagal membuat profil masukan "%1" - + Delete Input Profile Hapus Profil Masukan - + Failed to delete the input profile "%1" Gagal menghapus profil masukan "%1" - + Load Input Profile Muat Profil Masukan - + Failed to load the input profile "%1" Gagal memuat profil masukan "%1" - + Save Input Profile Simpat Profil Masukan - + Failed to save the input profile "%1" Gagal menyimpan profil masukan "%1" @@ -3040,6 +3060,81 @@ Untuk membalikkan sumbu, pertama gerakkan joystik secara tegak lurus, lalu menda Uji coba UDP atau kalibrasi konfigurasi sedang berjalan.<br>Mohon tunggu hingga selesai. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Bawaan + + ConfigureNetwork @@ -3116,47 +3211,47 @@ Untuk membalikkan sumbu, pertama gerakkan joystik secara tegak lurus, lalu menda Pengembang - + Add-Ons Pengaya (Add-On) - + General Umum - + System Sistem - + CPU CPU - + Graphics Grafis - + Adv. Graphics Ljtan. Grafik - + Audio Audio - + Input Profiles - + Properties Properti @@ -3358,7 +3453,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3395,7 +3490,7 @@ UUID: %2 - + Enable @@ -3462,12 +3557,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [menunggu] @@ -4576,960 +4676,899 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Data anonim dikumpulkan</a> untuk membantu yuzu. <br/><br/>Apa Anda ingin membagi data penggunaan dengan kami? - + Telemetry Telemetri - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Memuat Applet Web... - - + + Disable Web Applet Matikan Applet Web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Jumlah shader yang sedang dibuat - + The current selected resolution scaling multiplier. Pengali skala resolusi yang terpilih. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Kecepatan emulasi saat ini. Nilai yang lebih tinggi atau rendah dari 100% menandakan pengemulasian berjalan lebih cepat atau lambat dibanding Switch aslinya. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Berapa banyak frame per second (bingkai per detik) permainan akan ditampilkan. Ini akan berubah dari berbagai permainan dan pemandangan. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Waktu yang diperlukan untuk mengemulasikan bingkai Switch, tak menghitung pembatas bingkai atau v-sync. Agar emulasi berkecepatan penuh, ini harus 16.67 mdtk. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files &Bersihkan Berkas Baru-baru Ini - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Lanjutkan - + &Pause &Jeda - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu sedang menjalankan game - - - + Warning Outdated Game Format Peringatan Format Permainan yang Usang - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Anda menggunakan format direktori ROM yang sudah didekonstruksi untuk permainan ini, yang mana itu merupakan format lawas yang sudah tergantikan oleh yang lain seperti NCA, NAX, XCI, atau NSP. Direktori ROM yang sudah didekonstruksi kekurangan ikon, metadata, dan dukungan pembaruan.<br><br>Untuk penjelasan berbagai format Switch yang didukung yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>periksa wiki kami</a>. Pesan ini tidak akan ditampilkan lagi. - - + + Error while loading ROM! Kesalahan ketika memuat ROM! - + The ROM format is not supported. Format ROM tak didukung. - + An error occurred initializing the video core. Terjadi kesalahan ketika menginisialisasi inti video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu telah mengalami error saat menjalankan inti video. Ini biasanya disebabkan oleh pemicu piranti (driver) GPU yang usang, termasuk yang terintegrasi. Mohon lihat catatan untuk informasi lebih rinci. Untuk informasi cara mengakses catatan, mohon lihat halaman berikut: <a href='https://yuzu-emu.org/help/reference/log-files/'>Cara Mengupload Berkas Catatan</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Terjadi kesalahan yang tak diketahui. Mohon lihat catatan untuk informasi lebih rinci. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + Save Data Simpan Data - + Mod Data Mod Data - + Error Opening %1 Folder Gagal Membuka Folder %1 - - + + Folder does not exist! Folder tak ada! - + Error Opening Transferable Shader Cache Gagal Ketika Membuka Tembolok Shader yang Dapat Ditransfer - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry Hapus Masukan - - - - - - + + + + + + Successfully Removed - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. Tidak ada DLC yang terinstall untuk judul ini. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File Hapus File - - + + Error Removing Transferable Shader Cache Kesalahan Menghapus Transferable Shader Cache - - + + A shader cache for this title does not exist. Cache shader bagi judul ini tidak ada - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Kesalahan Menghapus Konfigurasi Buatan - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! Pengekstrakan RomFS Gagal! - + There was an error copying the RomFS files or the user cancelled the operation. Terjadi kesalahan ketika menyalin berkas RomFS atau dibatalkan oleh pengguna. - + Full Penuh - + Skeleton Skeleton - + Select RomFS Dump Mode Pilih Mode Dump RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Mohon pilih cara RomFS akan di-dump.<br>FPenuh akan menyalin seluruh berkas ke dalam direktori baru sementara <br>jerangkong hanya akan menciptakan struktur direktorinya saja. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Mengekstrak RomFS... - - + + Cancel Batal - + RomFS Extraction Succeeded! Pengekstrakan RomFS Berhasil! - + The operation completed successfully. Operasi selesai dengan sukses, - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Gagal membuka %1 - + Select Directory Pilih Direktori - + Properties Properti - + The game properties could not be loaded. Properti permainan tak dapat dimuat. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Eksekutabel Switch (%1);;Semua Berkas (*.*) - + Load File Muat Berkas - + Open Extracted ROM Directory Buka Direktori ROM Terekstrak - + Invalid Directory Selected Direktori Terpilih Tidak Sah - + The directory you have selected does not contain a 'main' file. Direktori yang Anda pilih tak memiliki berkas 'utama.' - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Install File - + %n file(s) remaining - + Installing file "%1"... Memasang berkas "%1"... - - + + Install Results Hasil Install - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed %n file(s) baru diinstall - + %n file(s) were overwritten %n file(s) telah ditimpa - + %n file(s) failed to install %n file(s) gagal di install - + System Application Aplikasi Sistem - + System Archive Arsip Sistem - + System Application Update Pembaruan Aplikasi Sistem - + Firmware Package (Type A) Paket Perangkat Tegar (Tipe A) - + Firmware Package (Type B) Paket Perangkat Tegar (Tipe B) - + Game Permainan - + Game Update Pembaruan Permainan - + Game DLC DLC Permainan - + Delta Title Judul Delta - + Select NCA Install Type... Pilih Tipe Pemasangan NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Mohon pilih jenis judul yang Anda ingin pasang sebagai NCA ini: (Dalam kebanyakan kasus, pilihan bawaan 'Permainan' tidak apa-apa`.) - + Failed to Install Gagal Memasang - + The title type you selected for the NCA is invalid. Jenis judul yang Anda pilih untuk NCA tidak sah. - + File not found Berkas tak ditemukan - + File "%1" not found Berkas "%1" tak ditemukan - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Akun yuzu Hilang - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Agar dapat mengirimkan berkas uju kompatibilitas permainan, Anda harus menautkan akun yuzu Anda.<br><br/>TUntuk mennautkan akun yuzu Anda, pergi ke Emulasi &gt; Konfigurasi &gt; Web. - + Error opening URL Kesalahan saat membuka URL - + Unable to open the URL "%1". Tidak dapat membuka URL "%1". - + TAS Recording Rekaman TAS - + Overwrite file of player 1? Timpa file pemain 1? - + Invalid config detected Konfigurasi tidak sah terdeteksi - + Handheld controller can't be used on docked mode. Pro controller will be selected. Kontroller jinjing tidak bisa digunakan dalam mode dock. Kontroller Pro akan dipilih - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Berkas Amiibo (%1);; Semua Berkas (*.*) - + Load Amiibo Muat Amiibo - + Error loading Amiibo data Gagal memuat data Amiibo - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Capture Screenshot Tangkapan Layar - + PNG Image (*.png) Berkas PNG (*.png) - + TAS state: Running %1/%2 Status TAS: Berjalan %1/%2 - + TAS state: Recording %1 Status TAS: Merekam %1 - + TAS state: Idle %1/%2 Status TAS: Diam %1/%2 - + TAS State: Invalid Status TAS: Tidak Valid - + &Stop Running &Matikan - + &Start &Mulai - + Stop R&ecording Berhenti Mer&ekam - + R&ecord R&ekam - + Building: %n shader(s) Membangun: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Skala: %1x - + Speed: %1% / %2% Kecepatan: %1% / %2% - + Speed: %1% Kecepatan: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Permainan: %1 FPS - + Frame: %1 ms Frame: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU TINGGI - - - - GPU EXTREME - GPU EKSTRIM - - - - GPU ERROR - KESALAHAN GPU - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - NEAREST - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BICUBIC - - - - GAUSSIAN - GAUSSIAN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA TANPA AA - - FXAA - FXAA - - - - SMAA - - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5540,133 +5579,230 @@ This will delete your autogenerated key files and re-run the key derivation modu - + Missing fuses - + - Missing BOOT0 - Kehilangan BOOT0 - + - Missing BCPKG2-1-Normal-Main - Kehilangan BCPKG2-1-Normal-Main - + - Missing PRODINFO - Kehilangan PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. - + Memuat kunci... +Ini mungkin memakan waktu hingga satu menit +tergantung dari sistem performa Anda. - + Deriving Keys - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target - + Pilih Target Dump RomFS - + Please select which RomFS you would like to dump. - + Silahkan pilih jenis RomFS yang ingin Anda buang. - + Are you sure you want to close yuzu? Apakah anda yakin ingin menutup yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. - + Apakah Anda yakin untuk menghentikan emulasi? Setiap progres yang tidak tersimpan akan hilang. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? + + + None + Tak ada + + + + FXAA + FXAA + + + + SMAA + + + + + Nearest + + + + + Bilinear + Biliner + + + + Bicubic + Bikubik + + + + Gaussian + Gaussian + + + + ScaleForce + ScaleForce + + + + Docked + Terpasang + + + + Handheld + Jinjing + + + + Normal + + + + + High + + + + + Extreme + + + + + Vulkan + + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL tidak tersedia! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. - - + + Error while initializing OpenGL! Terjadi kesalahan menginisialisasi OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. VGA anda mungkin tidak mendukung OpenGL, atau anda tidak memiliki pemacu piranti (driver) grafis terbaharu. - + Error while initializing OpenGL 4.6! Terjadi kesalahan menginisialisasi OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 VGA anda mungkin tidak mendukung OpenGL 4.6, atau anda tidak memiliki pemacu piranti (driver) grafis terbaharu.<br><br>Pemuat GL:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 VGA anda mungkin tidak mendukung satu atau lebih ekstensi OpenGL. Mohon pastikan bahwa anda memiliki pemacu piranti (driver) grafis terbaharu.<br><br>Pemuat GL:<br>%1<br><br>Ekstensi yang tidak didukung:<br>%2 @@ -5746,13 +5882,13 @@ Would you like to bypass this and exit anyway? Remove All Installed Contents - + Hapus semua konten terinstall. Dump RomFS - + Dump RomFS @@ -5762,12 +5898,12 @@ Would you like to bypass this and exit anyway? Copy Title ID to Clipboard - + Salin Judul ID ke Clipboard. Navigate to GameDB entry - + Pindah ke tampilan GameDB @@ -5812,7 +5948,7 @@ Would you like to bypass this and exit anyway? Open Directory Location - + Buka Lokasi Direktori @@ -5837,7 +5973,7 @@ Would you like to bypass this and exit anyway? File type - + Tipe berkas @@ -5895,17 +6031,17 @@ Would you like to bypass this and exit anyway? The game crashes when attempting to startup. - + Gim rusak saat mencoba untuk memulai. Not Tested - + Belum dites The game has not yet been tested. - + Gim belum pernah dites. @@ -5913,7 +6049,7 @@ Would you like to bypass this and exit anyway? Double-click to add a new folder to the game list - + Klik dua kali untuk menambahkan folder sebagai daftar permainan. @@ -5931,7 +6067,7 @@ Would you like to bypass this and exit anyway? Enter pattern to filter - + Masukkan pola untuk memfilter @@ -6019,138 +6155,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Tangkapan Layar - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen - + Load File Muat Berkas - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6202,7 +6338,7 @@ Debug Message: Estimated Time 5m 4s - + Waktu yang diperlukan 5m 4d @@ -6464,7 +6600,7 @@ Debug Message: Show Status Bar - + Munculkan Status Bar @@ -6874,7 +7010,7 @@ p, li { white-space: pre-wrap; } Add New Game Directory - + Tambahkan direktori permainan @@ -6884,30 +7020,30 @@ p, li { white-space: pre-wrap; } - + Shift - + Ubah - + Ctrl - + Alt - + Alt - - - - + + + + [not set] [belum diatur] @@ -6918,14 +7054,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 @@ -6936,320 +7072,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] - + [tidak diketahui] - - + + Left Kiri - - + + Right Kanan - - + + Down Bawah - - + + Up Atas - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Mulai - + L1 - + L2 - + L3 - + R1 - + R2 - + R3 - + Circle - + Cross - + Square - + Triangle - + Share - + Options - + [undefined] - + %1%2 - - + + [invalid] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 %1%2Gerakan %3 - - + + %1%2Button %3 - - + + [unused] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Tambah - + Minus Kurang - - + + Home Home - + Capture Tangkapan - + Touch Sentuh - + Wheel Indicates the mouse wheel - + Backward - + Forward - + Task - + Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 @@ -7672,7 +7808,7 @@ Please try again or contact the developer of the software. Profile Selector - + Pemilih Profil @@ -7732,7 +7868,7 @@ Please try again or contact the developer of the software. Select a user: - + Pilih akun: @@ -7773,7 +7909,7 @@ p, li { white-space: pre-wrap; } Enter a hotkey - + Masukkan hotkey. @@ -7817,12 +7953,12 @@ p, li { white-space: pre-wrap; } waiting for IPC reply - + menunggu respon IPC waiting for objects - + Menunggu objek diff --git a/dist/languages/it.ts b/dist/languages/it.ts index ab3aa7611..fbd1247f6 100644 --- a/dist/languages/it.ts +++ b/dist/languages/it.ts @@ -242,67 +242,67 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP. <html><head/><body><p>Does the game boot?</p></body></html> - + il gioco parte? Yes The game starts to output video or audio - + Sì Il gioco inizia a produrre video o audio No The game doesn't get past the "Launching..." screen - + No il gioco non passa avanti la schermata d'avvio Yes The game gets past the intro/menu and into gameplay - + sì il gioco passa l'intro/menu e va nel gameplay No The game crashes or freezes while loading or using the menu - + no il gioco si freeza e crasha durante il caricamento o usando il menu <html><head/><body><p>Does the game reach gameplay?</p></body></html> - + il gioco arriva al gameplay? Yes The game works without crashes - + si il gioco funziona senza crashare No The game crashes or freezes during gameplay - + no il gioco crasha/si blocca durante il gameplay <html><head/><body><p>Does the game work without crashing, freezing or locking up during gameplay?</p></body></html> - + Il gioco funziona senza crashare o bloccarsi durante il gameplay? Yes The game can be finished without any workarounds - + Sì Il gioco può essere finito senza alcuna soluzione alternativa No The game can't progress past a certain area - + no il gioco non va avanti dopo una certa area <html><head/><body><p>Is the game completely playable from start to finish?</p></body></html> - + Il gioco è completamente giocabile dall'inizio alla fine? Major The game has major graphical errors - + il gioco ha gravi errori grafici @@ -1122,78 +1122,78 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP.Configurazione di yuzu - - + + Audio Audio - - + + CPU CPU - + Debug Debug - + Filesystem Filesystem - - + + General Generale - - + + Graphics Grafica - + GraphicsAdvanced Grafica avanzata - + Hotkeys Scorciatoie - - + + Controls Comandi - + Profiles Profili - + Network Rete - - + + System Sistema - + Game List Lista dei giochi - + Web Web @@ -1387,17 +1387,22 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP.Nascondi il puntatore del mouse se inattivo - + + Disable controller applet + + + + Reset All Settings Ripristina tutte le impostazioni - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Tutte le impostazioni verranno ripristinate e tutte le configurazioni dei giochi verranno rimosse. Le cartelle di gioco, i profili e i profili di input non saranno cancellati. Vuoi procedere? @@ -1463,7 +1468,7 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP. VSync Mode: - + Modalità VSync: @@ -1685,43 +1690,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Colore dello sfondo: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (shader assembly, solo NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (sperimentale, solo Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1751,27 +1756,27 @@ Immediate (no synchronization) just presents whatever is available and can exhib ASTC recompression: - + Ricompressione ASTC: Uncompressed (Best quality) - + Nessuna compressione (qualità migliore) BC1 (Low quality) - + BC1 (qualità bassa) BC3 (Medium quality) - + BC3 (qualità media) Enable asynchronous presentation (Vulkan only) - + Abilita la presentazione asincrona (solo Vulkan) @@ -1845,37 +1850,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Filtro anisotropico: - + Automatic Automatico - + Default Predefinito - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2258,7 +2283,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Configura @@ -2325,22 +2350,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Abilita il mouse panning - - - - Mouse sensitivity - Sensibilità del mouse - - - - % - % - - - + Motion / Touch Movimento/tocco @@ -2452,7 +2462,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Levetta sinistra @@ -2546,14 +2556,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2572,7 +2582,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Più @@ -2585,15 +2595,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2650,247 +2660,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Levetta destra - - - - + + Mouse panning + + + + + Configure + Configura + + + + + + Clear Cancella - - - - - + + + + + [not set] [non impost.] - - - + + + Invert button Inverti pulsante - - + + Toggle button Premi il pulsante - + Turbo button - - + + Invert axis Inverti asse - - - + + + Set threshold Imposta soglia - - + + Choose a value between 0% and 100% Scegli un valore compreso tra 0% e 100% - + Toggle axis - + Set gyro threshold - + Calibrate sensor - + Map Analog Stick Mappa la levetta analogica - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Dopo aver premuto OK, prima muovi la levetta orizzontalmente, e poi verticalmente. Per invertire gli assi, prima muovi la levetta verticalmente, e poi orizzontalmente. - + Center axis Centra asse - - + + Deadzone: %1% Zona morta: %1% - - + + Modifier Range: %1% Modifica raggio: %1% - - + + Pro Controller Pro Controller - + Dual Joycons Due Joycon - + Left Joycon Joycon sinistro - + Right Joycon Joycon destro - + Handheld Portatile - + GameCube Controller Controller GameCube - + Poke Ball Plus Poké Ball Plus - + NES Controller Controller NES - + SNES Controller Controller SNES - + N64 Controller Controller N64 - + Sega Genesis Sega Genesis - + Start / Pause Avvia / Metti in pausa - + Z Z - + Control Stick Levetta di Controllo - + C-Stick Levetta C - + Shake! Scuoti! - + [waiting] [in attesa] - + New Profile Nuovo profilo - + Enter a profile name: Inserisci un nome profilo: - - + + Create Input Profile Crea un profilo di input - + The given profile name is not valid! Il nome profilo inserito non è valido! - + Failed to create the input profile "%1" Impossibile creare il profilo di input "%1" - + Delete Input Profile Elimina un profilo di input - + Failed to delete the input profile "%1" Impossibile eliminare il profilo di input "%1" - + Load Input Profile Carica un profilo di input - + Failed to load the input profile "%1" Impossibile caricare il profilo di input "%1" - + Save Input Profile Salva un profilo di Input - + Failed to save the input profile "%1" Impossibile creare il profilo di input "%1" @@ -3069,6 +3089,81 @@ Per invertire gli assi, prima muovi la levetta verticalmente, e poi orizzontalme È in corso il test UDP o la configurazione della calibrazione,<br> attendere che finiscano. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Abilita + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Predefinito + + ConfigureNetwork @@ -3145,47 +3240,47 @@ Per invertire gli assi, prima muovi la levetta verticalmente, e poi orizzontalme Sviluppatore - + Add-Ons Add-on - + General Generale - + System Sistema - + CPU CPU - + Graphics Grafica - + Adv. Graphics Grafica (Avanzate) - + Audio Audio - + Input Profiles Profili di input - + Properties Proprietà @@ -3388,7 +3483,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3425,7 +3520,7 @@ UUID: %2 - + Enable Abilita @@ -3492,12 +3587,17 @@ UUID: %2 L'attuale dispositivo mappato non è collegato a un Ring-Con - + + The current mapped device is not connected + + + + Unexpected driver result %1 Risultato imprevisto del driver: %1 - + [waiting] [in attesa] @@ -3908,7 +4008,7 @@ UUID: %2 Unsafe extended memory layout (8GB DRAM) - + Layout di memoria esteso non sicuro (8GB DRAM) @@ -4607,559 +4707,574 @@ Trascina i punti per cambiare posizione, oppure clicca due volte la cella in tab GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Vengono raccolti dati anonimi</a> per aiutarci a migliorare yuzu. <br/><br/>Desideri condividere i tuoi dati di utilizzo con noi? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Rilevata installazione di Vulkan non funzionante - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. L'inizializzazione di Vulkan è fallita durante l'avvio.<br><br>Clicca <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>qui per istruzioni su come risolvere il problema</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Caricamento dell'applet web... - - + + Disable Web Applet Disabilita l'applet web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Il numero di shaders al momento in costruzione - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocità corrente dell'emulazione. Valori più alti o più bassi di 100% indicano che l'emulazione sta funzionando più velocemente o lentamente rispetto a una Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Il numero di fotogrammi al secondo che il gioco visualizza attualmente. Può variare in base al gioco e alla situazione. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tempo necessario per emulare un fotogramma della Switch, senza tenere conto del limite al framerate o del V-Sync. Per un'emulazione alla massima velocità, il valore non dovrebbe essere superiore a 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files &Cancella i file recenti - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Continua - + &Pause &Pausa - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - - - - + Warning Outdated Game Format Formato del gioco obsoleto - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Stai usando una cartella con dentro una ROM decostruita come formato per avviare questo gioco, è un formato obsoleto ed è stato sostituito da altri come NCA, NAX, XCI o NSP. Le ROM decostruite non hanno icone, metadata e non supportano gli aggiornamenti. <br><br>Per una spiegazione sui vari formati di Switch che yuzu supporta, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>controlla la nostra wiki</a>. Questo messaggio non verrà più mostrato. - - + + Error while loading ROM! Errore nel caricamento della ROM! - + The ROM format is not supported. Il formato della ROM non è supportato. - + An error occurred initializing the video core. È stato riscontrato un errore nell'inizializzazione del core video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Errore nel caricamento della ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Segui <a href='https://yuzu-emu.org/help/quickstart/'>la guida introduttiva di yuzu</a> per rifare il dump dei file.<br>Puoi fare riferimento alla wiki di yuzu</a> o al server Discord di yuzu</a> per assistenza. - + An unknown error occurred. Please see the log for more details. Si è verificato un errore sconosciuto. Visualizza il log per maggiori dettagli. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Chiusura del software in corso... - + Save Data Dati di salvataggio - + Mod Data Dati delle mod - + Error Opening %1 Folder Impossibile aprire la cartella %1 - - + + Folder does not exist! La cartella non esiste! - + Error Opening Transferable Shader Cache Impossibile aprire la cache trasferibile degli shader - + Failed to create the shader cache directory for this title. Impossibile creare la cartella della cache degli shader per questo titolo. - + Error Removing Contents Impossibile rimuovere il contentuto - + Error Removing Update Impossibile rimuovere l'aggiornamento - + Error Removing DLC Impossibile rimuovere il DLC - + Remove Installed Game Contents? Rimuovere il contenuto del gioco installato? - + Remove Installed Game Update? Rimuovere l'aggiornamento installato? - + Remove Installed Game DLC? Rimuovere il DLC installato? - + Remove Entry Rimuovi voce - - - - - - + + + + + + Successfully Removed Rimozione completata - + Successfully removed the installed base game. Il gioco base installato è stato rimosso con successo. - + The base game is not installed in the NAND and cannot be removed. Il gioco base non è installato su NAND e non può essere rimosso. - + Successfully removed the installed update. Aggiornamento rimosso con successo. - + There is no update installed for this title. Non c'è alcun aggiornamento installato per questo gioco. - + There are no DLC installed for this title. Non c'è alcun DLC installato per questo gioco. - + Successfully removed %1 installed DLC. %1 DLC rimossi con successo. - + Delete OpenGL Transferable Shader Cache? Vuoi rimuovere la cache trasferibile degli shader OpenGL? - + Delete Vulkan Transferable Shader Cache? Vuoi rimuovere la cache trasferibile degli shader Vulkan? - + Delete All Transferable Shader Caches? Vuoi rimuovere tutte le cache trasferibili degli shader? - + Remove Custom Game Configuration? Rimuovere la configurazione personalizzata del gioco? - + Remove Cache Storage? - + Remove File Rimuovi file - - + + Error Removing Transferable Shader Cache Impossibile rimuovere la cache trasferibile degli shader - - + + A shader cache for this title does not exist. Per questo titolo non esiste una cache degli shader. - + Successfully removed the transferable shader cache. La cache trasferibile degli shader è stata rimossa con successo. - + Failed to remove the transferable shader cache. Impossibile rimuovere la cache trasferibile degli shader. - + Error Removing Vulkan Driver Pipeline Cache Impossibile rimuovere la cache delle pipeline del driver Vulkan - + Failed to remove the driver pipeline cache. Impossibile rimuovere la cache delle pipeline del driver. - - + + Error Removing Transferable Shader Caches Impossibile rimuovere le cache trasferibili degli shader - + Successfully removed the transferable shader caches. Le cache trasferibili degli shader sono state rimosse con successo. - + Failed to remove the transferable shader cache directory. Impossibile rimuovere la cartella della cache trasferibile degli shader. - - + + Error Removing Custom Configuration Impossibile rimuovere la configurazione personalizzata - + A custom configuration for this title does not exist. Non esiste una configurazione personalizzata per questo gioco. - + Successfully removed the custom game configuration. La configurazione personalizzata del gioco è stata rimossa con successo. - + Failed to remove the custom game configuration. Impossibile rimuovere la configurazione personalizzata del gioco. - - + + RomFS Extraction Failed! Estrazione RomFS fallita! - + There was an error copying the RomFS files or the user cancelled the operation. C'è stato un errore nella copia dei file del RomFS o l'operazione è stata annullata dall'utente. - + Full Completa - + Skeleton Cartelle - + Select RomFS Dump Mode Seleziona la modalità di estrazione della RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Seleziona come vorresti estrarre la RomFS. <br>La modalità Completa copierà tutti i file in una nuova cartella mentre<br>la modalità Cartelle creerà solamente le cartelle e le sottocartelle. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Estrazione RomFS in corso... - - + + Cancel Annulla - + RomFS Extraction Succeeded! Estrazione RomFS riuscita! - + The operation completed successfully. L'operazione è stata completata con successo. - - - - - + + + + + Create Shortcut Crea scorciatoia - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Verrà creata una scorciatoia all'AppImage attuale. Potrebbe non funzionare correttamente se effettui un aggiornamento. Vuoi continuare? - + Cannot create shortcut on desktop. Path "%1" does not exist. Impossibile creare la scorciatoia sul desktop. Il percorso "%1" non esiste. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Impossibile creare la scorciatoia nel menù delle applicazioni. Il percorso "%1" non esiste e non può essere creato. - + Create Icon Crea icona - + Cannot create icon file. Path "%1" does not exist and cannot be created. Impossibile creare il file dell'icona. Il percorso "%1" non esiste e non può essere creato. - + Start %1 with the yuzu Emulator Avvia %1 con l'emulatore yuzu - + Failed to create a shortcut at %1 Impossibile creare la scorciatoia in %1 - + Successfully created a shortcut to %1 Scorciatoia creata con successo in %1 - + Error Opening %1 Impossibile aprire %1 - + Select Directory Seleziona cartella - + Properties Proprietà - + The game properties could not be loaded. Non è stato possibile caricare le proprietà del gioco. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Eseguibile Switch (%1);;Tutti i file (*.*) - + Load File Carica file - + Open Extracted ROM Directory Apri cartella ROM estratta - + Invalid Directory Selected Cartella selezionata non valida - + The directory you have selected does not contain a 'main' file. La cartella che hai selezionato non contiene un file "main". - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) File installabili Switch (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installa file - + %n file(s) remaining %n file rimanente%n file rimanenti%n file rimanenti - + Installing file "%1"... Installazione del file "%1"... - - + + Install Results Risultati dell'installazione - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Per evitare possibli conflitti, sconsigliamo di installare i giochi base su NAND. Usa questa funzione solo per installare aggiornamenti e DLC. - + %n file(s) were newly installed %n nuovo file è stato installato @@ -5168,7 +5283,7 @@ Usa questa funzione solo per installare aggiornamenti e DLC. - + %n file(s) were overwritten %n file è stato sovrascritto @@ -5177,7 +5292,7 @@ Usa questa funzione solo per installare aggiornamenti e DLC. - + %n file(s) failed to install %n file non è stato installato a causa di errori @@ -5186,389 +5301,313 @@ Usa questa funzione solo per installare aggiornamenti e DLC. - + System Application Applicazione di sistema - + System Archive Archivio di sistema - + System Application Update Aggiornamento di un'applicazione di sistema - + Firmware Package (Type A) Pacchetto firmware (tipo A) - + Firmware Package (Type B) Pacchetto firmware (tipo B) - + Game Gioco - + Game Update Aggiornamento di gioco - + Game DLC DLC - + Delta Title Titolo delta - + Select NCA Install Type... Seleziona il tipo di installazione NCA - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Seleziona il tipo del file NCA da installare: (Nella maggior parte dei casi, il valore predefinito 'Gioco' va bene.) - + Failed to Install Installazione fallita - + The title type you selected for the NCA is invalid. Il tipo che hai selezionato per l'NCA non è valido. - + File not found File non trovato - + File "%1" not found File "%1" non trovato - + OK OK - - + + Hardware requirements not met Requisiti hardware non soddisfatti - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Il tuo sistema non soddisfa i requisiti hardware consigliati. La funzionalità di segnalazione della compatibilità è stata disattivata. - + Missing yuzu Account Account di yuzu non trovato - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Per segnalare la compatibilità di un gioco, devi collegare il tuo account yuzu. <br><br/>Per collegare il tuo account yuzu, vai su Emulazione &gt; Configurazione &gt; Web. - + Error opening URL Impossibile aprire l'URL - + Unable to open the URL "%1". Non è stato possibile aprire l'URL "%1". - + TAS Recording - + Overwrite file of player 1? Vuoi sovrascrivere il file del giocatore 1? - + Invalid config detected Trovata configurazione invalida - + Handheld controller can't be used on docked mode. Pro controller will be selected. Il controller portatile non può essere utilizzato in modalità dock. Verrà selezionato il controller Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed L'Amiibo corrente è stato rimosso - + Error Errore - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) File Amiibo (%1);; Tutti i file (*.*) - + Load Amiibo Carica Amiibo - + Error loading Amiibo data Impossibile caricare i dati dell'Amiibo - + The selected file is not a valid amiibo Il file selezionato non è un Amiibo valido - + The selected file is already on use Il file selezionato è già in uso - + An unknown error occurred Si è verificato un errore sconosciuto - + Capture Screenshot Cattura screenshot - + PNG Image (*.png) Immagine PNG (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running &Interrompi - + &Start &Avvia - + Stop R&ecording Interrompi r&egistrazione - + R&ecord R&egistra - + Building: %n shader(s) Compilazione di %n shaderCompilazione di %n shaderCompilazione di %n shader - + Scale: %1x %1 is the resolution scaling factor Risoluzione: %1x - + Speed: %1% / %2% Velocità: %1% / %2% - + Speed: %1% Velocità: %1% - + Game: %1 FPS (Unlocked) Gioco: %1 FPS (Sbloccati) - + Game: %1 FPS Gioco: %1 FPS - + Frame: %1 ms Frame: %1 ms - - GPU NORMAL - GPU NORMALE + + %1 %2 + %1 %2 - - GPU HIGH - GPU ALTA - - - - GPU EXTREME - GPU ESTREMA - - - - GPU ERROR - ERRORE GPU - - - - DOCKED - DOCK - - - - HANDHELD - PORTATILE - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - NEAREST - - - - - BILINEAR - BILINEARE - - - - BICUBIC - BICUBICO - - - - GAUSSIAN - GAUSSIANO - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA NO AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE VOLUME: MUTO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Conferma ri-derivazione chiavi - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5585,37 +5624,37 @@ e facoltativamente fai dei backup. Questo eliminerà i tuoi file di chiavi autogenerati e ri-avvierà il processo di derivazione delle chiavi. - + Missing fuses Fusi mancanti - + - Missing BOOT0 - BOOT0 mancante - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main mancante - + - Missing PRODINFO - PRODINFO mancante - + Derivation Components Missing Componenti di derivazione mancanti - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Chiavi di crittografia mancanti. <br>Segui <a href='https://yuzu-emu.org/help/quickstart/'>la guida introduttiva di yuzu</a> per ottenere tutte le tue chiavi, il tuo firmware e i tuoi giochi.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5624,49 +5663,49 @@ Questa operazione potrebbe durare fino a un minuto in base alle prestazioni del tuo sistema. - + Deriving Keys Derivazione chiavi - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Seleziona Target dell'Estrazione del RomFS - + Please select which RomFS you would like to dump. Seleziona quale RomFS vorresti estrarre. - + Are you sure you want to close yuzu? Sei sicuro di voler chiudere yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Sei sicuro di voler arrestare l'emulazione? Tutti i progressi non salvati verranno perduti. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5674,48 +5713,143 @@ Would you like to bypass this and exit anyway? Desideri uscire comunque? + + + None + Nessuna + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + Nearest + + + + Bilinear + Bilineare + + + + Bicubic + Bicubico + + + + Gaussian + Gaussiano + + + + ScaleForce + ScaleForce + + + + Docked + Dock + + + + Handheld + Portatile + + + + Normal + Normale + + + + High + Alta + + + + Extreme + Estrema + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + + + + + GLSL + GLSL + + + + GLASM + GLASM + + + + SPIRV + SPIRV + GRenderWindow - - + + OpenGL not available! OpenGL non disponibile! - + OpenGL shared contexts are not supported. Gli shared context di OpenGL non sono supportati. - + yuzu has not been compiled with OpenGL support. yuzu è stato compilato senza il supporto a OpenGL. - - + + Error while initializing OpenGL! Errore durante l'inizializzazione di OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. La tua GPU potrebbe non supportare OpenGL, o non hai installato l'ultima versione dei driver video. - + Error while initializing OpenGL 4.6! Errore durante l'inizializzazione di OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 La tua GPU potrebbe non supportare OpenGL 4.6, o non hai installato l'ultima versione dei driver video.<br><br>Renderer GL:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 La tua GPU potrebbe non supportare una o più estensioni OpenGL richieste. Assicurati di aver installato i driver video più recenti.<br><br>Renderer GL:<br>%1<br><br>Estensioni non supportate:<br>%2 @@ -6069,138 +6203,138 @@ Messaggio di debug: Hotkeys - + Audio Mute/Unmute Attiva/disattiva l'audio - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Finestra principale - + Audio Volume Down Abbassa il volume dell'audio - + Audio Volume Up Alza il volume dell'audio - + Capture Screenshot Cattura screenshot - + Change Adapting Filter Cambia filtro di adattamento - + Change Docked Mode Cambia modalità console - + Change GPU Accuracy Cambia accuratezza GPU - + Continue/Pause Emulation Continua/Metti in pausa l'emulazione - + Exit Fullscreen Esci dalla modalità schermo intero - + Exit yuzu Esci da yuzu - + Fullscreen Schermo intero - + Load File Carica file - + Load/Remove Amiibo Carica/Rimuovi Amiibo - + Restart Emulation Riavvia l'emulazione - + Stop Emulation Arresta l'emulazione - + TAS Record Registra TAS - + TAS Reset Reimposta TAS - + TAS Start/Stop Avvia/interrompi TAS - + Toggle Filter Bar Mostra/nascondi la barra del filtro - + Toggle Framerate Limit Attiva/disattiva il limite del framerate - + Toggle Mouse Panning Attiva/disattiva il mouse panning - + Toggle Status Bar Mostra/nascondi la barra di stato @@ -6942,30 +7076,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [non impost.] @@ -6976,14 +7110,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Asse %1%2 @@ -6994,320 +7128,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [sconosciuto] - - + + Left Sinistra - - + + Right Destra - - + + Down Giù - - + + Up Su - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Cerchio - + Cross Croce - + Square Quadrato - + Triangle Triangolo - + Share Condividi - + Options Opzioni - + [undefined] - + %1%2 %1%2 - - + + [invalid] [non valido] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 %1%2Asse %3 - - + + %1%2Axis %3,%4,%5 %1%2Asse %3,%4,%5 - - + + %1%2Motion %3 - + %1%2Movimento %3 - - + + %1%2Button %3 %1%2Pulsante %3 - - + + [unused] [inutilizzato] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Levetta L - + Stick R Levetta R - + Plus Più - + Minus Meno - - + + Home Home - + Capture Cattura - + Touch Touch - + Wheel Indicates the mouse wheel Rotella - + Backward Indietro - + Forward Avanti - + Task - + Extra Extra - + %1%2%3%4 - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - + %1%2%3Asse %4 - - + + %1%2%3Button %4 %1%2%3Pulsante %4 diff --git a/dist/languages/ja_JP.ts b/dist/languages/ja_JP.ts index 282855584..74094f48b 100644 --- a/dist/languages/ja_JP.ts +++ b/dist/languages/ja_JP.ts @@ -381,17 +381,17 @@ This would ban both their forum username and their IP address. Output Device: - + 出力デバイス: Input Device: - + 入力デバイス: Sound Output Mode: - + 音声出力モード: @@ -1137,78 +1137,78 @@ This would ban both their forum username and their IP address. yuzuの設定 - - + + Audio サウンド - - + + CPU CPU - + Debug デバッグ - + Filesystem ファイルシステム - - + + General 全般 - - + + Graphics グラフィック - + GraphicsAdvanced 拡張グラフィック - + Hotkeys ホットキー - - + + Controls 操作 - + Profiles プロファイル - + Network ネットワーク - - + + System システム - + Game List ゲームリスト - + Web Web @@ -1402,17 +1402,22 @@ This would ban both their forum username and their IP address. 非アクティブ時にマウスカーソルを隠す - + + Disable controller applet + + + + Reset All Settings すべての設定をリセット - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? すべての設定がリセットされ、ゲームごとの設定もすべて削除されます。ゲームディレクトリ、プロファイル、入力プロファイルは削除されません。続行しますか? @@ -1700,45 +1705,45 @@ Immediate (no synchronization) just presents whatever is available and can exhib 背景色: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (アセンブリシェーダ、NVIDIA のみ) - + SPIR-V (Experimental, Mesa Only) SPIR-V (実験的, Mesa のみ) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + オフ + + + + VSync Off + VSync オフ + + + + Recommended + 推奨 - VSync Off - - - - - Recommended - - - - On - + オン - + VSync On - + VSync オン @@ -1766,22 +1771,22 @@ Immediate (no synchronization) just presents whatever is available and can exhib ASTC recompression: - + ASTC 再圧縮: Uncompressed (Best quality) - + 圧縮しない (最高品質) BC1 (Low quality) - + BC1 (低品質) BC3 (Medium quality) - + BC3 (中品質) @@ -1860,37 +1865,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: 異方性フィルタリング: - + Automatic 自動 - + Default デフォルト - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2273,7 +2298,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure 設定 @@ -2337,25 +2362,10 @@ Compute pipelines are always enabled on all other drivers. Use random Amiibo ID - + ランダムな Amiibo ID を使用 - - Enable mouse panning - - - - - Mouse sensitivity - マウス感度 - - - - % - % - - - + Motion / Touch モーション / タッチ @@ -2420,7 +2430,7 @@ Compute pipelines are always enabled on all other drivers. Use global input configuration - + グローバル入力設定を使用 @@ -2467,7 +2477,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Lスティック @@ -2561,14 +2571,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2587,7 +2597,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus + @@ -2600,15 +2610,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2665,247 +2675,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Rスティック - - - - + + Mouse panning + + + + + Configure + 設定 + + + + + + Clear クリア - - - - - + + + + + [not set] [未設定] - - - + + + Invert button ボタンを反転 - - + + Toggle button - + Turbo button - + ターボボタン - - + + Invert axis 軸を反転 - - - + + + Set threshold しきい値を設定 - - + + Choose a value between 0% and 100% 0%から100%の間の値を選択してください - + Toggle axis - + Set gyro threshold ジャイロのしきい値を設定 - + Calibrate sensor センサーを補正 - + Map Analog Stick アナログスティックをマップ - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. OKを押した後、スティックを水平方向に動かし、次に垂直方向に動かしてください。 軸を反転させる場合、 最初に垂直方向に動かし、次に水平方向に動かしてください。 - + Center axis - - + + Deadzone: %1% デッドゾーン:%1% - - + + Modifier Range: %1% 変更範囲:%1% - - + + Pro Controller Proコントローラ - + Dual Joycons Joy-Con(L/R) - + Left Joycon Joy-Con(L) - + Right Joycon Joy-Con(R) - + Handheld 携帯モード - + GameCube Controller ゲームキューブコントローラ - + Poke Ball Plus モンスターボールプラス - + NES Controller ファミコン・コントローラー - + SNES Controller スーパーファミコン・コントローラー - + N64 Controller ニンテンドウ64・コントローラー - + Sega Genesis メガドライブ - + Start / Pause スタート/ ポーズ - + Z Z - + Control Stick - + C-Stick Cスティック - + Shake! 振ってください - + [waiting] [待機中] - + New Profile 新規プロファイル - + Enter a profile name: プロファイル名を入力: - - + + Create Input Profile 入力プロファイルを作成 - + The given profile name is not valid! プロファイル名が無効です! - + Failed to create the input profile "%1" 入力プロファイル "%1" の作成に失敗しました - + Delete Input Profile 入力プロファイルを削除 - + Failed to delete the input profile "%1" 入力プロファイル "%1" の削除に失敗しました - + Load Input Profile 入力プロファイルをロード - + Failed to load the input profile "%1" 入力プロファイル "%1" のロードに失敗しました - + Save Input Profile 入力プロファイルをセーブ - + Failed to save the input profile "%1" 入力プロファイル "%1" のセーブに失敗しました @@ -3084,6 +3104,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< UDPテストまたはキャリブレーション実行中です。<br>完了までお待ちください。 + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + 有効 + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + デフォルト + + ConfigureNetwork @@ -3160,47 +3255,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< 開発元 - + Add-Ons アドオン - + General 全般 - + System システム - + CPU CPU - + Graphics グラフィック - + Adv. Graphics 高度なグラフィック - + Audio サウンド - + Input Profiles 入力プロファイル - + Properties プロパティ @@ -3403,8 +3498,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - このコントローラを使用する場合は、ゲームを開始する前に、プレイヤー1を右コントローラ、プレイヤー2をデュアルジョイコンに設定し、このコントローラを正しく認識させるようにしてください。 + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3436,18 +3531,18 @@ UUID: %2 Enable Ring Input - + リングコン入力を有効化 - + Enable 有効 Ring Sensor Value - + リングコン センサー値 @@ -3484,7 +3579,7 @@ UUID: %2 Error enabling ring input - + リングコン入力の有効化エラー @@ -3507,12 +3602,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [入力待ち] @@ -4622,962 +4722,901 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? yuzuの改善に役立てるため、<a href='https://yuzu-emu.org/help/feature/telemetry/'>匿名データが収集されます</a>。<br/><br/>統計情報を共有しますか? - + Telemetry テレメトリ - + Broken Vulkan Installation Detected 壊れたVulkanのインストールが検出されました。 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. 起動時にVulkanの初期化に失敗しました。<br><br>この問題を解決するための手順は<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>こちら</a>。 - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Webアプレットをロード中... - - + + Disable Web Applet Webアプレットの無効化 - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Webアプレットを無効にすると、未定義の動作になる可能性があるため、スーパーマリオ3Dオールスターズでのみ使用するようにしてください。本当にWebアプレットを無効化しますか? (デバッグ設定で再度有効にすることができます)。 - + The amount of shaders currently being built ビルド中のシェーダー数 - + The current selected resolution scaling multiplier. 現在選択されている解像度の倍率。 - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 現在のエミュレーション速度。値が100%より高いか低い場合、エミュレーション速度がSwitchより速いか遅いことを示します。 - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. ゲームが現在表示している1秒あたりのフレーム数。これはゲームごと、シーンごとに異なります。 - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Switchフレームをエミュレートするのにかかる時間で、フレームリミットやV-Syncは含まれません。フルスピードエミュレーションの場合、最大で16.67ミリ秒になります。 - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files 最近のファイルをクリア(&C) - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue 再開(&C) - + &Pause 中断(&P) - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzuはゲームを起動しています - - - + Warning Outdated Game Format 古いゲームフォーマットの警告 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. このゲームでは、分解されたROMディレクトリフォーマットを使用しています。これは、NCA、NAX、XCI、またはNSPなどに取って代わられた古いフォーマットです。分解されたROMディレクトリには、アイコン、メタデータ、およびアップデートサポートがありません。<br><br>yuzuがサポートするSwitchフォーマットの説明については、<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>wikiをチェックしてください</a>。このメッセージは二度と表示されません。 - - + + Error while loading ROM! ROMロード中にエラーが発生しました! - + The ROM format is not supported. このROMフォーマットはサポートされていません。 - + An error occurred initializing the video core. ビデオコア初期化中にエラーが発生しました。 - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzuは、ビデオコアの実行中にエラーが発生しました。これは通常、内蔵GPUも含め、古いGPUドライバが原因です。詳しくはログをご覧ください。ログへのアクセス方法については、以下のページをご覧ください:<a href='https://yuzu-emu.org/help/reference/log-files/'>ログファイルのアップロード方法について</a>。 - + Error while loading ROM! %1 %1 signifies a numeric error code. ROMのロード中にエラー! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br><a href='https://yuzu-emu.org/help/quickstart/'>yuzuクイックスタートガイド</a>を参照してファイルを再ダンプしてください。<br>またはyuzu wiki及び</a>yuzu Discord</a>を参照するとよいでしょう。 - + An unknown error occurred. Please see the log for more details. 不明なエラーが発生しました。詳細はログを確認して下さい。 - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + ソフトウェアを終了中... - + Save Data データのセーブ - + Mod Data Modデータ - + Error Opening %1 Folder ”%1”フォルダを開けませんでした - - + + Folder does not exist! フォルダが存在しません! - + Error Opening Transferable Shader Cache シェーダキャッシュを開けませんでした - + Failed to create the shader cache directory for this title. このタイトル用のシェーダキャッシュディレクトリの作成に失敗しました - + Error Removing Contents コンテンツの削除エラー - + Error Removing Update アップデートの削除エラー - + Error Removing DLC DLC の削除エラー - + Remove Installed Game Contents? インストールされたゲームのコンテンツを削除しますか? - + Remove Installed Game Update? インストールされたゲームのアップデートを削除しますか? - + Remove Installed Game DLC? インストールされたゲームの DLC を削除しますか? - + Remove Entry エントリ削除 - - - - - - + + + + + + Successfully Removed 削除しました - + Successfully removed the installed base game. インストールされたゲームを正常に削除しました。 - + The base game is not installed in the NAND and cannot be removed. ゲームはNANDにインストールされていないため、削除できません。 - + Successfully removed the installed update. インストールされたアップデートを正常に削除しました。 - + There is no update installed for this title. このタイトルのアップデートはインストールされていません。 - + There are no DLC installed for this title. このタイトルにはDLCがインストールされていません。 - + Successfully removed %1 installed DLC. %1にインストールされたDLCを正常に削除しました。 - + Delete OpenGL Transferable Shader Cache? 転送可能なOpenGLシェーダキャッシュを削除しますか? - + Delete Vulkan Transferable Shader Cache? 転送可能なVulkanシェーダキャッシュを削除しますか? - + Delete All Transferable Shader Caches? 転送可能なすべてのシェーダキャッシュを削除しますか? - + Remove Custom Game Configuration? このタイトルのカスタム設定を削除しますか? - + Remove Cache Storage? - + キャッシュストレージを削除しますか? - + Remove File ファイル削除 - - + + Error Removing Transferable Shader Cache 転送可能なシェーダーキャッシュの削除エラー - - + + A shader cache for this title does not exist. このタイトル用のシェーダキャッシュは存在しません。 - + Successfully removed the transferable shader cache. 転送可能なシェーダーキャッシュが正常に削除されました。 - + Failed to remove the transferable shader cache. 転送可能なシェーダーキャッシュを削除できませんでした。 - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches 転送可能なシェーダキャッシュの削除エラー - + Successfully removed the transferable shader caches. 転送可能なシェーダキャッシュを正常に削除しました。 - + Failed to remove the transferable shader cache directory. 転送可能なシェーダキャッシュディレクトリの削除に失敗しました。 - - + + Error Removing Custom Configuration カスタム設定の削除エラー - + A custom configuration for this title does not exist. このタイトルのカスタム設定は存在しません。 - + Successfully removed the custom game configuration. カスタム設定を正常に削除しました。 - + Failed to remove the custom game configuration. カスタム設定の削除に失敗しました。 - - + + RomFS Extraction Failed! RomFSの抽出に失敗しました! - + There was an error copying the RomFS files or the user cancelled the operation. RomFSファイルをコピー中にエラーが発生したか、ユーザー操作によりキャンセルされました。 - + Full フル - + Skeleton スケルトン - + Select RomFS Dump Mode RomFSダンプモードの選択 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. RomFSのダンプ方法を選択してください。<br>”完全”はすべてのファイルが新しいディレクトリにコピーされます。<br>”スケルトン”はディレクトリ構造を作成するだけです。 - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 に RomFS を展開するための十分な空き領域がありません。Emulation > Configure > System > Filesystem > Dump Root で、空き容量を確保するか、別のダンプディレクトリを選択してください。 - + Extracting RomFS... RomFSを抽出中... - - + + Cancel キャンセル - + RomFS Extraction Succeeded! RomFS抽出成功! - + The operation completed successfully. 操作は成功しました。 - - - - - + + + + + Create Shortcut ショートカットを作成 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon アイコンを作成 - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 ”%1”を開けませんでした - + Select Directory ディレクトリの選択 - + Properties プロパティ - + The game properties could not be loaded. ゲームプロパティをロード出来ませんでした。 - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch実行ファイル (%1);;すべてのファイル (*.*) - + Load File ファイルのロード - + Open Extracted ROM Directory 展開されているROMディレクトリを開く - + Invalid Directory Selected 無効なディレクトリが選択されました - + The directory you have selected does not contain a 'main' file. 選択されたディレクトリに”main”ファイルが見つかりませんでした。 - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) インストール可能なスイッチファイル (*.nca *.nsp *.xci);;任天堂コンテンツアーカイブ (*.nca);;任天堂サブミッションパッケージ (*.nsp);;NXカートリッジイメージ (*.xci) - + Install Files ファイルのインストール - + %n file(s) remaining 残り %n ファイル - + Installing file "%1"... "%1"ファイルをインストールしています・・・ - - + + Install Results インストール結果 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 競合を避けるため、NANDにゲーム本体をインストールすることはお勧めしません。 この機能は、アップデートやDLCのインストールにのみ使用してください。 - + %n file(s) were newly installed %n ファイルが新たにインストールされました - + %n file(s) were overwritten %n ファイルが上書きされました - + %n file(s) failed to install %n ファイルのインストールに失敗しました - + System Application システムアプリケーション - + System Archive システムアーカイブ - + System Application Update システムアプリケーションアップデート - + Firmware Package (Type A) ファームウェアパッケージ(Type A) - + Firmware Package (Type B) ファームウェアパッケージ(Type B) - + Game ゲーム - + Game Update ゲームアップデート - + Game DLC ゲームDLC - + Delta Title 差分タイトル - + Select NCA Install Type... NCAインストール種別を選択・・・ - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) インストールするNCAタイトル種別を選択して下さい: (ほとんどの場合、デフォルトの”ゲーム”で問題ありません。) - + Failed to Install インストール失敗 - + The title type you selected for the NCA is invalid. 選択されたNCAのタイトル種別が無効です。 - + File not found ファイルが存在しません - + File "%1" not found ファイル”%1”が存在しません - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account yuzuアカウントが存在しません - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. ゲームの互換性テストケースを送信するには、yuzuアカウントをリンクする必要があります。<br><br/>yuzuアカウントをリンクするには、エミュレーション > 設定 > Web から行います。 - + Error opening URL URLオープンエラー - + Unable to open the URL "%1". URL"%1"を開けません。 - + TAS Recording TAS 記録中 - + Overwrite file of player 1? プレイヤー1のファイルを上書きしますか? - + Invalid config detected 無効な設定を検出しました - + Handheld controller can't be used on docked mode. Pro controller will be selected. 携帯コントローラはドックモードで使用できないため、Proコントローラが選択されます。 - - + + Amiibo Amiibo - - + + The current amiibo has been removed 現在の amiibo は削除されました - + Error エラー - - + + The current game is not looking for amiibos 現在のゲームはamiiboを要求しません - + Amiibo File (%1);; All Files (*.*) amiiboファイル (%1);;すべてのファイル (*.*) - + Load Amiibo amiiboのロード - + Error loading Amiibo data amiiboデータ読み込み中にエラーが発生しました - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + 不明なエラーが発生しました - + Capture Screenshot スクリーンショットのキャプチャ - + PNG Image (*.png) PNG画像 (*.png) - + TAS state: Running %1/%2 TAS 状態: 実行中 %1/%2 - + TAS state: Recording %1 TAS 状態: 記録中 %1 - + TAS state: Idle %1/%2 TAS 状態: アイドル %1/%2 - + TAS State: Invalid TAS 状態: 無効 - + &Stop Running 実行停止(&S) - + &Start 実行(&S) - + Stop R&ecording 記録停止(&R) - + R&ecord 記録(&R) - + Building: %n shader(s) 構築中: %n 個のシェーダー - + Scale: %1x %1 is the resolution scaling factor 拡大率: %1x - + Speed: %1% / %2% 速度:%1% / %2% - + Speed: %1% 速度:%1% - + Game: %1 FPS (Unlocked) Game: %1 FPS(制限解除) - + Game: %1 FPS ゲーム:%1 FPS - + Frame: %1 ms フレーム:%1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU HIGH - - - - GPU EXTREME - GPU EXTREME - - - - GPU ERROR - GPU ERROR - - - - DOCKED - DOCKED - - - - HANDHELD - HANDHELD - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - NEAREST - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BICUBIC - - - - GAUSSIAN - GAUSSIAN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA NO AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE 音量: ミュート - + VOLUME: %1% Volume percentage (e.g. 50%) 音量: %1% - + Confirm Key Rederivation キーの再取得確認 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5594,37 +5633,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 実行すると、自動生成された鍵ファイルが削除され、鍵生成モジュールが再実行されます。 - + Missing fuses ヒューズがありません - + - Missing BOOT0 - BOOT0がありません - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Mainがありません - + - Missing PRODINFO - PRODINFOがありません - + Derivation Components Missing 派生コンポーネントがありません - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 暗号化キーがありません。<br>キー、ファームウェア、ゲームを取得するには<a href='https://yuzu-emu.org/help/quickstart/'>yuzu クイックスタートガイド</a>を参照ください。<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5633,49 +5672,49 @@ on your system's performance. 1分以上かかります。 - + Deriving Keys 派生キー - + System Archive Decryption Failed - + システムアーカイブの復号に失敗しました - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target RomFSダンプターゲットの選択 - + Please select which RomFS you would like to dump. ダンプしたいRomFSを選択して下さい。 - + Are you sure you want to close yuzu? yuzuを終了しますか? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. エミュレーションを停止しますか?セーブされていない進行状況は失われます。 - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5683,48 +5722,143 @@ Would you like to bypass this and exit anyway? 無視してとにかく終了しますか? + + + None + なし + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bicubic + + + + Gaussian + Gaussian + + + + ScaleForce + ScaleForce + + + + Docked + Docked + + + + Handheld + 携帯モード + + + + Normal + 標準 + + + + High + 高い + + + + Extreme + + + + + Vulkan + Vulkan + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGLは使用できません! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. yuzuはOpenGLサポート付きでコンパイルされていません。 - - + + Error while initializing OpenGL! OpenGL初期化エラー - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. GPUがOpenGLをサポートしていないか、グラフィックスドライバーが最新ではありません。 - + Error while initializing OpenGL 4.6! OpenGL4.6初期化エラー! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 GPUがOpenGL4.6をサポートしていないか、グラフィックスドライバーが最新ではありません。<br><br>GL レンダラ:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 GPUが1つ以上の必要なOpenGL拡張機能をサポートしていない可能性があります。最新のグラフィックドライバを使用していることを確認してください。<br><br>GL レンダラ:<br>%1<br><br>サポートされていない拡張機能:<br>%2 @@ -5784,7 +5918,7 @@ Would you like to bypass this and exit anyway? Remove Cache Storage - + キャッシュストレージを削除 @@ -6078,138 +6212,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute 音声ミュート/解除 - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window メイン画面 - + Audio Volume Down 音量を下げる - + Audio Volume Up 音量を上げる - + Capture Screenshot スクリーンショットを撮る - + Change Adapting Filter アダプティングフィルターの変更 - + Change Docked Mode ドックモードを変更 - + Change GPU Accuracy GPU精度を変更 - + Continue/Pause Emulation エミュレーションの一時停止/再開 - + Exit Fullscreen フルスクリーンをやめる - + Exit yuzu yuzuを終了 - + Fullscreen フルスクリーン - + Load File ファイルのロード - + Load/Remove Amiibo 読み込み/解除 Amiibo - + Restart Emulation エミュレーションをリスタート - + Stop Emulation エミュレーションをやめる - + TAS Record TAS 記録 - + TAS Reset TAS リセット - + TAS Start/Stop TAS 開始/停止 - + Toggle Filter Bar フィルタバー切り替え - + Toggle Framerate Limit フレームレート制限切り替え - + Toggle Mouse Panning - + Toggle Status Bar ステータスバー切り替え @@ -6951,30 +7085,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [未設定] @@ -6985,14 +7119,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 スティック %1%2 @@ -7003,320 +7137,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [不明] - - + + Left - - + + Right - - + + Down - - + + Up - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start 開始 - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle マル - + Cross バツ - + Square 四角 - + Triangle 三角 - + Share Share - + Options Options - + [undefined] [未定義] - + %1%2 %1%2 - - + + [invalid] [無効] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 - - + + %1%2Button %3 %1%2ボタン %3 - - + + [unused] [未使用] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L L スティック - + Stick R R スティック - + Plus + - + Minus - - - + + Home HOME - + Capture キャプチャ - + Touch タッチの設定 - + Wheel Indicates the mouse wheel ホイール - + Backward 後ろ - + Forward - + Task - + タスク - + Extra - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 @@ -7361,7 +7495,7 @@ p, li { white-space: pre-wrap; } Owner - + オーナー @@ -7750,12 +7884,12 @@ Please try again or contact the developer of the software. Profile Icon Editor - + プロファイル アイコンエディタ Profile Nickname Editor - + プロファイル ニックネームエディタ diff --git a/dist/languages/ko_KR.ts b/dist/languages/ko_KR.ts index 573d5e77b..8ebdf1d04 100644 --- a/dist/languages/ko_KR.ts +++ b/dist/languages/ko_KR.ts @@ -1138,78 +1138,78 @@ This would ban both their forum username and their IP address. yuzu 설정 - - + + Audio 오디오 - - + + CPU CPU - + Debug 디버그 - + Filesystem 파일 시스템 - - + + General 일반 - - + + Graphics 그래픽 - + GraphicsAdvanced 그래픽 고급 - + Hotkeys 단축키 - - + + Controls 조작 - + Profiles 프로필 - + Network 네트워크 - - + + System 시스템 - + Game List 게임 목록 - + Web @@ -1403,17 +1403,22 @@ This would ban both their forum username and their IP address. 비활성 상태일 때 마우스 숨기기 - + + Disable controller applet + + + + Reset All Settings 모든 설정 초기화 - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? 모든 환경 설정과 게임별 맞춤 설정이 초기화됩니다. 게임 디렉토리나 프로필, 또는 입력 프로필은 삭제되지 않습니다. 진행하시겠습니까? @@ -1487,7 +1492,10 @@ This would ban both their forum username and their IP address. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate (no synchronization) just presents whatever is available and can exhibit tearing. - + FIFO (수직동기화)는 프레임이 떨어지거나 티어링 현상이 나타나지 않지만 화면 재생률에 의해 제한됩니다. +FIFO 릴랙스드는 FIFO와 유사하지만 속도가 느려진 후 복구할 때 끊김 현상이 발생할 수 있습니다. +메일박스는 FIFO보다 지연 시간이 짧고 티어링이 발생하지 않지만 프레임이 떨어질 수 있습니다. +즉시 (동기화 없음)는 사용 가능한 모든 것을 표시하며 티어링이 나타날 수 있습니다. @@ -1701,45 +1709,45 @@ Immediate (no synchronization) just presents whatever is available and can exhib 배경색: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM(어셈블리 셰이더, NVIDIA 전용) - + SPIR-V (Experimental, Mesa Only) SPIR-V (실험적, Mesa 전용) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + + + + + VSync Off + 수직동기화 끔 + + + + Recommended + 추천 - VSync Off - - - - - Recommended - - - - On - + - + VSync On - + 수직동기화 켬 @@ -1862,37 +1870,57 @@ Compute pipelines are always enabled on all other drivers. 컴퓨팅 파이프라인 활성화(Intel Vulkan만 해당) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + 프레임 속도가 잠금 해제된 상태에서도 동영상 재생 중에 일반 속도로 게임을 실행합니다. + + + + Sync to framerate of video playback + 동영상 재생 프레임 속도에 동기화 + + + + Improves rendering of transparency effects in specific games. + 특정 게임에서 투명도 효과의 렌더링을 개선합니다. + + + + Barrier feedback loops + 차단 피드백 루프 + + + Anisotropic Filtering: 비등방성 필터링: - + Automatic 자동 - + Default 기본값 - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2275,7 +2303,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure 설정 @@ -2334,30 +2362,15 @@ Compute pipelines are always enabled on all other drivers. Allows unlimited uses of the same Amiibo in games that would otherwise limit you to one use. - + 한 번으로 사용이 제한되는 게임에서 동일한 아미보를 무제한으로 사용할 수 있습니다. Use random Amiibo ID - + 무작위 아미보 ID 사용 - - Enable mouse panning - 마우스 패닝 활성화 - - - - Mouse sensitivity - 마우스 감도 - - - - % - % - - - + Motion / Touch 모션 컨트롤/ 터치 @@ -2469,7 +2482,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick L 스틱 @@ -2563,14 +2576,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2589,7 +2602,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus + @@ -2602,15 +2615,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2667,247 +2680,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick R 스틱 - - - - + + Mouse panning + + + + + Configure + 설정 + + + + + + Clear 초기화 - - - - - + + + + + [not set] [설정 안 됨] - - - + + + Invert button 버튼 반전 - - + + Toggle button 토글 버튼 - + Turbo button - + 터보 버튼 - - + + Invert axis 축 뒤집기 - - - + + + Set threshold 임계값 설정 - - + + Choose a value between 0% and 100% 0%에서 100% 안의 값을 고르세요 - + Toggle axis axis 토글 - + Set gyro threshold 자이로 임계값 설정 - + Calibrate sensor - + 센서 보정 - + Map Analog Stick 아날로그 스틱 맵핑 - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. OK 버튼을 누른 후에 먼저 조이스틱을 수평으로 움직이고, 그 다음 수직으로 움직이세요. 축을 뒤집으려면 수직으로 먼저 움직인 뒤에 수평으로 움직이세요. - + Center axis 중심축 - - + + Deadzone: %1% 데드존: %1% - - + + Modifier Range: %1% 수정자 범위: %1% - - + + Pro Controller 프로 컨트롤러 - + Dual Joycons 듀얼 조이콘 - + Left Joycon 왼쪽 조이콘 - + Right Joycon 오른쪽 조이콘 - + Handheld 휴대 모드 - + GameCube Controller GameCube 컨트롤러 - + Poke Ball Plus 몬스터볼 Plus - + NES Controller NES 컨트롤러 - + SNES Controller SNES 컨트롤러 - + N64 Controller N64 컨트롤러 - + Sega Genesis 세가 제네시스 - + Start / Pause 시작 / 일시중지 - + Z Z - + Control Stick 컨트롤 스틱 - + C-Stick C-Stick - + Shake! 흔드세요! - + [waiting] [대기중] - + New Profile 새 프로필 - + Enter a profile name: 프로필 이름을 입력하세요: - - + + Create Input Profile 입력 프로필 생성 - + The given profile name is not valid! 해당 프로필 이름은 사용할 수 없습니다! - + Failed to create the input profile "%1" "%1" 입력 프로필 생성 실패 - + Delete Input Profile 입력 프로필 삭제 - + Failed to delete the input profile "%1" "%1" 입력 프로필 삭제 실패 - + Load Input Profile 입력 프로필 불러오기 - + Failed to load the input profile "%1" "%1" 입력 프로필 불러오기 실패 - + Save Input Profile 입력 프로필 저장 - + Failed to save the input profile "%1" "%1" 입력 프로필 저장 실패 @@ -3086,6 +3109,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< UDP 테스트와 교정 설정이 진행 중입니다.<br>끝날 때까지 기다려주세요. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + 활성화 + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + 기본값 + + ConfigureNetwork @@ -3162,47 +3260,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< 개발자 - + Add-Ons 부가 기능 - + General 일반 - + System 시스템 - + CPU CPU - + Graphics 그래픽 - + Adv. Graphics 고급 그래픽 - + Audio 오디오 - + Input Profiles 입력 프로파일 - + Properties 속성 @@ -3405,13 +3503,13 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - 이 컨트롤러를 사용하려면 이 컨트롤러가 제대로 감지될 수 있도록 게임을 시작하기 전에 플레이어 1을 오른쪽 컨트롤러로, 플레이어 2를 듀얼 조이콘으로 구성하십시오. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + Virtual Ring Sensor Parameters - + 가상 링 센서 파라미터 @@ -3433,29 +3531,29 @@ UUID: %2 Direct Joycon Driver - + 다이렉트 조이콘 드라이버 Enable Ring Input - + 링 입력 활성화 - + Enable - + 활성화 Ring Sensor Value - + 링 센서 값 Not connected - + 연결되지 않음 @@ -3486,12 +3584,12 @@ UUID: %2 Error enabling ring input - + 링 입력 활성화 오류 Direct Joycon driver is not enabled - + 다이렉트 조이콘 드라이버가 활성화되지 않았음 @@ -3501,20 +3599,25 @@ UUID: %2 The current mapped device doesn't support the ring controller - + 현재 매핑된 장치가 링 컨트롤러를 지원하지 않음 The current mapped device doesn't have a ring attached + 현재 매핑된 장치에 링이 연결되어 있지 않음 + + + + The current mapped device is not connected - + Unexpected driver result %1 - + 예기치 않은 드라이버 결과 %1 - + [waiting] [대기중] @@ -3925,7 +4028,7 @@ UUID: %2 Unsafe extended memory layout (8GB DRAM) - + 안전하지 않은 확장 메모리 레이아웃 (8GB DRAM) @@ -4575,12 +4678,12 @@ Drag points to change position, or double-click table cells to edit values. Server Address - + 서버 주소 <html><head/><body><p>Server address of the host</p></body></html> - + <html><head/><body><p>호스트의 서버 주소</p></body></html> @@ -4624,962 +4727,901 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? yuzu를 개선하기 위해 <a href='https://yuzu-emu.org/help/feature/telemetry/'>익명 데이터가 수집됩니다.</a> <br/><br/>사용 데이터를 공유하시겠습니까? - + Telemetry 원격 측정 - + Broken Vulkan Installation Detected 망가진 Vulkan 설치 감지됨 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. 부팅하는 동안 Vulkan 초기화에 실패했습니다.<br><br>문제 해결 지침을 보려면 <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>여기</a>를 클릭하세요. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... 웹 애플릿을 로드하는 중... - - + + Disable Web Applet 웹 애플릿 비활성화 - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) 웹 애플릿을 비활성화하면 정의되지 않은 동작이 발생할 수 있으며 Super Mario 3D All-Stars에서만 사용해야 합니다. 웹 애플릿을 비활성화하시겠습니까? (디버그 설정에서 다시 활성화할 수 있습니다.) - + The amount of shaders currently being built 현재 생성중인 셰이더의 양 - + The current selected resolution scaling multiplier. 현재 선택된 해상도 배율입니다. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 현재 에뮬레이션 속도. 100%보다 높거나 낮은 값은 에뮬레이션이 Switch보다 빠르거나 느린 것을 나타냅니다. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. 게임이 현재 표시하고 있는 초당 프레임 수입니다. 이것은 게임마다 다르고 장면마다 다릅니다. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. 프레임 제한이나 수직 동기화를 계산하지 않고 Switch 프레임을 에뮬레이션 하는 데 걸린 시간. 최대 속도로 에뮬레이트 중일 때에는 대부분 16.67 ms 근처입니다. - + + Unmute + 음소거 해제 + + + + Mute + 음소거 + + + + Reset Volume + 볼륨 재설정 + + + &Clear Recent Files Clear Recent Files(&C) - + Emulated mouse is enabled - + 에뮬레이트 마우스 사용 - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + 실제 마우스 입력과 마우스 패닝은 호환되지 않습니다. 마우스 패닝을 허용하려면 입력 고급 설정에서 에뮬레이트 마우스를 비활성화하세요. - + &Continue 재개(&C) - + &Pause 일시중지(&P) - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu가 게임을 실행중입니다 - - - + Warning Outdated Game Format 오래된 게임 포맷 경고 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. 이 게임 파일은 '분해된 ROM 디렉토리'라는 오래된 포맷을 사용하고 있습니다. 해당 포맷은 NCA, NAX, XCI 또는 NSP와 같은 다른 포맷으로 대체되었으며 분해된 ROM 디렉토리에는 아이콘, 메타 데이터 및 업데이트가 지원되지 않습니다.<br><br>yuzu가 지원하는 다양한 Switch 포맷에 대한 설명은 <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>위키를 확인하세요.</a> 이 메시지는 다시 표시되지 않습니다. - - + + Error while loading ROM! ROM 로드 중 오류 발생! - + The ROM format is not supported. 지원되지 않는 롬 포맷입니다. - + An error occurred initializing the video core. 비디오 코어를 초기화하는 동안 오류가 발생했습니다. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. 비디오 코어를 실행하는 동안 yuzu에 오류가 발생했습니다. 이것은 일반적으로 통합 드라이버를 포함하여 오래된 GPU 드라이버로 인해 발생합니다. 자세한 내용은 로그를 참조하십시오. 로그 액세스에 대한 자세한 내용은 <a href='https://yuzu-emu.org/help/reference/log-files/'>로그 파일 업로드 방법</a> 페이지를 참조하세요. - + Error while loading ROM! %1 %1 signifies a numeric error code. ROM 불러오는 중 오류 발생! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>파일들을 다시 덤프하기 위해<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 빠른 시작 가이드</a> 를 따라주세요.<br>도움이 필요할 시 yuzu 위키</a> 를 참고하거나 yuzu 디스코드</a> 를 이용해보세요. - + An unknown error occurred. Please see the log for more details. 알 수 없는 오류가 발생했습니다. 자세한 내용은 로그를 참고하십시오. - + (64-bit) (64비트) - + (32-bit) (32비트) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... 소프트웨어를 닫는 중... - + Save Data 세이브 데이터 - + Mod Data 모드 데이터 - + Error Opening %1 Folder %1 폴더 열기 오류 - - + + Folder does not exist! 폴더가 존재하지 않습니다! - + Error Opening Transferable Shader Cache 전송 가능한 셰이더 캐시 열기 오류 - + Failed to create the shader cache directory for this title. 이 타이틀에 대한 셰이더 캐시 디렉토리를 생성하지 못했습니다. - + Error Removing Contents 콘텐츠 제거 중 오류 발생 - + Error Removing Update 업데이트 제거 오류 - + Error Removing DLC DLC 제거 오류 - + Remove Installed Game Contents? 설치된 게임 콘텐츠를 제거하겠습니까? - + Remove Installed Game Update? 설치된 게임 업데이트를 제거하겠습니까? - + Remove Installed Game DLC? 설치된 게임 DLC를 제거하겠습니까? - + Remove Entry 항목 제거 - - - - - - + + + + + + Successfully Removed 삭제 완료 - + Successfully removed the installed base game. 설치된 기본 게임을 성공적으로 제거했습니다. - + The base game is not installed in the NAND and cannot be removed. 기본 게임은 NAND에 설치되어 있지 않으며 제거 할 수 없습니다. - + Successfully removed the installed update. 설치된 업데이트를 성공적으로 제거했습니다. - + There is no update installed for this title. 이 타이틀에 대해 설치된 업데이트가 없습니다. - + There are no DLC installed for this title. 이 타이틀에 설치된 DLC가 없습니다. - + Successfully removed %1 installed DLC. 설치된 %1 DLC를 성공적으로 제거했습니다. - + Delete OpenGL Transferable Shader Cache? OpenGL 전송 가능한 셰이더 캐시를 삭제하시겠습니까? - + Delete Vulkan Transferable Shader Cache? Vulkan 전송 가능한 셰이더 캐시를 삭제하시겠습니까? - + Delete All Transferable Shader Caches? 모든 전송 가능한 셰이더 캐시를 삭제하시겠습니까? - + Remove Custom Game Configuration? 사용자 지정 게임 구성을 제거 하시겠습니까? - + Remove Cache Storage? - + 캐시 저장소를 제거하겠습니까? - + Remove File 파일 제거 - - + + Error Removing Transferable Shader Cache 전송 가능한 셰이더 캐시 제거 오류 - - + + A shader cache for this title does not exist. 이 타이틀에 대한 셰이더 캐시가 존재하지 않습니다. - + Successfully removed the transferable shader cache. 전송 가능한 셰이더 캐시를 성공적으로 제거했습니다. - + Failed to remove the transferable shader cache. 전송 가능한 셰이더 캐시를 제거하지 못했습니다. - + Error Removing Vulkan Driver Pipeline Cache Vulkan 드라이버 파이프라인 캐시 제거 오류 - + Failed to remove the driver pipeline cache. 드라이버 파이프라인 캐시를 제거하지 못했습니다. - - + + Error Removing Transferable Shader Caches 전송 가능한 셰이더 캐시 제거 오류 - + Successfully removed the transferable shader caches. 전송 가능한 셰이더 캐시를 성공적으로 제거했습니다. - + Failed to remove the transferable shader cache directory. 전송 가능한 셰이더 캐시 디렉토리를 제거하지 못했습니다. - - + + Error Removing Custom Configuration 사용자 지정 구성 제거 오류 - + A custom configuration for this title does not exist. 이 타이틀에 대한 사용자 지정 구성이 존재하지 않습니다. - + Successfully removed the custom game configuration. 사용자 지정 게임 구성을 성공적으로 제거했습니다. - + Failed to remove the custom game configuration. 사용자 지정 게임 구성을 제거하지 못했습니다. - - + + RomFS Extraction Failed! RomFS 추출 실패! - + There was an error copying the RomFS files or the user cancelled the operation. RomFS 파일을 복사하는 중에 오류가 발생했거나 사용자가 작업을 취소했습니다. - + Full 전체 - + Skeleton 뼈대 - + Select RomFS Dump Mode RomFS 덤프 모드 선택 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. RomFS 덤프 방법을 선택하십시오.<br>전체는 모든 파일을 새 디렉토리에 복사하고<br>뼈대는 디렉토리 구조 만 생성합니다. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1에 RomFS를 추출하기에 충분한 여유 공간이 없습니다. 공간을 확보하거나 에뮬레이견 > 설정 > 시스템 > 파일시스템 > 덤프 경로에서 다른 덤프 디렉토리를 선택하십시오. - + Extracting RomFS... RomFS 추출 중... - - + + Cancel 취소 - + RomFS Extraction Succeeded! RomFS 추출이 성공했습니다! - + The operation completed successfully. 작업이 성공적으로 완료되었습니다. - - - - - + + + + + Create Shortcut 바로가기 만들기 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? 현재 AppImage에 대한 바로 가기가 생성됩니다. 업데이트하면 제대로 작동하지 않을 수 있습니다. 계속합니까? - + Cannot create shortcut on desktop. Path "%1" does not exist. 바탕 화면에 바로가기를 만들 수 없습니다. 경로 "%1"이(가) 존재하지 않습니다. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. 애플리케이션 메뉴에서 바로가기를 만들 수 없습니다. 경로 "%1"이(가) 존재하지 않으며 생성할 수 없습니다. - + Create Icon 아이콘 만들기 - + Cannot create icon file. Path "%1" does not exist and cannot be created. 아이콘 파일을 만들 수 없습니다. 경로 "%1"이(가) 존재하지 않으며 생성할 수 없습니다. - + Start %1 with the yuzu Emulator yuzu 에뮬레이터로 %1 시작 - + Failed to create a shortcut at %1 %1에서 바로가기를 만들기 실패 - + Successfully created a shortcut to %1 %1 바로가기를 성공적으로 만듬 - + Error Opening %1 %1 열기 오류 - + Select Directory 경로 선택 - + Properties 속성 - + The game properties could not be loaded. 게임 속성을 로드 할 수 없습니다. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch 실행파일 (%1);;모든 파일 (*.*) - + Load File 파일 로드 - + Open Extracted ROM Directory 추출된 ROM 디렉토리 열기 - + Invalid Directory Selected 잘못된 디렉토리 선택 - + The directory you have selected does not contain a 'main' file. 선택한 디렉토리에 'main'파일이 없습니다. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) 설치 가능한 Switch 파일 (*.nca *.nsp *.xci);;Nintendo 컨텐츠 아카이브 (*.nca);;Nintendo 서브미션 패키지 (*.nsp);;NX 카트리지 이미지 (*.xci) - + Install Files 파일 설치 - + %n file(s) remaining %n개의 파일이 남음 - + Installing file "%1"... 파일 "%1" 설치 중... - - + + Install Results 설치 결과 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 충돌을 피하기 위해, 낸드에 베이스 게임을 설치하는 것을 권장하지 않습니다. 이 기능은 업데이트나 DLC를 설치할 때에만 사용해주세요. - + %n file(s) were newly installed %n개의 파일이 새로 설치되었습니다. - + %n file(s) were overwritten %n개의 파일을 덮어썼습니다. - + %n file(s) failed to install %n개의 파일을 설치하지 못했습니다. - + System Application 시스템 애플리케이션 - + System Archive 시스템 아카이브 - + System Application Update 시스템 애플리케이션 업데이트 - + Firmware Package (Type A) 펌웨어 패키지 (A타입) - + Firmware Package (Type B) 펌웨어 패키지 (B타입) - + Game 게임 - + Game Update 게임 업데이트 - + Game DLC 게임 DLC - + Delta Title 델타 타이틀 - + Select NCA Install Type... NCA 설치 유형 선택... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) 이 NCA를 설치할 타이틀 유형을 선택하세요: (대부분의 경우 기본값인 '게임'이 괜찮습니다.) - + Failed to Install 설치 실패 - + The title type you selected for the NCA is invalid. NCA 타이틀 유형이 유효하지 않습니다. - + File not found 파일을 찾을 수 없음 - + File "%1" not found 파일 "%1"을 찾을 수 없습니다 - + OK OK - - + + Hardware requirements not met 하드웨어 요구 사항이 충족되지 않음 - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. 시스템이 권장 하드웨어 요구 사항을 충족하지 않습니다. 호환성 보고가 비활성화되었습니다. - + Missing yuzu Account yuzu 계정 누락 - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. 게임 호환성 테스트 결과를 제출하려면 yuzu 계정을 연결해야합니다.<br><br/>yuzu 계정을 연결하려면 에뮬레이션 &gt; 설정 &gt; 웹으로 가세요. - + Error opening URL URL 열기 오류 - + Unable to open the URL "%1". URL "%1"을 열 수 없습니다. - + TAS Recording TAS 레코딩 - + Overwrite file of player 1? 플레이어 1의 파일을 덮어쓰시겠습니까? - + Invalid config detected 유효하지 않은 설정 감지 - + Handheld controller can't be used on docked mode. Pro controller will be selected. 휴대 모드용 컨트롤러는 거치 모드에서 사용할 수 없습니다. 프로 컨트롤러로 대신 선택됩니다. - - + + Amiibo Amiibo - - + + The current amiibo has been removed 현재 amiibo가 제거되었습니다. - + Error 오류 - - + + The current game is not looking for amiibos 현재 게임은 amiibo를 찾고 있지 않습니다 - + Amiibo File (%1);; All Files (*.*) Amiibo 파일 (%1);; 모든 파일 (*.*) - + Load Amiibo Amiibo 로드 - + Error loading Amiibo data Amiibo 데이터 로드 오류 - + The selected file is not a valid amiibo 선택한 파일은 유효한 amiibo가 아닙니다 - + The selected file is already on use 선택한 파일은 이미 사용 중입니다 - + An unknown error occurred 알수없는 오류가 발생했습니다 - + Capture Screenshot 스크린샷 캡처 - + PNG Image (*.png) PNG 이미지 (*.png) - + TAS state: Running %1/%2 TAS 상태: %1/%2 실행 중 - + TAS state: Recording %1 TAS 상태: 레코딩 %1 - + TAS state: Idle %1/%2 TAS 상태: 유휴 %1/%2 - + TAS State: Invalid TAS 상태: 유효하지 않음 - + &Stop Running 실행 중지(&S) - + &Start 시작(&S) - + Stop R&ecording 레코딩 중지(&e) - + R&ecord 레코드(&R) - + Building: %n shader(s) 빌드중: %n개 셰이더 - + Scale: %1x %1 is the resolution scaling factor 스케일: %1x - + Speed: %1% / %2% 속도: %1% / %2% - + Speed: %1% 속도: %1% - + Game: %1 FPS (Unlocked) 게임: %1 FPS (제한없음) - + Game: %1 FPS 게임: %1 FPS - + Frame: %1 ms 프레임: %1 ms - - GPU NORMAL - GPU 보통 + + %1 %2 + %1 %2 - - GPU HIGH - GPU 높음 - - - - GPU EXTREME - GPU 굉장함 - - - - GPU ERROR - GPU 오류 - - - - DOCKED - 거치 모드 - - - - HANDHELD - 휴대 모드 - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - NEAREST - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BICUBIC - - - - GAUSSIAN - GAUSSIAN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA AA 없음 - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE 볼륨: 음소거 - + VOLUME: %1% Volume percentage (e.g. 50%) 볼륨: %1% - + Confirm Key Rederivation 키 재생성 확인 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5596,37 +5638,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 자동 생성되었던 키 파일들이 삭제되고 키 생성 모듈이 다시 실행됩니다. - + Missing fuses fuses 누락 - + - Missing BOOT0 - BOOT0 누락 - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main 누락 - + - Missing PRODINFO - PRODINFO 누락 - + Derivation Components Missing 파생 구성 요소 누락 - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 암호화 키가 없습니다. <br>모든 키, 펌웨어 및 게임을 얻으려면 <a href='https://yuzu-emu.org/help/quickstart/'>yuzu 빠른 시작 가이드</a>를 따르세요.<br><br> <small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5635,49 +5677,49 @@ on your system's performance. 소요될 수 있습니다. - + Deriving Keys 파생 키 - + System Archive Decryption Failed 시스템 아카이브 암호 해독 실패 - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + 암호화 키가 펌웨어를 해독하지 못했습니다. <br> 모든 키, 펌웨어 및 게임을 받으려면<a href='https://yuzu-emu.org/help/quickstart/'> Yuzu 빠른 시작 가이드 </a>를 따르세요. - + Select RomFS Dump Target RomFS 덤프 대상 선택 - + Please select which RomFS you would like to dump. 덤프할 RomFS를 선택하십시오. - + Are you sure you want to close yuzu? yuzu를 닫으시겠습니까? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. 에뮬레이션을 중지하시겠습니까? 모든 저장되지 않은 진행 상황은 사라집니다. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5685,48 +5727,143 @@ Would you like to bypass this and exit anyway? 이를 무시하고 나가시겠습니까? + + + None + 없음 + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + 가장 가까운 + + + + Bilinear + 이중선형 + + + + Bicubic + 고등차수보간 + + + + Gaussian + 가우시안 + + + + ScaleForce + 스케일포스 + + + + Docked + 거치 모드 + + + + Handheld + 휴대 모드 + + + + Normal + 보통 + + + + High + 높음 + + + + Extreme + 익스트림 + + + + Vulkan + 불칸 + + + + OpenGL + OpenGL + + + + Null + Null + + + + GLSL + GLSL + + + + GLASM + GLASM + + + + SPIRV + SPIRV + GRenderWindow - - + + OpenGL not available! OpenGL을 사용할 수 없습니다! - + OpenGL shared contexts are not supported. OpenGL 공유 컨텍스트는 지원되지 않습니다. - + yuzu has not been compiled with OpenGL support. yuzu는 OpenGL 지원으로 컴파일되지 않았습니다. - - + + Error while initializing OpenGL! OpenGL을 초기화하는 동안 오류가 발생했습니다! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. 사용하시는 GPU가 OpenGL을 지원하지 않거나, 최신 그래픽 드라이버가 설치되어 있지 않습니다. - + Error while initializing OpenGL 4.6! OpenGL 4.6 초기화 중 오류 발생! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 사용하시는 GPU가 OpenGL 4.6을 지원하지 않거나 최신 그래픽 드라이버가 설치되어 있지 않습니다. <br><br>GL 렌더링 장치:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 사용하시는 GPU가 1개 이상의 OpenGL 확장 기능을 지원하지 않습니다. 최신 그래픽 드라이버가 설치되어 있는지 확인하세요. <br><br>GL 렌더링 장치:<br>%1<br><br>지원하지 않는 확장 기능:<br>%2 @@ -5786,7 +5923,7 @@ Would you like to bypass this and exit anyway? Remove Cache Storage - + 캐시 스토리지 제거 @@ -6080,138 +6217,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute 오디오 음소거/음소거 해제 - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window 메인 윈도우 - + Audio Volume Down 오디오 볼륨 낮추기 - + Audio Volume Up 오디오 볼륨 키우기 - + Capture Screenshot 스크린샷 캡처 - + Change Adapting Filter 적응형 필터 변경 - + Change Docked Mode 독 모드 변경 - + Change GPU Accuracy GPU 정확성 변경 - + Continue/Pause Emulation 재개/에뮬레이션 일시중지 - + Exit Fullscreen 전체화면 종료 - + Exit yuzu yuzu 종료 - + Fullscreen 전체화면 - + Load File 파일 로드 - + Load/Remove Amiibo Amiibo 로드/제거 - + Restart Emulation 에뮬레이션 재시작 - + Stop Emulation 에뮬레이션 중단 - + TAS Record TAS 기록 - + TAS Reset TAS 리셋 - + TAS Start/Stop TAS 시작/멈춤 - + Toggle Filter Bar 상태 표시줄 전환 - + Toggle Framerate Limit 프레임속도 제한 토글 - + Toggle Mouse Panning 마우스 패닝 활성화 - + Toggle Status Bar 상태 표시줄 전환 @@ -6954,30 +7091,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [설정 안 됨] @@ -6988,14 +7125,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 축 %1%2 @@ -7006,320 +7143,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [알 수 없음] - - + + Left 왼쪽 - - + + Right 오른쪽 - - + + Down 아래 - - + + Up - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle 동그라미 - + Cross 엑스 - + Square 네모 - + Triangle 세모 - + Share Share - + Options Options - + [undefined] [설정안됨] - + %1%2 %1%2 - - + + [invalid] [유효하지않음] - - + + %1%2Hat %3 %1%2방향키 %3 - - + - + + %1%2Axis %3 %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 %1%2모션 %3 - - + + %1%2Button %3 %1%2버튼 %3 - - + + [unused] [미사용] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L L 스틱 - + Stick R R 스틱 - + Plus Plus - + Minus Minus - - + + Home - + Capture 캡쳐 - + Touch 터치 - + Wheel Indicates the mouse wheel - + Backward 뒤로가기 - + Forward 앞으로가기 - + Task Task - + Extra Extra - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3방향키%4 - - + + %1%2%3Axis %4 %1%2%3Axis %4 - - + + %1%2%3Button %4 %1%2%3버튼%4 diff --git a/dist/languages/nb.ts b/dist/languages/nb.ts index f6f79ca02..6e86588f6 100644 --- a/dist/languages/nb.ts +++ b/dist/languages/nb.ts @@ -1137,78 +1137,78 @@ Dette vil bannlyse både deres forum brukernavn og deres IP adresse.yuzu Konfigurasjon - - + + Audio Lyd - - + + CPU CPU - + Debug Feilsøk - + Filesystem Filsystem - - + + General Generelt - - + + Graphics Grafikk - + GraphicsAdvanced AvnsertGrafikk - + Hotkeys Hurtigtaster - - + + Controls Kontrollere - + Profiles Profiler - + Network Nettverk - - + + System System - + Game List Spill Liste - + Web Nett @@ -1402,17 +1402,22 @@ Dette vil bannlyse både deres forum brukernavn og deres IP adresse.Gjem mus under inaktivitet - + + Disable controller applet + Deaktiver kontroller-appleten + + + Reset All Settings Tilbakestill alle innstillinger - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Dette tilbakestiller alle innstillinger og fjerner alle spillinnstillinger. Spillmapper, profiler og inndataprofiler blir ikke slettet. Fortsett? @@ -1703,43 +1708,43 @@ Umiddelbar (ingen synkronisering) presenterer bare det som er tilgjengelig og ka Bakgrunnsfarge: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (assembly-shader-e, kun med NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Eksperimentell, Kun Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off Av - + VSync Off VSync Av - + Recommended Anbefalt - + On - + VSync On VSync På @@ -1864,37 +1869,57 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. Aktiver beregningsrørledninger (kun Intel Vulkan) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + Kjør spillet i normal hastighet under videoavspilling, selv når bildefrekvensen er låst opp. + + + + Sync to framerate of video playback + Synkroniser med bildefrekvensen for videoavspilling + + + + Improves rendering of transparency effects in specific games. + Forbedrer gjengivelsen av transparenseffekter i spesifikke spill. + + + + Barrier feedback loops + Tilbakekoblingssløyfer for barrierer + + + Anisotropic Filtering: Anisotropisk filtrering: - + Automatic Automatisk - + Default Standard - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2277,7 +2302,7 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. - + Configure Konfigurer @@ -2344,22 +2369,7 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. Bruk tilfeldig Amiibo ID - - Enable mouse panning - Slå på musepanorering - - - - Mouse sensitivity - Musesensitivitet - - - - % - % - - - + Motion / Touch Bevegelse / Touch @@ -2471,7 +2481,7 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. - + Left Stick Venstre Pinne @@ -2565,14 +2575,14 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. - + L L - + ZL ZL @@ -2591,7 +2601,7 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. - + Plus Pluss @@ -2604,15 +2614,15 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. - - + + R R - + ZR ZR @@ -2669,247 +2679,257 @@ Beregningsrørledninger er alltid aktivert på alle andre drivere. - + Right Stick Høyre Pinne - - - - + + Mouse panning + Musepanorering + + + + Configure + Konfigurer + + + + + + Clear Fjern - - - - - + + + + + [not set] [ikke satt] - - - + + + Invert button Inverter knapp - - + + Toggle button Veksle knapp - + Turbo button Turbo-Knapp - - + + Invert axis Inverter akse - - - + + + Set threshold Set grense - - + + Choose a value between 0% and 100% Velg en verdi mellom 0% og 100% - + Toggle axis veksle akse - + Set gyro threshold Angi gyroterskel - + Calibrate sensor Kalibrer sensor - + Map Analog Stick Kartlegg Analog Spak - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Etter du har trykker på OK, flytt først stikken horisontalt, og så vertikalt. For å invertere aksene, flytt først stikken vertikalt, og så horistonalt. - + Center axis Senterakse - - + + Deadzone: %1% Dødsone: %1% - - + + Modifier Range: %1% Modifikatorområde: %1% - - + + Pro Controller Pro-Kontroller - + Dual Joycons Doble Joycons - + Left Joycon Venstre Joycon - + Right Joycon Høyre Joycon - + Handheld Håndholdt - + GameCube Controller GameCube-kontroller - + Poke Ball Plus Poke Ball Plus - + NES Controller NES-kontroller - + SNES Controller SNES-kontroller - + N64 Controller N64-kontroller - + Sega Genesis Sega Genesis - + Start / Pause Start / paus - + Z Z - + Control Stick Kontrollstikke - + C-Stick C-stikke - + Shake! Rist! - + [waiting] [venter] - + New Profile Ny Profil - + Enter a profile name: Skriv inn et profilnavn: - - + + Create Input Profile Lag inndataprofil - + The given profile name is not valid! Det oppgitte profilenavnet er ugyldig! - + Failed to create the input profile "%1" Klarte ikke lage inndataprofil "%1" - + Delete Input Profile Slett inndataprofil - + Failed to delete the input profile "%1" Klarte ikke slette inndataprofil "%1" - + Load Input Profile Last inn inndataprofil - + Failed to load the input profile "%1" Klarte ikke laste inn inndataprofil "%1" - + Save Input Profile Lagre inndataprofil - + Failed to save the input profile "%1" Klarte ikke lagre inndataprofil "%1" @@ -3088,6 +3108,81 @@ For å invertere aksene, flytt først stikken vertikalt, og så horistonalt.UDP-Test eller kalibrasjonskonfigurering er i fremgang.<br>Vennligst vent for dem til å bli ferdig. + + ConfigureMousePanning + + + Configure mouse panning + Konfigurer musepanorering + + + + Enable + Aktiver + + + + Can be toggled via a hotkey + Kan veksles via en hurtigtast + + + + Sensitivity + Følsomhet + + + + + Horizontal + Horisontal + + + + + + + + + % + % + + + + + Vertical + Vertikal + + + + Deadzone counterweight + Motvekt for dødssone + + + + Counteracts a game's built-in deadzone + Motvirker spillets innebygde dødsone + + + + Stick decay + Forfall av spaken + + + + Strength + Styrke + + + + Minimum + Minimum + + + + Default + Standard + + ConfigureNetwork @@ -3164,47 +3259,47 @@ For å invertere aksene, flytt først stikken vertikalt, og så horistonalt.Utvikler - + Add-Ons Tillegg - + General Generelt - + System System - + CPU CPU - + Graphics Grafikk - + Adv. Graphics Avn. Grafikk - + Audio Lyd - + Input Profiles Inndataprofiler - + Properties Egenskaper @@ -3407,8 +3502,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Hvis du vil bruke denne kontrolleren, må du konfigurere spiller 1 som høyre kontroller og spiller 2 som dobbel joycon før du starter spillet, slik at denne kontrolleren kan oppdages riktig. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + For å bruke Ring-Con konfigurerer du spiller 1 som høyre Joy-Con (både fysisk og emulert) og spiller 2 som venstre Joy-Con (venstre fysisk og dobbelt emulert) før du starter spillet. @@ -3444,7 +3539,7 @@ UUID: %2 - + Enable Aktiver @@ -3511,12 +3606,17 @@ UUID: %2 Den gjeldende kartlagte enheten har ikke en ring festet - + + The current mapped device is not connected + Den tilordnede enheten er ikke tilkoblet + + + Unexpected driver result %1 Uventet driverresultat %1 - + [waiting] [venter] @@ -4626,560 +4726,575 @@ Dra punkter for å endre posisjon, eller dobbelttrykk på tabellfelter for å re GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonym data blir samlet inn</a>for å hjelpe til med å forbedre yuzu.<br/><br/>Vil du dele din bruksdata med oss? - + Telemetry Telemetri - + Broken Vulkan Installation Detected Ødelagt Vulkan-installasjon oppdaget - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan-initialisering mislyktes under oppstart.<br><br>Klikk<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>her for instruksjoner for å løse problemet</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + Kjører et spill + + + Loading Web Applet... Laster web-applet... - - + + Disable Web Applet Slå av web-applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Deaktivering av webappleten kan føre til udefinert oppførsel og bør bare brukes med Super Mario 3D All-Stars. Er du sikker på at du vil deaktivere webappleten? (Dette kan aktiveres på nytt i feilsøkingsinnstillingene). - + The amount of shaders currently being built Antall shader-e som bygges for øyeblikket - + The current selected resolution scaling multiplier. Den valgte oppløsningsskaleringsfaktoren. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Nåværende emuleringshastighet. Verdier høyere eller lavere en 100% indikerer at emuleringen kjører raskere eller tregere enn en Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Hvor mange bilder per sekund spiller viser. Dette vil variere fra spill til spill og scene til scene. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tid det tar for å emulere et Switch bilde. Teller ikke med bildebegrensing eller v-sync. For full-hastighet emulering burde dette være 16.67 ms. på det høyeste. - + + Unmute + Slå på lyden + + + + Mute + Lydløs + + + + Reset Volume + Tilbakestill volum + + + &Clear Recent Files &Tøm Nylige Filer - + Emulated mouse is enabled Emulert mus er aktivert - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Ekte museinndata og musepanning er inkompatible. Deaktiver den emulerte musen i avanserte innstillinger for inndata for å tillate musepanning. - + &Continue &Fortsett - + &Pause &Paus - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - Et spill kjører i yuzu - - - + Warning Outdated Game Format Advarsel: Utdatert Spillformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Du bruker en dekonstruert ROM-mappe for dette spillet, som er et utdatert format som har blitt erstattet av andre formater som NCA, NAX, XCI, eller NSP. Dekonstruerte ROM-mapper mangler ikoner, metadata, og oppdateringsstøtte.<br><br>For en forklaring på diverse Switch-formater som yuzu støtter,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>sjekk vår wiki</a>. Denne meldingen vil ikke bli vist igjen. - - + + Error while loading ROM! Feil under innlasting av ROM! - + The ROM format is not supported. Dette ROM-formatet er ikke støttet. - + An error occurred initializing the video core. En feil oppstod under initialisering av videokjernen. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu har oppdaget en feil under kjøring av videokjernen. Dette er vanligvis forårsaket av utdaterte GPU-drivere, inkludert for integrert grafikk. Vennligst sjekk loggen for flere detaljer. For mer informasjon om å finne loggen, besøk følgende side: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Uploadd the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Feil under lasting av ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Vennligst følg <a href='https://yuzu-emu.org/help/quickstart/'>hurtigstartsguiden</a> for å redumpe filene dine. <br>Du kan henvise til yuzu wikien</a> eller yuzu Discorden</a> for hjelp. - + An unknown error occurred. Please see the log for more details. En ukjent feil oppstod. Se loggen for flere detaljer. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Lukker programvare... - + Save Data Lagre Data - + Mod Data Mod Data - + Error Opening %1 Folder Feil Under Åpning av %1 Mappen - - + + Folder does not exist! Mappen eksisterer ikke! - + Error Opening Transferable Shader Cache Feil ved åpning av overførbar shaderbuffer - + Failed to create the shader cache directory for this title. Kunne ikke opprette shader cache-katalogen for denne tittelen. - + Error Removing Contents Feil ved fjerning av innhold - + Error Removing Update Feil ved fjerning av oppdatering - + Error Removing DLC Feil ved fjerning av DLC - + Remove Installed Game Contents? Fjern Innstallert Spillinnhold? - + Remove Installed Game Update? Fjern Installert Spilloppdatering? - + Remove Installed Game DLC? Fjern Installert Spill DLC? - + Remove Entry Fjern oppføring - - - - - - + + + + + + Successfully Removed Fjerning lykkes - + Successfully removed the installed base game. Vellykket fjerning av det installerte basisspillet. - + The base game is not installed in the NAND and cannot be removed. Grunnspillet er ikke installert i NAND og kan ikke bli fjernet. - + Successfully removed the installed update. Fjernet vellykket den installerte oppdateringen. - + There is no update installed for this title. Det er ingen oppdatering installert for denne tittelen. - + There are no DLC installed for this title. Det er ingen DLC installert for denne tittelen. - + Successfully removed %1 installed DLC. Fjernet vellykket %1 installerte DLC-er. - + Delete OpenGL Transferable Shader Cache? Slette OpenGL Overførbar Shaderbuffer? - + Delete Vulkan Transferable Shader Cache? Slette Vulkan Overførbar Shaderbuffer? - + Delete All Transferable Shader Caches? Slette Alle Overførbare Shaderbuffere? - + Remove Custom Game Configuration? Fjern Tilpasset Spillkonfigurasjon? - + Remove Cache Storage? Fjerne Hurtiglagringen? - + Remove File Fjern Fil - - + + Error Removing Transferable Shader Cache Feil under fjerning av overførbar shader cache - - + + A shader cache for this title does not exist. En shaderbuffer for denne tittelen eksisterer ikke. - + Successfully removed the transferable shader cache. Lykkes i å fjerne den overførbare shader cachen. - + Failed to remove the transferable shader cache. Feil under fjerning av den overførbare shader cachen. - + Error Removing Vulkan Driver Pipeline Cache Feil ved fjerning av Vulkan Driver-Rørledningsbuffer - + Failed to remove the driver pipeline cache. Kunne ikke fjerne driverens rørledningsbuffer. - - + + Error Removing Transferable Shader Caches Feil ved fjerning av overførbare shaderbuffere - + Successfully removed the transferable shader caches. Vellykket fjerning av overførbare shaderbuffere. - + Failed to remove the transferable shader cache directory. Feil ved fjerning av overførbar shaderbuffer katalog. - - + + Error Removing Custom Configuration Feil Under Fjerning Av Tilpasset Konfigurasjon - + A custom configuration for this title does not exist. En tilpasset konfigurasjon for denne tittelen finnes ikke. - + Successfully removed the custom game configuration. Fjernet vellykket den tilpassede spillkonfigurasjonen. - + Failed to remove the custom game configuration. Feil under fjerning av den tilpassede spillkonfigurasjonen. - - + + RomFS Extraction Failed! Utvinning av RomFS Feilet! - + There was an error copying the RomFS files or the user cancelled the operation. Det oppstod en feil under kopiering av RomFS filene eller så kansellerte brukeren operasjonen. - + Full Fullstendig - + Skeleton Skjelett - + Select RomFS Dump Mode Velg RomFS Dump Modus - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Velg hvordan du vil dumpe RomFS.<br>Fullstendig vil kopiere alle filene til en ny mappe mens <br>skjelett vil bare skape mappestrukturen. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Det er ikke nok ledig plass på %1 til å pakke ut RomFS. Vennligst frigjør plass eller velg en annen dump-katalog under Emulering > Konfigurer > System > Filsystem > Dump Root. - + Extracting RomFS... Utvinner RomFS... - - + + Cancel Avbryt - + RomFS Extraction Succeeded! RomFS Utpakking lyktes! - + The operation completed successfully. Operasjonen fullført vellykket. - - - - - + + + + + Create Shortcut Lag Snarvei - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Dette vil opprette en snarvei til gjeldende AppImage. Dette fungerer kanskje ikke bra hvis du oppdaterer. Fortsette? - + Cannot create shortcut on desktop. Path "%1" does not exist. Kan ikke opprette snarvei på skrivebordet. Stien "%1" finnes ikke. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Kan ikke opprette snarvei i applikasjonsmenyen. Stien "%1" finnes ikke og kan ikke opprettes. - + Create Icon Lag Ikon - + Cannot create icon file. Path "%1" does not exist and cannot be created. Kan ikke opprette ikonfil. Stien "%1" finnes ikke og kan ikke opprettes. - + Start %1 with the yuzu Emulator Start %1 med yuzu-emulatoren - + Failed to create a shortcut at %1 Mislyktes i å opprette en snarvei ved %1 - + Successfully created a shortcut to %1 Opprettet en snarvei til %1 - + Error Opening %1 Feil ved åpning av %1 - + Select Directory Velg Mappe - + Properties Egenskaper - + The game properties could not be loaded. Spillets egenskaper kunne ikke bli lastet inn. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Kjørbar Fil (%1);;Alle Filer (*.*) - + Load File Last inn Fil - + Open Extracted ROM Directory Åpne Utpakket ROM Mappe - + Invalid Directory Selected Ugyldig Mappe Valgt - + The directory you have selected does not contain a 'main' file. Mappen du valgte inneholder ikke en 'main' fil. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installerbar Switch-Fil (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xcI) - + Install Files Installer Filer - + %n file(s) remaining %n fil gjenstår%n filer gjenstår - + Installing file "%1"... Installerer fil "%1"... - - + + Install Results Insallasjonsresultater - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. For å unngå mulige konflikter fraråder vi brukere å installere basisspill på NAND. Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + %n file(s) were newly installed %n fil ble nylig installert @@ -5187,7 +5302,7 @@ Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + %n file(s) were overwritten %n fil ble overskrevet @@ -5195,7 +5310,7 @@ Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + %n file(s) failed to install %n fil ble ikke installert @@ -5203,388 +5318,312 @@ Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + System Application Systemapplikasjon - + System Archive Systemarkiv - + System Application Update Systemapplikasjonsoppdatering - + Firmware Package (Type A) Firmware Pakke (Type A) - + Firmware Package (Type B) Firmware-Pakke (Type B) - + Game Spill - + Game Update Spilloppdatering - + Game DLC Spill tilleggspakke - + Delta Title Delta Tittel - + Select NCA Install Type... Velg NCA Installasjonstype... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vennligst velg typen tittel du vil installere denne NCA-en som: (I de fleste tilfellene, standarden 'Spill' fungerer.) - + Failed to Install Feil under Installasjon - + The title type you selected for the NCA is invalid. Titteltypen du valgte for NCA-en er ugyldig. - + File not found Fil ikke funnet - + File "%1" not found Filen "%1" ikke funnet - + OK OK - - + + Hardware requirements not met Krav til maskinvare ikke oppfylt - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Systemet ditt oppfyller ikke de anbefalte maskinvarekravene. Kompatibilitetsrapportering er deaktivert. - + Missing yuzu Account Mangler yuzu Bruker - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. For å sende inn et testtilfelle for spillkompatibilitet, må du linke yuzu-brukeren din.<br><br/>For å linke yuzu-brukeren din, gå til Emulasjon &gt; Konfigurasjon &gt; Nett. - + Error opening URL Feil under åpning av URL - + Unable to open the URL "%1". Kunne ikke åpne URL "%1". - + TAS Recording TAS-innspilling - + Overwrite file of player 1? Overskriv filen til spiller 1? - + Invalid config detected Ugyldig konfigurasjon oppdaget - + Handheld controller can't be used on docked mode. Pro controller will be selected. Håndholdt kontroller kan ikke brukes i dokket modus. Pro-kontroller vil bli valgt. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Den valgte amiibo-en har blitt fjernet - + Error Feil - - + + The current game is not looking for amiibos Det kjørende spillet sjekker ikke for amiibo-er - + Amiibo File (%1);; All Files (*.*) Amiibo-Fil (%1);; Alle Filer (*.*) - + Load Amiibo Last inn Amiibo - + Error loading Amiibo data Feil ved lasting av Amiibo data - + The selected file is not a valid amiibo Den valgte filen er ikke en gyldig amiibo - + The selected file is already on use Den valgte filen er allerede i bruk - + An unknown error occurred En ukjent feil oppso - + Capture Screenshot Ta Skjermbilde - + PNG Image (*.png) PNG Bilde (*.png) - + TAS state: Running %1/%2 TAS-tilstand: Kjører %1/%2 - + TAS state: Recording %1 TAS-tilstand: Spiller inn %1 - + TAS state: Idle %1/%2 TAS-tilstand: Venter %1%2 - + TAS State: Invalid TAS-tilstand: Ugyldig - + &Stop Running &Stopp kjøring - + &Start &Start - + Stop R&ecording Stopp innspilling (&E) - + R&ecord Spill inn (%E) - + Building: %n shader(s) Bygger: %n shaderBygger: %n shader-e - + Scale: %1x %1 is the resolution scaling factor Skala: %1x - + Speed: %1% / %2% Hastighet: %1% / %2% - + Speed: %1% Hastighet: %1% - + Game: %1 FPS (Unlocked) Spill: %1 FPS (ubegrenset) - + Game: %1 FPS Spill: %1 FPS - + Frame: %1 ms Ramme: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU HØY - - - - GPU EXTREME - GPU EKSTREM - - - - GPU ERROR - GPU FEIL - - - - DOCKED - FORANKRET - - - - HANDHELD - HÅNDHOLDT - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - NÆRMESTE - - - - - BILINEAR - BILINEÆR - - - - BICUBIC - BIKUBISK - - - - GAUSSIAN - GAUSSISK - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA INGEN AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE VOLUM: DEMPET - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUM: %1% - + Confirm Key Rederivation Bekreft Nøkkel-Redirevasjon - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5601,37 +5640,37 @@ og eventuelt lag backups. Dette vil slette dine autogenererte nøkkel-filer og kjøre nøkkel-derivasjonsmodulen på nytt. - + Missing fuses Mangler fuses - + - Missing BOOT0 - Mangler BOOT0 - + - Missing BCPKG2-1-Normal-Main - Mangler BCPKG2-1-Normal-Main - + - Missing PRODINFO - Mangler PRODINFO - + Derivation Components Missing Derivasjonskomponenter Mangler - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Krypteringsnøkler mangler. <br>Vennligst følg <a href='https://yuzu-emu.org/help/quickstart/'>yuzus oppstartsguide</a> for å få alle nøklene, fastvaren og spillene dine.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5640,49 +5679,49 @@ Dette kan ta opp til et minutt avhengig av systemytelsen din. - + Deriving Keys Deriverer Nøkler - + System Archive Decryption Failed Dekryptering av systemarkiv mislyktes - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Krypteringsnøkler klarte ikke å dekryptere firmware. <br>Vennligst følg <a href='https://yuzu-emu.org/help/quickstart/'>quickstartguiden for yuzu </a> for å få alle nøkler, firmware og spill. - + Select RomFS Dump Target Velg RomFS Dump-Mål - + Please select which RomFS you would like to dump. Vennligst velg hvilken RomFS du vil dumpe. - + Are you sure you want to close yuzu? Er du sikker på at du vil lukke yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Er du sikker på at du vil stoppe emulasjonen? All ulagret fremgang vil bli tapt. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5690,48 +5729,143 @@ Would you like to bypass this and exit anyway? Vil du overstyre dette og lukke likevel? + + + None + Ingen + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + Nærmest + + + + Bilinear + Bilineær + + + + Bicubic + Bikubisk + + + + Gaussian + Gaussisk + + + + ScaleForce + ScaleForce + + + + Docked + Dokket + + + + Handheld + Håndholdt + + + + Normal + Normal + + + + High + Høy + + + + Extreme + Ekstrem + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + Null + + + + GLSL + GLSL + + + + GLASM + GLASM + + + + SPIRV + SPIRV + GRenderWindow - - + + OpenGL not available! OpenGL ikke tilgjengelig! - + OpenGL shared contexts are not supported. Delte OpenGL-kontekster støttes ikke. - + yuzu has not been compiled with OpenGL support. yuzu har ikke blitt kompilert med OpenGL-støtte. - - + + Error while initializing OpenGL! Feil under initialisering av OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Det kan hende at GPU-en din ikke støtter OpenGL, eller at du ikke har den nyeste grafikkdriveren. - + Error while initializing OpenGL 4.6! Feil under initialisering av OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Det kan hende at GPU-en din ikke støtter OpenGL 4.6, eller at du ikke har den nyeste grafikkdriveren.<br><br>GL-renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Det kan hende at GPU-en din ikke støtter én eller flere nødvendige OpenGL-utvidelser. Vennligst sørg for at du har den nyeste grafikkdriveren.<br><br>GL-renderer: <br>%1<br><br>Ikke-støttede utvidelser:<br>%2 @@ -6085,138 +6219,138 @@ Feilmelding: Hotkeys - + Audio Mute/Unmute Lyd av/på - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Hovedvindu - + Audio Volume Down Lydvolum Ned - + Audio Volume Up Lydvolum Opp - + Capture Screenshot Ta Skjermbilde - + Change Adapting Filter Endre tilpasningsfilter - + Change Docked Mode Endre forankret modus - + Change GPU Accuracy Endre GPU-nøyaktighet - + Continue/Pause Emulation Fortsett/Pause Emuleringen - + Exit Fullscreen Avslutt fullskjerm - + Exit yuzu Avslutt yuzu - + Fullscreen Fullskjerm - + Load File Last inn Fil - + Load/Remove Amiibo Last/Fjern Amiibo - + Restart Emulation Omstart Emuleringen - + Stop Emulation Stopp Emuleringen - + TAS Record Spill inn TAS - + TAS Reset Tilbakestill TAS - + TAS Start/Stop Start/Stopp TAS - + Toggle Filter Bar Veksle Filterlinje - + Toggle Framerate Limit Veksle Bildefrekvensgrense - + Toggle Mouse Panning Veksle Muspanorering - + Toggle Status Bar Veksle Statuslinje @@ -6959,30 +7093,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [ikke satt] @@ -6993,14 +7127,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Akse %1%2 @@ -7011,320 +7145,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [ukjent] - - + + Left Venstre - - + + Right Høyre - - + + Down Ned - - + + Up Opp - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Sirkel - + Cross Kryss - + Square Firkant - + Triangle Trekant - + Share Del - + Options Instillinger - + [undefined] [udefinert] - + %1%2 %1%2 - - + + [invalid] [ugyldig] - - + + %1%2Hat %3 %1%2Hat %3 - - + - + + %1%2Axis %3 %1%2Akse %3 - - + + %1%2Axis %3,%4,%5 %1%2Akse %3,%4,%5 - - + + %1%2Motion %3 %1%2Bevegelse %3 - - + + %1%2Button %3 %1%2Knapp %3 - - + + [unused] [ubrukt] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Venstre Stikke - + Stick R Høyre Stikke - + Plus Pluss - + Minus Minus - - + + Home Hjem - + Capture Opptak - + Touch Touch - + Wheel Indicates the mouse wheel Hjul - + Backward Bakover - + Forward Fremover - + Task oppgave - + Extra Ekstra - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3Hat %4 - - + + %1%2%3Axis %4 %1%2%3Akse %4 - - + + %1%2%3Button %4 %1%2%3Knapp %4 diff --git a/dist/languages/nl.ts b/dist/languages/nl.ts index b2fe2669e..070e4dba7 100644 --- a/dist/languages/nl.ts +++ b/dist/languages/nl.ts @@ -1119,78 +1119,78 @@ Dit zou zowel hun forum gebruikersnaam als hun IP-adres verbannen. yuzu-configuratie - - + + Audio Audio - - + + CPU CPU - + Debug Debug - + Filesystem Bestandssysteem - - + + General Algemeen - - + + Graphics Graphics - + GraphicsAdvanced Geavanceerde Graphics - + Hotkeys Sneltoetsen - - + + Controls Bediening - + Profiles Profielen - + Network Netwerk - - + + System Systeem - + Game List Spellijst - + Web Web @@ -1384,17 +1384,22 @@ Dit zou zowel hun forum gebruikersnaam als hun IP-adres verbannen. Verberg muis wanneer inactief - + + Disable controller applet + + + + Reset All Settings Reset Alle Instellingen - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Hiermee worden alle instellingen gereset en alle configuraties per game verwijderd. Hiermee worden gamedirectory's, profielen of invoerprofielen niet verwijderd. Doorgaan? @@ -1685,43 +1690,43 @@ Immediate (geen synchronisatie) presenteert gewoon wat beschikbaar is en kan sch Achtergrondkleur: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Assembly Shaders, alleen NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Experimenteel, alleen Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off Uit - + VSync Off VSync Uit - + Recommended Aanbevolen - + On Aan - + VSync On VSync Aan @@ -1761,12 +1766,12 @@ Immediate (geen synchronisatie) presenteert gewoon wat beschikbaar is en kan sch BC1 (Low quality) - + BC1 (Lage Kwaliteit) BC3 (Medium quality) - + BC3 (Gemiddelde kwaliteit) @@ -1846,37 +1851,57 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. Schakel Compute Pipelines in (alleen Intel Vulkan) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Anisotrope Filtering: - + Automatic Automatisch - + Default Standaard - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2259,7 +2284,7 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. - + Configure Configureer @@ -2326,22 +2351,7 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. Gebruik willekeurige Amiibo-ID - - Enable mouse panning - Schakel muispanning in - - - - Mouse sensitivity - Muisgevoeligheid - - - - % - % - - - + Motion / Touch Beweging / Touch @@ -2453,7 +2463,7 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. - + Left Stick Linker Stick @@ -2547,14 +2557,14 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. - + L L - + ZL ZL @@ -2573,7 +2583,7 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. - + Plus Plus @@ -2586,15 +2596,15 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. - - + + R R - + ZR ZR @@ -2651,247 +2661,257 @@ Compute pipelines is altijd ingeschakeld bij alle andere drivers. - + Right Stick Rechter Stick - - - - + + Mouse panning + + + + + Configure + Configureer + + + + + + Clear Wis - - - - - + + + + + [not set] [niet ingesteld] - - - + + + Invert button Knop omkeren - - + + Toggle button Schakel-knop - + Turbo button Turbo-knop - - + + Invert axis Spiegel as - - - + + + Set threshold Stel drempel in - - + + Choose a value between 0% and 100% Kies een waarde tussen 0% en 100% - + Toggle axis Schakel as - + Set gyro threshold Stel gyro-drempel in - + Calibrate sensor Kalibreer sensor - + Map Analog Stick Analoge Stick Toewijzen - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Nadat je op OK hebt gedrukt, beweeg je de joystick eerst horizontaal en vervolgens verticaal. Om de assen om te keren, beweeg je de joystick eerst verticaal en vervolgens horizontaal. - + Center axis Midden as - - + + Deadzone: %1% Deadzone: %1% - - + + Modifier Range: %1% Modificatorbereik: %1% - - + + Pro Controller Pro Controller - + Dual Joycons Twee Joycons - + Left Joycon Linker Joycon - + Right Joycon Rechter Joycon - + Handheld Handheld - + GameCube Controller GameCube-controller - + Poke Ball Plus Poke Ball Plus - + NES Controller NES-controller - + SNES Controller SNES-controller - + N64 Controller N64-controller - + Sega Genesis Sega Genesis - + Start / Pause Begin / Onderbreken - + Z Z - + Control Stick Control Stick - + C-Stick C-Stick - + Shake! Schud! - + [waiting] [aan het wachten] - + New Profile Nieuw Profiel - + Enter a profile name: Voer een profielnaam in: - - + + Create Input Profile Maak Invoerprofiel - + The given profile name is not valid! De ingevoerde profielnaam is niet geldig! - + Failed to create the input profile "%1" Kon invoerprofiel "%1" niet maken - + Delete Input Profile Verwijder Invoerprofiel - + Failed to delete the input profile "%1" Kon invoerprofiel "%1" niet verwijderen - + Load Input Profile Laad Invoerprofiel - + Failed to load the input profile "%1" Kon invoerprofiel "%1" niet laden - + Save Input Profile Sla Invoerprofiel op - + Failed to save the input profile "%1" Kon invoerprofiel "%1" niet opslaan @@ -3070,6 +3090,81 @@ Om de assen om te keren, beweeg je de joystick eerst verticaal en vervolgens hor UDP-test of kalibratieconfiguratie is bezig.<br>Wacht tot ze klaar zijn. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Inschakelen + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Standaard + + ConfigureNetwork @@ -3146,47 +3241,47 @@ Om de assen om te keren, beweeg je de joystick eerst verticaal en vervolgens hor Ontwikkelaar - + Add-Ons Add-Ons - + General Algemeen - + System Systeem - + CPU CPU - + Graphics Graphics - + Adv. Graphics Adv. Graphics - + Audio Audio - + Input Profiles Invoerprofielen - + Properties Eigenschappen @@ -3389,8 +3484,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Als je deze controller wilt gebruiken, configureer dan speler 1 als rechter controller en speler 2 als dual joycon voordat je het spel start, zodat deze controller goed wordt gedetecteerd. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3426,7 +3521,7 @@ UUID: %2 - + Enable Inschakelen @@ -3493,12 +3588,17 @@ UUID: %2 Het huidige apparaat heeft geen ring - + + The current mapped device is not connected + + + + Unexpected driver result %1 Onverwacht driverresultaat %1 - + [waiting] [aan het wachten] @@ -4608,560 +4708,575 @@ Versleep punten om de positie te veranderen, of dubbelklik op tabelcellen om waa GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Annonieme gegevens worden verzameld</a> om yuzu te helpen verbeteren. <br/><br/> Zou je jouw gebruiksgegevens met ons willen delen? - + Telemetry Telemetrie - + Broken Vulkan Installation Detected Beschadigde Vulkan-installatie gedetecteerd - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan-initialisatie mislukt tijdens het opstarten.<br><br>Klik <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>hier voor instructies om het probleem op te lossen</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Web Applet Laden... - - + + Disable Web Applet Schakel Webapplet uit - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Het uitschakelen van de webapplet kan leiden tot ongedefinieerd gedrag en mag alleen gebruikt worden met Super Mario 3D All-Stars. Weet je zeker dat je de webapplet wilt uitschakelen? (Deze kan opnieuw worden ingeschakeld in de Debug-instellingen). - + The amount of shaders currently being built Het aantal shaders dat momenteel wordt gebouwd - + The current selected resolution scaling multiplier. De huidige geselecteerde resolutieschaalmultiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Huidige emulatiesnelheid. Waarden hoger of lager dan 100% geven aan dat de emulatie sneller of langzamer werkt dan een Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Hoeveel beelden per seconde het spel momenteel weergeeft. Dit varieert van spel tot spel en van scène tot scène. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tijd die nodig is om een Switch-beeld te emuleren, beeldbeperking of v-sync niet meegerekend. Voor emulatie op volle snelheid mag dit maximaal 16,67 ms zijn. - + + Unmute + Dempen opheffen + + + + Mute + Dempen + + + + Reset Volume + Volume resetten + + + &Clear Recent Files &Wis Recente Bestanden - + Emulated mouse is enabled Geëmuleerde muis is ingeschakeld - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Echte muisinvoer en muispanning zijn niet compatibel. Schakel de geëmuleerde muis uit in de geavanceerde invoerinstellingen om muispanning mogelijk te maken. - + &Continue &Doorgaan - + &Pause &Onderbreken - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu is een spel aan het uitvoeren - - - + Warning Outdated Game Format Waarschuwing Verouderd Spelformaat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Je gebruikt het gedeconstrueerde ROM-mapformaat voor dit spel, wat een verouderd formaat is dat vervangen is door andere zoals NCA, NAX, XCI, of NSP. Deconstructed ROM-mappen missen iconen, metadata, en update-ondersteuning.<br><br>Voor een uitleg van de verschillende Switch-formaten die yuzu ondersteunt,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'> bekijk onze wiki</a>. Dit bericht wordt niet meer getoond. - - + + Error while loading ROM! Fout tijdens het laden van een ROM! - + The ROM format is not supported. Het ROM-formaat wordt niet ondersteund. - + An error occurred initializing the video core. Er is een fout opgetreden tijdens het initialiseren van de videokern. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu is een fout tegengekomen tijdens het uitvoeren van de videokern. Dit wordt meestal veroorzaakt door verouderde GPU-drivers, inclusief geïntegreerde. Zie het logboek voor meer details. Voor meer informatie over toegang tot het log, zie de volgende pagina: <a href='https://yuzu-emu.org/help/reference/log-files/'>Hoe upload je het logbestand</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Fout tijdens het laden van ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Volg de <a href='https://yuzu-emu.org/help/quickstart/'>yuzu snelstartgids</a> om je bestanden te redumpen.<br>Je kunt de yuzu-wiki</a>of de yuzu-Discord</a> raadplegen voor hulp. - + An unknown error occurred. Please see the log for more details. Een onbekende fout heeft plaatsgevonden. Kijk in de log voor meer details. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Software sluiten... - + Save Data Save Data - + Mod Data Mod Data - + Error Opening %1 Folder Fout tijdens het openen van %1 map - - + + Folder does not exist! Map bestaat niet! - + Error Opening Transferable Shader Cache Fout bij het openen van overdraagbare shader-cache - + Failed to create the shader cache directory for this title. Kon de shader-cache-map voor dit spel niet aanmaken. - + Error Removing Contents Fout bij het verwijderen van de inhoud - + Error Removing Update Fout bij het verwijderen van de update - + Error Removing DLC Fout bij het verwijderen van DLC - + Remove Installed Game Contents? Geïnstalleerde Spelinhoud Verwijderen? - + Remove Installed Game Update? Geïnstalleerde Spel-update Verwijderen? - + Remove Installed Game DLC? Geïnstalleerde Spel-DLC Verwijderen? - + Remove Entry Verwijder Invoer - - - - - - + + + + + + Successfully Removed Met Succes Verwijderd - + Successfully removed the installed base game. Het geïnstalleerde basisspel is succesvol verwijderd. - + The base game is not installed in the NAND and cannot be removed. Het basisspel is niet geïnstalleerd in de NAND en kan niet worden verwijderd. - + Successfully removed the installed update. De geïnstalleerde update is succesvol verwijderd. - + There is no update installed for this title. Er is geen update geïnstalleerd voor dit spel. - + There are no DLC installed for this title. Er is geen DLC geïnstalleerd voor dit spel. - + Successfully removed %1 installed DLC. %1 geïnstalleerde DLC met succes verwijderd. - + Delete OpenGL Transferable Shader Cache? Overdraagbare OpenGL-shader-cache Verwijderen? - + Delete Vulkan Transferable Shader Cache? Overdraagbare Vulkan-shader-cache Verwijderen? - + Delete All Transferable Shader Caches? Alle Overdraagbare Shader-caches Verwijderen? - + Remove Custom Game Configuration? Aangepaste Spelconfiguratie Verwijderen? - + Remove Cache Storage? - + Cache-opslag verwijderen - + Remove File Verwijder Bestand - - + + Error Removing Transferable Shader Cache Fout bij het verwijderen van Overdraagbare Shader-cache - - + + A shader cache for this title does not exist. Er bestaat geen shader-cache voor dit spel. - + Successfully removed the transferable shader cache. De overdraagbare shader-cache is verwijderd. - + Failed to remove the transferable shader cache. Kon de overdraagbare shader-cache niet verwijderen. - + Error Removing Vulkan Driver Pipeline Cache Fout bij het verwijderen van Pijplijn-cache van Vulkan-driver - + Failed to remove the driver pipeline cache. Kon de pijplijn-cache van de driver niet verwijderen. - - + + Error Removing Transferable Shader Caches Fout bij het verwijderen van overdraagbare shader-caches - + Successfully removed the transferable shader caches. De overdraagbare shader-caches zijn verwijderd. - + Failed to remove the transferable shader cache directory. Kon de overdraagbare shader-cache-map niet verwijderen. - - + + Error Removing Custom Configuration Fout bij het verwijderen van aangepaste configuratie - + A custom configuration for this title does not exist. Er bestaat geen aangepaste configuratie voor dit spel. - + Successfully removed the custom game configuration. De aangepaste spelconfiguratie is verwijderd. - + Failed to remove the custom game configuration. Kon de aangepaste spelconfiguratie niet verwijderen. - - + + RomFS Extraction Failed! RomFS-extractie Mislukt! - + There was an error copying the RomFS files or the user cancelled the operation. Er is een fout opgetreden bij het kopiëren van de RomFS-bestanden of de gebruiker heeft de bewerking geannuleerd. - + Full Volledig - + Skeleton Skelet - + Select RomFS Dump Mode Selecteer RomFS-dumpmodus - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Selecteer hoe je de RomFS gedumpt wilt hebben.<br>Volledig zal alle bestanden naar de nieuwe map kopiëren, terwijl <br>Skelet alleen de mapstructuur zal aanmaken. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Er is niet genoeg vrije ruimte op %1 om de RomFS uit te pakken. Maak ruimte vrij of kies een andere dumpmap bij Emulatie > Configuratie > Systeem > Bestandssysteem > Dump Root. - + Extracting RomFS... RomFS uitpakken... - - + + Cancel Annuleren - + RomFS Extraction Succeeded! RomFS-extractie Geslaagd! - + The operation completed successfully. De bewerking is succesvol voltooid. - - - - - + + + + + Create Shortcut Maak Snelkoppeling - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Dit maakt een snelkoppeling naar de huidige AppImage. Dit werkt mogelijk niet goed als je een update uitvoert. Doorgaan? - + Cannot create shortcut on desktop. Path "%1" does not exist. Kan geen snelkoppeling op het bureaublad maken. Pad "%1" bestaat niet. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Kan geen snelkoppeling maken in toepassingen menu. Pad "%1" bestaat niet en kan niet worden aangemaakt. - + Create Icon Maak Icoon - + Cannot create icon file. Path "%1" does not exist and cannot be created. Kan geen icoonbestand maken. Pad "%1" bestaat niet en kan niet worden aangemaakt. - + Start %1 with the yuzu Emulator Voer %1 uiit met de yuzu-emulator - + Failed to create a shortcut at %1 Er is geen snelkoppeling gemaakt op %1 - + Successfully created a shortcut to %1 Succesvol een snelkoppeling naar %1 gemaakt - + Error Opening %1 Fout bij openen %1 - + Select Directory Selecteer Map - + Properties Eigenschappen - + The game properties could not be loaded. De speleigenschappen kunnen niet geladen worden. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Executable (%1);;Alle Bestanden (*.*) - + Load File Laad Bestand - + Open Extracted ROM Directory Open Uitgepakte ROM-map - + Invalid Directory Selected Ongeldige Map Geselecteerd - + The directory you have selected does not contain a 'main' file. De map die je hebt geselecteerd bevat geen 'main'-bestand. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installeerbaar Switch-bestand (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installeer Bestanden - + %n file(s) remaining %n bestand(en) resterend%n bestand(en) resterend - + Installing file "%1"... Bestand "%1" Installeren... - - + + Install Results Installeerresultaten - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Om mogelijke conflicten te voorkomen, raden we gebruikers af om basisgames te installeren op de NAND. Gebruik deze functie alleen om updates en DLC te installeren. - + %n file(s) were newly installed %n bestand(en) zijn recent geïnstalleerd @@ -5169,7 +5284,7 @@ Gebruik deze functie alleen om updates en DLC te installeren. - + %n file(s) were overwritten %n bestand(en) werden overschreven @@ -5177,7 +5292,7 @@ Gebruik deze functie alleen om updates en DLC te installeren. - + %n file(s) failed to install %n bestand(en) niet geïnstalleerd @@ -5185,388 +5300,312 @@ Gebruik deze functie alleen om updates en DLC te installeren. - + System Application Systeemapplicatie - + System Archive Systeemarchief - + System Application Update Systeemapplicatie-update - + Firmware Package (Type A) Filmware-pakket (Type A) - + Firmware Package (Type B) Filmware-pakket (Type B) - + Game Spel - + Game Update Spelupdate - + Game DLC Spel-DLC - + Delta Title Delta Titel - + Select NCA Install Type... Selecteer NCA-installatiesoort... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Selecteer het type titel waarin je deze NCA wilt installeren: (In de meeste gevallen is de standaard "Spel" prima). - + Failed to Install Installatie Mislukt - + The title type you selected for the NCA is invalid. Het soort title dat je hebt geselecteerd voor de NCA is ongeldig. - + File not found Bestand niet gevonden - + File "%1" not found Bestand "%1" niet gevonden - + OK OK - - + + Hardware requirements not met Er is niet voldaan aan de hardwarevereisten - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Je systeem voldoet niet aan de aanbevolen hardwarevereisten. Compatibiliteitsrapportage is uitgeschakeld. - + Missing yuzu Account yuzu-account Ontbreekt - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Om een spelcompatibiliteitstest in te dienen, moet je je yuzu-account koppelen.<br><br/>Om je yuzu-account te koppelen, ga naar Emulatie &gt; Configuratie &gt; Web. - + Error opening URL Fout bij het openen van URL - + Unable to open the URL "%1". Kan de URL "%1" niet openen. - + TAS Recording TAS-opname - + Overwrite file of player 1? Het bestand van speler 1 overschrijven? - + Invalid config detected Ongeldige configuratie gedetecteerd - + Handheld controller can't be used on docked mode. Pro controller will be selected. Handheld-controller kan niet gebruikt worden in docked-modus. Pro controller wordt geselecteerd. - - + + Amiibo Amiibo - - + + The current amiibo has been removed De huidige amiibo is verwijderd - + Error Fout - - + + The current game is not looking for amiibos Het huidige spel is niet op zoek naar amiibo's - + Amiibo File (%1);; All Files (*.*) Amiibo-bestand (%1);; Alle Bestanden (*.*) - + Load Amiibo Laad Amiibo - + Error loading Amiibo data Fout tijdens het laden van de Amiibo-gegevens - + The selected file is not a valid amiibo Het geselecteerde bestand is geen geldige amiibo - + The selected file is already on use Het geselecteerde bestand is al in gebruik - + An unknown error occurred Er is een onbekende fout opgetreden - + Capture Screenshot Leg Schermafbeelding Vast - + PNG Image (*.png) PNG-afbeelding (*.png) - + TAS state: Running %1/%2 TAS-status: %1/%2 In werking - + TAS state: Recording %1 TAS-status: %1 Aan het opnemen - + TAS state: Idle %1/%2 TAS-status: %1/%2 Inactief - + TAS State: Invalid TAS-status: Ongeldig - + &Stop Running &Stop Uitvoering - + &Start &Start - + Stop R&ecording Stop Opname - + R&ecord Opnemen - + Building: %n shader(s) Bouwen: %n shader(s)Bouwen: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Schaal: %1x - + Speed: %1% / %2% Snelheid: %1% / %2% - + Speed: %1% Snelheid: %1% - + Game: %1 FPS (Unlocked) Spel: %1 FPS (Ontgrendeld) - + Game: %1 FPS Game: %1 FPS - + Frame: %1 ms Frame: %1 ms - - GPU NORMAL - GPU NORMAAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU HOOG - - - - GPU EXTREME - GPU EXTREEM - - - - GPU ERROR - GPU FOUT - - - - DOCKED - DOCKED - - - - HANDHELD - HANDHELD - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - NEAREST - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BICUBIC - - - - GAUSSIAN - GAUSSIAN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA GEEN AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE VOLUME: GEDEMPT - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Bevestig Sleutelherhaling - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5583,37 +5622,37 @@ en maak eventueel back-ups. Dit zal je automatisch gegenereerde sleutelbestanden verwijderen en de sleutelafleidingsmodule opnieuw uitvoeren. - + Missing fuses Missing fuses - + - Missing BOOT0 - BOOT0 Ontbreekt - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main Ontbreekt - + - Missing PRODINFO - PRODINFO Ontbreekt - + Derivation Components Missing Afleidingscomponenten ontbreken - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Encryptiesleutels ontbreken. <br>Volg <a href='https://yuzu-emu.org/help/quickstart/'>de yuzu-snelstartgids</a> om al je sleutels, firmware en spellen te krijgen.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5622,49 +5661,49 @@ Dit kan tot een minuut duren, afhankelijk van de prestaties van je systeem. - + Deriving Keys Sleutels Afleiden - + System Archive Decryption Failed Decryptie van Systeemarchief Mislukt - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Encryptiesleutels zijn mislukt om firmware te decoderen. <br>Volg <a href='https://yuzu-emu.org/help/quickstart/'>de yuzu-snelstartgids</a> om al je sleutels, firmware en games te krijgen. - + Select RomFS Dump Target Selecteer RomFS-dumpdoel - + Please select which RomFS you would like to dump. Selecteer welke RomFS je zou willen dumpen. - + Are you sure you want to close yuzu? Weet je zeker dat je yuzu wilt sluiten? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Weet je zeker dat je de emulatie wilt stoppen? Alle niet opgeslagen voortgang zal verloren gaan. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5672,48 +5711,143 @@ Would you like to bypass this and exit anyway? Wil je toch afsluiten? + + + None + Geen + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bicubic + + + + Gaussian + Gaussian + + + + ScaleForce + ScaleForce + + + + Docked + Docked + + + + Handheld + Handheld + + + + Normal + Normaal + + + + High + Hoog + + + + Extreme + Extreem + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + Nul + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL niet beschikbaar! - + OpenGL shared contexts are not supported. OpenGL gedeelde contexten worden niet ondersteund. - + yuzu has not been compiled with OpenGL support. yuzu is niet gecompileerd met OpenGL-ondersteuning. - - + + Error while initializing OpenGL! Fout tijdens het initialiseren van OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Je GPU ondersteunt mogelijk geen OpenGL, of je hebt niet de laatste grafische stuurprogramma. - + Error while initializing OpenGL 4.6! Fout tijdens het initialiseren van OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Je GPU ondersteunt mogelijk OpenGL 4.6 niet, of je hebt niet het laatste grafische stuurprogramma.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Je GPU ondersteunt mogelijk een of meer vereiste OpenGL-extensies niet. Zorg ervoor dat je het laatste grafische stuurprogramma hebt.<br><br>GL Renderer:<br>%1<br><br>Ondersteunde extensies:<br>%2 @@ -5773,7 +5907,7 @@ Wil je toch afsluiten? Remove Cache Storage - + Cache-opslag verwijderen @@ -6067,138 +6201,138 @@ Debug-bericht: Hotkeys - + Audio Mute/Unmute Audio Dempen/Dempen Opheffen - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Hoofdvenster - + Audio Volume Down Audiovolume Omlaag - + Audio Volume Up Audiovolume Omhoog - + Capture Screenshot Leg Schermafbeelding Vast - + Change Adapting Filter Wijzig Aanpassingsfilter - + Change Docked Mode Wijzig Docked-modus - + Change GPU Accuracy Wijzig GPU-nauwkeurigheid - + Continue/Pause Emulation Emulatie Doorgaan/Onderbreken - + Exit Fullscreen Volledig Scherm Afsluiten - + Exit yuzu yuzu afsluiten - + Fullscreen Volledig Scherm - + Load File Laad Bestand - + Load/Remove Amiibo Laad/Verwijder Amiibo - + Restart Emulation Herstart Emulatie - + Stop Emulation Stop Emulatie - + TAS Record TAS Opname - + TAS Reset TAS Reset - + TAS Start/Stop TAS Start/Stop - + Toggle Filter Bar Schakel Filterbalk - + Toggle Framerate Limit Schakel Frameratelimiet - + Toggle Mouse Panning Schakel Muispanning - + Toggle Status Bar Schakel Statusbalk @@ -6941,30 +7075,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [niet aangegeven] @@ -6975,14 +7109,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Axis %1%2 @@ -6993,320 +7127,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [onbekend] - - + + Left Links - - + + Right Rechts - - + + Down Omlaag - - + + Up Omhoog - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Cirkel - + Cross Kruis - + Square Vierkant - + Triangle Driehoek - + Share Deel - + Options Opties - + [undefined] [ongedefinieerd] - + %1%2 %1%2 - - + + [invalid] [ongeldig] - - + + %1%2Hat %3 %1%2Hat %3 - - + - + + %1%2Axis %3 %1%2As %3 - - + + %1%2Axis %3,%4,%5 %1%2As %3,%4,%5 - - + + %1%2Motion %3 %1%2Beweging %3 - - + + %1%2Button %3 %1%2Knop %3 - - + + [unused] [ongebruikt] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Stick L - + Stick R Stick R - + Plus Plus - + Minus Min - - + + Home Home - + Capture Vastleggen - + Touch Touch - + Wheel Indicates the mouse wheel Wiel - + Backward Achteruit - + Forward Vooruit - + Task Taak - + Extra Extra - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3Hat %4 - - + + %1%2%3Axis %4 %1%2%3As %4 - - + + %1%2%3Button %4 %1%2%3Knop %4 diff --git a/dist/languages/pl.ts b/dist/languages/pl.ts index 19132bf95..2ee8cef47 100644 --- a/dist/languages/pl.ts +++ b/dist/languages/pl.ts @@ -381,17 +381,17 @@ To zbanuje jego/jej nick na forum, oraz jego/jej adres IP. Output Device: - + Urządzenie wyjściowe: Input Device: - + Urządzenie wejściowe: Sound Output Mode: - + Tryb wyjścia dźwięku: @@ -1131,78 +1131,78 @@ Gdy ta opcja jest włączona, niedopasowanie jest uruchamiane tylko wtedy, gdy d Ustawienia yuzu - - + + Audio Dźwięk - - + + CPU CPU - + Debug Wyszukiwanie usterek - + Filesystem System plików - - + + General Ogólne - - + + Graphics Grafika - + GraphicsAdvanced Zaawansowana grafika - + Hotkeys Skróty klawiszowe - - + + Controls Sterowanie - + Profiles Profile - + Network Sieć - - + + System System - + Game List Lista Gier - + Web Web @@ -1396,17 +1396,22 @@ Gdy ta opcja jest włączona, niedopasowanie jest uruchamiane tylko wtedy, gdy d Ukryj mysz przy braku aktywności - + + Disable controller applet + + + + Reset All Settings Resetuj wszystkie ustawienia - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Spowoduje to zresetowanie wszystkich ustawień i usunięcie wszystkich konfiguracji gier. Nie spowoduje to usunięcia katalogów gier, profili ani profili wejściowych. Kontynuować? @@ -1472,7 +1477,7 @@ Gdy ta opcja jest włączona, niedopasowanie jest uruchamiane tylko wtedy, gdy d VSync Mode: - + Tryb synchronizacji pionowej: @@ -1570,7 +1575,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib 1.5X (1080p/1620p) [EXPERIMENTAL] - + 1.5X (1080p/1620p) [Ekperymentalnie] @@ -1600,12 +1605,12 @@ Immediate (no synchronization) just presents whatever is available and can exhib 7X (5040p/7560p) - + 7X (5040p/7560p) 8X (5760p/8640p) - + 8X (5760p/8640p) @@ -1640,7 +1645,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib AMD FidelityFX™️ Super Resolution - + AMD FidelityFX™️ Super Resolution @@ -1694,45 +1699,45 @@ Immediate (no synchronization) just presents whatever is available and can exhib Kolor tła - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Zgromadzone Shadery, tylko NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Eksperymentalne, Tylko Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + Wyłączone + + + + VSync Off + VSync wyłączony + + + + Recommended + Zalecane - VSync Off - - - - - Recommended - - - - On - + Włączone - + VSync On - + VSync aktywny @@ -1760,22 +1765,22 @@ Immediate (no synchronization) just presents whatever is available and can exhib ASTC recompression: - + Rekompresja ASTC: Uncompressed (Best quality) - + Brak (najlepsza jakość) BC1 (Low quality) - + BC1 (niska jakość) BC3 (Medium quality) - + BC3 (średnia jakość) @@ -1800,7 +1805,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib Decode ASTC textures asynchronously (Hack) - + Dekoduj tekstury ASTC asynchronicznie (Hack) @@ -1854,37 +1859,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Filtrowanie anizotropowe: - + Automatic Automatyczne - + Default Domyślne - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2267,7 +2292,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Konfiguruj @@ -2334,22 +2359,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Włącz panoramowanie myszą - - - - Mouse sensitivity - Czułość myszy - - - - % - % - - - + Motion / Touch Ruch / Dotyk @@ -2461,7 +2471,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Lewa gałka @@ -2555,14 +2565,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2581,7 +2591,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Plus @@ -2594,15 +2604,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2659,247 +2669,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Prawa gałka - - - - + + Mouse panning + + + + + Configure + Konfiguruj + + + + + + Clear Wyczyść - - - - - + + + + + [not set] [nie ustawione] - - - + + + Invert button Odwróć przycisk - - + + Toggle button Przycisk Toggle - + Turbo button - + Przycisk TURBO - - + + Invert axis Odwróć oś - - - + + + Set threshold Ustaw próg - - + + Choose a value between 0% and 100% Wybierz wartość od 0% do 100% - + Toggle axis Przełącz oś - + Set gyro threshold Ustaw próg gyro - + Calibrate sensor - + Kalibracja sensora - + Map Analog Stick Przypisz Drążek Analogowy - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Po naciśnięciu OK, najpierw przesuń joystick w poziomie, a następnie w pionie. Aby odwrócić osie, najpierw przesuń joystick pionowo, a następnie poziomo. - + Center axis Środkowa oś - - + + Deadzone: %1% Martwa strefa: %1% - - + + Modifier Range: %1% Zasięg Modyfikatora: %1% - - + + Pro Controller Pro Controller - + Dual Joycons Para Joyconów - + Left Joycon Lewy Joycon - + Right Joycon Prawy Joycon - + Handheld Handheld - + GameCube Controller Kontroler GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Kontroler NES/Pegasus - + SNES Controller Kontroler SNES - + N64 Controller Kontroler N64 - + Sega Genesis Sega Mega Drive - + Start / Pause Start / Pauza - + Z Z - + Control Stick Lewa gałka - + C-Stick C-gałka - + Shake! Potrząśnij! - + [waiting] [oczekiwanie] - + New Profile Nowy profil - + Enter a profile name: Wpisz nazwę profilu: - - + + Create Input Profile Utwórz profil wejściowy - + The given profile name is not valid! Podana nazwa profilu jest nieprawidłowa! - + Failed to create the input profile "%1" Nie udało się utworzyć profilu wejściowego "%1" - + Delete Input Profile Usuń profil wejściowy - + Failed to delete the input profile "%1" Nie udało się usunąć profilu wejściowego "%1" - + Load Input Profile Załaduj profil wejściowy - + Failed to load the input profile "%1" Nie udało się wczytać profilu wejściowego "%1" - + Save Input Profile Zapisz profil wejściowy - + Failed to save the input profile "%1" Nie udało się zapisać profilu wejściowego "%1" @@ -3078,6 +3098,81 @@ Aby odwrócić osie, najpierw przesuń joystick pionowo, a następnie poziomo.Trwa konfiguracja testu UDP lub kalibracji.<br>Poczekaj na zakończenie. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Domyślny + + ConfigureNetwork @@ -3154,47 +3249,47 @@ Aby odwrócić osie, najpierw przesuń joystick pionowo, a następnie poziomo.Deweloper - + Add-Ons Dodatki - + General Ogólne - + System System - + CPU CPU - + Graphics Grafika - + Adv. Graphics Zaaw. Grafika - + Audio Dźwięk - + Input Profiles Profil wejściowy - + Properties Właściwości @@ -3397,8 +3492,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Jeżeli zamierzasz używać tego kontrolera, skonfiguruj Gracza 1 jako prawy kontroler oraz Gracza 2 jako podwójnego JoyCona przed uruchomieniem gry aby zezwolić temu kontrolerowi na jego poprawne wykrycie. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3434,7 +3529,7 @@ UUID: %2 - + Enable @@ -3447,7 +3542,7 @@ UUID: %2 Not connected - + Niepodłączony @@ -3501,12 +3596,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [oczekiwanie] @@ -4616,561 +4716,576 @@ Przeciągnij punkty, aby zmienić pozycję, lub kliknij dwukrotnie komórki tabe GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dane anonimowe są gromadzone</a> aby ulepszyć yuzu. <br/><br/>Czy chcesz udostępnić nam swoje dane o użytkowaniu? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Wykryto uszkodzoną instalację Vulkana - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Inicjalizacja Vulkana nie powiodła się podczas uruchamiania.<br><br>Kliknij<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>tutaj aby uzyskać instrukcje dotyczące rozwiązania tego problemu</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Ładowanie apletu internetowego... - - + + Disable Web Applet Wyłącz Aplet internetowy - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Wyłączanie web appletu może doprowadzić do nieokreślonych zachowań - wyłączyć applet należy jedynie grając w Super Mario 3D All-Stars. Na pewno chcesz wyłączyć web applet? (Można go ponownie włączyć w ustawieniach debug.) - + The amount of shaders currently being built Ilość budowanych shaderów - + The current selected resolution scaling multiplier. Obecnie wybrany mnożnik rozdzielczości. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Aktualna prędkość emulacji. Wartości większe lub niższe niż 100% wskazują, że emulacja działa szybciej lub wolniej niż Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Ile klatek na sekundę gra aktualnie wyświetla. To będzie się różnić w zależności od gry, od sceny do sceny. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Czas potrzebny do emulacji klatki na sekundę Switcha, nie licząc ograniczania klatek ani v-sync. Dla emulacji pełnej szybkości powinno to wynosić co najwyżej 16,67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files &Usuń Ostatnie pliki - + Emulated mouse is enabled - + Emulacja myszki jest aktywna - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Kontynuuj - + &Pause &Pauza - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu jest w trakcie gry - - - + Warning Outdated Game Format OSTRZEŻENIE! Nieaktualny format gry - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Używasz zdekonstruowanego formatu katalogu ROM dla tej gry, który jest przestarzałym formatem, który został zastąpiony przez inne, takie jak NCA, NAX, XCI lub NSP. W zdekonstruowanych katalogach ROM brakuje ikon, metadanych i obsługi aktualizacji.<br><br> Aby znaleźć wyjaśnienie różnych formatów Switch obsługiwanych przez yuzu,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'> sprawdź nasze wiki</a>. Ta wiadomość nie pojawi się ponownie. - - + + Error while loading ROM! Błąd podczas wczytywania ROMu! - + The ROM format is not supported. Ten format ROMu nie jest wspierany. - + An error occurred initializing the video core. Wystąpił błąd podczas inicjowania rdzenia wideo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu napotkał błąd podczas uruchamiania rdzenia wideo. Jest to zwykle spowodowane przestarzałymi sterownikami GPU, w tym zintegrowanymi. Więcej szczegółów znajdziesz w pliku log. Więcej informacji na temat dostępu do log-u można znaleźć na następującej stronie: <a href='https://yuzu-emu.org/help/reference/log-files/'>Jak przesłać plik log</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Błąd podczas wczytywania ROMu! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Postępuj zgodnie z<a href='https://yuzu-emu.org/help/quickstart/'>yuzu quickstart guide</a> aby zrzucić ponownie swoje pliki.<br>Możesz odwołać się do wiki yuzu</a>lub discord yuzu </a> po pomoc. - + An unknown error occurred. Please see the log for more details. Wystąpił nieznany błąd. Więcej informacji można znaleźć w pliku log. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Zamykanie aplikacji... - + Save Data Zapis danych - + Mod Data Dane modów - + Error Opening %1 Folder Błąd podczas otwarcia folderu %1 - - + + Folder does not exist! Folder nie istnieje! - + Error Opening Transferable Shader Cache Błąd podczas otwierania przenośnej pamięci podręcznej Shaderów. - + Failed to create the shader cache directory for this title. Nie udało się stworzyć ścieżki shaderów dla tego tytułu. - + Error Removing Contents Błąd podczas usuwania zawartości - + Error Removing Update Błąd podczas usuwania aktualizacji - + Error Removing DLC Błąd podczas usuwania dodatków - + Remove Installed Game Contents? Czy usunąć zainstalowaną zawartość gry? - + Remove Installed Game Update? Czy usunąć zainstalowaną aktualizację gry? - + Remove Installed Game DLC? Czy usunąć zainstalowane dodatki gry? - + Remove Entry Usuń wpis - - - - - - + + + + + + Successfully Removed Pomyślnie usunięto - + Successfully removed the installed base game. Pomyślnie usunięto zainstalowaną grę. - + The base game is not installed in the NAND and cannot be removed. Gra nie jest zainstalowana w NAND i nie może zostać usunięta. - + Successfully removed the installed update. Pomyślnie usunięto zainstalowaną łatkę. - + There is no update installed for this title. Brak zainstalowanych łatek dla tego tytułu. - + There are no DLC installed for this title. Brak zainstalowanych DLC dla tego tytułu. - + Successfully removed %1 installed DLC. Pomyślnie usunięto %1 zainstalowane DLC. - + Delete OpenGL Transferable Shader Cache? Usunąć Transferowalne Shadery OpenGL? - + Delete Vulkan Transferable Shader Cache? Usunąć Transferowalne Shadery Vulkan? - + Delete All Transferable Shader Caches? Usunąć Wszystkie Transferowalne Shadery? - + Remove Custom Game Configuration? Usunąć niestandardową konfigurację gry? - + Remove Cache Storage? - + Usunąć pamięć podręczną? - + Remove File Usuń plik - - + + Error Removing Transferable Shader Cache Błąd podczas usuwania przenośnej pamięci podręcznej Shaderów. - - + + A shader cache for this title does not exist. Pamięć podręczna Shaderów dla tego tytułu nie istnieje. - + Successfully removed the transferable shader cache. Pomyślnie usunięto przenośną pamięć podręczną Shaderów. - + Failed to remove the transferable shader cache. Nie udało się usunąć przenośnej pamięci Shaderów. - + Error Removing Vulkan Driver Pipeline Cache Błąd podczas usuwania pamięci podręcznej strumienia sterownika Vulkana - + Failed to remove the driver pipeline cache. Błąd podczas usuwania pamięci podręcznej strumienia sterownika. - - + + Error Removing Transferable Shader Caches Błąd podczas usuwania Transferowalnych Shaderów - + Successfully removed the transferable shader caches. Pomyślnie usunięto transferowalne shadery. - + Failed to remove the transferable shader cache directory. Nie udało się usunąć ścieżki transferowalnych shaderów. - - + + Error Removing Custom Configuration Błąd podczas usuwania niestandardowej konfiguracji - + A custom configuration for this title does not exist. Niestandardowa konfiguracja nie istnieje dla tego tytułu. - + Successfully removed the custom game configuration. Pomyślnie usunięto niestandardową konfiguracje gry. - + Failed to remove the custom game configuration. Nie udało się usunąć niestandardowej konfiguracji gry. - - + + RomFS Extraction Failed! Wypakowanie RomFS nieudane! - + There was an error copying the RomFS files or the user cancelled the operation. Wystąpił błąd podczas kopiowania plików RomFS lub użytkownik anulował operację. - + Full Pełny - + Skeleton Szkielet - + Select RomFS Dump Mode Wybierz tryb zrzutu RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Proszę wybrać w jaki sposób chcesz, aby zrzut pliku RomFS został wykonany. <br>Pełna kopia ze wszystkimi plikami do nowego folderu, gdy <br>skielet utworzy tylko strukturę folderu. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Nie ma wystarczająco miejsca w %1 aby wyodrębnić RomFS. Zwolnij trochę miejsca, albo zmień ścieżkę zrzutu RomFs w Emulacja> Konfiguruj> System> System Plików> Źródło Zrzutu - + Extracting RomFS... Wypakowywanie RomFS... - - + + Cancel Anuluj - + RomFS Extraction Succeeded! Wypakowanie RomFS zakończone pomyślnie! - + The operation completed successfully. Operacja zakończona sukcesem. - - - - - + + + + + Create Shortcut Utwórz skrót - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Utworzy to skrót do obecnego AppImage. Może nie działać dobrze po aktualizacji. Kontynuować? - + Cannot create shortcut on desktop. Path "%1" does not exist. Nie można utworzyć skrótu na pulpicie. Ścieżka "%1" nie istnieje. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Nie można utworzyć skrótu w menu aplikacji. Ścieżka "%1" nie istnieje oraz nie może być utworzona. - + Create Icon Utwórz ikonę - + Cannot create icon file. Path "%1" does not exist and cannot be created. Nie można utworzyć pliku ikony. Ścieżka "%1" nie istnieje oraz nie może być utworzona. - + Start %1 with the yuzu Emulator Włącz %1 z emulatorem yuzu - + Failed to create a shortcut at %1 Nie udało się utworzyć skrótu pod %1 - + Successfully created a shortcut to %1 Pomyślnie utworzono skrót do %1 - + Error Opening %1 Błąd podczas otwierania %1 - + Select Directory Wybierz folder... - + Properties Właściwości - + The game properties could not be loaded. Właściwości tej gry nie mogły zostać załadowane. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Plik wykonywalny Switcha (%1);;Wszystkie pliki (*.*) - + Load File Załaduj plik... - + Open Extracted ROM Directory Otwórz folder wypakowanego ROMu - + Invalid Directory Selected Wybrano niewłaściwy folder - + The directory you have selected does not contain a 'main' file. Folder wybrany przez ciebie nie zawiera 'głownego' pliku. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Instalacyjne pliki Switch'a (*.nca *.nsp *.xci);;Archiwum zawartości Nintendo (*.nca);;Pakiet poddany Nintendo (*.nsp);;Obraz z kartridża NX (*.xci) - + Install Files Zainstaluj pliki - + %n file(s) remaining 1 plik został%n plików zostało%n plików zostało%n plików zostało - + Installing file "%1"... Instalowanie pliku "%1"... - - + + Install Results Wynik instalacji - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Aby uniknąć ewentualnych konfliktów, odradzamy użytkownikom instalowanie gier na NAND. Proszę, używaj tej funkcji tylko do instalowania łatek i DLC. - + %n file(s) were newly installed 1 nowy plik został zainstalowany @@ -5180,400 +5295,324 @@ Proszę, używaj tej funkcji tylko do instalowania łatek i DLC. - + %n file(s) were overwritten 1 plik został nadpisany%n plików zostało nadpisane%n plików zostało nadpisane%n plików zostało nadpisane - + %n file(s) failed to install 1 pliku nie udało się zainstalować%n plików nie udało się zainstalować%n plików nie udało się zainstalować%n plików nie udało się zainstalować - + System Application Aplikacja systemowa - + System Archive Archiwum systemu - + System Application Update Aktualizacja aplikacji systemowej - + Firmware Package (Type A) Paczka systemowa (Typ A) - + Firmware Package (Type B) Paczka systemowa (Typ B) - + Game Gra - + Game Update Aktualizacja gry - + Game DLC Dodatek do gry - + Delta Title Tytuł Delta - + Select NCA Install Type... Wybierz typ instalacji NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Wybierz typ tytułu, do którego chcesz zainstalować ten NCA, jako: (W większości przypadków domyślna "gra" jest w porządku.) - + Failed to Install Instalacja nieudana - + The title type you selected for the NCA is invalid. Typ tytułu wybrany dla NCA jest nieprawidłowy. - + File not found Nie znaleziono pliku - + File "%1" not found Nie znaleziono pliku "%1" - + OK OK - - + + Hardware requirements not met Wymagania sprzętowe nie są spełnione - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Twój system nie spełnia rekomendowanych wymagań sprzętowych. Raportowanie kompatybilności zostało wyłączone. - + Missing yuzu Account Brakuje konta Yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Aby przesłać test zgodności gry, musisz połączyć swoje konto yuzu.<br><br/> Aby połączyć swoje konto yuzu, przejdź do opcji Emulacja &gt; Konfiguracja &gt; Sieć. - + Error opening URL Błąd otwierania adresu URL - + Unable to open the URL "%1". Nie można otworzyć adresu URL "%1". - + TAS Recording Nagrywanie TAS - + Overwrite file of player 1? Nadpisać plik gracza 1? - + Invalid config detected Wykryto nieprawidłową konfigurację - + Handheld controller can't be used on docked mode. Pro controller will be selected. Nie można używać kontrolera handheld w trybie zadokowanym. Zostanie wybrany kontroler Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Amiibo zostało "zdjęte" - + Error Błąd - - + + The current game is not looking for amiibos Ta gra nie szuka amiibo - + Amiibo File (%1);; All Files (*.*) Plik Amiibo (%1);;Wszyskie pliki (*.*) - + Load Amiibo Załaduj Amiibo - + Error loading Amiibo data Błąd podczas ładowania pliku danych Amiibo - + The selected file is not a valid amiibo Wybrany plik nie jest poprawnym amiibo - + The selected file is already on use Wybrany plik jest już w użyciu - + An unknown error occurred Wystąpił nieznany błąd - + Capture Screenshot Zrób zrzut ekranu - + PNG Image (*.png) Obrazek PNG (*.png) - + TAS state: Running %1/%2 Status TAS: Działa %1%2 - + TAS state: Recording %1 Status TAS: Nagrywa %1 - + TAS state: Idle %1/%2 Status TAS: Bezczynny %1%2 - + TAS State: Invalid Status TAS: Niepoprawny - + &Stop Running &Wyłącz - + &Start &Start - + Stop R&ecording Przestań N&agrywać - + R&ecord N&agraj - + Building: %n shader(s) Budowanie shaderaBudowanie: %n shaderówBudowanie: %n shaderówBudowanie: %n shaderów - + Scale: %1x %1 is the resolution scaling factor Skala: %1x - + Speed: %1% / %2% Prędkość: %1% / %2% - + Speed: %1% Prędkość: %1% - + Game: %1 FPS (Unlocked) Gra: %1 FPS (Odblokowane) - + Game: %1 FPS Gra: %1 FPS - + Frame: %1 ms Klatka: %1 ms - - GPU NORMAL - GPU NORMALNE + + %1 %2 + %1 %2 - - GPU HIGH - GPU WYSOKIE - - - - GPU EXTREME - GPU EKSTREMALNE - - - - GPU ERROR - BŁĄD GPU - - - - DOCKED - TRYB ZADOKOWANY - - - - HANDHELD - TRYB PRZENOŚNY - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - Zero - - - - NEAREST - NAJBLIŻSZY - - - - - BILINEAR - BILINEARNY - - - - BICUBIC - BIKUBICZNY - - - - GAUSSIAN - GAUSSIAN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA BEZ AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE - + Głośność: Wyciszony - + VOLUME: %1% Volume percentage (e.g. 50%) - + Głośność: %1% - + Confirm Key Rederivation Potwierdź ponowną aktywacje klucza - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5590,37 +5629,37 @@ i opcjonalnie tworzyć kopie zapasowe. Spowoduje to usunięcie wygenerowanych automatycznie plików kluczy i ponowne uruchomienie modułu pochodnego klucza. - + Missing fuses Brakujące bezpieczniki - + - Missing BOOT0 - Brak BOOT0 - + - Missing BCPKG2-1-Normal-Main - Brak BCPKG2-1-Normal-Main - + - Missing PRODINFO - Brak PRODINFO - + Derivation Components Missing Brak komponentów wyprowadzania - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Brakuje elementów, które mogą uniemożliwić zakończenie wyprowadzania kluczy. <br>Postępuj zgodnie z <a href='https://yuzu-emu.org/help/quickstart/'>yuzu quickstart guide</a> aby zdobyć wszystkie swoje klucze i gry.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5629,49 +5668,49 @@ Zależnie od tego może potrwać do minuty na wydajność twojego systemu. - + Deriving Keys Wyprowadzanie kluczy... - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Wybierz cel zrzutu RomFS - + Please select which RomFS you would like to dump. Proszę wybrać RomFS, jakie chcesz zrzucić. - + Are you sure you want to close yuzu? Czy na pewno chcesz zamknąć yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Czy na pewno chcesz zatrzymać emulację? Wszystkie niezapisane postępy zostaną utracone. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5679,48 +5718,143 @@ Would you like to bypass this and exit anyway? Czy chcesz to ominąć i mimo to wyjść? + + + None + Żadna (wyłączony) + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinearny + + + + Bicubic + Bikubiczny + + + + Gaussian + Kulisty + + + + ScaleForce + ScaleForce + + + + Docked + Zadokowany + + + + Handheld + Przenośnie + + + + Normal + Normalny + + + + High + Wysoki + + + + Extreme + + + + + Vulkan + Vulkan + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL niedostępny! - + OpenGL shared contexts are not supported. Współdzielone konteksty OpenGL nie są obsługiwane. - + yuzu has not been compiled with OpenGL support. yuzu nie zostało skompilowane z obsługą OpenGL. - - + + Error while initializing OpenGL! Błąd podczas inicjowania OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Twoja karta graficzna może nie obsługiwać OpenGL lub nie masz najnowszych sterowników karty graficznej. - + Error while initializing OpenGL 4.6! Błąd podczas inicjowania OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Twoja karta graficzna może nie obsługiwać OpenGL 4.6 lub nie masz najnowszych sterowników karty graficznej.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Twoja karta graficzna może nie obsługiwać co najmniej jednego wymaganego rozszerzenia OpenGL. Upewnij się, że masz najnowsze sterowniki karty graficznej<br><br>GL Renderer:<br>%1<br><br>Nieobsługiwane rozszerzenia:<br>%2 @@ -5780,7 +5914,7 @@ Czy chcesz to ominąć i mimo to wyjść? Remove Cache Storage - + Usuń pamięć podręczną @@ -6074,138 +6208,138 @@ Komunikat debugowania: Hotkeys - + Audio Mute/Unmute Wycisz/Odcisz Audio - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Okno główne - + Audio Volume Down Zmniejsz głośność dźwięku - + Audio Volume Up Zwiększ głośność dźwięku - + Capture Screenshot Zrób zrzut ekranu - + Change Adapting Filter Zmień filtr adaptacyjny - + Change Docked Mode Zmień tryb dokowania - + Change GPU Accuracy Zmień dokładność GPU - + Continue/Pause Emulation Kontynuuj/Zatrzymaj Emulację - + Exit Fullscreen Wyłącz Pełny Ekran - + Exit yuzu Wyjdź z yuzu - + Fullscreen Pełny ekran - + Load File Załaduj plik... - + Load/Remove Amiibo Załaduj/Usuń Amiibo - + Restart Emulation Zrestartuj Emulację - + Stop Emulation Zatrzymaj Emulację - + TAS Record Nagrywanie TAS - + TAS Reset Reset TAS - + TAS Start/Stop TAS Start/Stop - + Toggle Filter Bar Pokaż pasek filtrowania - + Toggle Framerate Limit Przełącz limit liczby klatek na sekundę - + Toggle Mouse Panning Włącz przesuwanie myszką - + Toggle Status Bar Przełącz pasek stanu @@ -6948,30 +7082,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [nie ustawione] @@ -6982,14 +7116,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Oś %1%2 @@ -7000,322 +7134,322 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [nieznane] - - + + Left Lewo - - + + Right Prawo - - + + Down Dół - - + + Up Góra - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Kółko - + Cross Krzyż - + Square Kwadrat - + Triangle Trójkąt - + Share Udostępnij - + Options Opcje - + [undefined] [niezdefiniowane] - + %1%2 %1%2 - - + + [invalid] [niepoprawne] - - + + %1%2Hat %3 %1%2Drążek %3 - - + - + + %1%2Axis %3 %1%2Oś %3 - - + + %1%2Axis %3,%4,%5 %1%2Oś %3,%4,%5 - - + + %1%2Motion %3 %1%2Ruch %3 - - + + %1%2Button %3 %1%2Przycisk %3 - - + + [unused] [nieużywane] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Lewa gałka - + Stick R - + Prawa gałka - + Plus Plus - + Minus Minus - - + + Home Home - + Capture Zrzut ekranu - + Touch Dotyk - + Wheel Indicates the mouse wheel Kółko - + Backward Do tyłu - + Forward Do przodu - + Task Zadanie - + Extra Dodatkowe - + %1%2%3%4 - + %1%2%3%4 - - + + %1%2%3Hat %4 - + %1%2%3Krzyżak %4 - - + + %1%2%3Axis %4 - + %1%2%3Oś %4 - - + + %1%2%3Button %4 - + %1%2%3Przycisk %4 @@ -7736,7 +7870,7 @@ Spróbuj ponownie lub skontaktuj się z twórcą oprogramowania. Profile Creator - + Kreator profilu @@ -7747,12 +7881,12 @@ Spróbuj ponownie lub skontaktuj się z twórcą oprogramowania. Profile Icon Editor - + Edytor ikony profilu Profile Nickname Editor - + Edytor ksywki profilowej diff --git a/dist/languages/pt_BR.ts b/dist/languages/pt_BR.ts index a81ba4c22..05545c04d 100644 --- a/dist/languages/pt_BR.ts +++ b/dist/languages/pt_BR.ts @@ -381,17 +381,17 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. Output Device: - + Dispositivo de Saída Input Device: - + Dispositivo de Entrada Sound Output Mode: - + Modo de saída de som @@ -1137,78 +1137,78 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.Configurações do yuzu - - + + Audio Áudio - - + + CPU CPU - + Debug Depuração - + Filesystem Sistema de arquivos - - + + General Geral - - + + Graphics Gráficos - + GraphicsAdvanced GráficosAvançado - + Hotkeys Teclas de atalho - - + + Controls Controles - + Profiles Perfis - + Network Rede - - + + System Sistema - + Game List Lista de jogos - + Web Rede @@ -1402,17 +1402,22 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.Esconder cursor do mouse quando em inatividade - + + Disable controller applet + + + + Reset All Settings Redefinir todas as configurações - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Isto restaura todas as configurações e exclui as configurações individuais de todos os jogos. As pastas de jogos, perfis de jogos e perfis de controles não serão excluídos. Deseja prosseguir? @@ -1478,7 +1483,7 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. VSync Mode: - + Modo de Sincronização vertical: @@ -1700,45 +1705,45 @@ Immediate (no synchronization) just presents whatever is available and can exhib Cor de fundo: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Shaders Assembly, apenas NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Experimental, Somente Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + Desligado + + + + VSync Off + Sincronização vertical desligada + + + + Recommended + Recomendado - VSync Off - - - - - Recommended - - - - On - + Ligado - + VSync On - + Sincronização vertical ligada @@ -1766,27 +1771,27 @@ Immediate (no synchronization) just presents whatever is available and can exhib ASTC recompression: - + Recompressão ASTC: Uncompressed (Best quality) - + Descompactado (Melhor qualidade) BC1 (Low quality) - + BC1 (Baixa qualidade) BC3 (Medium quality) - + BC3 (Média qualidade) Enable asynchronous presentation (Vulkan only) - + Ativar apresentação assíncrona (Somente Vulkan) @@ -1857,40 +1862,60 @@ Compute pipelines are always enabled on all other drivers. Enable Compute Pipelines (Intel Vulkan only) + Ativar Compute Pipelines (Intel Vulkan only) + + + + Run the game at normal speed during video playback, even when the framerate is unlocked. - + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Filtragem anisotrópica: - + Automatic Automático - + Default Padrão - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2273,7 +2298,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Configurar @@ -2332,30 +2357,15 @@ Compute pipelines are always enabled on all other drivers. Allows unlimited uses of the same Amiibo in games that would otherwise limit you to one use. - + Permite acesso ilimitado ao mesmo Amiibo que limitam o seu uso. Use random Amiibo ID - + Utilizar ID Amiibo aleatório - - Enable mouse panning - Ativar o giro do mouse - - - - Mouse sensitivity - Sensibilidade do mouse - - - - % - % - - - + Motion / Touch Movimento/toque @@ -2467,7 +2477,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Analógico esquerdo @@ -2561,14 +2571,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2587,7 +2597,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Mais @@ -2600,15 +2610,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2665,247 +2675,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Analógico direito - - - - + + Mouse panning + + + + + Configure + Configurar + + + + + + Clear Limpar - - - - - + + + + + [not set] [não definido] - - - + + + Invert button Inverter botão - - + + Toggle button Alternar pressionamento do botão - + Turbo button Botão Turbo - - + + Invert axis Inverter eixo - - - + + + Set threshold Definir limite - - + + Choose a value between 0% and 100% Escolha um valor entre 0% e 100% - + Toggle axis Alternar eixos - + Set gyro threshold Definir limite do giroscópio - + Calibrate sensor - + Calibrar sensor - + Map Analog Stick Mapear analógico - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Após pressionar OK, mova o seu direcional analógico primeiro horizontalmente e depois verticalmente. Para inverter os eixos, mova seu analógico primeiro verticalmente e depois horizontalmente. - + Center axis Eixo central - - + + Deadzone: %1% Zona morta: %1% - - + + Modifier Range: %1% Alcance de modificador: %1% - - + + Pro Controller Pro Controller - + Dual Joycons Par de Joycons - + Left Joycon Joycon Esquerdo - + Right Joycon Joycon Direito - + Handheld Portátil - + GameCube Controller Controle de GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Controle NES - + SNES Controller Controle SNES - + N64 Controller Controle N64 - + Sega Genesis Mega Drive - + Start / Pause Iniciar / Pausar - + Z Z - + Control Stick Direcional de controle - + C-Stick C-Stick - + Shake! Balance! - + [waiting] [esperando] - + New Profile Novo perfil - + Enter a profile name: Insira um nome para o perfil: - - + + Create Input Profile Criar perfil de controle - + The given profile name is not valid! O nome de perfil inserido não é válido! - + Failed to create the input profile "%1" Falha ao criar o perfil de controle "%1" - + Delete Input Profile Excluir perfil de controle - + Failed to delete the input profile "%1" Falha ao excluir o perfil de controle "%1" - + Load Input Profile Carregar perfil de controle - + Failed to load the input profile "%1" Falha ao carregar o perfil de controle "%1" - + Save Input Profile Salvar perfil de controle - + Failed to save the input profile "%1" Falha ao salvar o perfil de controle "%1" @@ -3084,6 +3104,81 @@ Para inverter os eixos, mova seu analógico primeiro verticalmente e depois hori Um teste UDP ou configuração de calibração está em curso no momento.<br>Aguarde até a sua conclusão. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Habilitar + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Padrão + + ConfigureNetwork @@ -3160,47 +3255,47 @@ Para inverter os eixos, mova seu analógico primeiro verticalmente e depois hori Desenvolvedor - + Add-Ons Adicionais - + General Geral - + System Sistema - + CPU CPU - + Graphics Gráficos - + Adv. Graphics Gráf. avançados - + Audio Áudio - + Input Profiles Perfis de controle - + Properties Propriedades @@ -3403,8 +3498,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Caso queira usar este controle, configure o jogador 1 como Joycon direito e o jogador 2 como par de Joycons antes de iniciar o jogo. Isso permitirá que o controle seja detectado corretamente. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3440,7 +3535,7 @@ UUID: %2 - + Enable Habilitar @@ -3507,12 +3602,17 @@ UUID: %2 O dispositivo mapeado não tem um anel conectado - + + The current mapped device is not connected + + + + Unexpected driver result %1 Resultado inesperado do driver %1 - + [waiting] [aguardando] @@ -3923,7 +4023,7 @@ UUID: %2 Unsafe extended memory layout (8GB DRAM) - + Layout de memória estendida inseguro (8GB DRAM) @@ -4622,560 +4722,575 @@ Mova os pontos para mudar a posição, ou clique duas vezes nas células da tabe GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dados anônimos são recolhidos</a> para ajudar a melhorar o yuzu. <br/><br/>Gostaria de compartilhar os seus dados de uso conosco? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Detectada Instalação Defeituosa do Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. A inicialização do Vulkan falhou durante a carga do programa. <br><br>Clique <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>aqui para instruções de como resolver o problema</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Carregando applet web... - - + + Disable Web Applet Desativar o applet da web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) A desativação do applet da web pode causar comportamento inesperado e deve apenas ser usada com Super Mario 3D All-Stars. Você deseja mesmo desativar o applet da web? (Ele pode ser reativado nas configurações de depuração.) - + The amount of shaders currently being built A quantidade de shaders sendo construídos - + The current selected resolution scaling multiplier. O atualmente multiplicador de escala de resolução selecionado. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocidade atual de emulação. Valores maiores ou menores que 100% indicam que a emulação está rodando mais rápida ou lentamente que em um Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Quantos quadros por segundo o jogo está exibindo atualmente. Isto irá variar de jogo para jogo e cena para cena. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tempo que leva para emular um quadro do Switch, sem considerar o limitador de taxa de quadros ou a sincronização vertical. Um valor menor ou igual a 16.67 ms indica que a emulação está em velocidade plena. - + + Unmute + Unmute + + + + Mute + Mute + + + + Reset Volume + Redefinir volume + + + &Clear Recent Files &Limpar arquivos recentes - + Emulated mouse is enabled Mouse emulado está habilitado - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Controle de mouse real e controle panorâmico do mouse são incompatíveis. Por favor desabilite a emulação do mouse em configurações avançadas de controles para permitir o controle panorâmico do mouse. - + &Continue &Continuar - + &Pause &Pausar - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu está rodando um jogo - - - + Warning Outdated Game Format Aviso - formato de jogo desatualizado - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Você está usando neste jogo o formato de ROM desconstruída e extraída em uma pasta, que é um formato desatualizado que foi substituído por outros, como NCA, NAX, XCI ou NSP. Pastas desconstruídas de ROMs não possuem ícones, metadados e suporte a atualizações.<br><br>Para saber mais sobre os vários formatos de ROMs de Switch compatíveis com o yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>confira a nossa wiki</a>. Esta mensagem não será exibida novamente. - - + + Error while loading ROM! Erro ao carregar a ROM! - + The ROM format is not supported. O formato da ROM não é suportado. - + An error occurred initializing the video core. Ocorreu um erro ao inicializar o núcleo de vídeo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu encontrou um erro enquanto rodando o núcleo de vídeo. Normalmente isto é causado por drivers de GPU desatualizados, incluindo integrados. Por favor veja o registro para mais detalhes. Para mais informações em acesso ao registro por favor veja a seguinte página: <a href='https://yuzu-emu.org/help/reference/log-files/'>Como fazer envio de arquivo de registro</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Erro ao carregar a ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>o guia de início rápido</a> para reextrair os seus arquivos.<br>Você pode consultar a wiki do yuzu</a> ou o Discord do yuzu</a> para obter ajuda. - + An unknown error occurred. Please see the log for more details. Ocorreu um erro desconhecido. Consulte o registro para mais detalhes. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Encerrando software... - + Save Data Dados de jogos salvos - + Mod Data Dados de mods - + Error Opening %1 Folder Erro ao abrir a pasta %1 - - + + Folder does not exist! A pasta não existe! - + Error Opening Transferable Shader Cache Erro ao abrir o cache de shaders transferível - + Failed to create the shader cache directory for this title. Falha ao criar o diretório de cache de shaders para este título. - + Error Removing Contents Erro ao Remover Conteúdos - + Error Removing Update Erro ao Remover Atualização - + Error Removing DLC Erro ao Remover DLC - + Remove Installed Game Contents? Remover Conteúdo Instalado do Jogo? - + Remove Installed Game Update? Remover Atualização Instalada do Jogo? - + Remove Installed Game DLC? Remover DLC Instalada do Jogo? - + Remove Entry Remover item - - - - - - + + + + + + Successfully Removed Removido com sucesso - + Successfully removed the installed base game. O jogo base foi removido com sucesso. - + The base game is not installed in the NAND and cannot be removed. O jogo base não está instalado na NAND e não pode ser removido. - + Successfully removed the installed update. A atualização instalada foi removida com sucesso. - + There is no update installed for this title. Não há nenhuma atualização instalada para este título. - + There are no DLC installed for this title. Não há nenhum DLC instalado para este título. - + Successfully removed %1 installed DLC. %1 DLC(s) instalados foram removidos com sucesso. - + Delete OpenGL Transferable Shader Cache? Apagar o cache de shaders transferível do OpenGL? - + Delete Vulkan Transferable Shader Cache? Apagar o cache de shaders transferível do Vulkan? - + Delete All Transferable Shader Caches? Apagar todos os caches de shaders transferíveis? - + Remove Custom Game Configuration? Remover configurações customizadas do jogo? - + Remove Cache Storage? - + Remover Armazenamento da Cache? - + Remove File Remover arquivo - - + + Error Removing Transferable Shader Cache Erro ao remover cache de shaders transferível - - + + A shader cache for this title does not exist. Não existe um cache de shaders para este título. - + Successfully removed the transferable shader cache. O cache de shaders transferível foi removido com sucesso. - + Failed to remove the transferable shader cache. Falha ao remover o cache de shaders transferível. - + Error Removing Vulkan Driver Pipeline Cache Erro ao Remover Cache de Pipeline do Driver Vulkan - + Failed to remove the driver pipeline cache. Falha ao remover o pipeline de cache do driver. - - + + Error Removing Transferable Shader Caches Erro ao remover os caches de shaders transferíveis - + Successfully removed the transferable shader caches. Os caches de shaders transferíveis foram removidos com sucesso. - + Failed to remove the transferable shader cache directory. Falha ao remover o diretório do cache de shaders transferível. - - + + Error Removing Custom Configuration Erro ao remover as configurações customizadas do jogo. - + A custom configuration for this title does not exist. Não há uma configuração customizada para este título. - + Successfully removed the custom game configuration. As configurações customizadas do jogo foram removidas com sucesso. - + Failed to remove the custom game configuration. Falha ao remover as configurações customizadas do jogo. - - + + RomFS Extraction Failed! Falha ao extrair RomFS! - + There was an error copying the RomFS files or the user cancelled the operation. Houve um erro ao copiar os arquivos RomFS ou o usuário cancelou a operação. - + Full Extração completa - + Skeleton Apenas estrutura - + Select RomFS Dump Mode Selecione o modo de extração do RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Selecione a forma como você gostaria que o RomFS seja extraído.<br>"Extração completa" copiará todos os arquivos para a nova pasta, enquanto que <br>"Apenas estrutura" criará apenas a estrutura de pastas. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Não há espaço suficiente em %1 para extrair o RomFS. Por favor abra espaço ou selecione um diretório diferente em Emulação > Configurar > Sistema > Sistema de arquivos > Extrair raiz - + Extracting RomFS... Extraindo RomFS... - - + + Cancel Cancelar - + RomFS Extraction Succeeded! Extração do RomFS concluida! - + The operation completed successfully. A operação foi concluída com sucesso. - - - - - + + + + + Create Shortcut Criar Atalho - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Isso irá criar um atalho para o AppImage atual. Isso pode não funcionar corretamente se você fizer uma atualização. Continuar? - + Cannot create shortcut on desktop. Path "%1" does not exist. Não foi possível criar um atalho na área de trabalho. O caminho "%1" não existe. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Não foi possível criar um atalho no menu de aplicativos. O caminho "%1" não existe e não pode ser criado. - + Create Icon Criar Ícone - + Cannot create icon file. Path "%1" does not exist and cannot be created. Não foi possível criar o arquivo de ícone. O caminho "%1" não existe e não pode ser criado. - + Start %1 with the yuzu Emulator Iniciar %1 com o Emulador yuzu - + Failed to create a shortcut at %1 Falha ao criar um atalho em %1 - + Successfully created a shortcut to %1 Atalho criado com sucesso em %1 - + Error Opening %1 Erro ao abrir %1 - + Select Directory Selecionar pasta - + Properties Propriedades - + The game properties could not be loaded. As propriedades do jogo não puderam ser carregadas. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Executável do Switch (%1);;Todos os arquivos (*.*) - + Load File Carregar arquivo - + Open Extracted ROM Directory Abrir pasta da ROM extraída - + Invalid Directory Selected Pasta inválida selecionada - + The directory you have selected does not contain a 'main' file. A pasta que você selecionou não contém um arquivo 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Arquivo de Switch instalável (*.nca *.nsp *.xci);; Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Instalar arquivos - + %n file(s) remaining %n arquivo restante%n arquivo(s) restante(s)%n arquivo(s) restante(s) - + Installing file "%1"... Instalando arquivo "%1"... - - + + Install Results Resultados da instalação - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Para evitar possíveis conflitos, desencorajamos que os usuários instalem os jogos base na NAND. Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + %n file(s) were newly installed %n arquivo(s) instalado(s) @@ -5184,7 +5299,7 @@ Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + %n file(s) were overwritten %n arquivo(s) sobrescrito(s) @@ -5193,7 +5308,7 @@ Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + %n file(s) failed to install %n arquivo(s) não instalado(s) @@ -5202,388 +5317,312 @@ Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + System Application Aplicativo do sistema - + System Archive Arquivo do sistema - + System Application Update Atualização de aplicativo do sistema - + Firmware Package (Type A) Pacote de firmware (tipo A) - + Firmware Package (Type B) Pacote de firmware (tipo B) - + Game Jogo - + Game Update Atualização de jogo - + Game DLC DLC de jogo - + Delta Title Título delta - + Select NCA Install Type... Selecione o tipo de instalação do NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Selecione o tipo de título como o qual você gostaria de instalar este NCA: (Na maioria dos casos, o padrão 'Jogo' serve bem.) - + Failed to Install Falha ao instalar - + The title type you selected for the NCA is invalid. O tipo de título que você selecionou para o NCA é inválido. - + File not found Arquivo não encontrado - + File "%1" not found Arquivo "%1" não encontrado - + OK OK - - + + Hardware requirements not met Requisitos de hardware não atendidos - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Seu sistema não atende os requisitos de harwdare. O relatório de compatibilidade foi desabilitado. - + Missing yuzu Account Conta do yuzu faltando - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Para enviar um caso de teste de compatibilidade de jogo, você precisa entrar com a sua conta do yuzu.<br><br/>Para isso, vá para Emulação &gt; Configurar... &gt; Rede. - + Error opening URL Erro ao abrir URL - + Unable to open the URL "%1". Não foi possível abrir o URL "%1". - + TAS Recording Gravando TAS - + Overwrite file of player 1? Sobrescrever arquivo do jogador 1? - + Invalid config detected Configuração inválida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. O controle portátil não pode ser usado no modo encaixado na base. O Pro Controller será selecionado. - - + + Amiibo Amiibo - - + + The current amiibo has been removed O amiibo atual foi removido - + Error Erro - - + + The current game is not looking for amiibos O jogo atual não está procurando amiibos - + Amiibo File (%1);; All Files (*.*) Arquivo Amiibo (%1);; Todos os arquivos (*.*) - + Load Amiibo Carregar Amiibo - + Error loading Amiibo data Erro ao carregar dados do Amiibo - + The selected file is not a valid amiibo O arquivo selecionado não é um amiibo válido - + The selected file is already on use O arquivo selecionado já está em uso - + An unknown error occurred Ocorreu um erro desconhecido - + Capture Screenshot Capturar tela - + PNG Image (*.png) Imagem PNG (*.png) - + TAS state: Running %1/%2 Situação TAS: Rodando %1%2 - + TAS state: Recording %1 Situação TAS: Gravando %1 - + TAS state: Idle %1/%2 Situação TAS: Repouso %1%2 - + TAS State: Invalid Situação TAS: Inválido - + &Stop Running &Parar de rodar - + &Start &Iniciar - + Stop R&ecording Parar G&ravação - + R&ecord G&ravação - + Building: %n shader(s) Compilando: %n shader(s)Compilando: %n shader(s)Compilando: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escala: %1x - + Speed: %1% / %2% Velocidade: %1% / %2% - + Speed: %1% Velocidade: %1% - + Game: %1 FPS (Unlocked) Jogo: %1 FPS (Desbloqueado) - + Game: %1 FPS Jogo: %1 FPS - + Frame: %1 ms Quadro: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU ALTA - - - - GPU EXTREME - GPU EXTREMA - - - - GPU ERROR - ERRO DE GPU - - - - DOCKED - ANCORADO - - - - HANDHELD - PORTÁTIL - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULO - - - - NEAREST - VIZINHO - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BICÚBICO - - - - GAUSSIAN - GAUSSIANO - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA Sem AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE VOLUME: MUDO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Confirmar rederivação de chave - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5600,37 +5639,37 @@ e opcionalmente faça cópias de segurança. Isto excluirá o seus arquivos de chaves geradas automaticamente, e reexecutar o módulo de derivação de chaves. - + Missing fuses Faltando fusíveis - + - Missing BOOT0 - Faltando BOOT0 - + - Missing BCPKG2-1-Normal-Main - Faltando BCPKG2-1-Normal-Main - + - Missing PRODINFO - Faltando PRODINFO - + Derivation Components Missing Faltando componentes de derivação - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Chaves de encriptação faltando. <br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>o guia de início rápido</a> para extrair suas chaves, firmware e jogos. <br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5639,49 +5678,49 @@ Isto pode demorar até um minuto, dependendo do desempenho do seu sistema. - + Deriving Keys Derivando chaves - + System Archive Decryption Failed - + Falha a desencriptar o arquivo do sistema - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Chaves de encriptação falharam a desencriptar o firmware. <br>Por favor segue <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> para obter todas as tuas chaves, firmware e jogos. - + Select RomFS Dump Target Selecionar alvo de extração do RomFS - + Please select which RomFS you would like to dump. Selecione qual RomFS você quer extrair. - + Are you sure you want to close yuzu? Você deseja mesmo fechar o yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Deseja mesmo parar a emulação? Qualquer progresso não salvo será perdido. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5689,48 +5728,143 @@ Would you like to bypass this and exit anyway? Deseja ignorar isso e sair mesmo assim? + + + None + Nenhum + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bicúbico + + + + Gaussian + Gaussiano + + + + ScaleForce + ScaleForce + + + + Docked + Na base + + + + Handheld + Portátil + + + + Normal + Normal + + + + High + Alto + + + + Extreme + + + + + Vulkan + Vulcano + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL não disponível! - + OpenGL shared contexts are not supported. Shared contexts do OpenGL não são suportados. - + yuzu has not been compiled with OpenGL support. O yuzu não foi compilado com suporte para OpenGL. - - + + Error while initializing OpenGL! Erro ao inicializar o OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Sua GPU pode não suportar OpenGL, ou você não possui o driver gráfico mais recente. - + Error while initializing OpenGL 4.6! Erro ao inicializar o OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Sua GPU pode não suportar o OpenGL 4.6, ou você não possui os drivers gráficos mais recentes.<br><br>Renderizador GL:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Sua GPU pode não suportar uma ou mais extensões necessárias do OpenGL. Verifique se você possui a última versão dos drivers gráficos.<br><br>Renderizador GL:<br>%1<br><br>Extensões não suportadas:<br>%2 @@ -5790,7 +5924,7 @@ Deseja ignorar isso e sair mesmo assim? Remove Cache Storage - + Remove a Cache do Armazenamento @@ -6084,138 +6218,138 @@ Mensagem de depuração: Hotkeys - + Audio Mute/Unmute Mutar/Desmutar Áudio - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Janela Principal - + Audio Volume Down Volume Menos - + Audio Volume Up Volume Mais - + Capture Screenshot Capturar Tela - + Change Adapting Filter Alterar Filtro de Adaptação - + Change Docked Mode Alterar Modo de Ancoragem - + Change GPU Accuracy Alterar Precisão da GPU - + Continue/Pause Emulation Continuar/Pausar Emulação - + Exit Fullscreen Sair da Tela Cheia - + Exit yuzu Sair do yuzu - + Fullscreen Tela Cheia - + Load File Carregar Arquivo - + Load/Remove Amiibo Carregar/Remover Amiibo - + Restart Emulation Reiniciar Emulação - + Stop Emulation Parar Emulação - + TAS Record Gravar TAS - + TAS Reset Reiniciar TAS - + TAS Start/Stop Iniciar/Parar TAS - + Toggle Filter Bar Alternar Barra de Filtro - + Toggle Framerate Limit Alternar Limite de Quadros por Segundo - + Toggle Mouse Panning Alternar o Giro do Mouse - + Toggle Status Bar Alternar Barra de Status @@ -6955,30 +7089,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [não definido] @@ -6989,14 +7123,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Eixo %1%2 @@ -7007,320 +7141,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [desconhecido] - - + + Left Esquerda - - + + Right Direita - - + + Down Baixo - - + + Up Cima - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Círculo - + Cross Cruz - + Square Quadrado - + Triangle Triângulo - + Share Compartilhar - + Options Opções - + [undefined] [indefinido] - + %1%2 %1%2 - - + + [invalid] [inválido] - - + + %1%2Hat %3 %1%2Direcional %3 - - + - + + %1%2Axis %3 %1%2Eixo %3 - - + + %1%2Axis %3,%4,%5 %1%2Eixo %3,%4,%5 - - + + %1%2Motion %3 %1%2Movimentação %3 - - + + %1%2Button %3 %1%2Botão %3 - - + + [unused] [não utilizado] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Mais - + Minus Menos - - + + Home Botão Home - + Capture Capturar - + Touch Toque - + Wheel Indicates the mouse wheel Volante - + Backward Para trás - + Forward Para a frente - + Task Tarefa - + Extra Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/pt_PT.ts b/dist/languages/pt_PT.ts index 0a526cb12..704ffa0c4 100644 --- a/dist/languages/pt_PT.ts +++ b/dist/languages/pt_PT.ts @@ -381,17 +381,17 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. Output Device: - + Dispositivo de Saída Input Device: - + Dispositivo de Entrada Sound Output Mode: - + Modo de saída de som @@ -1127,78 +1127,78 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.Configuração yuzu - - + + Audio Audio - - + + CPU CPU - + Debug Depurar - + Filesystem Sistema de Ficheiros - - + + General Geral - - + + Graphics Gráficos - + GraphicsAdvanced GráficosAvançados - + Hotkeys Teclas de Atalhos - - + + Controls Controlos - + Profiles Perfis - + Network Rede - - + + System Sistema - + Game List Lista de Jogos - + Web Rede @@ -1392,17 +1392,22 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.Esconder rato quando inactivo. - + + Disable controller applet + + + + Reset All Settings Restaurar todas as configurações - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Isto restaura todas as configurações e remove as configurações específicas de cada jogo. As pastas de jogos, perfis de jogos e perfis de controlo não serão removidos. Continuar? @@ -1468,7 +1473,7 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. VSync Mode: - + Modo de Sincronização vertical: @@ -1690,45 +1695,45 @@ Immediate (no synchronization) just presents whatever is available and can exhib Cor de fundo: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Shaders Assembly, apenas NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Experimental, Somente Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + Desligado + + + + VSync Off + Sincronização vertical desligada + + + + Recommended + Recomendado - VSync Off - - - - - Recommended - - - - On - + Ligado - + VSync On - + Sincronização vertical ligada @@ -1756,27 +1761,27 @@ Immediate (no synchronization) just presents whatever is available and can exhib ASTC recompression: - + Recompressão ASTC: Uncompressed (Best quality) - + Descompactado (Melhor Q BC1 (Low quality) - + BC1 (Baixa qualidade) BC3 (Medium quality) - + BC3 (Média qualidade) Enable asynchronous presentation (Vulkan only) - + Ativar apresentação assíncrona (Somente Vulkan) @@ -1847,40 +1852,60 @@ Compute pipelines are always enabled on all other drivers. Enable Compute Pipelines (Intel Vulkan only) + Ativar Compute Pipelines (Intel Vulkan only) + + + + Run the game at normal speed during video playback, even when the framerate is unlocked. - + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Filtro Anisotrópico: - + Automatic Automático - + Default Padrão - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2263,7 +2288,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Configurar @@ -2322,30 +2347,15 @@ Compute pipelines are always enabled on all other drivers. Allows unlimited uses of the same Amiibo in games that would otherwise limit you to one use. - + Permite acesso ilimitado ao mesmo Amiibo que limitam o seu uso. Use random Amiibo ID - + Utilizar ID Amiibo aleatório - - Enable mouse panning - Ativar o giro do mouse - - - - Mouse sensitivity - Sensibilidade do rato - - - - % - % - - - + Motion / Touch Movimento / Toque @@ -2457,7 +2467,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Analógico Esquerdo @@ -2551,14 +2561,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2577,7 +2587,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Mais @@ -2590,15 +2600,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2655,247 +2665,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Analógico Direito - - - - + + Mouse panning + + + + + Configure + Configurar + + + + + + Clear Limpar - - - - - + + + + + [not set] [não definido] - - - + + + Invert button Inverter botão - - + + Toggle button Alternar pressionamento do botão - + Turbo button Botão Turbo - - + + Invert axis Inverter eixo - - - + + + Set threshold Definir limite - - + + Choose a value between 0% and 100% Escolha um valor entre 0% e 100% - + Toggle axis Alternar eixos - + Set gyro threshold Definir limite do giroscópio - + Calibrate sensor - + Calibrar sensor - + Map Analog Stick Mapear analógicos - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Após pressionar OK, mova o seu analógico primeiro horizontalmente e depois verticalmente. Para inverter os eixos, mova o seu analógico primeiro verticalmente e depois horizontalmente. - + Center axis Eixo central - - + + Deadzone: %1% Ponto Morto: %1% - - + + Modifier Range: %1% Modificador de Alcance: %1% - - + + Pro Controller Comando Pro - + Dual Joycons Joycons Duplos - + Left Joycon Joycon Esquerdo - + Right Joycon Joycon Direito - + Handheld Portátil - + GameCube Controller Controlador de depuração - + Poke Ball Plus Poke Ball Plus - + NES Controller Controle NES - + SNES Controller Controle SNES - + N64 Controller Controle N64 - + Sega Genesis Mega Drive - + Start / Pause Iniciar / Pausar - + Z Z - + Control Stick Direcional de controle - + C-Stick C-Stick - + Shake! Abane! - + [waiting] [em espera] - + New Profile Novo Perfil - + Enter a profile name: Introduza um novo nome de perfil: - - + + Create Input Profile Criar perfil de controlo - + The given profile name is not valid! O nome de perfil dado não é válido! - + Failed to create the input profile "%1" Falha ao criar o perfil de controlo "%1" - + Delete Input Profile Apagar Perfil de Controlo - + Failed to delete the input profile "%1" Falha ao apagar o perfil de controlo "%1" - + Load Input Profile Carregar perfil de controlo - + Failed to load the input profile "%1" Falha ao carregar o perfil de controlo "%1" - + Save Input Profile Guardar perfil de controlo - + Failed to save the input profile "%1" Falha ao guardar o perfil de controlo "%1" @@ -3074,6 +3094,81 @@ Para inverter os eixos, mova o seu analógico primeiro verticalmente e depois ho Teste UDP ou configuração de calibragem em progresso.<br> Por favor espera que termine. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Habilitar + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Padrão + + ConfigureNetwork @@ -3150,47 +3245,47 @@ Para inverter os eixos, mova o seu analógico primeiro verticalmente e depois ho Desenvolvedor - + Add-Ons Add-Ons - + General Geral - + System Sistema - + CPU CPU - + Graphics Gráficos - + Adv. Graphics Gráficos Avç. - + Audio Audio - + Input Profiles Perfis de controle - + Properties Propriedades @@ -3393,8 +3488,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Caso queira usar este controle, configure o jogador 1 como Joycon direito e o jogador 2 como par de Joycons antes de iniciar o jogo. Isso permitirá que o controle seja detectado corretamente. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3430,7 +3525,7 @@ UUID: %2 - + Enable Habilitar @@ -3497,12 +3592,17 @@ UUID: %2 O dispositivo mapeado não tem um anel conectado - + + The current mapped device is not connected + + + + Unexpected driver result %1 Resultado inesperado do driver %1 - + [waiting] [em espera] @@ -3913,7 +4013,7 @@ UUID: %2 Unsafe extended memory layout (8GB DRAM) - + Layout de memória estendida inseguro (8GB DRAM) @@ -4612,959 +4712,898 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dados anônimos são coletados</a>para ajudar a melhorar o yuzu.<br/><br/>Gostaria de compartilhar seus dados de uso conosco? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Detectada Instalação Defeituosa do Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. A inicialização do Vulkan falhou durante a carga do programa. <br><br>Clique <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>aqui para instruções de como resolver o problema</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... A Carregar o Web Applet ... - - + + Disable Web Applet Desativar Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) A desativação do applet da web pode causar comportamento inesperado e deve apenas ser usada com Super Mario 3D All-Stars. Você deseja mesmo desativar o applet da web? (Ele pode ser reativado nas configurações de depuração.) - + The amount of shaders currently being built Quantidade de shaders a serem construídos - + The current selected resolution scaling multiplier. O atualmente multiplicador de escala de resolução selecionado. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocidade da emulação actual. Valores acima ou abaixo de 100% indicam que a emulação está sendo executada mais depressa ou mais devagar do que a Switch - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Quantos quadros por segundo o jogo está exibindo de momento. Isto irá variar de jogo para jogo e de cena para cena. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tempo gasto para emular um frame da Switch, sem contar o a limitação de quadros ou o v-sync. Para emulação de velocidade máxima, esta deve ser no máximo 16.67 ms. - + + Unmute + Unmute + + + + Mute + Mute + + + + Reset Volume + Redefinir volume + + + &Clear Recent Files &Limpar arquivos recentes - + Emulated mouse is enabled Mouse emulado está habilitado - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Controle de mouse real e controle panorâmico do mouse são incompatíveis. Por favor desabilite a emulação do mouse em configurações avançadas de controles para permitir o controle panorâmico do mouse. - + &Continue &Continuar - + &Pause &Pausa - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu está rodando um jogo - - - + Warning Outdated Game Format Aviso de Formato de Jogo Desactualizado - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Você está usando o formato de directório ROM desconstruído para este jogo, que é um formato desactualizado que foi substituído por outros, como NCA, NAX, XCI ou NSP. Os directórios de ROM não construídos não possuem ícones, metadados e suporte de actualização.<br><br>Para uma explicação dos vários formatos de Switch que o yuzu suporta,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Verifique a nossa Wiki</a>. Esta mensagem não será mostrada novamente. - - + + Error while loading ROM! Erro ao carregar o ROM! - + The ROM format is not supported. O formato do ROM não é suportado. - + An error occurred initializing the video core. Ocorreu um erro ao inicializar o núcleo do vídeo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu encontrou um erro enquanto rodando o núcleo de vídeo. Normalmente isto é causado por drivers de GPU desatualizados, incluindo integrados. Por favor veja o registro para mais detalhes. Para mais informações em acesso ao registro por favor veja a seguinte página: <a href='https://yuzu-emu.org/help/reference/log-files/'>Como fazer envio de arquivo de registro</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Erro ao carregar a ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>a guia de início rápido do yuzu</a> para fazer o redespejo dos seus arquivos.<br>Você pode consultar a wiki do yuzu</a> ou o Discord do yuzu</a> para obter ajuda. - + An unknown error occurred. Please see the log for more details. Ocorreu um erro desconhecido. Por favor, veja o log para mais detalhes. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Encerrando software... - + Save Data Save Data - + Mod Data Mod Data - + Error Opening %1 Folder Erro ao abrir a pasta %1 - - + + Folder does not exist! A Pasta não existe! - + Error Opening Transferable Shader Cache Erro ao abrir os Shader Cache transferíveis - + Failed to create the shader cache directory for this title. Falha ao criar o diretório de cache de shaders para este título. - + Error Removing Contents Erro Removendo Conteúdos - + Error Removing Update Erro ao Remover Atualização - + Error Removing DLC Erro Removendo DLC - + Remove Installed Game Contents? Remover Conteúdo Instalado do Jogo? - + Remove Installed Game Update? Remover Atualização Instalada do Jogo? - + Remove Installed Game DLC? Remover DLC Instalada do Jogo? - + Remove Entry Remover Entrada - - - - - - + + + + + + Successfully Removed Removido com Sucesso - + Successfully removed the installed base game. Removida a instalação do jogo base com sucesso. - + The base game is not installed in the NAND and cannot be removed. O jogo base não está instalado no NAND e não pode ser removido. - + Successfully removed the installed update. Removida a actualização instalada com sucesso. - + There is no update installed for this title. Não há actualização instalada neste título. - + There are no DLC installed for this title. Não há DLC instalado neste título. - + Successfully removed %1 installed DLC. Removido DLC instalado %1 com sucesso. - + Delete OpenGL Transferable Shader Cache? Apagar o cache de shaders transferível do OpenGL? - + Delete Vulkan Transferable Shader Cache? Apagar o cache de shaders transferível do Vulkan? - + Delete All Transferable Shader Caches? Apagar todos os caches de shaders transferíveis? - + Remove Custom Game Configuration? Remover Configuração Personalizada do Jogo? - + Remove Cache Storage? - + Remover Armazenamento da Cache? - + Remove File Remover Ficheiro - - + + Error Removing Transferable Shader Cache Error ao Remover Cache de Shader Transferível - - + + A shader cache for this title does not exist. O Shader Cache para este titulo não existe. - + Successfully removed the transferable shader cache. Removido a Cache de Shader Transferível com Sucesso. - + Failed to remove the transferable shader cache. Falha ao remover a cache de shader transferível. - + Error Removing Vulkan Driver Pipeline Cache Erro ao Remover Cache de Pipeline do Driver Vulkan - + Failed to remove the driver pipeline cache. Falha ao remover o pipeline de cache do driver. - - + + Error Removing Transferable Shader Caches Erro ao remover os caches de shaders transferíveis - + Successfully removed the transferable shader caches. Os caches de shaders transferíveis foram removidos com sucesso. - + Failed to remove the transferable shader cache directory. Falha ao remover o diretório do cache de shaders transferível. - - + + Error Removing Custom Configuration Erro ao Remover Configuração Personalizada - + A custom configuration for this title does not exist. Não existe uma configuração personalizada para este titúlo. - + Successfully removed the custom game configuration. Removida a configuração personalizada do jogo com sucesso. - + Failed to remove the custom game configuration. Falha ao remover a configuração personalizada do jogo. - - + + RomFS Extraction Failed! A Extração de RomFS falhou! - + There was an error copying the RomFS files or the user cancelled the operation. Houve um erro ao copiar os arquivos RomFS ou o usuário cancelou a operação. - + Full Cheio - + Skeleton Esqueleto - + Select RomFS Dump Mode Selecione o modo de despejo do RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Por favor, selecione a forma como você gostaria que o RomFS fosse despejado<br>Full irá copiar todos os arquivos para o novo diretório enquanto<br>skeleton criará apenas a estrutura de diretórios. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Não há espaço suficiente em %1 para extrair o RomFS. Por favor abra espaço ou selecione um diretório diferente em Emulação > Configurar > Sistema > Sistema de arquivos > Extrair raiz - + Extracting RomFS... Extraindo o RomFS ... - - + + Cancel Cancelar - + RomFS Extraction Succeeded! Extração de RomFS Bem-Sucedida! - + The operation completed successfully. A operação foi completa com sucesso. - - - - - + + + + + Create Shortcut Criar Atalho - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Isso irá criar um atalho para o AppImage atual. Isso pode não funcionar corretamente se você fizer uma atualização. Continuar? - + Cannot create shortcut on desktop. Path "%1" does not exist. Não foi possível criar um atalho na área de trabalho. O caminho "%1" não existe. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Não foi possível criar um atalho no menu de aplicativos. O caminho "%1" não existe e não pode ser criado. - + Create Icon Criar Ícone - + Cannot create icon file. Path "%1" does not exist and cannot be created. Não foi possível criar o arquivo de ícone. O caminho "%1" não existe e não pode ser criado. - + Start %1 with the yuzu Emulator Iniciar %1 com o Emulador Yuzu - + Failed to create a shortcut at %1 Falha ao criar um atalho em %1 - + Successfully created a shortcut to %1 Atalho criado com sucesso em %1 - + Error Opening %1 Erro ao abrir %1 - + Select Directory Selecione o Diretório - + Properties Propriedades - + The game properties could not be loaded. As propriedades do jogo não puderam ser carregadas. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Executáveis Switch (%1);;Todos os Ficheiros (*.*) - + Load File Carregar Ficheiro - + Open Extracted ROM Directory Abrir o directório ROM extraído - + Invalid Directory Selected Diretório inválido selecionado - + The directory you have selected does not contain a 'main' file. O diretório que você selecionou não contém um arquivo 'Main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Ficheiro Switch Instalável (*.nca *.nsp *.xci);;Arquivo de Conteúdo Nintendo (*.nca);;Pacote de Envio Nintendo (*.nsp);;Imagem de Cartucho NX (*.xci) - + Install Files Instalar Ficheiros - + %n file(s) remaining - + %n arquivo restante%n ficheiro(s) remanescente(s)%n ficheiro(s) remanescente(s) - + Installing file "%1"... Instalando arquivo "%1"... - - + + Install Results Instalar Resultados - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Para evitar possíveis conflitos, desencorajamos que os utilizadores instalem os jogos base na NAND. Por favor, use esse recurso apenas para instalar atualizações e DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Aplicação do sistema - + System Archive Arquivo do sistema - + System Application Update Atualização do aplicativo do sistema - + Firmware Package (Type A) Pacote de Firmware (Tipo A) - + Firmware Package (Type B) Pacote de Firmware (Tipo B) - + Game Jogo - + Game Update Actualização do Jogo - + Game DLC DLC do Jogo - + Delta Title Título Delta - + Select NCA Install Type... Selecione o tipo de instalação do NCA ... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Por favor, selecione o tipo de título que você gostaria de instalar este NCA como: (Na maioria dos casos, o padrão 'Jogo' é suficiente). - + Failed to Install Falha na instalação - + The title type you selected for the NCA is invalid. O tipo de título que você selecionou para o NCA é inválido. - + File not found Arquivo não encontrado - + File "%1" not found Arquivo "%1" não encontrado - + OK OK - - + + Hardware requirements not met Requisitos de hardware não atendidos - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Seu sistema não atende os requisitos de harwdare. O relatório de compatibilidade foi desabilitado. - + Missing yuzu Account Conta Yuzu Ausente - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Para enviar um caso de teste de compatibilidade de jogos, você deve vincular sua conta yuzu.<br><br/>Para vincular sua conta yuzu, vá para Emulação &gt; Configuração &gt; Rede. - + Error opening URL Erro ao abrir URL - + Unable to open the URL "%1". Não foi possível abrir o URL "%1". - + TAS Recording Gravando TAS - + Overwrite file of player 1? Sobrescrever arquivo do jogador 1? - + Invalid config detected Configação inválida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. O comando portátil não pode ser usado no modo encaixado na base. O Pro controller será selecionado. - - + + Amiibo Amiibo - - + + The current amiibo has been removed O amiibo atual foi removido - + Error Erro - - + + The current game is not looking for amiibos O jogo atual não está procurando amiibos - + Amiibo File (%1);; All Files (*.*) Arquivo Amiibo (%1);; Todos os Arquivos (*.*) - + Load Amiibo Carregar Amiibo - + Error loading Amiibo data Erro ao carregar dados do Amiibo - + The selected file is not a valid amiibo O arquivo selecionado não é um amiibo válido - + The selected file is already on use O arquivo selecionado já está em uso - + An unknown error occurred Ocorreu um erro desconhecido - + Capture Screenshot Captura de Tela - + PNG Image (*.png) Imagem PNG (*.png) - + TAS state: Running %1/%2 Situação TAS: Rodando %1%2 - + TAS state: Recording %1 Situação TAS: Gravando %1 - + TAS state: Idle %1/%2 Situação TAS: Repouso %1%2 - + TAS State: Invalid Situação TAS: Inválido - + &Stop Running &Parar de rodar - + &Start &Começar - + Stop R&ecording Parar G&ravação - + R&ecord G&ravação - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escala: %1x - + Speed: %1% / %2% Velocidade: %1% / %2% - + Speed: %1% Velocidade: %1% - + Game: %1 FPS (Unlocked) Jogo: %1 FPS (Desbloqueado) - + Game: %1 FPS Jogo: %1 FPS - + Frame: %1 ms Quadro: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU ALTA - - - - GPU EXTREME - GPU EXTREMA - - - - GPU ERROR - ERRO DE GPU - - - - DOCKED - ANCORADO - - - - HANDHELD - PORTÁTIL - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULO - - - - NEAREST - VIZINHO - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BICÚBICO - - - - GAUSSIAN - GAUSSIANO - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA Sem AA - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE VOLUME: MUDO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Confirme a rederivação da chave - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5581,37 +5620,37 @@ e opcionalmente faça backups. Isso irá excluir os seus arquivos de chave gerados automaticamente e executará novamente o módulo de derivação de chave. - + Missing fuses Fusíveis em Falta - + - Missing BOOT0 - BOOT0 em Falta - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main em Falta - + - Missing PRODINFO - PRODINFO em Falta - + Derivation Components Missing Componentes de Derivação em Falta - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Chaves de encriptação faltando. <br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>o guia de início rápido</a> para extrair suas chaves, firmware e jogos. <br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5620,49 +5659,49 @@ Isto pode demorar até um minuto, dependendo do desempenho do seu sistema. - + Deriving Keys Derivando Chaves - + System Archive Decryption Failed - + Falha a desencriptar o arquivo do sistema - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Chaves de encriptação falharam a desencriptar o firmware. <br>Por favor segue <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> para obter todas as tuas chaves, firmware e jogos. - + Select RomFS Dump Target Selecione o destino de despejo do RomFS - + Please select which RomFS you would like to dump. Por favor, selecione qual o RomFS que você gostaria de despejar. - + Are you sure you want to close yuzu? Tem a certeza que quer fechar o yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Tem a certeza de que quer parar a emulação? Qualquer progresso não salvo será perdido. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5670,48 +5709,143 @@ Would you like to bypass this and exit anyway? Deseja ignorar isso e sair mesmo assim? + + + None + Nenhum + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bicúbico + + + + Gaussian + Gaussiano + + + + ScaleForce + ScaleForce + + + + Docked + Ancorado + + + + Handheld + Portátil + + + + Normal + Normal + + + + High + Alto + + + + Extreme + + + + + Vulkan + Vulcano + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL não está disponível! - + OpenGL shared contexts are not supported. Shared contexts do OpenGL não são suportados. - + yuzu has not been compiled with OpenGL support. yuzu não foi compilado com suporte OpenGL. - - + + Error while initializing OpenGL! Erro ao inicializar OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. O seu GPU pode não suportar OpenGL, ou não tem os drivers gráficos mais recentes. - + Error while initializing OpenGL 4.6! Erro ao inicializar o OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 O teu GPU pode não suportar OpenGL 4.6, ou não tem os drivers gráficos mais recentes. - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Sua GPU pode não suportar uma ou mais extensões necessárias do OpenGL. Verifique se você possui a última versão dos drivers gráficos.<br><br>Renderizador GL:<br>%1<br><br>Extensões não suportadas:<br>%2 @@ -5771,7 +5905,7 @@ Deseja ignorar isso e sair mesmo assim? Remove Cache Storage - + Remove a Cache do Armazenamento @@ -6065,138 +6199,138 @@ Mensagem de depuração: Hotkeys - + Audio Mute/Unmute Mutar/Desmutar Áudio - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Janela Principal - + Audio Volume Down Volume Menos - + Audio Volume Up Volume Mais - + Capture Screenshot Captura de Tela - + Change Adapting Filter Alterar Filtro de Adaptação - + Change Docked Mode Alterar Modo de Ancoragem - + Change GPU Accuracy Alterar Precisão da GPU - + Continue/Pause Emulation Continuar/Pausar Emulação - + Exit Fullscreen Sair da Tela Cheia - + Exit yuzu Sair do yuzu - + Fullscreen Tela Cheia - + Load File Carregar Ficheiro - + Load/Remove Amiibo Carregar/Remover Amiibo - + Restart Emulation Reiniciar Emulação - + Stop Emulation Parar Emulação - + TAS Record Gravar TAS - + TAS Reset Reiniciar TAS - + TAS Start/Stop Iniciar/Parar TAS - + Toggle Filter Bar Alternar Barra de Filtro - + Toggle Framerate Limit Alternar Limite de Quadros por Segundo - + Toggle Mouse Panning Alternar o Giro do Mouse - + Toggle Status Bar Alternar Barra de Status @@ -6936,30 +7070,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [não configurado] @@ -6970,14 +7104,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Eixo %1%2 @@ -6988,320 +7122,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [Desconhecido] - - + + Left Esquerda - - + + Right Direita - - + + Down Baixo - - + + Up Cima - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Começar - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Círculo - + Cross Cruz - + Square Quadrado - + Triangle Triângulo - + Share Compartilhar - + Options Opções - + [undefined] [indefinido] - + %1%2 %1%2 - - + + [invalid] [inválido] - - + + %1%2Hat %3 %1%2Direcional %3 - - + - + + %1%2Axis %3 %1%2Eixo %3 - - + + %1%2Axis %3,%4,%5 %1%2Eixo %3,%4,%5 - - + + %1%2Motion %3 %1%2Movimentação %3 - - + + %1%2Button %3 %1%2Botão %3 - - + + [unused] [sem uso] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Mais - + Minus Menos - - + + Home Home - + Capture Capturar - + Touch Toque - + Wheel Indicates the mouse wheel Volante - + Backward Para trás - + Forward Para a frente - + Task Tarefa - + Extra Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/ru_RU.ts b/dist/languages/ru_RU.ts index 672fa78b0..b623a5dbd 100644 --- a/dist/languages/ru_RU.ts +++ b/dist/languages/ru_RU.ts @@ -36,7 +36,7 @@ p, li { white-space: pre-wrap; } <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> - <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Веб-сайт</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Исходный код</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Соавторы</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">Лицензия</span></a></p></body></html> + <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Веб-сайт</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Исходный код</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Контрибьюторы</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">Лицензия</span></a></p></body></html> @@ -1137,78 +1137,78 @@ This would ban both their forum username and their IP address. Параметры yuzu - - + + Audio Звук - - + + CPU ЦП - + Debug Отладка - + Filesystem Файловая система - - + + General Общие - - + + Graphics Графика - + GraphicsAdvanced ГрафикаРасширенные - + Hotkeys Горячие клавиши - - + + Controls Управление - + Profiles Профили - + Network Сеть - - + + System Система - + Game List Список игр - + Web Сеть @@ -1402,17 +1402,22 @@ This would ban both their forum username and their IP address. Спрятать мышь при неактивности - + + Disable controller applet + + + + Reset All Settings Сбросить все настройки - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Это сбросит все настройки и удалит все конфигурации под отдельные игры. При этом не будут удалены пути для игр, профили или профили ввода. Продолжить? @@ -1486,10 +1491,10 @@ This would ban both their forum username and their IP address. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate (no synchronization) just presents whatever is available and can exhibit tearing. - FIFO (VSync) не пропускает кадры и не имеет разрывов, но ограничен частотой обновления экрана. + FIFO (Верт. синхронизация) не пропускает кадры и не имеет разрывов, но ограничен частотой обновления экрана. FIFO Relaxed похож на FIFO, но может иметь разрывы при восстановлении после просадок. Mailbox может иметь меньшую задержку, чем FIFO, и не имеет разрывов, но может пропускать кадры. -Моментальный (без синхронизации) просто показывает все кадры и может иметь разрывы. +Моментальная (без синхронизации) просто показывает все кадры и может иметь разрывы. @@ -1703,43 +1708,43 @@ Mailbox может иметь меньшую задержку, чем FIFO, и Фоновый цвет: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (ассемблерные шейдеры, только для NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Экспериментально, только для Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off Отключена - + VSync Off Верт. синхронизация отключена - + Recommended Рекомендуется - + On Включена - + VSync On Верт. синхронизация включена @@ -1864,37 +1869,57 @@ Compute pipelines are always enabled on all other drivers. Включить вычислительные конвейеры (только для Intel Vulkan) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Анизотропная фильтрация: - + Automatic Автоматически - + Default Стандартная - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2277,7 +2302,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Настроить @@ -2344,22 +2369,7 @@ Compute pipelines are always enabled on all other drivers. Использовать случайный идентификатор Amiibo - - Enable mouse panning - Включить панорамирование мыши - - - - Mouse sensitivity - Чувствительность мыши - - - - % - % - - - + Motion / Touch Движение и сенсор @@ -2471,7 +2481,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Левый мини-джойстик @@ -2560,19 +2570,19 @@ Compute pipelines are always enabled on all other drivers. D-Pad - Кнопки направлений + Крестовина - + L L - + ZL ZL @@ -2591,7 +2601,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Плюс @@ -2604,15 +2614,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2669,247 +2679,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Правый мини-джойстик - - - - + + Mouse panning + + + + + Configure + Настроить + + + + + + Clear Очистить - - - - - + + + + + [not set] [не задано] - - - + + + Invert button Инвертировать кнопку - - + + Toggle button Переключить кнопку - + Turbo button Турбо кнопка - - + + Invert axis Инвертировать оси - - - + + + Set threshold Установить порог - - + + Choose a value between 0% and 100% Выберите значение между 0% и 100% - + Toggle axis Переключить оси - + Set gyro threshold Установить порог гироскопа - + Calibrate sensor Калибровка датчика - + Map Analog Stick Задать аналоговый мини-джойстик - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. После нажатия на ОК, двигайте ваш мини-джойстик горизонтально, а затем вертикально. Чтобы инвертировать оси, сначала двигайте ваш мини-джойстик вертикально, а затем горизонтально. - + Center axis Центрировать оси - - + + Deadzone: %1% Мёртвая зона: %1% - - + + Modifier Range: %1% Диапазон модификатора: %1% - - + + Pro Controller Контроллер Pro - + Dual Joycons Двойные Joy-Con'ы - + Left Joycon Левый Joy-Сon - + Right Joycon Правый Joy-Сon - + Handheld Портативный - + GameCube Controller Контроллер GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Контроллер NES - + SNES Controller Контроллер SNES - + N64 Controller Контроллер N64 - + Sega Genesis Sega Genesis - + Start / Pause Старт / Пауза - + Z Z - + Control Stick Мини-джойстик управления - + C-Stick C-Джойстик - + Shake! Встряхните! - + [waiting] [ожидание] - + New Profile Новый профиль - + Enter a profile name: Введите имя профиля: - - + + Create Input Profile Создать профиль управления - + The given profile name is not valid! Заданное имя профиля недействительно! - + Failed to create the input profile "%1" Не удалось создать профиль управления "%1" - + Delete Input Profile Удалить профиль управления - + Failed to delete the input profile "%1" Не удалось удалить профиль управления "%1" - + Load Input Profile Загрузить профиль управления - + Failed to load the input profile "%1" Не удалось загрузить профиль управления "%1" - + Save Input Profile Сохранить профиль управления - + Failed to save the input profile "%1" Не удалось сохранить профиль управления "%1" @@ -3088,6 +3108,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Тест UDP или калибрация в процессе.<br>Пожалуйста, подождите завершения. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Включить + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + По умолчанию + + ConfigureNetwork @@ -3164,47 +3259,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Разработчик - + Add-Ons Дополнения - + General Общие - + System Система - + CPU ЦП - + Graphics Графика - + Adv. Graphics Расш. Графика - + Audio Звук - + Input Profiles Профили управления - + Properties Свойства @@ -3407,8 +3502,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Если вы хотите использовать этот контроллер, настройте игрока 1 как правый контроллер, а игрока 2 как двойной Joy-Сon перед началом игры, чтобы этот контроллер был обнаружен правильно. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3444,7 +3539,7 @@ UUID: %2 - + Enable Включить @@ -3511,12 +3606,17 @@ UUID: %2 К текущему устройству не прикреплено кольцо - + + The current mapped device is not connected + + + + Unexpected driver result %1 Неожиданный результат драйвера %1 - + [waiting] [ожидание] @@ -3822,7 +3922,7 @@ UUID: %2 American English - Американский Английский + Американский английский @@ -3877,32 +3977,32 @@ UUID: %2 British English - Британский Английский + Британский английский Canadian French - Канадский Французский + Канадский французский Latin American Spanish - Латиноамериканский Испанский + Латиноамериканский испанский Simplified Chinese - Упрощённый Китайский + Упрощённый китайский Traditional Chinese (正體中文) - Традиционный Китайский (正體中文) + Традиционный китайский (正體中文) Brazilian Portuguese (português do Brasil) - Бразильский Португальский (português do Brasil) + Бразильский португальский (português do Brasil) @@ -4626,560 +4726,575 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Анонимные данные собираются для того,</a> чтобы помочь улучшить работу yuzu. <br/><br/>Хотели бы вы делиться данными об использовании с нами? - + Telemetry Телеметрия - + Broken Vulkan Installation Detected Обнаружена поврежденная установка Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Не удалось выполнить инициализацию Vulkan во время загрузки.<br><br>Нажмите <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>здесь для получения инструкций по устранению проблемы</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Загрузка веб-апплета... - - + + Disable Web Applet Отключить веб-апплет - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Отключение веб-апплета может привести к неожиданному поведению и должно использоваться только с Super Mario 3D All-Stars. Вы уверены, что хотите отключить веб-апплет? (Его можно снова включить в настройках отладки.) - + The amount of shaders currently being built Количество создаваемых шейдеров на данный момент - + The current selected resolution scaling multiplier. Текущий выбранный множитель масштабирования разрешения. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Текущая скорость эмуляции. Значения выше или ниже 100% указывают на то, что эмуляция идет быстрее или медленнее, чем на Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Количество кадров в секунду в данный момент. Значение будет меняться между играми и сценами. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Время, которое нужно для эмуляции 1 кадра Switch, не принимая во внимание ограничение FPS или вертикальную синхронизацию. Для эмуляции в полной скорости значение должно быть не больше 16,67 мс. - + + Unmute + Включить звук + + + + Mute + Выключить звук + + + + Reset Volume + Сбросить громкость + + + &Clear Recent Files [&C] Очистить недавние файлы - + Emulated mouse is enabled Эмулированная мышь включена - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Ввод реальной мыши и панорамирование мышью несовместимы. Пожалуйста, отключите эмулированную мышь в расширенных настройках ввода, чтобы разрешить панорамирование мышью. - + &Continue [&C] Продолжить - + &Pause [&P] Пауза - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - В yuzu запущена игра - - - + Warning Outdated Game Format Предупреждение устаревший формат игры - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Для этой игры вы используете разархивированный формат ROM'а, который является устаревшим и был заменен другими, такими как NCA, NAX, XCI или NSP. В разархивированных каталогах ROM'а отсутствуют иконки, метаданные и поддержка обновлений. <br><br>Для получения информации о различных форматах Switch, поддерживаемых yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>просмотрите нашу вики</a>. Это сообщение больше не будет отображаться. - - + + Error while loading ROM! Ошибка при загрузке ROM'а! - + The ROM format is not supported. Формат ROM'а не поддерживается. - + An error occurred initializing the video core. Произошла ошибка при инициализации видеоядра. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu столкнулся с ошибкой при запуске видеоядра. Обычно это вызвано устаревшими драйверами ГП, включая интегрированные. Проверьте журнал для получения более подробной информации. Дополнительную информацию о доступе к журналу смотрите на следующей странице: <a href='https://yuzu-emu.org/help/reference/log-files/'>Как загрузить файл журнала</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Ошибка при загрузке ROM'а! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Пожалуйста, следуйте <a href='https://yuzu-emu.org/help/quickstart/'>краткому руководству пользователя yuzu</a> чтобы пере-дампить ваши файлы<br>Вы можете обратиться к вики yuzu</a> или Discord yuzu</a> для помощи. - + An unknown error occurred. Please see the log for more details. Произошла неизвестная ошибка. Пожалуйста, проверьте журнал для подробностей. - + (64-bit) (64-х битный) - + (32-bit) (32-х битный) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Закрываем программу... - + Save Data Сохранения - + Mod Data Данные модов - + Error Opening %1 Folder Ошибка при открытии папки %1 - - + + Folder does not exist! Папка не существует! - + Error Opening Transferable Shader Cache Ошибка при открытии переносного кэша шейдеров - + Failed to create the shader cache directory for this title. Не удалось создать папку кэша шейдеров для этой игры. - + Error Removing Contents Ошибка при удалении содержимого - + Error Removing Update Ошибка при удалении обновлений - + Error Removing DLC Ошибка при удалении DLC - + Remove Installed Game Contents? Удалить установленное содержимое игр? - + Remove Installed Game Update? Удалить установленные обновления игры? - + Remove Installed Game DLC? Удалить установленные DLC игры? - + Remove Entry Удалить запись - - - - - - + + + + + + Successfully Removed Успешно удалено - + Successfully removed the installed base game. Установленная игра успешно удалена. - + The base game is not installed in the NAND and cannot be removed. Игра не установлена в NAND и не может быть удалена. - + Successfully removed the installed update. Установленное обновление успешно удалено. - + There is no update installed for this title. Для этой игры не было установлено обновление. - + There are no DLC installed for this title. Для этой игры не были установлены DLC. - + Successfully removed %1 installed DLC. Установленное DLC %1 было успешно удалено - + Delete OpenGL Transferable Shader Cache? Удалить переносной кэш шейдеров OpenGL? - + Delete Vulkan Transferable Shader Cache? Удалить переносной кэш шейдеров Vulkan? - + Delete All Transferable Shader Caches? Удалить весь переносной кэш шейдеров? - + Remove Custom Game Configuration? Удалить пользовательскую настройку игры? - + Remove Cache Storage? - + Убрать хранилище Cache? - + Remove File Удалить файл - - + + Error Removing Transferable Shader Cache Ошибка при удалении переносного кэша шейдеров - - + + A shader cache for this title does not exist. Кэш шейдеров для этой игры не существует. - + Successfully removed the transferable shader cache. Переносной кэш шейдеров успешно удалён. - + Failed to remove the transferable shader cache. Не удалось удалить переносной кэш шейдеров. - + Error Removing Vulkan Driver Pipeline Cache Ошибка при удалении конвейерного кэша Vulkan - + Failed to remove the driver pipeline cache. Не удалось удалить конвейерный кэш шейдеров. - - + + Error Removing Transferable Shader Caches Ошибка при удалении переносного кэша шейдеров - + Successfully removed the transferable shader caches. Переносной кэш шейдеров успешно удален. - + Failed to remove the transferable shader cache directory. Ошибка при удалении папки переносного кэша шейдеров. - - + + Error Removing Custom Configuration Ошибка при удалении пользовательской настройки - + A custom configuration for this title does not exist. Пользовательская настройка для этой игры не существует. - + Successfully removed the custom game configuration. Пользовательская настройка игры успешно удалена. - + Failed to remove the custom game configuration. Не удалось удалить пользовательскую настройку игры. - - + + RomFS Extraction Failed! Не удалось извлечь RomFS! - + There was an error copying the RomFS files or the user cancelled the operation. Произошла ошибка при копировании файлов RomFS или пользователь отменил операцию. - + Full Полный - + Skeleton Скелет - + Select RomFS Dump Mode Выберите режим дампа RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Пожалуйста, выберите, как вы хотите выполнить дамп RomFS. <br>Полный скопирует все файлы в новую папку, в то время как <br>скелет создаст только структуру папок. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root В %1 недостаточно свободного места для извлечения RomFS. Пожалуйста, освободите место или выберите другую папку для дампа в Эмуляция > Настройка > Система > Файловая система > Корень дампа - + Extracting RomFS... Извлечение RomFS... - - + + Cancel Отмена - + RomFS Extraction Succeeded! Извлечение RomFS прошло успешно! - + The operation completed successfully. Операция выполнена. - - - - - + + + + + Create Shortcut Создать ярлык - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Это создаст ярлык для текущего AppImage. Он может не работать после обновлений. Продолжить? - + Cannot create shortcut on desktop. Path "%1" does not exist. Не удается создать ярлык на рабочем столе. Путь "%1" не существует. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Невозможно создать ярлык в меню приложений. Путь "%1" не существует и не может быть создан. - + Create Icon Создать иконку - + Cannot create icon file. Path "%1" does not exist and cannot be created. Невозможно создать файл иконки. Путь "%1" не существует и не может быть создан. - + Start %1 with the yuzu Emulator Запустить %1 с помощью эмулятора yuzu - + Failed to create a shortcut at %1 Не удалось создать ярлык в %1 - + Successfully created a shortcut to %1 Успешно создан ярлык в %1 - + Error Opening %1 Ошибка открытия %1 - + Select Directory Выбрать папку - + Properties Свойства - + The game properties could not be loaded. Не удалось загрузить свойства игры. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Исполняемый файл Switch (%1);;Все файлы (*.*) - + Load File Загрузить файл - + Open Extracted ROM Directory Открыть папку извлечённого ROM'а - + Invalid Directory Selected Выбрана недопустимая папка - + The directory you have selected does not contain a 'main' file. Папка, которую вы выбрали, не содержит файла 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Устанавливаемый файл Switch (*.nca, *.nsp, *.xci);;Архив контента Nintendo (*.nca);;Пакет подачи Nintendo (*.nsp);;Образ картриджа NX (*.xci) - + Install Files Установить файлы - + %n file(s) remaining Остался %n файлОсталось %n файл(ов)Осталось %n файл(ов)Осталось %n файл(ов) - + Installing file "%1"... Установка файла "%1"... - - + + Install Results Результаты установки - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Чтобы избежать возможных конфликтов, мы не рекомендуем пользователям устанавливать игры в NAND. Пожалуйста, используйте эту функцию только для установки обновлений и DLC. - + %n file(s) were newly installed %n файл был недавно установлен @@ -5189,7 +5304,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) were overwritten %n файл был перезаписан @@ -5199,7 +5314,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) failed to install %n файл не удалось установить @@ -5209,388 +5324,312 @@ Please, only use this feature to install updates and DLC. - + System Application Системное приложение - + System Archive Системный архив - + System Application Update Обновление системного приложения - + Firmware Package (Type A) Пакет прошивки (Тип А) - + Firmware Package (Type B) Пакет прошивки (Тип Б) - + Game Игра - + Game Update Обновление игры - + Game DLC DLC игры - + Delta Title Дельта-титул - + Select NCA Install Type... Выберите тип установки NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Пожалуйста, выберите тип приложения, который вы хотите установить для этого NCA: (В большинстве случаев, подходит стандартный выбор «Игра».) - + Failed to Install Ошибка установки - + The title type you selected for the NCA is invalid. Тип приложения, который вы выбрали для NCA, недействителен. - + File not found Файл не найден - + File "%1" not found Файл "%1" не найден - + OK ОК - - + + Hardware requirements not met Не удовлетворены системные требования - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Ваша система не соответствует рекомендуемым системным требованиям. Отчеты о совместимости были отключены. - + Missing yuzu Account Отсутствует аккаунт yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Чтобы отправить отчет о совместимости игры, необходимо привязать свою учетную запись yuzu.<br><br/>Чтобы привязать свою учетную запись yuzu, перейдите в раздел Эмуляция &gt; Параметры &gt; Сеть. - + Error opening URL Ошибка при открытии URL - + Unable to open the URL "%1". Не удалось открыть URL: "%1". - + TAS Recording Запись TAS - + Overwrite file of player 1? Перезаписать файл игрока 1? - + Invalid config detected Обнаружена недопустимая конфигурация - + Handheld controller can't be used on docked mode. Pro controller will be selected. Портативный контроллер не может быть использован в режиме док-станции. Будет выбран контроллер Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Текущий amiibo был убран - + Error Ошибка - - + + The current game is not looking for amiibos Текущая игра не ищет amiibo - + Amiibo File (%1);; All Files (*.*) Файл Amiibo (%1);; Все Файлы (*.*) - + Load Amiibo Загрузить Amiibo - + Error loading Amiibo data Ошибка загрузки данных Amiibo - + The selected file is not a valid amiibo Выбранный файл не является допустимым amiibo - + The selected file is already on use Выбранный файл уже используется - + An unknown error occurred Произошла неизвестная ошибка - + Capture Screenshot Сделать скриншот - + PNG Image (*.png) Изображение PNG (*.png) - + TAS state: Running %1/%2 Состояние TAS: Выполняется %1/%2 - + TAS state: Recording %1 Состояние TAS: Записывается %1 - + TAS state: Idle %1/%2 Состояние TAS: Простой %1/%2 - + TAS State: Invalid Состояние TAS: Неверное - + &Stop Running [&S] Остановка - + &Start [&S] Начать - + Stop R&ecording [&E] Закончить запись - + R&ecord [&E] Запись - + Building: %n shader(s) Постройка: %n шейдерПостройка: %n шейдер(ов)Постройка: %n шейдер(ов)Постройка: %n шейдер(ов) - + Scale: %1x %1 is the resolution scaling factor Масштаб: %1x - + Speed: %1% / %2% Скорость: %1% / %2% - + Speed: %1% Скорость: %1% - + Game: %1 FPS (Unlocked) Игра: %1 FPS (Неограниченно) - + Game: %1 FPS Игра: %1 FPS - + Frame: %1 ms Кадр: %1 мс - - GPU NORMAL - ГП НОРМАЛЬНО + + %1 %2 + %1 %2 - - GPU HIGH - ГП ВЫСОКО - - - - GPU EXTREME - ГП ЭКСТРИМ - - - - GPU ERROR - ГП ОШИБКА - - - - DOCKED - В ДОК-СТАНЦИИ - - - - HANDHELD - ПОРТАТИВНЫЙ - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - БЛИЖАЙШИЙ - - - - - BILINEAR - БИЛИНЕЙНЫЙ - - - - BICUBIC - БИКУБИЧЕСКИЙ - - - - GAUSSIAN - ГАУСС - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA БЕЗ СГЛАЖИВАНИЯ - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE ГРОМКОСТЬ: ЗАГЛУШЕНА - + VOLUME: %1% Volume percentage (e.g. 50%) ГРОМКОСТЬ: %1% - + Confirm Key Rederivation Подтвердите перерасчет ключа - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5607,37 +5646,37 @@ This will delete your autogenerated key files and re-run the key derivation modu Это удалит ваши автоматически сгенерированные файлы ключей и повторно запустит модуль расчета ключей. - + Missing fuses Отсутствуют предохранители - + - Missing BOOT0 - Отсутствует BOOT0 - + - Missing BCPKG2-1-Normal-Main - Отсутствует BCPKG2-1-Normal-Main - + - Missing PRODINFO - Отсутствует PRODINFO - + Derivation Components Missing Компоненты расчета отсутствуют - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Ключи шифрования отсутствуют. <br>Пожалуйста, следуйте <a href='https://yuzu-emu.org/help/quickstart/'>краткому руководству пользователя yuzu</a>, чтобы получить все ваши ключи, прошивку и игры.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5646,49 +5685,49 @@ on your system's performance. от производительности вашей системы. - + Deriving Keys Получение ключей - + System Archive Decryption Failed Не удалось расшифровать системный архив - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Ключи шифрования не смогли расшифровать прошивку. <br>Пожалуйста, следуйте <a href='https://yuzu-emu.org/help/quickstart/'>краткому руководству пользователя yuzu</a> чтобы получить все ваши ключи, прошивку и игры. - + Select RomFS Dump Target Выберите цель для дампа RomFS - + Please select which RomFS you would like to dump. Пожалуйста, выберите, какой RomFS вы хотите сдампить. - + Are you sure you want to close yuzu? Вы уверены, что хотите закрыть yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Вы уверены, что хотите остановить эмуляцию? Любой несохраненный прогресс будет потерян. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5696,48 +5735,143 @@ Would you like to bypass this and exit anyway? Хотите ли вы обойти это и выйти в любом случае? + + + None + Никакой + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + Ближайший + + + + Bilinear + Билинейный + + + + Bicubic + Бикубический + + + + Gaussian + Гаусс + + + + ScaleForce + ScaleForce + + + + Docked + В док-станции + + + + Handheld + Портативный + + + + Normal + Нормальная + + + + High + Высокая + + + + Extreme + Экстрим + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + Null + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL не доступен! - + OpenGL shared contexts are not supported. Общие контексты OpenGL не поддерживаются. - + yuzu has not been compiled with OpenGL support. yuzu не был скомпилирован с поддержкой OpenGL. - - + + Error while initializing OpenGL! Ошибка при инициализации OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Ваш ГП может не поддерживать OpenGL, или у вас установлен устаревший графический драйвер. - + Error while initializing OpenGL 4.6! Ошибка при инициализации OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Ваш ГП может не поддерживать OpenGL 4.6, или у вас установлен устаревший графический драйвер.<br><br>Рендерер GL:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Ваш ГП может не поддерживать одно или несколько требуемых расширений OpenGL. Пожалуйста, убедитесь в том, что у вас установлен последний графический драйвер.<br><br>Рендерер GL:<br>%1<br><br>Неподдерживаемые расширения:<br>%2 @@ -5797,7 +5931,7 @@ Would you like to bypass this and exit anyway? Remove Cache Storage - + Убрать хранилище Cache @@ -6091,138 +6225,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute Включение/отключение звука - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Основное окно - + Audio Volume Down Уменьшить громкость звука - + Audio Volume Up Повысить громкость звука - + Capture Screenshot Сделать скриншот - + Change Adapting Filter Изменить адаптирующий фильтр - + Change Docked Mode Изменить режим консоли - + Change GPU Accuracy Изменить точность ГП - + Continue/Pause Emulation Продолжение/Пауза эмуляции - + Exit Fullscreen Выйти из полноэкранного режима - + Exit yuzu Выйти из yuzu - + Fullscreen Полный экран - + Load File Загрузить файл - + Load/Remove Amiibo Загрузить/удалить Amiibo - + Restart Emulation Перезапустить эмуляцию - + Stop Emulation Остановить эмуляцию - + TAS Record Запись TAS - + TAS Reset Сброс TAS - + TAS Start/Stop Старт/Стоп TAS - + Toggle Filter Bar Переключить панель поиска - + Toggle Framerate Limit Переключить ограничение частоты кадров - + Toggle Mouse Panning Переключить панорамирование мыши - + Toggle Status Bar Переключить панель состояния @@ -6965,30 +7099,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [не задано] @@ -6999,14 +7133,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Ось %1%2 @@ -7017,320 +7151,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [неизвестно] - - + + Left Влево - - + + Right Вправо - - + + Down Вниз - - + + Up Вверх - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Круг - + Cross Крестик - + Square Квадрат - + Triangle Треугольник - + Share Share - + Options Options - + [undefined] [не определено] - + %1%2 %1%2 - - + + [invalid] [недопустимо] - - + + %1%2Hat %3 %1%2Крест. %3 - - + - + + %1%2Axis %3 %1%2Ось %3 - - + + %1%2Axis %3,%4,%5 %1%2Ось %3,%4,%5 - - + + %1%2Motion %3 %1%2Движение %3 - - + + %1%2Button %3 %1%2Кнопка %3 - - + + [unused] [не используется] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Левый стик - + Stick R Правый стик - + Plus Плюс - + Minus Минус - - + + Home Home - + Capture Захват - + Touch Сенсор - + Wheel Indicates the mouse wheel Колёсико - + Backward Назад - + Forward Вперёд - + Task Задача - + Extra Дополнительная - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3Крест. %4 - - + + %1%2%3Axis %4 %1%2%3Ось %4 - - + + %1%2%3Button %4 %1%2%3Кнопка %4 diff --git a/dist/languages/sv.ts b/dist/languages/sv.ts index 7aa5f082e..245a1f764 100644 --- a/dist/languages/sv.ts +++ b/dist/languages/sv.ts @@ -1114,78 +1114,78 @@ avgjord kod.</div> yuzu Konfigurering - - + + Audio Ljud - - + + CPU CPU - + Debug Debug - + Filesystem Filsystem - - + + General Allmänt - - + + Graphics Grafik - + GraphicsAdvanced Avancerade grafikinställningar - + Hotkeys Snabbknappar - - + + Controls Kontroller - + Profiles Profiler - + Network Nätverk - - + + System System - + Game List Spellista - + Web Webb @@ -1379,17 +1379,22 @@ avgjord kod.</div> Göm mus när inaktiv - + + Disable controller applet + + + + Reset All Settings Återställ Alla Inställningar - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? @@ -1677,43 +1682,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Bakgrundsfärg: - + GLASM (Assembly Shaders, NVIDIA Only) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1837,37 +1842,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Anisotropisk filtrering: - + Automatic - + Default Standard - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2250,7 +2275,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Konfigurera @@ -2317,22 +2342,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - - - - - Mouse sensitivity - - - - - % - % - - - + Motion / Touch Rörelse / Touch @@ -2444,7 +2454,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Vänster Spak @@ -2538,14 +2548,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2564,7 +2574,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Pluss @@ -2577,15 +2587,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2642,246 +2652,256 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Höger Spak - - - - + + Mouse panning + + + + + Configure + Konfigurera + + + + + + Clear Rensa - - - - - + + + + + [not set] [ej angett] - - - + + + Invert button - - + + Toggle button - + Turbo button - - + + Invert axis - - - + + + Set threshold - - + + Choose a value between 0% and 100% - + Toggle axis - + Set gyro threshold - + Calibrate sensor - + Map Analog Stick - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. - + Center axis - - + + Deadzone: %1% Dödzon: %1% - - + + Modifier Range: %1% Modifieringsräckvidd: %1% - - + + Pro Controller Prokontroller - + Dual Joycons Dubbla Joycons - + Left Joycon Vänster Joycon - + Right Joycon Höger Joycon - + Handheld Handhållen - + GameCube Controller GameCube-kontroll - + Poke Ball Plus Poke Ball Plus - + NES Controller NES-kontroll - + SNES Controller SNES-kontroll - + N64 Controller N64-kontroll - + Sega Genesis Sega Genesis - + Start / Pause - + Z Z - + Control Stick - + C-Stick - + Shake! - + [waiting] [väntar] - + New Profile Ny profil - + Enter a profile name: - - + + Create Input Profile - + The given profile name is not valid! - + Failed to create the input profile "%1" - + Delete Input Profile - + Failed to delete the input profile "%1" - + Load Input Profile - + Failed to load the input profile "%1" - + Save Input Profile - + Failed to save the input profile "%1" @@ -3060,6 +3080,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< UDP Test eller kalibreringskonfiguration är igång.<br>Var vänlig vänta för dem att slutföras. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Aktivera + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Standard + + ConfigureNetwork @@ -3136,47 +3231,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Utvecklare - + Add-Ons Tillägg - + General Allmänt - + System System - + CPU CPU - + Graphics Grafik - + Adv. Graphics Avancerade Grafikinställningar - + Audio Ljud - + Input Profiles - + Properties egenskaper @@ -3378,7 +3473,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3415,7 +3510,7 @@ UUID: %2 - + Enable Aktivera @@ -3482,12 +3577,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [väntar] @@ -4597,957 +4697,896 @@ Dra punkter för att ändra position, eller dubbelklicka tabellceller för att r GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonym data skickas </a>För att förbättra yuzu. <br/><br/>Vill du dela med dig av din användarstatistik med oss? - + Telemetry Telemetri - + Broken Vulkan Installation Detected Felaktig Vulkaninstallation Upptäckt - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Laddar WebApplet... - - + + Disable Web Applet Avaktivera Webbappletten - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Mängden shaders som just nu byggs - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Nuvarande emuleringshastighet. Värden över eller under 100% indikerar på att emulationen körs snabbare eller långsammare än en Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Hur många bilder per sekund som spelet just nu visar. Detta varierar från spel till spel och scen till scen. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tid det tar att emulera en Switch bild, utan att räkna med framelimiting eller v-sync. För emulering på full hastighet så ska det vara som mest 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files - + Emulated mouse is enabled Emulerad datormus är aktiverad - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue - + &Pause &Paus - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - - - - + Warning Outdated Game Format Varning Föråldrat Spelformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Du använder det dekonstruerade ROM-formatet för det här spelet. Det är ett föråldrat format som har överträffats av andra som NCA, NAX, XCI eller NSP. Dekonstruerade ROM-kataloger saknar ikoner, metadata och uppdatering.<br><br>För en förklaring av de olika format som yuzu stöder, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>kolla in vår wiki</a>. Det här meddelandet visas inte igen. - - + + Error while loading ROM! Fel vid laddning av ROM! - + The ROM format is not supported. ROM-formatet stöds inte. - + An error occurred initializing the video core. Ett fel inträffade vid initiering av videokärnan. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Ett okänt fel har uppstått. Se loggen för mer information. - + (64-bit) - + (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit - + Closing software... - + Save Data Spardata - + Mod Data Mod-data - + Error Opening %1 Folder Fel Öppnar %1 Mappen - - + + Folder does not exist! Mappen finns inte! - + Error Opening Transferable Shader Cache Fel Under Öppning Av Överförbar Shadercache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry Ta bort katalog - - - - - - + + + + + + Successfully Removed Framgångsrikt borttagen - + Successfully removed the installed base game. Tog bort det installerade basspelet framgångsrikt. - + The base game is not installed in the NAND and cannot be removed. Basspelet är inte installerat i NAND och kan inte tas bort. - + Successfully removed the installed update. Tog bort den installerade uppdateringen framgångsrikt. - + There is no update installed for this title. Det finns ingen uppdatering installerad för denna titel. - + There are no DLC installed for this title. Det finns inga DLC installerade för denna titel. - + Successfully removed %1 installed DLC. Tog framgångsrikt bort den %1 installerade DLCn. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? Ta Bort Anpassad Spelkonfiguration? - + Remove Cache Storage? - + Remove File Radera fil - - + + Error Removing Transferable Shader Cache Fel När Överförbar Shader Cache Raderades - - + + A shader cache for this title does not exist. En shader cache för denna titel existerar inte. - + Successfully removed the transferable shader cache. Raderade den överförbara shadercachen framgångsrikt. - + Failed to remove the transferable shader cache. Misslyckades att ta bort den överförbara shadercache - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Fel När Anpassad Konfiguration Raderades - + A custom configuration for this title does not exist. En anpassad konfiguration för denna titel existerar inte. - + Successfully removed the custom game configuration. Tog bort den anpassade spelkonfigurationen framgångsrikt. - + Failed to remove the custom game configuration. Misslyckades att ta bort den anpassade spelkonfigurationen. - - + + RomFS Extraction Failed! RomFS Extraktion Misslyckades! - + There was an error copying the RomFS files or the user cancelled the operation. Det uppstod ett fel vid kopiering av RomFS filer eller användaren avbröt operationen. - + Full Full - + Skeleton Skelett - + Select RomFS Dump Mode Välj RomFS Dump-Läge - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Välj hur du vill att RomFS ska dumpas. <br>Full kommer att kopiera alla filer i den nya katalogen medan <br>skelett bara skapar katalogstrukturen. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Extraherar RomFS... - - + + Cancel Avbryt - + RomFS Extraction Succeeded! RomFS Extraktion Lyckades! - + The operation completed successfully. Operationen var lyckad. - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Fel under öppning av %1 - + Select Directory Välj Katalog - + Properties Egenskaper - + The game properties could not be loaded. Spelegenskaperna kunde inte laddas. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Körbar (%1);;Alla Filer (*.*) - + Load File Ladda Fil - + Open Extracted ROM Directory Öppna Extraherad ROM-Katalog - + Invalid Directory Selected Ogiltig Katalog Vald - + The directory you have selected does not contain a 'main' file. Katalogen du har valt innehåller inte en 'main'-fil. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installerbar Switch-fil (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installera filer - + %n file(s) remaining - + Installing file "%1"... Installerar Fil "%1"... - - + + Install Results Installera resultat - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Systemapplikation - + System Archive Systemarkiv - + System Application Update Systemapplikationsuppdatering - + Firmware Package (Type A) Firmwarepaket (Typ A) - + Firmware Package (Type B) Firmwarepaket (Typ B) - + Game Spel - + Game Update Speluppdatering - + Game DLC Spel DLC - + Delta Title Delta Titel - + Select NCA Install Type... Välj NCA-Installationsläge... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Välj vilken typ av titel du vill installera som: (I de flesta fallen, standard 'Spel' är bra.) - + Failed to Install Misslyckades med Installationen - + The title type you selected for the NCA is invalid. Den titeltyp du valt för NCA är ogiltig. - + File not found Filen hittades inte - + File "%1" not found Filen "%1" hittades inte - + OK OK - - + + Hardware requirements not met Hårdvarukraven uppfylls ej - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account yuzu Konto hittades inte - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. För att skicka ett spelkompatibilitetstest, du måste länka ditt yuzu-konto.<br><br/>För att länka ditt yuzu-konto, gå till Emulering &gt, Konfigurering &gt, Web. - + Error opening URL Fel när URL öppnades - + Unable to open the URL "%1". Oförmögen att öppna URL:en "%1". - + TAS Recording TAS Inspelning - + Overwrite file of player 1? Överskriv spelare 1:s fil? - + Invalid config detected Ogiltig konfiguration upptäckt - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Den aktuella amiibon har avlägsnats - + Error Fel - - + + The current game is not looking for amiibos Det aktuella spelet letar ej efter amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo Fil (%1);; Alla Filer (*.*) - + Load Amiibo Ladda Amiibo - + Error loading Amiibo data Fel vid laddning av Amiibodata - + The selected file is not a valid amiibo Den valda filen är inte en giltig amiibo - + The selected file is already on use Den valda filen är redan använd - + An unknown error occurred Ett okänt fel har inträffat - + Capture Screenshot Skärmdump - + PNG Image (*.png) PNG Bild (*.png) - + TAS state: Running %1/%2 TAStillstånd: pågående %1/%2 - + TAS state: Recording %1 TAStillstånd: spelar in %1 - + TAS state: Idle %1/%2 TAStillstånd: inaktiv %1/%2 - + TAS State: Invalid TAStillstånd: ogiltigt - + &Stop Running - + &Start &Start - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Hastighet: %1% / %2% - + Speed: %1% Hastighet: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Spel: %1 FPS - + Frame: %1 ms Ruta: %1 ms - - GPU NORMAL + + %1 %2 - - GPU HIGH - - - - - GPU EXTREME - - - - - GPU ERROR - - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - - - - - - BILINEAR - - - - - BICUBIC - - - - - GAUSSIAN - - - - - SCALEFORCE - - - - + + FSR - - + NO AA - - FXAA - - - - - SMAA - - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Bekräfta Nyckel Rederivering - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5564,37 +5603,37 @@ och eventuellt göra säkerhetskopior. Detta raderar dina autogenererade nyckelfiler och kör nyckelderivationsmodulen. - + Missing fuses Saknade säkringar - + - Missing BOOT0 - Saknar BOOT0 - + - Missing BCPKG2-1-Normal-Main - Saknar BCPKG2-1-Normal-Main - + - Missing PRODINFO - Saknar PRODINFO - + Derivation Components Missing Deriveringsdelar saknas - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5603,49 +5642,49 @@ Detta kan ta upp till en minut beroende på systemets prestanda. - + Deriving Keys Härleda Nycklar - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Välj RomFS Dumpa Mål - + Please select which RomFS you would like to dump. Välj vilken RomFS du vill dumpa. - + Are you sure you want to close yuzu? Är du säker på att du vill stänga yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Är du säker på att du vill stoppa emuleringen? Du kommer att förlora osparade framsteg. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5653,48 +5692,143 @@ Would you like to bypass this and exit anyway? Vill du strunta i detta och avsluta ändå? + + + None + Ingen + + + + FXAA + + + + + SMAA + + + + + Nearest + + + + + Bilinear + + + + + Bicubic + + + + + Gaussian + + + + + ScaleForce + + + + + Docked + Dockad + + + + Handheld + Handheld + + + + Normal + + + + + High + + + + + Extreme + + + + + Vulkan + + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL inte tillgängligt! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. yuzu har inte komilerats med OpenGL support. - - + + Error while initializing OpenGL! Fel under initialisering av OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. - + Error while initializing OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 @@ -6047,138 +6181,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Skärmdump - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen Fullskärm - + Load File Ladda Fil - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6912,30 +7046,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [inte inställd] @@ -6946,14 +7080,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Axel %1%2 @@ -6964,320 +7098,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [okänd] - - + + Left Vänster - - + + Right Höger - - + + Down Ner - - + + Up Upp - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Cirkel - + Cross Kors - + Square Fyrkant - + Triangle Triangel - + Share Dela - + Options Val - + [undefined] [odefinerad] - + %1%2 %1%2 - - + + [invalid] [felaktig] - - + + %1%2Hat %3 %1%2Hatt %3 - - + - + + %1%2Axis %3 %1%2Axel %3 - - + + %1%2Axis %3,%4,%5 %1%2Axel %3,%4%5 - - + + %1%2Motion %3 %1%2Rörelse %3 - - + + %1%2Button %3 %1%2Knapp %3 - - + + [unused] [oanvänd] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Pluss - + Minus Minus - - + + Home Hem - + Capture Fånga - + Touch Touch - + Wheel Indicates the mouse wheel Hjul - + Backward Bakåt - + Forward Framåt - + Task Åtgärd - + Extra Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/tr_TR.ts b/dist/languages/tr_TR.ts index 8a1ebdc7e..c98e78ddb 100644 --- a/dist/languages/tr_TR.ts +++ b/dist/languages/tr_TR.ts @@ -1130,78 +1130,78 @@ Bu seçenek belleğe yazma/okuma işlemlerindeki güvenlik kontrolünü kaldıra yuzu Yapılandırması - - + + Audio Ses - - + + CPU CPU - + Debug Hata Ayıklama - + Filesystem Dosya sistemi - - + + General Genel - - + + Graphics Grafikler - + GraphicsAdvanced Gelişmiş Grafik Ayarları - + Hotkeys Kısayollar - - + + Controls Kontroller - + Profiles Profiller - + Network - - + + System Sistem - + Game List Oyun Listesi - + Web Web @@ -1395,17 +1395,22 @@ Bu seçenek belleğe yazma/okuma işlemlerindeki güvenlik kontrolünü kaldıra Hareketsizlik durumunda imleci gizle - + + Disable controller applet + + + + Reset All Settings Tüm Ayarları Sıfırla - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Bu seçenek tüm genel ve oyuna özgü ayarları silecektir. Oyun dizinleri, profiller ve giriş profilleri silinmeyecektir. Devam etmek istiyor musunuz? @@ -1693,43 +1698,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Arkaplan Rengi: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Assembly Shaderları, Yalnızca NVIDIA için) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Deneysel, Yalnızca Mesa için) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1853,37 +1858,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Anisotropic Filtering: - + Automatic Otomatik - + Default Varsayılan - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2266,7 +2291,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Yapılandır @@ -2333,22 +2358,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - Mouse ile kaydırmayı etkinleştir - - - - Mouse sensitivity - Fare hassasiyeti - - - - % - % - - - + Motion / Touch Hareket / Dokunmatik @@ -2460,7 +2470,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Sol Analog @@ -2554,14 +2564,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2580,7 +2590,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Artı @@ -2593,15 +2603,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2658,247 +2668,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Sağ Analog - - - - + + Mouse panning + + + + + Configure + Yapılandır + + + + + + Clear Temizle - - - - - + + + + + [not set] [belirlenmedi] - - - + + + Invert button Tuşları ters çevir - - + + Toggle button Tuşu Aç/Kapa - + Turbo button Turbo tuşu - - + + Invert axis Ekseni ters çevir - - - + + + Set threshold Alt sınır ayarla - - + + Choose a value between 0% and 100% %0 ve %100 arasında bir değer seçin - + Toggle axis Ekseni aç/kapa - + Set gyro threshold Gyro alt sınırı ayarla - + Calibrate sensor - + Map Analog Stick Analog Çubuğu Ayarla - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Tamama bastıktan sonra, joystikinizi önce yatay sonra dikey olarak hareket ettirin. Eksenleri ters çevirmek için, önce joystickinizi dikey sonra yatay olarak hareket ettirin. - + Center axis Ekseni merkezle - - + + Deadzone: %1% Ölü Bölge: %1% - - + + Modifier Range: %1% Düzenleyici Aralığı: %1% - - + + Pro Controller Pro Controller - + Dual Joycons İkili Joyconlar - + Left Joycon Sol Joycon - + Right Joycon Sağ Joycon - + Handheld Handheld - + GameCube Controller GameCube Kontrolcüsü - + Poke Ball Plus Poke Ball Plus - + NES Controller NES Kontrolcüsü - + SNES Controller SNES Kontrolcüsü - + N64 Controller N64 Kontrolcüsü - + Sega Genesis Sega Genesis - + Start / Pause Başlat / Duraklat - + Z Z - + Control Stick Kontrol Çubuğu - + C-Stick C-Çubuğu - + Shake! Salla! - + [waiting] [bekleniyor] - + New Profile Yeni Profil - + Enter a profile name: Bir profil ismi girin: - - + + Create Input Profile Kontrol Profili Oluştur - + The given profile name is not valid! Girilen profil ismi geçerli değil! - + Failed to create the input profile "%1" "%1" kontrol profili oluşturulamadı - + Delete Input Profile Kontrol Profilini Kaldır - + Failed to delete the input profile "%1" "%1" kontrol profili kaldırılamadı - + Load Input Profile Kontrol Profilini Yükle - + Failed to load the input profile "%1" "%1" kontrol profili yüklenemedi - + Save Input Profile Kontrol Profilini Kaydet - + Failed to save the input profile "%1" "%1" kontrol profili kaydedilemedi @@ -3077,6 +3097,81 @@ Eksenleri ters çevirmek için, önce joystickinizi dikey sonra yatay olarak har UDP testi ya da yapılandırılması devrede.<br>Lütfen bitmesini bekleyin. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Varsayılan + + ConfigureNetwork @@ -3153,47 +3248,47 @@ Eksenleri ters çevirmek için, önce joystickinizi dikey sonra yatay olarak har Geliştirici - + Add-Ons Eklentiler - + General Genel - + System Sistem - + CPU CPU - + Graphics Grafikler - + Adv. Graphics Gelişmiş Grafikler - + Audio Ses - + Input Profiles Kontrol Profilleri - + Properties Özellikler @@ -3396,8 +3491,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Eğer bu kontrolcüyü kullanmak istiyorsanız oyunun doğru düzgün kontrolcüyü algılaması için oyunu açmadan önce oyuncu 1'i sağ kontrolcü ve oyuncu 2'yi çift joycon olarak ayarlayın. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3433,7 +3528,7 @@ UUID: %2 - + Enable @@ -3500,12 +3595,17 @@ UUID: %2 Atanmış cihaza ring takılı değil - + + The current mapped device is not connected + + + + Unexpected driver result %1 Beklenmeyen sürücü sonucu %1 - + [waiting] [bekleniyor] @@ -4615,560 +4715,575 @@ Noktanın konumunu değiştirmek için sürükleyin ya da sayıların üstüne GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Yuzuyu geliştirmeye yardımcı olmak için </a> anonim veri toplandı. <br/><br/>Kullanım verinizi bizimle paylaşmak ister misiniz? - + Telemetry Telemetri - + Broken Vulkan Installation Detected Bozuk Vulkan Kurulumu Algılandı - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Açılışta Vulkan başlatılırken hata. Hata yardımını görüntülemek için <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>buraya tıklayın</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Web Uygulaması Yükleniyor... - - + + Disable Web Applet Web Uygulamasını Devre Dışı Bırak - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Web uygulamasını kapatmak bilinmeyen hatalara neden olabileceğinden dolayı sadece Super Mario 3D All-Stars için kapatılması önerilir. Web uygulamasını kapatmak istediğinize emin misiniz? (Hata ayıklama ayarlarından tekrar açılabilir) - + The amount of shaders currently being built Şu anda derlenen shader miktarı - + The current selected resolution scaling multiplier. Geçerli seçili çözünürlük ölçekleme çarpanı. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Geçerli emülasyon hızı. %100'den yüksek veya düşük değerler emülasyonun bir Switch'den daha hızlı veya daha yavaş çalıştığını gösterir. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Oyunun şuanda saniye başına kaç kare gösterdiği. Bu oyundan oyuna ve sahneden sahneye değişiklik gösterir. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Bir Switch karesini emüle etmekte geçen zaman, karelimitleme ve v-sync hariç. Tam hız emülasyon için bu en çok 16,67 ms olmalı. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files &Son Dosyaları Temizle - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Devam Et - + &Pause &Duraklat - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu şu anda bir oyun çalıştırıyor - - - + Warning Outdated Game Format Uyarı, Eski Oyun Formatı - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Bu oyun için dekonstrükte ROM formatı kullanıyorsunuz, bu fromatın yerine NCA, NAX, XCI ve NSP formatları kullanılmaktadır. Dekonstrükte ROM formatları ikon, üst veri ve güncelleme desteği içermemektedir.<br><br>Yuzu'nun desteklediği çeşitli Switch formatları için<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Wiki'yi ziyaret edin</a>. Bu mesaj yeniden gösterilmeyecektir. - - + + Error while loading ROM! ROM yüklenirken hata oluştu! - + The ROM format is not supported. Bu ROM biçimi desteklenmiyor. - + An error occurred initializing the video core. Video çekirdeğini başlatılırken bir hata oluştu. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu video çekirdeğini çalıştırırken bir hatayla karşılaştı. Bu sorun genellikle eski GPU sürücüleri sebebiyle ortaya çıkar. Daha fazla detay için lütfen log dosyasına bakın. Log dosyasını incelemeye dair daha fazla bilgi için lütfen bu sayfaya ulaşın: <a href='https://yuzu-emu.org/help/reference/log-files/'>Log dosyası nasıl yüklenir</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. ROM yüklenirken hata oluştu! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Lütfen dosyalarınızı yeniden dump etmek için<a href='https://yuzu-emu.org/help/quickstart/'>yuzu hızlı başlangıç kılavuzu'nu</a> takip edin.<br> Yardım için yuzu wiki</a>veya yuzu Discord'una</a> bakabilirsiniz. - + An unknown error occurred. Please see the log for more details. Bilinmeyen bir hata oluştu. Lütfen daha fazla detay için kütüğe göz atınız. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Yazılım kapatılıyor... - + Save Data Kayıt Verisi - + Mod Data Mod Verisi - + Error Opening %1 Folder %1 klasörü açılırken hata - - + + Folder does not exist! Klasör mevcut değil! - + Error Opening Transferable Shader Cache Transfer Edilebilir Shader Cache'ini Açarken Bir Hata Oluştu - + Failed to create the shader cache directory for this title. Bu oyun için shader cache konumu oluşturulamadı. - + Error Removing Contents İçerik Kaldırma Hatası - + Error Removing Update Güncelleme Kaldırma hatası - + Error Removing DLC DLC Kaldırma Hatası - + Remove Installed Game Contents? Yüklenmiş Oyun İçeriğini Kaldırmak İstediğinize Emin Misiniz? - + Remove Installed Game Update? Yüklenmiş Oyun Güncellemesini Kaldırmak İstediğinize Emin Misiniz? - + Remove Installed Game DLC? Yüklenmiş DLC'yi Kaldırmak İstediğinize Emin Misiniz? - + Remove Entry Girdiyi Kaldır - - - - - - + + + + + + Successfully Removed Başarıyla Kaldırıldı - + Successfully removed the installed base game. Yüklenmiş oyun başarıyla kaldırıldı. - + The base game is not installed in the NAND and cannot be removed. Asıl oyun NAND'de kurulu değil ve kaldırılamaz. - + Successfully removed the installed update. Yüklenmiş güncelleme başarıyla kaldırıldı. - + There is no update installed for this title. Bu oyun için yüklenmiş bir güncelleme yok. - + There are no DLC installed for this title. Bu oyun için yüklenmiş bir DLC yok. - + Successfully removed %1 installed DLC. %1 yüklenmiş DLC başarıyla kaldırıldı. - + Delete OpenGL Transferable Shader Cache? OpenGL Transfer Edilebilir Shader Cache'ini Kaldırmak İstediğinize Emin Misiniz? - + Delete Vulkan Transferable Shader Cache? Vulkan Transfer Edilebilir Shader Cache'ini Kaldırmak İstediğinize Emin Misiniz? - + Delete All Transferable Shader Caches? Tüm Transfer Edilebilir Shader Cache'leri Kaldırmak İstediğinize Emin Misiniz? - + Remove Custom Game Configuration? Oyuna Özel Yapılandırmayı Kaldırmak İstediğinize Emin Misiniz? - + Remove Cache Storage? - + Remove File Dosyayı Sil - - + + Error Removing Transferable Shader Cache Transfer Edilebilir Shader Cache Kaldırılırken Bir Hata Oluştu - - + + A shader cache for this title does not exist. Bu oyun için oluşturulmuş bir shader cache yok. - + Successfully removed the transferable shader cache. Transfer edilebilir shader cache başarıyla kaldırıldı. - + Failed to remove the transferable shader cache. Transfer edilebilir shader cache kaldırılamadı. - + Error Removing Vulkan Driver Pipeline Cache Vulkan Pipeline Önbelleği Kaldırılırken Hata - + Failed to remove the driver pipeline cache. Sürücü pipeline önbelleği kaldırılamadı. - - + + Error Removing Transferable Shader Caches Transfer Edilebilir Shader Cache'ler Kaldırılırken Bir Hata Oluştu - + Successfully removed the transferable shader caches. Transfer edilebilir shader cacheler başarıyla kaldırıldı. - + Failed to remove the transferable shader cache directory. Transfer edilebilir shader cache konumu kaldırılamadı. - - + + Error Removing Custom Configuration Oyuna Özel Yapılandırma Kaldırılırken Bir Hata Oluştu. - + A custom configuration for this title does not exist. Bu oyun için bir özel yapılandırma yok. - + Successfully removed the custom game configuration. Oyuna özel yapılandırma başarıyla kaldırıldı. - + Failed to remove the custom game configuration. Oyuna özel yapılandırma kaldırılamadı. - - + + RomFS Extraction Failed! RomFS Çıkartımı Başarısız! - + There was an error copying the RomFS files or the user cancelled the operation. RomFS dosyaları kopyalanırken bir hata oluştu veya kullanıcı işlemi iptal etti. - + Full Full - + Skeleton Çerçeve - + Select RomFS Dump Mode RomFS Dump Modunu Seçiniz - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Lütfen RomFS'in nasıl dump edilmesini istediğinizi seçin.<br>"Full" tüm dosyaları yeni bir klasöre kopyalarken <br>"skeleton" sadece klasör yapısını oluşturur. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 konumunda RomFS çıkarmaya yetecek alan yok. Lütfen yer açın ya da Emülasyon > Yapılandırma > Sistem > Dosya Sistemi > Dump konumu kısmından farklı bir çıktı konumu belirleyin. - + Extracting RomFS... RomFS çıkartılıyor... - - + + Cancel İptal - + RomFS Extraction Succeeded! RomFS Çıkartımı Başarılı! - + The operation completed successfully. İşlem başarıyla tamamlandı. - - - - - + + + + + Create Shortcut Kısayol Oluştur - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Bu seçenek, şu anki AppImage dosyasının kısayolunu oluşturacak. Uygulama güncellenirse kısayol çalışmayabilir. Devam edilsin mi? - + Cannot create shortcut on desktop. Path "%1" does not exist. Masaüstünde kısayol oluşturulamadı. "%1" dizini yok. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Uygulamalar menüsünde kısayol oluşturulamadı. "%1" dizini yok ve oluşturulamıyor. - + Create Icon Simge Oluştur - + Cannot create icon file. Path "%1" does not exist and cannot be created. Simge dosyası oluşturulamadı. "%1" dizini yok ve oluşturulamıyor. - + Start %1 with the yuzu Emulator yuzu Emülatörü başlatılırken %1 başlatılsın - + Failed to create a shortcut at %1 %1 dizininde kısayol oluşturulamadı - + Successfully created a shortcut to %1 %1 dizinine kısayol oluşturuldu - + Error Opening %1 %1 Açılırken Bir Hata Oluştu - + Select Directory Klasör Seç - + Properties Özellikler - + The game properties could not be loaded. Oyun özellikleri yüklenemedi. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Çalıştırılabilir Dosyası (%1);;Tüm Dosyalar (*.*) - + Load File Dosya Aç - + Open Extracted ROM Directory Çıkartılmış ROM klasörünü aç - + Invalid Directory Selected Geçersiz Klasör Seçildi - + The directory you have selected does not contain a 'main' file. Seçtiğiniz klasör bir "main" dosyası içermiyor. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Yüklenilebilir Switch Dosyası (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submissions Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Dosya Kur - + %n file(s) remaining %n dosya kaldı%n dosya kaldı - + Installing file "%1"... "%1" dosyası kuruluyor... - - + + Install Results Kurulum Sonuçları - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Olası çakışmaları önlemek için oyunları NAND'e yüklememenizi tavsiye ediyoruz. Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + %n file(s) were newly installed %n dosya güncel olarak yüklendi @@ -5176,7 +5291,7 @@ Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + %n file(s) were overwritten %n dosyanın üstüne yazıldı @@ -5184,7 +5299,7 @@ Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + %n file(s) failed to install %n dosya yüklenemedi @@ -5192,388 +5307,312 @@ Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + System Application Sistem Uygulaması - + System Archive Sistem Arşivi - + System Application Update Sistem Uygulama Güncellemesi - + Firmware Package (Type A) Yazılım Paketi (Tür A) - + Firmware Package (Type B) Yazılım Paketi (Tür B) - + Game Oyun - + Game Update Oyun Güncellemesi - + Game DLC Oyun DLC'si - + Delta Title Delta Başlık - + Select NCA Install Type... NCA Kurulum Tipi Seçin... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Lütfen bu NCA dosyası için belirlemek istediğiniz başlık türünü seçiniz: (Çoğu durumda, varsayılan olan 'Oyun' kullanılabilir.) - + Failed to Install Kurulum Başarısız Oldu - + The title type you selected for the NCA is invalid. NCA için seçtiğiniz başlık türü geçersiz - + File not found Dosya Bulunamadı - + File "%1" not found Dosya "%1" Bulunamadı - + OK Tamam - - + + Hardware requirements not met Donanım gereksinimleri karşılanmıyor - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Sisteminiz, önerilen donanım gereksinimlerini karşılamıyor. Uyumluluk raporlayıcı kapatıldı. - + Missing yuzu Account Kayıp yuzu Hesabı - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Oyun uyumluluk test çalışması göndermek için öncelikle yuzu hesabınla giriş yapmanız gerekiyor.<br><br/>Yuzu hesabınızla giriş yapmak için, Emülasyon &gt; Yapılandırma &gt; Web'e gidiniz. - + Error opening URL URL açılırken bir hata oluştu - + Unable to open the URL "%1". URL "%1" açılamıyor. - + TAS Recording TAS kayıtta - + Overwrite file of player 1? Oyuncu 1'in dosyasının üstüne yazılsın mı? - + Invalid config detected Geçersiz yapılandırma tespit edildi - + Handheld controller can't be used on docked mode. Pro controller will be selected. Handheld kontrolcü dock modunda kullanılamaz. Pro kontrolcü seçilecek. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Amiibo kaldırıldı - + Error Hata - - + + The current game is not looking for amiibos Aktif oyun amiibo beklemiyor - + Amiibo File (%1);; All Files (*.*) Amiibo Dosyası (%1);; Tüm Dosyalar (*.*) - + Load Amiibo Amiibo Yükle - + Error loading Amiibo data Amiibo verisi yüklenirken hata - + The selected file is not a valid amiibo Seçtiğiniz dosya geçerli bir amiibo değil - + The selected file is already on use Seçtiğiniz dosya hali hazırda kullanılıyor - + An unknown error occurred Bilinmeyen bir hata oluştu - + Capture Screenshot Ekran Görüntüsü Al - + PNG Image (*.png) PNG görüntüsü (*.png) - + TAS state: Running %1/%2 TAS durumu: %1%2 çalışıyor - + TAS state: Recording %1 TAS durumu: %1 kaydediliyor - + TAS state: Idle %1/%2 TAS durumu: %1%2 boşta - + TAS State: Invalid TAS durumu: Geçersiz - + &Stop Running &Çalıştırmayı durdur - + &Start &Başlat - + Stop R&ecording K&aydetmeyi Durdur - + R&ecord K&aydet - + Building: %n shader(s) Oluşturuluyor: %n shaderOluşturuluyor: %n shader - + Scale: %1x %1 is the resolution scaling factor Ölçek: %1x - + Speed: %1% / %2% Hız %1% / %2% - + Speed: %1% Hız: %1% - + Game: %1 FPS (Unlocked) Oyun: %1 FPS (Sınırsız) - + Game: %1 FPS Oyun: %1 FPS - + Frame: %1 ms Kare: %1 ms - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU YÜKSEK - - - - GPU EXTREME - GPU EKSTREM - - - - GPU ERROR - GPU HATASI - - - - DOCKED - TAKILI MOD - - - - HANDHELD - TAŞIMA MODU - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - YOK - - - - NEAREST - EN YAKIN - - - - - BILINEAR - BILINEAR - - - - BICUBIC - BICUBIC - - - - GAUSSIAN - GAUSYEN - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA AA YOK - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE SES: KAPALI - + VOLUME: %1% Volume percentage (e.g. 50%) SES: %%1 - + Confirm Key Rederivation Anahtar Yeniden Türetimini Onayla - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5590,37 +5629,37 @@ ve opsiyonel olarak yedekler alın. Bu sizin otomatik oluşturulmuş anahtar dosyalarınızı silecek ve anahtar türetme modülünü tekrar çalıştıracak. - + Missing fuses Anahtarlar Kayıp - + - Missing BOOT0 - BOOT0 Kayıp - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main Kayıp - + - Missing PRODINFO - PRODINFO Kayıp - + Derivation Components Missing Türeten Bileşenleri Kayıp - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Şifreleme anahtarları eksik. <br>Lütfen takip edin<a href='https://yuzu-emu.org/help/quickstart/'>yuzu hızlı başlangıç kılavuzunu</a>tüm anahtarlarınızı, aygıt yazılımınızı ve oyunlarınızı almada.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5629,49 +5668,49 @@ Bu sistem performansınıza bağlı olarak bir dakika kadar zaman alabilir. - + Deriving Keys Anahtarlar Türetiliyor - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target RomFS Dump Hedefini Seçiniz - + Please select which RomFS you would like to dump. Lütfen dump etmek istediğiniz RomFS'i seçiniz. - + Are you sure you want to close yuzu? yuzu'yu kapatmak istediğinizden emin misiniz? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Emülasyonu durdurmak istediğinizden emin misiniz? Kaydedilmemiş veriler kaybolur. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5679,48 +5718,143 @@ Would you like to bypass this and exit anyway? Görmezden gelip kapatmak ister misiniz? + + + None + Yok + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bicubic + + + + Gaussian + Gausyen + + + + ScaleForce + ScaleForce + + + + Docked + Dock Modu Aktif + + + + Handheld + Taşınabilir + + + + Normal + + + + + High + + + + + Extreme + + + + + Vulkan + + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL kullanıma uygun değil! - + OpenGL shared contexts are not supported. OpenGL paylaşılan bağlam desteklenmiyor. - + yuzu has not been compiled with OpenGL support. Yuzu OpenGL desteklememektedir. - - + + Error while initializing OpenGL! OpenGl başlatılırken bir hata oluştu! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. GPU'nuz OpenGL desteklemiyor veya güncel bir grafik sürücüsüne sahip değilsiniz. - + Error while initializing OpenGL 4.6! OpenGl 4.6 başlatılırken bir hata oluştu! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 GPU'nuz OpenGL 4.6'yı desteklemiyor veya güncel bir grafik sürücüsüne sahip değilsiniz.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 GPU'nuz gereken bir yada daha fazla OpenGL eklentisini desteklemiyor Lütfen güncel bir grafik sürücüsüne sahip olduğunuzdan emin olun.<br><br>GL Renderer:<br>%1<br><br> Desteklenmeyen Eklentiler:<br>%2 @@ -6073,138 +6207,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute Sesi Sustur/Aç - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Ana Pencere - + Audio Volume Down Ses Kapa - + Audio Volume Up Ses Aç - + Capture Screenshot Ekran Görüntüsü Al - + Change Adapting Filter Uyarlanan Filtreyi Değiştir - + Change Docked Mode Takılı Modu Kullan - + Change GPU Accuracy GPU Doğruluğunu Değiştir - + Continue/Pause Emulation Sürdür/Emülasyonu duraklat - + Exit Fullscreen Tam Ekrandan Çık - + Exit yuzu Yuzu'dan çık - + Fullscreen Tam Ekran - + Load File Dosya Aç - + Load/Remove Amiibo Amiibo Yükle/Kaldır - + Restart Emulation Emülasyonu Yeniden Başlat - + Stop Emulation Emülasyonu Durdur - + TAS Record TAS Kaydet - + TAS Reset TAS Sıfırla - + TAS Start/Stop TAS Başlat/Durdur - + Toggle Filter Bar Filtre Çubuğunu Aç/Kapa - + Toggle Framerate Limit FPS Limitini Aç/Kapa - + Toggle Mouse Panning Mouse ile Kaydırmayı Aç/Kapa - + Toggle Status Bar Durum Çubuğunu Aç/Kapa @@ -6947,30 +7081,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [belirlenmedi] @@ -6981,14 +7115,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Eksen %1%2 @@ -6999,320 +7133,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [bilinmeyen] - - + + Left Sol - - + + Right Sağ - - + + Down Aşağı - - + + Up Yukarı - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Yuvarlak - + Cross Çarpı - + Square Kare - + Triangle Üçgen - + Share Share - + Options Options - + [undefined] [belirsiz] - + %1%2 %1%2 - - + + [invalid] [geçersiz] - - + + %1%2Hat %3 %1%2Hat %3 - - + - + + %1%2Axis %3 %1%2Eksen %3 - - + + %1%2Axis %3,%4,%5 %1%2Eksen %3,%4,%5 - - + + %1%2Motion %3 %1%2Hareket %3 - - + + %1%2Button %3 %1%2Tuş %3 - - + + [unused] [kullanılmayan] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L L Çubuğu - + Stick R R Çubuğu - + Plus Artı - + Minus Eksi - - + + Home Home - + Capture Kaydet - + Touch Dokunmatik - + Wheel Indicates the mouse wheel Fare Tekerleği - + Backward Geri - + Forward İleri - + Task Görev - + Extra Ekstra - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 %1%2%3Tuş %4 diff --git a/dist/languages/uk.ts b/dist/languages/uk.ts index d82fc1e66..6c5762e8d 100644 --- a/dist/languages/uk.ts +++ b/dist/languages/uk.ts @@ -1137,78 +1137,78 @@ This would ban both their forum username and their IP address. Налаштування yuzu - - + + Audio Аудіо - - + + CPU ЦП - + Debug Налагодження - + Filesystem Файлова система - - + + General Загальні - - + + Graphics Графіка - + GraphicsAdvanced ГрафікаРозширені - + Hotkeys Гарячі клавіші - - + + Controls Керування - + Profiles Профілі - + Network Мережа - - + + System Система - + Game List Список ігор - + Web Мережа @@ -1402,17 +1402,22 @@ This would ban both their forum username and their IP address. Приховування миші при бездіяльності - + + Disable controller applet + + + + Reset All Settings Скинути всі налаштування - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Це скине всі налаштування і видалить усі конфігурації під окремі ігри. При цьому не будуть видалені шляхи до ігор, профілів або профілів вводу. Продовжити? @@ -1703,43 +1708,43 @@ Mailbox може мати меншу затримку, ніж FIFO, і не ма Фоновий колір: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (асемблерні шейдери, лише для NVIDIA) - + SPIR-V (Experimental, Mesa Only) SPIR-V (Експериментально, лише для Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off Вимкнено - + VSync Off Верт. синхронізацію вимкнено - + Recommended Рекомендовано - + On Увімкнено - + VSync On Верт. синхронізація увімкнена @@ -1864,37 +1869,57 @@ Compute pipelines are always enabled on all other drivers. Увімкнути обчислювальні конвеєри (тільки для Intel Vulkan) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Анізотропна фільтрація: - + Automatic Автоматично - + Default За замовчуванням - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2277,7 +2302,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Налаштувати @@ -2344,22 +2369,7 @@ Compute pipelines are always enabled on all other drivers. Використовувати випадкове Amiibo ID - - Enable mouse panning - Увімкнути панорамування миші - - - - Mouse sensitivity - Чутливість миші - - - - % - % - - - + Motion / Touch Рух і сенсор @@ -2471,7 +2481,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Лівий міні-джойстик @@ -2565,14 +2575,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2591,7 +2601,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Плюс @@ -2604,15 +2614,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2669,247 +2679,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Правий міні-джойстик - - - - + + Mouse panning + + + + + Configure + Налаштувати + + + + + + Clear Очистити - - - - - + + + + + [not set] [не задано] - - - + + + Invert button Інвертувати кнопку - - + + Toggle button Переключити кнопку - + Turbo button Турбо кнопка - - + + Invert axis Інвертувати осі - - - + + + Set threshold Встановити поріг - - + + Choose a value between 0% and 100% Оберіть значення між 0% і 100% - + Toggle axis Переключити осі - + Set gyro threshold Встановити поріг гіроскопа - + Calibrate sensor Калібрувати сенсор - + Map Analog Stick Задати аналоговий міні-джойстик - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Після натискання на ОК, рухайте ваш міні-джойстик горизонтально, а потім вертикально. Щоб інвертувати осі, спочатку рухайте ваш міні-джойстик вертикально, а потім горизонтально. - + Center axis Центрувати осі - - + + Deadzone: %1% Мертва зона: %1% - - + + Modifier Range: %1% Діапазон модифікатора: %1% - - + + Pro Controller Контролер Pro - + Dual Joycons Подвійні Joy-Con'и - + Left Joycon Лівий Joy-Con - + Right Joycon Правий Joy-Con - + Handheld Портативний - + GameCube Controller Контролер GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Контролер NES - + SNES Controller Контролер SNES - + N64 Controller Контролер N64 - + Sega Genesis Sega Genesis - + Start / Pause Старт / Пауза - + Z Z - + Control Stick Міні-джойстик керування - + C-Stick C-Джойстик - + Shake! Потрусіть! - + [waiting] [очікування] - + New Profile Новий профіль - + Enter a profile name: Введіть ім'я профілю: - - + + Create Input Profile Створити профіль контролю - + The given profile name is not valid! Задане ім'я профілю недійсне! - + Failed to create the input profile "%1" Не вдалося створити профіль контролю "%1" - + Delete Input Profile Видалити профіль контролю - + Failed to delete the input profile "%1" Не вдалося видалити профіль контролю "%1" - + Load Input Profile Завантажити профіль контролю - + Failed to load the input profile "%1" Не вдалося завантажити профіль контролю "%1" - + Save Input Profile Зберегти профіль контролю - + Failed to save the input profile "%1" Не вдалося зберегти профіль контролю "%1" @@ -3088,6 +3108,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Тест UDP або калібрація в процесі.<br>Будь ласка, зачекайте завершення. + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + Увімкнути + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + За замовчуванням + + ConfigureNetwork @@ -3164,47 +3259,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Розробник - + Add-Ons Доповнення - + General Загальні - + System Система - + CPU ЦП - + Graphics Графіка - + Adv. Graphics Розш. Графіка - + Audio Аудіо - + Input Profiles Профілі вводу - + Properties Властивості @@ -3407,8 +3502,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - Якщо ви хочете використовувати цей контролер, налаштуйте гравця 1 як правий контролер, а гравця 2 як подвійний Joy-Соп перед початком гри, щоб цей контролер був виявлений правильно. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + @@ -3444,7 +3539,7 @@ UUID: %2 - + Enable Увімкнути @@ -3511,12 +3606,17 @@ UUID: %2 До поточного пристрою не прикріплено кільце - + + The current mapped device is not connected + + + + Unexpected driver result %1 Несподіваний результат драйвера %1 - + [waiting] [очікування] @@ -3822,7 +3922,7 @@ UUID: %2 American English - Американська Англійська + Американська англійська @@ -3877,32 +3977,32 @@ UUID: %2 British English - Британська Англійська + Британська англійська Canadian French - Канадська Французька + Канадська французька Latin American Spanish - Латиноамериканська Іспанська + Латиноамериканська іспанська Simplified Chinese - Спрощена Китайська + Спрощена китайська Traditional Chinese (正體中文) - Традиційна Китайська (正體中文) + Традиційна китайська (正體中文) Brazilian Portuguese (português do Brasil) - Бразильська Португальська (português do Brasil) + Бразильська португальська (português do Brasil) @@ -4626,560 +4726,575 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Анонімні дані збираються для того,</a> щоб допомогти поліпшити роботу yuzu. <br/><br/>Хотіли б ви ділитися даними про використання з нами? - + Telemetry Телеметрія - + Broken Vulkan Installation Detected Виявлено пошкоджену інсталяцію Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Не вдалося виконати ініціалізацію Vulkan під час завантаження.<br><br>Натисніть <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>тут для отримання інструкцій щодо усунення проблеми</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... Завантаження веб-аплета... - - + + Disable Web Applet Вимкнути веб-аплет - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Вимкнення веб-апплета може призвести до несподіваної поведінки, і його слід вимикати лише заради Super Mario 3D All-Stars. Ви впевнені, що хочете вимкнути веб-апплет? (Його можна знову ввімкнути в налаштуваннях налагодження.) - + The amount of shaders currently being built Кількість створюваних шейдерів на цей момент - + The current selected resolution scaling multiplier. Поточний обраний множник масштабування роздільної здатності. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Поточна швидкість емуляції. Значення вище або нижче 100% вказують на те, що емуляція йде швидше або повільніше, ніж на Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Кількість кадрів на секунду в цей момент. Значення буде змінюватися між іграми та сценами. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Час, який потрібен для емуляції 1 кадру Switch, не беручи до уваги обмеження FPS або вертикальну синхронізацію. Для емуляції в повній швидкості значення має бути не більше 16,67 мс. - + + Unmute + Увімкнути звук + + + + Mute + Вимкнути звук + + + + Reset Volume + Скинути гучність + + + &Clear Recent Files [&C] Очистити нещодавні файли - + Emulated mouse is enabled Емульована мишка увімкнена - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Введення реальної миші та панорамування мишею несумісні. Будь ласка, вимкніть емульовану мишу в розширених налаштуваннях введення, щоб дозволити панорамування мишею. - + &Continue [&C] Продовжити - + &Pause [&P] Пауза - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - В yuzu запущено гру - - - + Warning Outdated Game Format Попередження застарілий формат гри - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Для цієї гри ви використовуєте розархівований формат ROM'а, який є застарілим і був замінений іншими, такими як NCA, NAX, XCI або NSP. У розархівованих каталогах ROM'а відсутні іконки, метадані та підтримка оновлень. <br><br>Для отримання інформації про різні формати Switch, підтримувані yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>перегляньте нашу вікі</a>. Це повідомлення більше не буде відображатися. - - + + Error while loading ROM! Помилка під час завантаження ROM! - + The ROM format is not supported. Формат ROM'а не підтримується. - + An error occurred initializing the video core. Сталася помилка під час ініціалізації відеоядра. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu зіткнувся з помилкою під час запуску відеоядра. Зазвичай це спричинено застарілими драйверами ГП, включно з інтегрованими. Перевірте журнал для отримання більш детальної інформації. Додаткову інформацію про доступ до журналу дивіться на наступній сторінці: <a href='https://yuzu-emu.org/help/reference/log-files/'>Як завантажити файл журналу</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Помилка під час завантаження ROM'а! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Будь ласка, дотримуйтесь <a href='https://yuzu-emu.org/help/quickstart/'>короткого керівництва користувача yuzu</a> щоб пере-дампити ваші файли<br>Ви можете звернутися до вікі yuzu</a> або Discord yuzu</a> для допомоги - + An unknown error occurred. Please see the log for more details. Сталася невідома помилка. Будь ласка, перевірте журнал для подробиць. - + (64-bit) (64-бітний) - + (32-bit) (32-бітний) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Закриваємо програму... - + Save Data Збереження - + Mod Data Дані модів - + Error Opening %1 Folder Помилка під час відкриття папки %1 - - + + Folder does not exist! Папка не існує! - + Error Opening Transferable Shader Cache Помилка під час відкриття переносного кешу шейдерів - + Failed to create the shader cache directory for this title. Не вдалося створити папку кешу шейдерів для цієї гри. - + Error Removing Contents Помилка під час видалення вмісту - + Error Removing Update Помилка під час видалення оновлень - + Error Removing DLC Помилка під час видалення DLC - + Remove Installed Game Contents? Видалити встановлений вміст ігор? - + Remove Installed Game Update? Видалити встановлені оновлення гри? - + Remove Installed Game DLC? Видалити встановлені DLC гри? - + Remove Entry Видалити запис - - - - - - + + + + + + Successfully Removed Успішно видалено - + Successfully removed the installed base game. Встановлену гру успішно видалено. - + The base game is not installed in the NAND and cannot be removed. Гру не встановлено в NAND і не може буде видалено. - + Successfully removed the installed update. Встановлене оновлення успішно видалено. - + There is no update installed for this title. Для цієї гри не було встановлено оновлення. - + There are no DLC installed for this title. Для цієї гри не було встановлено DLC. - + Successfully removed %1 installed DLC. Встановлений DLC %1 було успішно видалено - + Delete OpenGL Transferable Shader Cache? Видалити переносний кеш шейдерів OpenGL? - + Delete Vulkan Transferable Shader Cache? Видалити переносний кеш шейдерів Vulkan? - + Delete All Transferable Shader Caches? Видалити весь переносний кеш шейдерів? - + Remove Custom Game Configuration? Видалити користувацьке налаштування гри? - + Remove Cache Storage? - + Видалити кеш-сховище? - + Remove File Видалити файл - - + + Error Removing Transferable Shader Cache Помилка під час видалення переносного кешу шейдерів - - + + A shader cache for this title does not exist. Кеш шейдерів для цієї гри не існує. - + Successfully removed the transferable shader cache. Переносний кеш шейдерів успішно видалено. - + Failed to remove the transferable shader cache. Не вдалося видалити переносний кеш шейдерів. - + Error Removing Vulkan Driver Pipeline Cache Помилка під час видалення конвеєрного кешу Vulkan - + Failed to remove the driver pipeline cache. Не вдалося видалити конвеєрний кеш шейдерів. - - + + Error Removing Transferable Shader Caches Помилка під час видалення переносного кешу шейдерів - + Successfully removed the transferable shader caches. Переносний кеш шейдерів успішно видалено. - + Failed to remove the transferable shader cache directory. Помилка під час видалення папки переносного кешу шейдерів. - - + + Error Removing Custom Configuration Помилка під час видалення користувацького налаштування - + A custom configuration for this title does not exist. Користувацьких налаштувань для цієї гри не існує. - + Successfully removed the custom game configuration. Користувацьке налаштування гри успішно видалено. - + Failed to remove the custom game configuration. Не вдалося видалити користувацьке налаштування гри. - - + + RomFS Extraction Failed! Не вдалося вилучити RomFS! - + There was an error copying the RomFS files or the user cancelled the operation. Сталася помилка під час копіювання файлів RomFS або користувач скасував операцію. - + Full Повний - + Skeleton Скелет - + Select RomFS Dump Mode Виберіть режим дампа RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Будь ласка, виберіть, як ви хочете виконати дамп RomFS <br>Повний скопіює всі файли в нову папку, тоді як <br>скелет створить лише структуру папок. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root В %1 недостатньо вільного місця для вилучення RomFS. Будь ласка, звільніть місце або виберіть іншу папку для дампа в Емуляція > Налаштування > Система > Файлова система > Корінь дампа - + Extracting RomFS... Вилучення RomFS... - - + + Cancel Скасувати - + RomFS Extraction Succeeded! Вилучення RomFS пройшло успішно! - + The operation completed successfully. Операція завершилася успішно. - - - - - + + + + + Create Shortcut Створити ярлик - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Це створить ярлик для поточного AppImage. Він може не працювати після оновлень. Продовжити? - + Cannot create shortcut on desktop. Path "%1" does not exist. Не вдається створити ярлик на робочому столі. Шлях "%1" не існує. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. Неможливо створити ярлик у меню додатків. Шлях "%1" не існує і не може бути створений. - + Create Icon Створити іконку - + Cannot create icon file. Path "%1" does not exist and cannot be created. Неможливо створити файл іконки. Шлях "%1" не існує і не може бути створений. - + Start %1 with the yuzu Emulator Запустити %1 за допомогою емулятора yuzu - + Failed to create a shortcut at %1 Не вдалося створити ярлик у %1 - + Successfully created a shortcut to %1 Успішно створено ярлик у %1 - + Error Opening %1 Помилка відкриття %1 - + Select Directory Обрати папку - + Properties Властивості - + The game properties could not be loaded. Не вдалося завантажити властивості гри. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Виконуваний файл Switch (%1);;Усі файли (*.*) - + Load File Завантажити файл - + Open Extracted ROM Directory Відкрити папку вилученого ROM'а - + Invalid Directory Selected Вибрано неприпустиму папку - + The directory you have selected does not contain a 'main' file. Папка, яку ви вибрали, не містить файлу 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Встановлюваний файл Switch (*.nca, *.nsp, *.xci);;Архів контенту Nintendo (*.nca);;Пакет подачі Nintendo (*.nsp);;Образ картриджа NX (*.xci) - + Install Files Встановити файли - + %n file(s) remaining Залишився %n файлЗалишилося %n файл(ів)Залишилося %n файл(ів)Залишилося %n файл(ів) - + Installing file "%1"... Встановлення файлу "%1"... - - + + Install Results Результати встановлення - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Щоб уникнути можливих конфліктів, ми не рекомендуємо користувачам встановлювати ігри в NAND. Будь ласка, використовуйте цю функцію тільки для встановлення оновлень і завантажуваного контенту. - + %n file(s) were newly installed %n файл було нещодавно встановлено @@ -5189,7 +5304,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) were overwritten %n файл було перезаписано @@ -5199,7 +5314,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) failed to install %n файл не вдалося встановити @@ -5209,388 +5324,312 @@ Please, only use this feature to install updates and DLC. - + System Application Системний додаток - + System Archive Системний архів - + System Application Update Оновлення системного додатку - + Firmware Package (Type A) Пакет прошивки (Тип А) - + Firmware Package (Type B) Пакет прошивки (Тип Б) - + Game Гра - + Game Update Оновлення гри - + Game DLC DLC до гри - + Delta Title Дельта-титул - + Select NCA Install Type... Виберіть тип установки NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Будь ласка, виберіть тип додатку, який ви хочете встановити для цього NCA: (У більшості випадків, підходить стандартний вибір "Гра".) - + Failed to Install Помилка встановлення - + The title type you selected for the NCA is invalid. Тип додатку, який ви вибрали для NCA, недійсний. - + File not found Файл не знайдено - + File "%1" not found Файл "%1" не знайдено - + OK ОК - - + + Hardware requirements not met Не задоволені системні вимоги - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Ваша система не відповідає рекомендованим системним вимогам. Звіти про сумісність було вимкнено. - + Missing yuzu Account Відсутній обліковий запис yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Щоб надіслати звіт про сумісність гри, необхідно прив'язати свій обліковий запис yuzu. <br><br/>Щоб прив'язати свій обліковий запис yuzu, перейдіть у розділ Емуляція &gt; Параметри &gt; Мережа. - + Error opening URL Помилка під час відкриття URL - + Unable to open the URL "%1". Не вдалося відкрити URL: "%1". - + TAS Recording Запис TAS - + Overwrite file of player 1? Перезаписати файл гравця 1? - + Invalid config detected Виявлено неприпустиму конфігурацію - + Handheld controller can't be used on docked mode. Pro controller will be selected. Портативний контролер не може бути використаний у режимі док-станції. Буде обрано контролер Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Поточний amiibo було прибрано - + Error Помилка - - + + The current game is not looking for amiibos Поточна гра не шукає amiibo - + Amiibo File (%1);; All Files (*.*) Файл Amiibo (%1);; Всі Файли (*.*) - + Load Amiibo Завантажити Amiibo - + Error loading Amiibo data Помилка під час завантаження даних Amiibo - + The selected file is not a valid amiibo Обраний файл не є допустимим amiibo - + The selected file is already on use Обраний файл уже використовується - + An unknown error occurred Виникла невідома помилка - + Capture Screenshot Зробити знімок екрану - + PNG Image (*.png) Зображення PNG (*.png) - + TAS state: Running %1/%2 Стан TAS: Виконується %1/%2 - + TAS state: Recording %1 Стан TAS: Записується %1 - + TAS state: Idle %1/%2 Стан TAS: Простий %1/%2 - + TAS State: Invalid Стан TAS: Неприпустимий - + &Stop Running [&S] Зупинка - + &Start [&S] Почати - + Stop R&ecording [&E] Закінчити запис - + R&ecord [&E] Запис - + Building: %n shader(s) Побудова: %n шейдерПобудова: %n шейдер(ів)Побудова: %n шейдер(ів)Побудова: %n шейдер(ів) - + Scale: %1x %1 is the resolution scaling factor Масштаб: %1x - + Speed: %1% / %2% Швидкість: %1% / %2% - + Speed: %1% Швидкість: %1% - + Game: %1 FPS (Unlocked) Гра: %1 FPS (Необмежено) - + Game: %1 FPS Гра: %1 FPS - + Frame: %1 ms Кадр: %1 мс - - GPU NORMAL - ГП НОРМАЛЬНО + + %1 %2 + %1 %2 - - GPU HIGH - ГП ВИСОКО - - - - GPU EXTREME - ГП ЕКСТРИМ - - - - GPU ERROR - ГП ПОМИЛКА - - - - DOCKED - В ДОК-СТАНЦІЇ - - - - HANDHELD - ПОРТАТИВНИЙ - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - НАЙБЛИЖЧІЙ - - - - - BILINEAR - БІЛІНІЙНИЙ - - - - BICUBIC - БІКУБІЧНИЙ - - - - GAUSSIAN - ГАУС - - - - SCALEFORCE - SCALEFORCE - - - + + FSR FSR - - + NO AA БЕЗ ЗГЛАДЖУВАННЯ - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE ГУЧНІСТЬ: ЗАГЛУШЕНА - + VOLUME: %1% Volume percentage (e.g. 50%) ГУЧНІСТЬ: %1% - + Confirm Key Rederivation Підтвердіть перерахунок ключа - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5607,37 +5646,37 @@ This will delete your autogenerated key files and re-run the key derivation modu Це видалить ваші автоматично згенеровані файли ключів і повторно запустить модуль розрахунку ключів. - + Missing fuses Відсутні запобіжники - + - Missing BOOT0 - Відсутній BOOT0 - + - Missing BCPKG2-1-Normal-Main - Відсутній BCPKG2-1-Normal-Main - + - Missing PRODINFO - Відсутній PRODINFO - + Derivation Components Missing Компоненти розрахунку відсутні - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Ключі шифрування відсутні.<br>Будь ласка, дотримуйтесь <a href='https://yuzu-emu.org/help/quickstart/'>короткого керівництва користувача yuzu</a>, щоб отримати всі ваші ключі, прошивку та ігри<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5646,49 +5685,49 @@ on your system's performance. від продуктивності вашої системи. - + Deriving Keys Отримання ключів - + System Archive Decryption Failed Не вдалося розшифрувати системний архів - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Ключі шифрування не змогли розшифрувати прошивку.<br>Будь ласка, дотримуйтесь <a href='https://yuzu-emu.org/help/quickstart/'>короткого керівництва користувача yuzu</a> щоб отримати всі ваші ключі, прошивку та ігри. - + Select RomFS Dump Target Оберіть ціль для дампа RomFS - + Please select which RomFS you would like to dump. Будь ласка, виберіть, який RomFS ви хочете здампити. - + Are you sure you want to close yuzu? Ви впевнені, що хочете закрити yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Ви впевнені, що хочете зупинити емуляцію? Будь-який незбережений прогрес буде втрачено. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5696,48 +5735,143 @@ Would you like to bypass this and exit anyway? Чи хочете ви обійти це і вийти в будь-якому випадку? + + + None + Вимкнено + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + Найближчий + + + + Bilinear + Білінійне + + + + Bicubic + Бікубічне + + + + Gaussian + Гауса + + + + ScaleForce + ScaleForce + + + + Docked + У док-станції + + + + Handheld + Портативний + + + + Normal + Нормальна + + + + High + Висока + + + + Extreme + Екстрим + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + Null + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! OpenGL недоступний! - + OpenGL shared contexts are not supported. Загальні контексти OpenGL не підтримуються. - + yuzu has not been compiled with OpenGL support. yuzu не було зібрано з підтримкою OpenGL. - - + + Error while initializing OpenGL! Помилка під час ініціалізації OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. Ваш ГП може не підтримувати OpenGL, або у вас встановлено застарілий графічний драйвер. - + Error while initializing OpenGL 4.6! Помилка під час ініціалізації OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 Ваш ГП може не підтримувати OpenGL 4.6, або у вас встановлено застарілий графічний драйвер.<br><br>Рендерер GL:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 Ваш ГП може не підтримувати одне або кілька необхідних розширень OpenGL. Будь ласка, переконайтеся в тому, що у вас встановлено останній графічний драйвер.<br><br>Рендерер GL:<br>%1<br><br>Розширення, що не підтримуються:<br>%2 @@ -5797,7 +5931,7 @@ Would you like to bypass this and exit anyway? Remove Cache Storage - + Видалити кеш-сховище @@ -6091,138 +6225,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute Увімкнення/вимкнення звуку - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window Основне вікно - + Audio Volume Down Зменшити гучність звуку - + Audio Volume Up Підвищити гучність звуку - + Capture Screenshot Зробити знімок екрану - + Change Adapting Filter Змінити адаптуючий фільтр - + Change Docked Mode Змінити режим консолі - + Change GPU Accuracy Змінити точність ГП - + Continue/Pause Emulation Продовження/Пауза емуляції - + Exit Fullscreen Вийти з повноекранного режиму - + Exit yuzu Вийти з yuzu - + Fullscreen Повний екран - + Load File Завантажити файл - + Load/Remove Amiibo Завантажити/видалити Amiibo - + Restart Emulation Перезапустити емуляцію - + Stop Emulation Зупинити емуляцію - + TAS Record Запис TAS - + TAS Reset Скидання TAS - + TAS Start/Stop Старт/Стоп TAS - + Toggle Filter Bar Переключити панель пошуку - + Toggle Framerate Limit Переключити обмеження частоти кадрів - + Toggle Mouse Panning Переключити панорамування миші - + Toggle Status Bar Переключити панель стану @@ -6965,30 +7099,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [не задано] @@ -6999,14 +7133,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Ось %1%2 @@ -7017,320 +7151,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [невідомо] - - + + Left Вліво - - + + Right Вправо - - + + Down Вниз - - + + Up Вгору - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Start - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle Кружечок - + Cross Хрестик - + Square Квадратик - + Triangle Трикутничок - + Share Share - + Options Options - + [undefined] [невизначено] - + %1%2 %1%2 - - + + [invalid] [неприпустимо] - - + + %1%2Hat %3 %1%2Напр. %3 - - + - + + %1%2Axis %3 %1%2Ось %3 - - + + %1%2Axis %3,%4,%5 %1%2Ось %3,%4,%5 - - + + %1%2Motion %3 %1%2Рух %3 - - + + %1%2Button %3 %1%2Кнопка %3 - - + + [unused] [не використаний] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L Лівий стік - + Stick R Правий стік - + Plus Плюс - + Minus Мінус - - + + Home Home - + Capture Захоплення - + Touch Сенсор - + Wheel Indicates the mouse wheel Коліщатко - + Backward Назад - + Forward Вперед - + Task Задача - + Extra Додаткова - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3Напр. %4 - - + + %1%2%3Axis %4 %1%2%3Вісь %4 - - + + %1%2%3Button %4 %1%2%3Кнопка %4 diff --git a/dist/languages/vi.ts b/dist/languages/vi.ts index 2829ef62a..a9674f644 100644 --- a/dist/languages/vi.ts +++ b/dist/languages/vi.ts @@ -1108,78 +1108,78 @@ This would ban both their forum username and their IP address. Thiết lập yuzu - - + + Audio Âm thanh - - + + CPU CPU - + Debug Gỡ lỗi - + Filesystem Hệ thống tệp tin - - + + General Chung - - + + Graphics Đồ hoạ - + GraphicsAdvanced Đồ họa Nâng cao - + Hotkeys Phím tắt - - + + Controls Phím - + Profiles Hồ sơ - + Network Mạng - - + + System Hệ thống - + Game List Danh sách trò chơi - + Web Web @@ -1373,17 +1373,22 @@ This would ban both their forum username and their IP address. Ẩn con trỏ chuột khi không dùng - + + Disable controller applet + + + + Reset All Settings Đặt lại mọi tùy chỉnh - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Quá trình này sẽ thiết lập lại toàn bộ tùy chỉnh và gỡ hết mọi cài đặt cho từng game riêng lẻ. Quá trình này không xóa đường dẫn tới thư mục game, hồ sơ, hay hồ sơ của thiết lập phím. Tiếp tục? @@ -1517,7 +1522,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib Force 16:10 - + Dung 16:10 @@ -1542,7 +1547,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib 1X (720p/1080p) - + 1X (720p/1080p) @@ -1592,27 +1597,27 @@ Immediate (no synchronization) just presents whatever is available and can exhib Nearest Neighbor - + Nearest Neighbor Bilinear - + Bilinear Bicubic - + Bicubic Gaussian - + ScaleForce ScaleForce - + ScaleForce @@ -1627,12 +1632,12 @@ Immediate (no synchronization) just presents whatever is available and can exhib FXAA - + FXAA SMAA - + SMAA @@ -1671,43 +1676,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Màu nền: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Assembly Shaders, Chỉ Cho NVIDIA) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1831,37 +1836,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Bộ lọc góc nghiêng: - + Automatic - + Default Mặc định - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2244,7 +2269,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Thiết lập @@ -2311,22 +2336,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - - - - - Mouse sensitivity - Độ nhạy chuột - - - - % - % - - - + Motion / Touch Chuyển động / Cảm ứng @@ -2438,7 +2448,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Cần trái @@ -2532,14 +2542,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2558,7 +2568,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Cộng @@ -2571,15 +2581,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2636,247 +2646,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Cần phải - - - - + + Mouse panning + + + + + Configure + Thiết lập + + + + + + Clear Bỏ trống - - - - - + + + + + [not set] [không đặt] - - - + + + Invert button - - + + Toggle button - + Turbo button - - + + Invert axis - - - + + + Set threshold - - + + Choose a value between 0% and 100% Chọn một giá trị giữa 0% và 100% - + Toggle axis - + Set gyro threshold - + Calibrate sensor - + Map Analog Stick Thiết lập Cần Điều Khiển - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Sau khi bấm OK, di chuyển cần sang ngang, rồi sau đó sang dọc. Nếu muốn đảo ngược hướng cần điều khiển, di chuyển cần sang dọc trước, rồi sang ngang. - + Center axis - - + + Deadzone: %1% - - + + Modifier Range: %1% - - + + Pro Controller Tay cầm Pro Controller - + Dual Joycons Joycon đôi - + Left Joycon Joycon Trái - + Right Joycon Joycon Phải - + Handheld Cầm tay - + GameCube Controller Tay cầm GameCube - + Poke Ball Plus - + NES Controller - + SNES Controller - + N64 Controller - + Sega Genesis - + Start / Pause Bắt đầu / Tạm ngưng - + Z Z - + Control Stick - + C-Stick C-Stick - + Shake! Lắc! - + [waiting] [Chờ] - + New Profile Hồ sơ mới - + Enter a profile name: Nhập tên hồ sơ: - - + + Create Input Profile Tạo Hồ Sơ Phím - + The given profile name is not valid! Tên hồ sơ không hợp lệ! - + Failed to create the input profile "%1" Quá trình tạo hồ sơ phím "%1" thất bại - + Delete Input Profile Xóa Hồ Sơ Phím - + Failed to delete the input profile "%1" Quá trình xóa hồ sơ phím "%1" thất bại - + Load Input Profile Nạp Hồ Sơ Phím - + Failed to load the input profile "%1" Quá trình nạp hồ sơ phím "%1" thất bại - + Save Input Profile Lưu Hồ Sơ Phím - + Failed to save the input profile "%1" Quá trình lưu hồ sơ phím "%1" thất bại @@ -3055,6 +3075,81 @@ Nếu muốn đảo ngược hướng cần điều khiển, di chuyển cần s + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Mặc định + + ConfigureNetwork @@ -3131,47 +3226,47 @@ Nếu muốn đảo ngược hướng cần điều khiển, di chuyển cần s Nhà Phát Hành - + Add-Ons Bổ Sung - + General Chung - + System Hệ thống - + CPU CPU - + Graphics Đồ hoạ - + Adv. Graphics Đồ Họa Nâng Cao - + Audio Âm thanh - + Input Profiles - + Properties Thuộc tính @@ -3373,7 +3468,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3410,7 +3505,7 @@ UUID: %2 - + Enable @@ -3477,12 +3572,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [Chờ] @@ -3628,7 +3728,7 @@ UUID: %2 Japan - + Nhật Bản @@ -3743,32 +3843,32 @@ UUID: %2 USA - + Hoa Kỳ Europe - + Châu Âu Australia - + Châu Úc China - + Trung Quốc Korea - + Hàn Quốc Taiwan - + Đài Loan @@ -3931,7 +4031,7 @@ UUID: %2 Settings - + Cài đặt @@ -4351,7 +4451,7 @@ Drag points to change position, or double-click table cells to edit values. Settings - + Cài đặt @@ -4591,957 +4691,896 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dữ liệu ẩn danh được thu thập</a>để hỗ trợ cải thiện yuzu. <br/><br/>Bạn có muốn chia sẽ dữ liệu sử dụng cho chúng tôi? - + Telemetry Viễn trắc - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... - - + + Disable Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Tốc độ giả lập hiện tại. Giá trị cao hơn hoặc thấp hơn 100% chỉ ra giả lập sẽ chạy nhanh hơn hoặc chậm hơn trên máy Switch - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Có bao nhiêu khung hình trên mỗi giây mà trò chơi đang hiển thị. Điều này sẽ thay đổi từ giữa các trò chơi và các khung cảnh khác nhau. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Thời gian mà giả lập lấy từ khung hình Switch, sẽ không kể đến giới hạn khung hình hoặc v-sync. Đối với tốc độ tối đa mà giả lập nhận được nhiều nhất là ở độ khoảng 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue - + &Pause &Tạm dừng - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - - - - + Warning Outdated Game Format Chú ý định dạng trò chơi đã lỗi thời - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Bạn đang sử dụng định dạng danh mục ROM giải mã cho trò chơi này, và đó là một định dạng lỗi thời đã được thay thế bởi những thứ khác như NCA, NAX, XCI, hoặc NSP. Danh mục ROM giải mã có thể thiếu các icon, metadata, và hỗ trợ cập nhật.<br><br>Để hiểu thêm về các định dạng khác nhau của Switch mà yuzu hỗ trợ, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>vui lòng kiểm tra trên wiki của chúng tôi</a>. Thông báo này sẽ không hiển thị lại lần sau. - - + + Error while loading ROM! Lỗi xảy ra khi nạp ROM! - + The ROM format is not supported. Định dạng ROM này không hỗ trợ. - + An error occurred initializing the video core. Đã xảy ra lỗi khi khởi tạo lõi đồ hoạ. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Đã xảy ra lỗi không xác định. Hãy kiểm tra phần báo cáo để biết thêm chi tiết. - + (64-bit) - + (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit - + Closing software... - + Save Data - + Mod Data - + Error Opening %1 Folder Xảy ra lỗi khi mở %1 thư mục - - + + Folder does not exist! Thư mục này không tồn tại! - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry - - - - - - + + + + + + Successfully Removed - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File - - + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! Khai thác RomFS không thành công! - + There was an error copying the RomFS files or the user cancelled the operation. Đã xảy ra lỗi khi sao chép tệp tin RomFS hoặc người dùng đã hủy bỏ hoạt động này. - + Full - + Skeleton Sườn - + Select RomFS Dump Mode Chọn chế độ kết xuất RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Vui lòng chọn cách mà bạn muốn RomFS kết xuất.<br>Chế độ Đầy Đủ sẽ sao chép toàn bộ tệp tin vào một danh mục mới trong khi <br>chế độ Sườn chỉ tạo kết cấu danh mục. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Khai thác RomFS... - - + + Cancel Hủy bỏ - + RomFS Extraction Succeeded! Khai thác RomFS thành công! - + The operation completed successfully. Các hoạt động đã hoàn tất thành công. - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 - + Select Directory Chọn danh mục - + Properties Thuộc tính - + The game properties could not be loaded. Không thể tải thuộc tính của trò chơi. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Thực thi Switch (%1);;Tất cả tệp tin (*.*) - + Load File Nạp tệp tin - + Open Extracted ROM Directory Mở danh mục ROM đã trích xuất - + Invalid Directory Selected Danh mục đã chọn không hợp lệ - + The directory you have selected does not contain a 'main' file. Danh mục mà bạn đã chọn không có chứa tệp tin 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Những tệp tin Switch cài được (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files - + %n file(s) remaining - + Installing file "%1"... Đang cài đặt tệp tin "%1"... - - + + Install Results - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Ứng dụng hệ thống - + System Archive Hệ thống lưu trữ - + System Application Update Cập nhật hệ thống ứng dụng - + Firmware Package (Type A) Gói phần mềm hệ thống (Loại A) - + Firmware Package (Type B) Gói phần mềm (Loại B) - + Game Trò chơi - + Game Update Cập nhật trò chơi - + Game DLC Nội dung trò chơi có thể tải xuống - + Delta Title Tiêu đề Delta - + Select NCA Install Type... Chọn cách cài đặt NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vui lòng chọn loại tiêu đề mà bạn muốn cài đặt NCA này: (Trong hầu hết trường hợp, chọn mặc định 'Game' là tốt nhất.) - + Failed to Install Cài đặt đã không thành công - + The title type you selected for the NCA is invalid. Loại tiêu đề NCA mà bạn chọn nó không hợp lệ. - + File not found Không tìm thấy tệp tin - + File "%1" not found Không tìm thấy tệp tin "%1" - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Thiếu tài khoản yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Để gửi trường hợp thử nghiệm trò chơi tương thích, bạn phải liên kết tài khoản yuzu.<br><br/>Để liên kết tải khoản yuzu của bạn, hãy đến Giả lập &gt; Thiết lập &gt; Web. - + Error opening URL - + Unable to open the URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Tệp tin Amiibo (%1);; Tất cả tệp tin (*.*) - + Load Amiibo Nạp dữ liệu Amiibo - + Error loading Amiibo data Xảy ra lỗi khi nạp dữ liệu Amiibo - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Capture Screenshot Chụp ảnh màn hình - + PNG Image (*.png) Hình ảnh PNG (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start &Bắt đầu - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Tốc độ: %1% / %2% - + Speed: %1% Tốc độ: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Trò chơi: %1 FPS - + Frame: %1 ms Khung hình: %1 ms - - GPU NORMAL + + %1 %2 - - GPU HIGH - - - - - GPU EXTREME - - - - - GPU ERROR - - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - - - - - - BILINEAR - - - - - BICUBIC - - - - - GAUSSIAN - - - - - SCALEFORCE - - - - + + FSR - - + NO AA - - FXAA - - - - - SMAA - - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Xác nhận mã khóa Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5558,37 +5597,37 @@ và phải tạo ra một bản sao lưu lại. Điều này sẽ xóa mã khóa tự động tạo trên tệp tin của bạn và chạy lại mô-đun chiết xuất mã khoá. - + Missing fuses - + - Missing BOOT0 - + - Missing BCPKG2-1-Normal-Main - + - Missing PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5597,49 +5636,49 @@ on your system's performance. hệ thống của bạn. - + Deriving Keys Mã khóa xuất phát - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Chọn thư mục để sao chép RomFS - + Please select which RomFS you would like to dump. Vui lòng chọn RomFS mà bạn muốn chiết xuất. - + Are you sure you want to close yuzu? Bạn có chắc chắn muốn đóng yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Bạn có chắc rằng muốn dừng giả lập? Bất kì tiến trình nào chưa được lưu sẽ bị mất. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5647,48 +5686,143 @@ Would you like to bypass this and exit anyway? Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? + + + None + Trống + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bicubic + + + + Gaussian + ScaleForce + + + + ScaleForce + ScaleForce + + + + Docked + Chế độ cắm TV + + + + Handheld + Cầm tay + + + + Normal + Trung bình + + + + High + Khỏe + + + + Extreme + + + + + Vulkan + Vulkan + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! Không có sẵn OpenGL! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. - - + + Error while initializing OpenGL! Đã xảy ra lỗi khi khởi tạo OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. - + Error while initializing OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 @@ -6041,138 +6175,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Chụp ảnh màn hình - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen Toàn màn hình - + Load File Nạp tệp tin - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6268,7 +6402,7 @@ Debug Message: Search - + Tìm @@ -6906,30 +7040,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [chưa đặt nút] @@ -6940,14 +7074,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Trục %1%2 @@ -6958,320 +7092,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [không xác định] - - + + Left Trái - - + + Right Phải - - + + Down Xuống - - + + Up Lên - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Bắt đầu - + L1 - + L2 - + L3 - + R1 - + R2 - + R3 - + Circle - + Cross - + Square - + Triangle - + Share - + Options - + [undefined] - + %1%2 - - + + [invalid] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 - - + + %1%2Button %3 - - + + [unused] [không sử dụng] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Cộng - + Minus Trừ - - + + Home Home - + Capture - + Touch Cảm Ứng - + Wheel Indicates the mouse wheel - + Backward - + Forward - + Task - + Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/vi_VN.ts b/dist/languages/vi_VN.ts index c09edc5d6..4c5961689 100644 --- a/dist/languages/vi_VN.ts +++ b/dist/languages/vi_VN.ts @@ -1108,78 +1108,78 @@ This would ban both their forum username and their IP address. Thiết lập yuzu - - + + Audio Âm thanh - - + + CPU CPU - + Debug Gỡ lỗi - + Filesystem Hệ thống tệp tin - - + + General Chung - - + + Graphics Đồ hoạ - + GraphicsAdvanced Đồ họa Nâng cao - + Hotkeys Phím tắt - - + + Controls Phím - + Profiles Hồ sơ - + Network Mạng - - + + System Hệ thống - + Game List Danh sách trò chơi - + Web Web @@ -1373,17 +1373,22 @@ This would ban both their forum username and their IP address. Ẩn con trỏ chuột khi không dùng - + + Disable controller applet + + + + Reset All Settings Đặt lại mọi tùy chỉnh - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? Quá trình này sẽ thiết lập lại toàn bộ tùy chỉnh và gỡ hết mọi cài đặt cho từng game riêng lẻ. Quá trình này không xóa đường dẫn tới thư mục game, hồ sơ, hay hồ sơ của thiết lập phím. Tiếp tục? @@ -1517,7 +1522,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib Force 16:10 - + Dung 16:10 @@ -1542,7 +1547,7 @@ Immediate (no synchronization) just presents whatever is available and can exhib 1X (720p/1080p) - + 1X (720p/1080p) @@ -1592,27 +1597,27 @@ Immediate (no synchronization) just presents whatever is available and can exhib Nearest Neighbor - + Nearest Neighbor Bilinear - + Bilinear Bicubic - + Bicubic Gaussian - + ScaleForce ScaleForce - + ScaleForce @@ -1627,12 +1632,12 @@ Immediate (no synchronization) just presents whatever is available and can exhib FXAA - + FXAA SMAA - + SMAA @@ -1671,43 +1676,43 @@ Immediate (no synchronization) just presents whatever is available and can exhib Màu nền: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (Assembly Shaders, Chỉ Cho NVIDIA) - + SPIR-V (Experimental, Mesa Only) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off - + VSync Off - + Recommended - + On - + VSync On @@ -1831,37 +1836,57 @@ Compute pipelines are always enabled on all other drivers. - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + + + + + Sync to framerate of video playback + + + + + Improves rendering of transparency effects in specific games. + + + + + Barrier feedback loops + + + + Anisotropic Filtering: Bộ lọc góc nghiêng: - + Automatic - + Default Mặc định - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2244,7 +2269,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure Thiết lập @@ -2311,22 +2336,7 @@ Compute pipelines are always enabled on all other drivers. - - Enable mouse panning - - - - - Mouse sensitivity - Độ nhạy chuột - - - - % - % - - - + Motion / Touch Chuyển động / Cảm ứng @@ -2438,7 +2448,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick Cần trái @@ -2532,14 +2542,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2558,7 +2568,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus Cộng @@ -2571,15 +2581,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2636,247 +2646,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick Cần phải - - - - + + Mouse panning + + + + + Configure + Cài đặt + + + + + + Clear Bỏ trống - - - - - + + + + + [not set] [không đặt] - - - + + + Invert button - - + + Toggle button - + Turbo button - - + + Invert axis - - - + + + Set threshold - - + + Choose a value between 0% and 100% Chọn một giá trị giữa 0% và 100% - + Toggle axis - + Set gyro threshold - + Calibrate sensor - + Map Analog Stick Thiết lập Cần Điều Khiển - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. Sau khi bấm OK, di chuyển cần sang ngang, rồi sau đó sang dọc. Nếu muốn đảo ngược hướng cần điều khiển, di chuyển cần sang dọc trước, rồi sang ngang. - + Center axis - - + + Deadzone: %1% - - + + Modifier Range: %1% - - + + Pro Controller Tay cầm Pro Controller - + Dual Joycons Joycon đôi - + Left Joycon Joycon Trái - + Right Joycon Joycon Phải - + Handheld Cầm tay - + GameCube Controller Tay cầm GameCube - + Poke Ball Plus - + NES Controller - + SNES Controller - + N64 Controller - + Sega Genesis - + Start / Pause Bắt đầu / Tạm ngưng - + Z Z - + Control Stick - + C-Stick C-Stick - + Shake! Lắc! - + [waiting] [Chờ] - + New Profile Hồ sơ mới - + Enter a profile name: Nhập tên hồ sơ: - - + + Create Input Profile Tạo Hồ Sơ Phím - + The given profile name is not valid! Tên hồ sơ không hợp lệ! - + Failed to create the input profile "%1" Quá trình tạo hồ sơ phím "%1" thất bại - + Delete Input Profile Xóa Hồ Sơ Phím - + Failed to delete the input profile "%1" Quá trình xóa hồ sơ phím "%1" thất bại - + Load Input Profile Nạp Hồ Sơ Phím - + Failed to load the input profile "%1" Quá trình nạp hồ sơ phím "%1" thất bại - + Save Input Profile Lưu Hồ Sơ Phím - + Failed to save the input profile "%1" Quá trình lưu hồ sơ phím "%1" thất bại @@ -3055,6 +3075,81 @@ Nếu muốn đảo ngược hướng cần điều khiển, di chuyển cần s + + ConfigureMousePanning + + + Configure mouse panning + + + + + Enable + + + + + Can be toggled via a hotkey + + + + + Sensitivity + + + + + + Horizontal + + + + + + + + + + % + % + + + + + Vertical + + + + + Deadzone counterweight + + + + + Counteracts a game's built-in deadzone + + + + + Stick decay + + + + + Strength + + + + + Minimum + + + + + Default + Mặc định + + ConfigureNetwork @@ -3131,47 +3226,47 @@ Nếu muốn đảo ngược hướng cần điều khiển, di chuyển cần s Nhà Phát Hành - + Add-Ons Bổ Sung - + General Tổng Quan - + System Hệ Thống - + CPU CPU - + Graphics Đồ Họa - + Adv. Graphics Đồ Họa Nâng Cao - + Audio Âm Thanh - + Input Profiles - + Properties Thuộc tính @@ -3373,7 +3468,7 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. @@ -3410,7 +3505,7 @@ UUID: %2 - + Enable @@ -3477,12 +3572,17 @@ UUID: %2 - + + The current mapped device is not connected + + + + Unexpected driver result %1 - + [waiting] [Chờ] @@ -3628,7 +3728,7 @@ UUID: %2 Japan - + Nhật Bản @@ -3743,32 +3843,32 @@ UUID: %2 USA - + Hoa Kỳ Europe - + Châu Âu Australia - + Châu Úc China - + Trung Quốc Korea - + Hàn Quốc Taiwan - + Đài Loan @@ -3931,7 +4031,7 @@ UUID: %2 Settings - + Cài đặt @@ -4351,7 +4451,7 @@ Drag points to change position, or double-click table cells to edit values. Settings - + Cài đặt @@ -4591,957 +4691,896 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dữ liệu ẩn danh được thu thập</a>để hỗ trợ cải thiện yuzu. <br/><br/>Bạn có muốn chia sẽ dữ liệu sử dụng cho chúng tôi? - + Telemetry Viễn trắc - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + + + + Loading Web Applet... - - + + Disable Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Tốc độ giả lập hiện tại. Giá trị cao hơn hoặc thấp hơn 100% chỉ ra giả lập sẽ chạy nhanh hơn hoặc chậm hơn trên máy Switch - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Có bao nhiêu khung hình trên mỗi giây mà trò chơi đang hiển thị. Điều này sẽ thay đổi từ trò chơi này đến trò chơi kia và khung cảnh này đến khung cảnh kia. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Thời gian mà giả lập lấy từ khung hình Switch, sẽ không kể đến giới hạn khung hình hoặc v-sync. Đối với tốc độ tối đa mà giả lập nhận được nhiều nhất là ở độ khoảng 16.67 ms. - + + Unmute + + + + + Mute + + + + + Reset Volume + + + + &Clear Recent Files - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue - + &Pause &Tạm dừng - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - - - - + Warning Outdated Game Format Chú ý định dạng trò chơi đã lỗi thời - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Bạn đang sử dụng định dạng danh mục ROM giải mã cho trò chơi này, và đó là một định dạng lỗi thời đã được thay thế bởi những thứ khác như NCA, NAX, XCI, hoặc NSP. Danh mục ROM giải mã có thể thiếu biểu tượng, metadata, và hỗ trợ cập nhật.<br><br>Để giải thích về các định dạng khác nhau của Switch mà yuzu hỗ trợ, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>vui lòng kiểm tra trên wiki của chúng tôi</a>. Thông báo này sẽ không hiển thị lại lần sau. - - + + Error while loading ROM! Xảy ra lỗi khi đang nạp ROM! - + The ROM format is not supported. Định dạng ROM này không hỗ trợ. - + An error occurred initializing the video core. Đã xảy ra lỗi khi khởi tạo lõi video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Đã xảy ra lỗi không xác định. Vui lòng kiểm tra sổ ghi chép để biết thêm chi tiết. - + (64-bit) - + (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit - + Closing software... - + Save Data - + Mod Data - + Error Opening %1 Folder Xảy ra lỗi khi mở %1 thư mục - - + + Folder does not exist! Thư mục này không tồn tại! - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry - - - - - - + + + + + + Successfully Removed - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File - - + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! Khai thác RomFS không thành công! - + There was an error copying the RomFS files or the user cancelled the operation. Đã xảy ra lỗi khi sao chép tệp tin RomFS hoặc người dùng đã hủy bỏ hoạt động này. - + Full - + Skeleton Sườn - + Select RomFS Dump Mode Chọn chế độ kết xuất RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Vui lòng chọn RomFS mà bạn muốn kết xuất như thế nào.<br>Đầy đủ sẽ sao chép toàn bộ tệp tin vào một danh mục mới trong khi <br>bộ xương chỉ tạo kết cấu danh mục. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Khai thác RomFS... - - + + Cancel Hủy bỏ - + RomFS Extraction Succeeded! Khai thác RomFS thành công! - + The operation completed successfully. Các hoạt động đã hoàn tất thành công. - - - - - + + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Cannot create shortcut on desktop. Path "%1" does not exist. - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 - + Select Directory Chọn danh mục - + Properties Thuộc tính - + The game properties could not be loaded. Thuộc tính của trò chơi không thể nạp được. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Thực thi Switch (%1);;Tất cả tệp tin (*.*) - + Load File Nạp tệp tin - + Open Extracted ROM Directory Mở danh mục ROM đã trích xuất - + Invalid Directory Selected Danh mục đã chọn không hợp lệ - + The directory you have selected does not contain a 'main' file. Danh mục mà bạn đã chọn không có chứa tệp tin 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Những tệp tin Switch cài được (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files - + %n file(s) remaining - + Installing file "%1"... Đang cài đặt tệp tin "%1"... - - + + Install Results - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Hệ thống ứng dụng - + System Archive Hệ thống lưu trữ - + System Application Update Cập nhật hệ thống ứng dụng - + Firmware Package (Type A) Gói phần mềm (Loại A) - + Firmware Package (Type B) Gói phần mềm (Loại B) - + Game Trò chơi - + Game Update Cập nhật trò chơi - + Game DLC Nội dung trò chơi có thể tải xuống - + Delta Title Tiêu đề Delta - + Select NCA Install Type... Chọn loại NCA để cài đặt... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vui lòng chọn loại tiêu đề mà bạn muốn cài đặt NCA này: (Trong hầu hết trường hợp, chọn mặc định 'Game' là tốt nhất.) - + Failed to Install Cài đặt đã không thành công - + The title type you selected for the NCA is invalid. Loại tiêu đề NCA mà bạn chọn nó không hợp lệ. - + File not found Không tìm thấy tệp tin - + File "%1" not found Không tìm thấy "%1" tệp tin - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Thiếu tài khoản yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Để gửi trường hợp thử nghiệm trò chơi tương thích, bạn phải liên kết tài khoản yuzu.<br><br/>Để liên kết tải khoản yuzu của bạn, hãy đến Giả lập &gt; Thiết lập &gt; Web. - + Error opening URL - + Unable to open the URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Tệp tin Amiibo (%1);; Tất cả tệp tin (*.*) - + Load Amiibo Nạp dữ liệu Amiibo - + Error loading Amiibo data Xảy ra lỗi khi nạp dữ liệu Amiibo - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Capture Screenshot Chụp ảnh màn hình - + PNG Image (*.png) Hình ảnh PNG (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start &Bắt đầu - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Tốc độ: %1% / %2% - + Speed: %1% Tốc độ: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Trò chơi: %1 FPS - + Frame: %1 ms Khung hình: %1 ms - - GPU NORMAL + + %1 %2 - - GPU HIGH - - - - - GPU EXTREME - - - - - GPU ERROR - - - - - DOCKED - - - - - HANDHELD - - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - - - - - - BILINEAR - - - - - BICUBIC - - - - - GAUSSIAN - - - - - SCALEFORCE - - - - + + FSR - - + NO AA - - FXAA - - - - - SMAA - - - - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Xác nhận mã khóa Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5558,37 +5597,37 @@ và phải tạo ra một bản sao lưu lại. Điều này sẽ xóa mã khóa tự động tạo trên tệp tin của bạn và chạy lại mô-đun mã khóa derivation. - + Missing fuses - + - Missing BOOT0 - + - Missing BCPKG2-1-Normal-Main - + - Missing PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5597,49 +5636,49 @@ on your system's performance. vào hiệu suất hệ thống của bạn. - + Deriving Keys Mã khóa xuất phát - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Chọn thư mục để sao chép RomFS - + Please select which RomFS you would like to dump. Vui lòng chọn RomFS mà bạn muốn sao chép. - + Are you sure you want to close yuzu? Bạn có chắc chắn muốn đóng yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Bạn có chắc rằng muốn dừng giả lập? Bất kì tiến trình nào chưa được lưu sẽ bị mất. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5647,48 +5686,143 @@ Would you like to bypass this and exit anyway? Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? + + + None + Trống + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + + + + + Bilinear + Bilinear + + + + Bicubic + Bicubic + + + + Gaussian + ScaleForce + + + + ScaleForce + ScaleForce + + + + Docked + Chế độ cắm TV + + + + Handheld + Cầm tay + + + + Normal + Trung bình + + + + High + Khỏe + + + + Extreme + + + + + Vulkan + Vulkan + + + + OpenGL + + + + + Null + + + + + GLSL + + + + + GLASM + + + + + SPIRV + + GRenderWindow - - + + OpenGL not available! Không có sẵn OpenGL! - + OpenGL shared contexts are not supported. - + yuzu has not been compiled with OpenGL support. - - + + Error while initializing OpenGL! Đã xảy ra lỗi khi khởi tạo OpenGL! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. - + Error while initializing OpenGL 4.6! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 @@ -6041,138 +6175,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - + Audio Volume Down - + Audio Volume Up - + Capture Screenshot Chụp ảnh màn hình - + Change Adapting Filter - + Change Docked Mode - + Change GPU Accuracy - + Continue/Pause Emulation - + Exit Fullscreen - + Exit yuzu - + Fullscreen Toàn màn hình - + Load File Nạp tệp tin - + Load/Remove Amiibo - + Restart Emulation - + Stop Emulation - + TAS Record - + TAS Reset - + TAS Start/Stop - + Toggle Filter Bar - + Toggle Framerate Limit - + Toggle Mouse Panning - + Toggle Status Bar @@ -6268,7 +6402,7 @@ Debug Message: Search - + Tìm @@ -6906,30 +7040,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [chưa đặt nút] @@ -6940,14 +7074,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Trục %1%2 @@ -6958,320 +7092,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [không xác định] - - + + Left Trái - - + + Right Phải - - + + Down Xuống - - + + Up Lên - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start Bắt đầu - + L1 - + L2 - + L3 - + R1 - + R2 - + R3 - + Circle - + Cross - + Square - + Triangle - + Share - + Options - + [undefined] - + %1%2 - - + + [invalid] - - + + %1%2Hat %3 - - + - + + %1%2Axis %3 - - + + %1%2Axis %3,%4,%5 - - + + %1%2Motion %3 - - + + %1%2Button %3 - - + + [unused] [không sử dụng] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L - + Stick R - + Plus Cộng - + Minus Trừ - - + + Home Home - + Capture - + Touch Cảm Ứng - + Wheel Indicates the mouse wheel - + Backward - + Forward - + Task - + Extra - + %1%2%3%4 - - + + %1%2%3Hat %4 - - + + %1%2%3Axis %4 - - + + %1%2%3Button %4 diff --git a/dist/languages/zh_CN.ts b/dist/languages/zh_CN.ts index 50b88e2b4..2c0885dfa 100644 --- a/dist/languages/zh_CN.ts +++ b/dist/languages/zh_CN.ts @@ -1134,78 +1134,78 @@ This would ban both their forum username and their IP address. yuzu 设置 - - + + Audio 声音 - - + + CPU CPU - + Debug 调试 - + Filesystem 文件系统 - - + + General 通用 - - + + Graphics 图形 - + GraphicsAdvanced 高级图形选项 - + Hotkeys 热键 - - + + Controls 控制 - + Profiles 用户配置 - + Network 网络 - - + + System 系统 - + Game List 游戏列表 - + Web 网络 @@ -1399,17 +1399,22 @@ This would ban both their forum username and their IP address. 自动隐藏鼠标光标 - + + Disable controller applet + 禁用控制器程序 + + + Reset All Settings 重置所有设置项 - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? 将重置模拟器所有设置并删除所有游戏的单独设置。这不会删除游戏目录、个人文件及输入配置文件。是否继续? @@ -1700,43 +1705,43 @@ Immediate (无同步)只显示可用内容,并可能产生撕裂。背景颜色: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM (汇编着色器,仅限 NVIDIA 显卡) - + SPIR-V (Experimental, Mesa Only) SPIR-V (实验性,仅限 Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off 关闭 - + VSync Off 垂直同步关 - + Recommended 推荐 - + On 开启 - + VSync On 垂直同步开 @@ -1861,37 +1866,57 @@ Compute pipelines are always enabled on all other drivers. 启用计算管线 (仅限 Intel 显卡 Vulkan 模式) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + 在视频播放期间以正常速度运行游戏,即使帧率未锁定。 + + + + Sync to framerate of video playback + 播放视频时帧率同步 + + + + Improves rendering of transparency effects in specific games. + 改进某些游戏中透明效果的渲染。 + + + + Barrier feedback loops + 屏障反馈环路 + + + Anisotropic Filtering: 各向异性过滤: - + Automatic 自动 - + Default 系统默认 - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2274,7 +2299,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure 设置 @@ -2341,22 +2366,7 @@ Compute pipelines are always enabled on all other drivers. 使用 Amiibo 随机 ID - - Enable mouse panning - 启用鼠标平移 - - - - Mouse sensitivity - 鼠标灵敏度 - - - - % - % - - - + Motion / Touch 体感/触摸 @@ -2468,7 +2478,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick 左摇杆 @@ -2562,14 +2572,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2588,7 +2598,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus @@ -2601,15 +2611,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2666,247 +2676,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick 右摇杆 - - - - + + Mouse panning + 鼠标平移 + + + + Configure + 设置 + + + + + + Clear 清除 - - - - - + + + + + [not set] [未设置] - - - + + + Invert button 反转按键 - - + + Toggle button 切换键 - + Turbo button 连发键 - - + + Invert axis 体感方向倒置 - - - + + + Set threshold 阈值设定 - - + + Choose a value between 0% and 100% 选择一个介于 0% 和 100% 之间的值 - + Toggle axis 切换轴 - + Set gyro threshold 陀螺仪阈值设定 - + Calibrate sensor 校准传感器 - + Map Analog Stick 映射摇杆 - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. 在按下确定后,首先水平移动你的手柄,然后垂直移动它。 如果要使体感方向倒置,首先垂直移动你的手柄,然后水平移动它。 - + Center axis 中心轴 - - + + Deadzone: %1% 摇杆死区:%1% - - + + Modifier Range: %1% 摇杆灵敏度:%1% - - + + Pro Controller Pro Controller - + Dual Joycons 双 Joycons 手柄 - + Left Joycon 左 Joycon 手柄 - + Right Joycon 右 Joycon 手柄 - + Handheld 掌机模式 - + GameCube Controller GameCube 控制器 - + Poke Ball Plus 精灵球 PLUS - + NES Controller NES 控制器 - + SNES Controller SNES 控制器 - + N64 Controller N64 控制器 - + Sega Genesis 世嘉创世纪 - + Start / Pause 开始 / 暂停 - + Z Z - + Control Stick 控制摇杆 - + C-Stick C 摇杆 - + Shake! 摇动! - + [waiting] [等待中] - + New Profile 新建自定义设置 - + Enter a profile name: 输入配置文件名称: - - + + Create Input Profile 新建输入配置文件 - + The given profile name is not valid! 输入的配置文件名称无效! - + Failed to create the input profile "%1" 新建输入配置文件 "%1" 失败 - + Delete Input Profile 删除输入配置文件 - + Failed to delete the input profile "%1" 删除输入配置文件 "%1" 失败 - + Load Input Profile 加载输入配置文件 - + Failed to load the input profile "%1" 加载输入配置文件 "%1" 失败 - + Save Input Profile 保存输入配置文件 - + Failed to save the input profile "%1" 保存输入配置文件 "%1" 失败 @@ -3085,6 +3105,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< UDP 测试或触摸校准正在进行中。<br>请耐心等待。 + + ConfigureMousePanning + + + Configure mouse panning + 设置鼠标平移 + + + + Enable + 启用 + + + + Can be toggled via a hotkey + 可通过热键进行切换 + + + + Sensitivity + 灵敏度 + + + + + Horizontal + 水平方向 + + + + + + + + + % + % + + + + + Vertical + 垂直方向 + + + + Deadzone counterweight + 调整死区平衡 + + + + Counteracts a game's built-in deadzone + 抵消游戏内置的死区 + + + + Stick decay + 摇杆漂移 + + + + Strength + 强烈程度 + + + + Minimum + 最小值 + + + + Default + 系统默认 + + ConfigureNetwork @@ -3161,47 +3256,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< 开发商 - + Add-Ons 附加项 - + General 通用 - + System 系统 - + CPU CPU - + Graphics 图形 - + Adv. Graphics 高级图形 - + Audio 声音 - + Input Profiles 输入配置文件 - + Properties 属性 @@ -3404,8 +3499,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - 如果您想使用这个控制器,请在游戏开始前为玩家 1 设置使用右控制器,玩家 2 使用双 joycon 控制器,从而允许该控制器被正确检测。 + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + 要使用健身环控制器,请在游戏开始前将玩家 1 设置使用右 Joy-Con 控制器(包括物理和模拟层面),玩家 2 使用左 Joy-Con 控制器(物理和模拟层面)。 @@ -3441,7 +3536,7 @@ UUID: %2 - + Enable 启用 @@ -3508,12 +3603,17 @@ UUID: %2 当前映射的设备未连接健身环控制器 - + + The current mapped device is not connected + 当前映射的设备未连接 + + + Unexpected driver result %1 意外的驱动结果: %1 - + [waiting] [请按键] @@ -4623,962 +4723,901 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>我们收集匿名数据</a>来帮助改进 yuzu 。<br/><br/>您愿意和我们分享您的使用数据吗? - + Telemetry 使用数据共享 - + Broken Vulkan Installation Detected 检测到 Vulkan 的安装已损坏 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan 初始化失败。<br><br>点击<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>这里</a>获取此问题的相关信息。 - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + 游戏正在运行 + + + Loading Web Applet... 正在加载 Web 应用程序... - - + + Disable Web Applet 禁用 Web 应用程序 - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) 禁用 Web 应用程序可能会发生未知的行为,且只能在《超级马里奥 3D 全明星》中使用。您确定要禁用 Web 应用程序吗? (您可以在调试选项中重新启用它。) - + The amount of shaders currently being built 当前正在构建的着色器数量 - + The current selected resolution scaling multiplier. 当前选定的分辨率缩放比例。 - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 当前的模拟速度。高于或低于 100% 的值表示运行速度比实际的 Switch 更快或更慢。 - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. 游戏当前运行的帧率。这将因游戏和场景的不同而有所变化。 - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. 在不计算速度限制和垂直同步的情况下,模拟一个 Switch 帧的实际时间。若要进行全速模拟,这个数值不应超过 16.67 毫秒。 - + + Unmute + 取消静音 + + + + Mute + 静音 + + + + Reset Volume + 重置音量 + + + &Clear Recent Files 清除最近文件 (&C) - + Emulated mouse is enabled 已启用模拟鼠标 - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. 实体鼠标输入与鼠标平移不兼容。请在高级输入设置中禁用模拟鼠标以使用鼠标平移。 - + &Continue 继续 (&C) - + &Pause 暂停 (&P) - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu 正在运行中 - - - + Warning Outdated Game Format 过时游戏格式警告 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. 目前使用的游戏为解体的 ROM 目录格式,这是一种过时的格式,已被其他格式替代,如 NCA,NAX,XCI 或 NSP。解体的 ROM 目录缺少图标、元数据和更新支持。<br><br>有关 yuzu 支持的各种 Switch 格式的说明,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>请查看我们的 wiki</a>。此消息将不会再次出现。 - - + + Error while loading ROM! 加载 ROM 时出错! - + The ROM format is not supported. 该 ROM 格式不受支持。 - + An error occurred initializing the video core. 初始化视频核心时发生错误 - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu 在运行视频核心时发生错误。这可能是由 GPU 驱动程序过旧造成的。有关详细信息,请参阅日志文件。关于日志文件的更多信息,请参考以下页面:<a href='https://yuzu-emu.org/help/reference/log-files/'>如何上传日志文件</a>。 - + Error while loading ROM! %1 %1 signifies a numeric error code. 加载 ROM 时出错! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>请参考<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速导航</a>以获取相关文件。<br>您可以参考 yuzu 的 wiki 页面</a>或 Discord 社区</a>以获得帮助。 - + An unknown error occurred. Please see the log for more details. 发生了未知错误。请查看日志了解详情。 - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... 正在关闭… - + Save Data 保存数据 - + Mod Data Mod 数据 - + Error Opening %1 Folder 打开 %1 文件夹时出错 - - + + Folder does not exist! 文件夹不存在! - + Error Opening Transferable Shader Cache 打开可转移着色器缓存时出错 - + Failed to create the shader cache directory for this title. 为该游戏创建着色器缓存目录时失败。 - + Error Removing Contents 删除内容时出错 - + Error Removing Update 删除更新时出错 - + Error Removing DLC 删除 DLC 时出错 - + Remove Installed Game Contents? 删除已安装的游戏内容? - + Remove Installed Game Update? 删除已安装的游戏更新? - + Remove Installed Game DLC? 删除已安装的游戏 DLC 内容? - + Remove Entry 删除项目 - - - - - - + + + + + + Successfully Removed 删除成功 - + Successfully removed the installed base game. 成功删除已安装的游戏。 - + The base game is not installed in the NAND and cannot be removed. 该游戏未安装于 NAND 中,无法删除。 - + Successfully removed the installed update. 成功删除已安装的游戏更新。 - + There is no update installed for this title. 这个游戏没有任何已安装的更新。 - + There are no DLC installed for this title. 这个游戏没有任何已安装的 DLC 。 - + Successfully removed %1 installed DLC. 成功删除游戏 %1 安装的 DLC 。 - + Delete OpenGL Transferable Shader Cache? 删除 OpenGL 模式的着色器缓存? - + Delete Vulkan Transferable Shader Cache? 删除 Vulkan 模式的着色器缓存? - + Delete All Transferable Shader Caches? 删除所有的着色器缓存? - + Remove Custom Game Configuration? 移除自定义游戏设置? - + Remove Cache Storage? 移除缓存? - + Remove File 删除文件 - - + + Error Removing Transferable Shader Cache 删除着色器缓存时出错 - - + + A shader cache for this title does not exist. 这个游戏的着色器缓存不存在。 - + Successfully removed the transferable shader cache. 成功删除着色器缓存。 - + Failed to remove the transferable shader cache. 删除着色器缓存失败。 - + Error Removing Vulkan Driver Pipeline Cache 删除 Vulkan 驱动程序管线缓存时出错 - + Failed to remove the driver pipeline cache. 删除驱动程序管线缓存失败。 - - + + Error Removing Transferable Shader Caches 删除着色器缓存时出错 - + Successfully removed the transferable shader caches. 着色器缓存删除成功。 - + Failed to remove the transferable shader cache directory. 删除着色器缓存目录失败。 - - + + Error Removing Custom Configuration 移除自定义游戏设置时出错 - + A custom configuration for this title does not exist. 这个游戏的自定义设置不存在。 - + Successfully removed the custom game configuration. 成功移除自定义游戏设置。 - + Failed to remove the custom game configuration. 移除自定义游戏设置失败。 - - + + RomFS Extraction Failed! RomFS 提取失败! - + There was an error copying the RomFS files or the user cancelled the operation. 复制 RomFS 文件时出错,或用户取消了操作。 - + Full 完整 - + Skeleton 框架 - + Select RomFS Dump Mode 选择 RomFS 转储模式 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. 请选择 RomFS 转储的方式。<br>“完整” 会将所有文件复制到新目录中,而<br>“框架” 只会创建目录结构。 - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 没有足够的空间用于提取 RomFS。请保持足够的空间或于模拟—>设置—>系统—>文件系统—>转储根目录中选择一个其他目录。 - + Extracting RomFS... 正在提取 RomFS... - - + + Cancel 取消 - + RomFS Extraction Succeeded! RomFS 提取成功! - + The operation completed successfully. 操作成功完成。 - - - - - + + + + + Create Shortcut 创建快捷方式 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? 这将为当前的游戏创建快捷方式。但在其更新后,快捷方式可能无法正常工作。是否继续? - + Cannot create shortcut on desktop. Path "%1" does not exist. 无法在桌面创建快捷方式。路径“ %1 ”不存在。 - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. 无法在应用程序菜单中创建快捷方式。路径“ %1 ”不存在且无法被创建。 - + Create Icon 创建图标 - + Cannot create icon file. Path "%1" does not exist and cannot be created. 无法创建图标文件。路径“ %1 ”不存在且无法被创建。 - + Start %1 with the yuzu Emulator 使用 yuzu 启动 %1 - + Failed to create a shortcut at %1 在 %1 处创建快捷方式时失败 - + Successfully created a shortcut to %1 成功地在 %1 处创建快捷方式 - + Error Opening %1 打开 %1 时出错 - + Select Directory 选择目录 - + Properties 属性 - + The game properties could not be loaded. 无法加载该游戏的属性信息。 - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch 可执行文件 (%1);;所有文件 (*.*) - + Load File 加载文件 - + Open Extracted ROM Directory 打开提取的 ROM 目录 - + Invalid Directory Selected 选择的目录无效 - + The directory you have selected does not contain a 'main' file. 选择的目录不包含 “main” 文件。 - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) 可安装 Switch 文件 (*.nca *.nsp *.xci);;任天堂内容档案 (*.nca);;任天堂应用包 (*.nsp);;NX 卡带镜像 (*.xci) - + Install Files 安装文件 - + %n file(s) remaining 剩余 %n 个文件 - + Installing file "%1"... 正在安装文件 "%1"... - - + + Install Results 安装结果 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 为了避免可能存在的冲突,我们不建议将游戏本体安装到 NAND 中。 此功能仅用于安装游戏更新和 DLC 。 - + %n file(s) were newly installed 最近安装了 %n 个文件 - + %n file(s) were overwritten %n 个文件被覆盖 - + %n file(s) failed to install %n 个文件安装失败 - + System Application 系统应用 - + System Archive 系统档案 - + System Application Update 系统应用更新 - + Firmware Package (Type A) 固件包 (A型) - + Firmware Package (Type B) 固件包 (B型) - + Game 游戏 - + Game Update 游戏更新 - + Game DLC 游戏 DLC - + Delta Title 差量程序 - + Select NCA Install Type... 选择 NCA 安装类型... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) 请选择此 NCA 的程序类型: (在大多数情况下,选择默认的“游戏”即可。) - + Failed to Install 安装失败 - + The title type you selected for the NCA is invalid. 选择的 NCA 程序类型无效。 - + File not found 找不到文件 - + File "%1" not found 文件 "%1" 未找到 - + OK 确定 - - + + Hardware requirements not met 硬件不满足要求 - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. 您的系统不满足运行 yuzu 的推荐配置。兼容性报告已被禁用。 - + Missing yuzu Account 未设置 yuzu 账户 - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. 要提交游戏兼容性测试用例,您必须设置您的 yuzu 帐户。<br><br/>要设置您的 yuzu 帐户,请转到模拟 &gt; 设置 &gt; 网络。 - + Error opening URL 打开 URL 时出错 - + Unable to open the URL "%1". 无法打开 URL : "%1" 。 - + TAS Recording TAS 录制中 - + Overwrite file of player 1? 覆盖玩家 1 的文件? - + Invalid config detected 检测到无效配置 - + Handheld controller can't be used on docked mode. Pro controller will be selected. 掌机手柄无法在主机模式中使用。将会选择 Pro controller。 - - + + Amiibo Amiibo - - + + The current amiibo has been removed 当前的 Amiibo 已被移除。 - + Error 错误 - - + + The current game is not looking for amiibos 当前游戏并没有在寻找 Amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo 文件 (%1);; 全部文件 (*.*) - + Load Amiibo 加载 Amiibo - + Error loading Amiibo data 加载 Amiibo 数据时出错 - + The selected file is not a valid amiibo 选择的文件并不是有效的 amiibo - + The selected file is already on use 选择的文件已在使用中 - + An unknown error occurred 发生了未知错误 - + Capture Screenshot 捕获截图 - + PNG Image (*.png) PNG 图像 (*.png) - + TAS state: Running %1/%2 TAS 状态:正在运行 %1/%2 - + TAS state: Recording %1 TAS 状态:正在录制 %1 - + TAS state: Idle %1/%2 TAS 状态:空闲 %1/%2 - + TAS State: Invalid TAS 状态:无效 - + &Stop Running 停止运行 (&S) - + &Start 开始 (&S) - + Stop R&ecording 停止录制 (&E) - + R&ecord 录制 (&E) - + Building: %n shader(s) 正在编译 %n 个着色器文件 - + Scale: %1x %1 is the resolution scaling factor 缩放比例: %1x - + Speed: %1% / %2% 速度: %1% / %2% - + Speed: %1% 速度: %1% - + Game: %1 FPS (Unlocked) FPS: %1 (未锁定) - + Game: %1 FPS FPS: %1 - + Frame: %1 ms 帧延迟: %1 毫秒 - - GPU NORMAL - GPU NORMAL + + %1 %2 + %1 %2 - - GPU HIGH - GPU HIGH - - - - GPU EXTREME - GPU EXTREME - - - - GPU ERROR - GPU ERROR - - - - DOCKED - 主机模式 - - - - HANDHELD - 掌机模式 - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - - - - - NEAREST - 邻近取样 - - - - - BILINEAR - 双线性过滤 - - - - BICUBIC - 双三线过滤 - - - - GAUSSIAN - 高斯模糊 - - - - SCALEFORCE - 强制缩放 - - - + + FSR FSR - - + NO AA 抗锯齿关 - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE 音量: 静音 - + VOLUME: %1% Volume percentage (e.g. 50%) 音量: %1% - + Confirm Key Rederivation 确认重新生成密钥 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5594,37 +5633,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 这将删除您自动生成的密钥文件并重新运行密钥生成模块。 - + Missing fuses 项目丢失 - + - Missing BOOT0 - 丢失 BOOT0 - + - Missing BCPKG2-1-Normal-Main - 丢失 BCPKG2-1-Normal-Main - + - Missing PRODINFO - 丢失 PRODINFO - + Derivation Components Missing 组件丢失 - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 密钥缺失。<br>请查看<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速导航</a>以获得你的密钥、固件和游戏。<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5633,49 +5672,49 @@ on your system's performance. 您的系统性能。 - + Deriving Keys 生成密钥 - + System Archive Decryption Failed 系统固件解密失败 - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. 当前密钥无法解密系统固件。<br>请查看<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速导航</a>以获得你的密钥、固件和游戏。 - + Select RomFS Dump Target 选择 RomFS 转储目标 - + Please select which RomFS you would like to dump. 请选择希望转储的 RomFS。 - + Are you sure you want to close yuzu? 您确定要关闭 yuzu 吗? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. 您确定要停止模拟吗?未保存的进度将会丢失。 - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5683,48 +5722,143 @@ Would you like to bypass this and exit anyway? 您希望忽略并退出吗? + + + None + + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + 邻近取样 + + + + Bilinear + 双线性过滤 + + + + Bicubic + 双三线过滤 + + + + Gaussian + 高斯模糊 + + + + ScaleForce + 强制缩放 + + + + Docked + 主机模式 + + + + Handheld + 掌机模式 + + + + Normal + 正常 + + + + High + + + + + Extreme + Extreme + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + + + + + GLSL + GLSL + + + + GLASM + GLASM + + + + SPIRV + SPIRV + GRenderWindow - - + + OpenGL not available! OpenGL 模式不可用! - + OpenGL shared contexts are not supported. 不支持 OpenGL 共享上下文。 - + yuzu has not been compiled with OpenGL support. yuzu 没有使用 OpenGL 进行编译。 - - + + Error while initializing OpenGL! 初始化 OpenGL 时出错! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. 您的 GPU 可能不支持 OpenGL ,或者您没有安装最新的显卡驱动。 - + Error while initializing OpenGL 4.6! 初始化 OpenGL 4.6 时出错! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 您的 GPU 可能不支持 OpenGL 4.6 ,或者您没有安装最新的显卡驱动。<br><br>GL 渲染器:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 您的 GPU 可能不支持某些必需的 OpenGL 扩展。请确保您已经安装最新的显卡驱动。<br><br>GL 渲染器:<br>%1<br><br>不支持的扩展:<br>%2 @@ -6078,138 +6212,138 @@ Debug Message: Hotkeys - + Audio Mute/Unmute 开启/关闭静音 - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window 主窗口 - + Audio Volume Down 调低音量 - + Audio Volume Up 调高音量 - + Capture Screenshot 捕获截图 - + Change Adapting Filter 更改窗口滤镜 - + Change Docked Mode 更改主机运行模式 - + Change GPU Accuracy 更改 GPU 精度 - + Continue/Pause Emulation 继续/暂停模拟 - + Exit Fullscreen 退出全屏 - + Exit yuzu 退出 yuzu - + Fullscreen 全屏 - + Load File 加载文件 - + Load/Remove Amiibo 加载/移除 Amiibo - + Restart Emulation 重新启动模拟 - + Stop Emulation 停止模拟 - + TAS Record TAS 录制 - + TAS Reset 重置 TAS - + TAS Start/Stop TAS 开始/停止 - + Toggle Filter Bar 切换搜索栏 - + Toggle Framerate Limit 切换帧率限制 - + Toggle Mouse Panning 切换鼠标平移 - + Toggle Status Bar 切换状态栏 @@ -6952,30 +7086,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [未设置] @@ -6986,14 +7120,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 轴 %1%2 @@ -7004,320 +7138,320 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [未知] - - + + Left - - + + Right - - + + Down - - + + Up - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start 开始 - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle - + Cross - + Square - + Triangle Δ - + Share 分享 - + Options 选项 - + [undefined] [未指定] - + %1%2 %1%2 - - + + [invalid] [无效] - - + + %1%2Hat %3 %1%2Hat 控制器 %3 - - + - + + %1%2Axis %3 %1%2轴 %3 - - + + %1%2Axis %3,%4,%5 %1%2轴 %3,%4,%5 - - + + %1%2Motion %3 %1%2体感 %3 - - + + %1%2Button %3 %1%2按键 %3 - - + + [unused] [未使用] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L 左摇杆 - + Stick R 右摇杆 - + Plus - + Minus - - + + Home Home - + Capture 截图 - + Touch 触摸 - + Wheel Indicates the mouse wheel 鼠标滚轮 - + Backward 后退 - + Forward 前进 - + Task 任务键 - + Extra 额外按键 - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3 控制器 %4 - - + + %1%2%3Axis %4 %1%2%3轴 %4 - - + + %1%2%3Button %4 %1%2%3 按键 %4 diff --git a/dist/languages/zh_TW.ts b/dist/languages/zh_TW.ts index a4605917f..436f3bdb7 100644 --- a/dist/languages/zh_TW.ts +++ b/dist/languages/zh_TW.ts @@ -122,7 +122,7 @@ p, li { white-space: pre-wrap; } %1 has been unbanned - %1 已被解封 + %1 已被解除禁止 @@ -153,7 +153,7 @@ p, li { white-space: pre-wrap; } Kick Player - 踢出玩家 + 踢除玩家 @@ -267,17 +267,17 @@ This would ban both their forum username and their IP address. <html><head/><body><p>Does the game reach gameplay?</p></body></html> - <html><head/><body><p>游戏是否具有游戏性?</p></body></html> + <html><head/><body><p>是否可以進行遊戲?</p></body></html> Yes The game works without crashes - 是的,游戏运行时没有崩溃 + 是,遊戲正常運作,並無當機 No The game crashes or freezes during gameplay - 不,游戏运行时出现卡死或崩溃 + 否,遊玩過程中會出現當機或凍結 @@ -455,27 +455,27 @@ This would ban both their forum username and their IP address. Camera Image Source: - 摄像头图像来源: + 相機圖像來源: Input device: - 输入设备: + 輸入裝置: Preview - 预览 + 預覽 Resolution: 320*240 - 分辨率: 320*240 + 解析度:320*240 Click to preview - 点击进行预览 + 按一下以預覽 @@ -853,7 +853,7 @@ This would ban both their forum username and their IP address. Debugger - 调试器 + 偵錯工具 @@ -1073,17 +1073,17 @@ This would ban both their forum username and their IP address. Restart Required - 需要重启 + 需要重新啟動 yuzu is required to restart in order to apply this setting. - 重启 yuzu 后才能应用此设置。 + yuzu 需要重新啟動以套用此設定。 Web applet not compiled - Web 应用程序未编译 + Web 小程式未編譯 @@ -1136,78 +1136,78 @@ This would ban both their forum username and their IP address. yuzu 設定 - - + + Audio 音訊 - - + + CPU CPU - + Debug 偵錯 - + Filesystem 檔案系統 - - + + General 一般 - - + + Graphics 圖形 - + GraphicsAdvanced 進階圖形 - + Hotkeys 快速鍵 - - + + Controls 控制 - + Profiles 設定檔 - + Network 網路 - - + + System 系統 - + Game List 遊戲清單 - + Web 網路服務 @@ -1401,17 +1401,22 @@ This would ban both their forum username and their IP address. 滑鼠閒置時自動隱藏 - + + Disable controller applet + 禁用控制器程序 + + + Reset All Settings 重設所有設定 - + yuzu yuzu - + This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? 這將重設所有遊戲的額外設定,但不會刪除遊戲資料夾、使用者設定檔、輸入設定檔,是否繼續? @@ -1477,7 +1482,7 @@ This would ban both their forum username and their IP address. VSync Mode: - 垂直同步模式: + 垂直同步模式: @@ -1548,7 +1553,7 @@ Immediate (无同步)只显示可用内容,并可能产生撕裂。 Force 16:10 - 强制 16:10 + 強制 16:10 @@ -1668,17 +1673,17 @@ Immediate (无同步)只显示可用内容,并可能产生撕裂。 Use global FSR Sharpness - 启用全局 FSR 锐化 + 啟用全域 FSR 清晰度 Set FSR Sharpness - 设置 FSR 锐化 + 設定 FSR 清晰度 FSR Sharpness: - FSR 锐化度: + FSR 清晰度: @@ -1702,43 +1707,43 @@ Immediate (无同步)只显示可用内容,并可能产生撕裂。背景顏色: - + GLASM (Assembly Shaders, NVIDIA Only) GLASM(組合語言著色器,僅限 NVIDIA) - + SPIR-V (Experimental, Mesa Only) - SPIR-V (实验性,仅限 Mesa) + SPIR-V (實驗性,僅 Mesa) - + %1% FSR sharpening percentage (e.g. 50%) %1% - + Off 關閉 - + VSync Off 垂直同步關 - + Recommended 推薦 - + On 開啟 - + VSync On 垂直同步開 @@ -1768,22 +1773,22 @@ Immediate (无同步)只显示可用内容,并可能产生撕裂。 ASTC recompression: - ASTC 纹理重压缩: + ASTC 重新壓縮: Uncompressed (Best quality) - 不压缩 (最高质量) + 不壓縮 (最高品質) BC1 (Low quality) - BC1 (低质量) + BC1 (低品質) BC3 (Medium quality) - BC3 (中等质量) + BC3 (中品質) @@ -1863,37 +1868,57 @@ Compute pipelines are always enabled on all other drivers. 启用计算管线 (仅限 Intel 显卡 Vulkan 模式) - + + Run the game at normal speed during video playback, even when the framerate is unlocked. + 在视频播放期间以正常速度运行游戏,即使帧率未锁定。 + + + + Sync to framerate of video playback + 播放视频时帧率同步 + + + + Improves rendering of transparency effects in specific games. + 改进某些游戏中透明效果的渲染。 + + + + Barrier feedback loops + 屏障反馈循环 + + + Anisotropic Filtering: 各向異性過濾: - + Automatic 自動 - + Default 預設 - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x @@ -2276,7 +2301,7 @@ Compute pipelines are always enabled on all other drivers. - + Configure 設定 @@ -2340,25 +2365,10 @@ Compute pipelines are always enabled on all other drivers. Use random Amiibo ID - 启用 Amiibo 随机 ID + 啟用 Amiibo 隨機 ID - - Enable mouse panning - 啟用滑鼠平移 - - - - Mouse sensitivity - 滑鼠靈敏度 - - - - % - % - - - + Motion / Touch 體感/觸控 @@ -2378,47 +2388,47 @@ Compute pipelines are always enabled on all other drivers. Input Profiles - 输入配置文件 + 輸入設定檔 Player 1 Profile - 玩家 1 配置文件 + 玩家 1 設定檔 Player 2 Profile - 玩家 2 配置文件 + 玩家 2 設定檔 Player 3 Profile - 玩家 3 配置文件 + 玩家 3 設定檔 Player 4 Profile - 玩家 4 配置文件 + 玩家 4 設定檔 Player 5 Profile - 玩家 5 配置文件 + 玩家 5 設定檔 Player 6 Profile - 玩家 6 配置文件 + 玩家 6 設定檔 Player 7 Profile - 玩家 7 配置文件 + 玩家 7 設定檔 Player 8 Profile - 玩家 8 配置文件 + 玩家 8 設定檔 @@ -2428,7 +2438,7 @@ Compute pipelines are always enabled on all other drivers. Player %1 profile - 玩家 %1 配置文件 + 玩家 %1 設定檔 @@ -2446,7 +2456,7 @@ Compute pipelines are always enabled on all other drivers. Input Device - 輸入裝置: + 輸入裝置 @@ -2470,7 +2480,7 @@ Compute pipelines are always enabled on all other drivers. - + Left Stick 左搖桿 @@ -2564,14 +2574,14 @@ Compute pipelines are always enabled on all other drivers. - + L L - + ZL ZL @@ -2590,7 +2600,7 @@ Compute pipelines are always enabled on all other drivers. - + Plus @@ -2603,15 +2613,15 @@ Compute pipelines are always enabled on all other drivers. - - + + R R - + ZR ZR @@ -2668,247 +2678,257 @@ Compute pipelines are always enabled on all other drivers. - + Right Stick 右搖桿 - - - - + + Mouse panning + 鼠标平移 + + + + Configure + 設定 + + + + + + Clear 清除 - - - - - + + + + + [not set] [未設定] - - - + + + Invert button 無效按鈕 - - + + Toggle button 切換按鍵 - + Turbo button 连发键 - - + + Invert axis 方向反轉 - - - + + + Set threshold 設定閾值 - - + + Choose a value between 0% and 100% 選擇介於 0% 和 100% 之間的值 - + Toggle axis 切换轴 - + Set gyro threshold 陀螺仪阈值设定 - + Calibrate sensor 校准传感器 - + Map Analog Stick 搖桿映射 - + After pressing OK, first move your joystick horizontally, and then vertically. To invert the axes, first move your joystick vertically, and then horizontally. 按下確定後,先水平再上下移動您的搖桿。 要反轉方向,則先上下再水平移動您的搖桿。 - + Center axis 中心轴 - - + + Deadzone: %1% 無感帶:%1% - - + + Modifier Range: %1% 輕推靈敏度:%1% - - + + Pro Controller Pro 手把 - + Dual Joycons 雙 Joycon 手把 - + Left Joycon 左 Joycon 手把 - + Right Joycon 右 Joycon 手把 - + Handheld 掌機模式 - + GameCube Controller GameCube 手把 - + Poke Ball Plus 精靈球 PLUS - + NES Controller NES 控制器 - + SNES Controller SNES 控制器 - + N64 Controller N64 控制器 - + Sega Genesis Mega Drive - + Start / Pause 開始 / 暫停 - + Z Z - + Control Stick 控制搖桿 - + C-Stick C 搖桿 - + Shake! 搖動! - + [waiting] [等待中] - + New Profile 新增設定檔 - + Enter a profile name: 輸入設定檔名稱: - - + + Create Input Profile 建立輸入設定檔 - + The given profile name is not valid! 輸入的設定檔名稱無效! - + Failed to create the input profile "%1" 建立輸入設定檔「%1」失敗 - + Delete Input Profile 刪除輸入設定檔 - + Failed to delete the input profile "%1" 刪除輸入設定檔「%1」失敗 - + Load Input Profile 載入輸入設定檔 - + Failed to load the input profile "%1" 載入輸入設定檔「%1」失敗 - + Save Input Profile 儲存輸入設定檔 - + Failed to save the input profile "%1" 儲存輸入設定檔「%1」失敗 @@ -3087,6 +3107,81 @@ To invert the axes, first move your joystick vertically, and then horizontally.< UDP 測試或觸控校正進行中。<br>請耐心等候。 + + ConfigureMousePanning + + + Configure mouse panning + 设置鼠标平移 + + + + Enable + 啟用 + + + + Can be toggled via a hotkey + 可通过热键进行切换 + + + + Sensitivity + 灵敏度 + + + + + Horizontal + 水平方向 + + + + + + + + + % + % + + + + + Vertical + 垂直方向 + + + + Deadzone counterweight + 调整死区范围 + + + + Counteracts a game's built-in deadzone + 调整游戏内置的死区范围 + + + + Stick decay + 摇杆老化 + + + + Strength + 强烈程度 + + + + Minimum + 最小值 + + + + Default + 預設 + + ConfigureNetwork @@ -3163,47 +3258,47 @@ To invert the axes, first move your joystick vertically, and then horizontally.< 出版商 - + Add-Ons 延伸模組 - + General 一般 - + System 系統 - + CPU CPU - + Graphics 圖形 - + Adv. Graphics 進階圖形 - + Audio 音訊 - + Input Profiles - 输入配置文件 + 輸入設定檔 - + Properties 屬性 @@ -3406,8 +3501,8 @@ UUID: %2 - If you want to use this controller configure player 1 as right controller and player 2 as dual joycon before starting the game to allow this controller to be detected properly. - 如果您想使用这个控制器,请在游戏开始前为玩家 1 配置使用右控制器,玩家 2 使用双 joycon 控制器,从而允许该控制器被正确检测。 + To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. + 要使用健身环控制器,请在游戏开始前将玩家 1 设置使用右 Joy-Con控制器(包括物理和模拟层面),玩家 2 使用左 Joy-Con 控制器(物理和模拟层面)。 @@ -3443,9 +3538,9 @@ UUID: %2 - + Enable - 启用 + 啟用 @@ -3510,12 +3605,17 @@ UUID: %2 当前映射的设备未连接健身环控制器 - + + The current mapped device is not connected + 当前映射的设备未连接 + + + Unexpected driver result %1 意外的驱动结果: %1 - + [waiting] [請按按鍵] @@ -3921,7 +4021,7 @@ UUID: %2 Device Name - 设备名称 + 裝置名稱 @@ -4074,7 +4174,7 @@ Drag points to change position, or double-click table cells to edit values. Enter the name for the new profile. - 輸入新設定檔的名稱 + 輸入新設定檔的名稱。 @@ -4571,12 +4671,12 @@ Drag points to change position, or double-click table cells to edit values. Direct Connect - 直接连接 + 直接連線 Server Address - 服务器地址 + 伺服器地址 @@ -4625,961 +4725,900 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? 我們<a href='https://yuzu-emu.org/help/feature/telemetry/'>蒐集匿名的資料</a>以幫助改善 yuzu。<br/><br/>您願意和我們分享您的使用資料嗎? - + Telemetry 遙測 - + Broken Vulkan Installation Detected 检测到 Vulkan 的安装已损坏 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan 初始化失败。<br><br>点击<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>这里</a>获取此问题的相关信息。 - + + Running a game + TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping + 游戏正在运行 + + + Loading Web Applet... 載入 Web Applet... - - + + Disable Web Applet 停用 Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) 禁用 Web 应用程序可能会导致未知的行为,且只能在《超级马里奥 3D 全明星》中使用。您确定要禁用 Web 应用程序吗? (您可以在调试选项中重新启用它。) - + The amount of shaders currently being built 目前正在建構的著色器數量 - + The current selected resolution scaling multiplier. 目前選擇的解析度縮放比例。 - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 目前的模擬速度。高於或低於 100% 表示比實際 Switch 執行速度更快或更慢。 - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. 遊戲即時 FPS。會因遊戲和場景的不同而改變。 - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. 在不考慮幀數限制和垂直同步的情況下模擬一個 Switch 畫格的實際時間,若要全速模擬,此數值不得超過 16.67 毫秒。 - + + Unmute + 取消靜音 + + + + Mute + 靜音 + + + + Reset Volume + 重設音量 + + + &Clear Recent Files 清除最近的檔案(&C) - + Emulated mouse is enabled - 已启用模拟鼠标 + 模擬滑鼠已啟用 - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. 实体鼠标输入与鼠标平移不兼容。请在高级输入设置中禁用模拟鼠标以使用鼠标平移。 - + &Continue 繼續(&C) - + &Pause &暫停 - - yuzu is running a game - TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - yuzu 正在執行中 - - - + Warning Outdated Game Format 過時遊戲格式警告 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. 此遊戲為解構的 ROM 資料夾格式,這是一種過時的格式,已被其他格式取代,如 NCA、NAX、XCI、NSP。解構的 ROM 目錄缺少圖示、中繼資料和更新支援。<br><br>有關 yuzu 支援的各種 Switch 格式說明,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>請參閱我們的 wiki </a>。此訊息將不再顯示。 - - + + Error while loading ROM! 載入 ROM 時發生錯誤! - + The ROM format is not supported. 此 ROM 格式不支援 - + An error occurred initializing the video core. 初始化視訊核心時發生錯誤 - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu 在執行視訊核心時發生錯誤。 這可能是 GPU 驅動程序過舊造成的。 詳細資訊請查閱日誌檔案。 關於日誌檔案的更多資訊,請參考以下頁面:<a href='https://yuzu-emu.org/help/reference/log-files/'>如何上傳日誌檔案</a>。 - + Error while loading ROM! %1 %1 signifies a numeric error code. 載入 ROM 時發生錯誤!%1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>請參閱 <a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速指引</a>以重新傾印檔案。<br>您可以前往 yuzu 的 wiki</a> 或 Discord 社群</a>以獲得幫助。 - + An unknown error occurred. Please see the log for more details. 發生未知錯誤,請檢視紀錄了解細節。 - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - 正在关闭… + 正在關閉軟體… - + Save Data 儲存資料 - + Mod Data 模組資料 - + Error Opening %1 Folder 開啟資料夾 %1 時發生錯誤 - - + + Folder does not exist! 資料夾不存在 - + Error Opening Transferable Shader Cache 開啟通用著色器快取位置時發生錯誤 - + Failed to create the shader cache directory for this title. 無法新增此遊戲的著色器快取資料夾。 - + Error Removing Contents - 删除内容时出错 + 移除內容時發生錯誤 - + Error Removing Update - 删除更新时出错 + 移除更新時發生錯誤 - + Error Removing DLC - 删除 DLC 时出错 + 移除 DLC 時發生錯誤 - + Remove Installed Game Contents? - 删除已安装的游戏内容? + 移除已安裝的遊戲內容? - + Remove Installed Game Update? - 删除已安装的游戏更新? + 移除已安裝的遊戲更新? - + Remove Installed Game DLC? - 删除已安装的游戏 DLC 内容? + 移除已安裝的遊戲 DLC? - + Remove Entry 移除項目 - - - - - - + + + + + + Successfully Removed 移除成功 - + Successfully removed the installed base game. 成功移除已安裝的遊戲。 - + The base game is not installed in the NAND and cannot be removed. 此遊戲並非安裝在內部儲存空間,因此無法移除。 - + Successfully removed the installed update. 成功移除已安裝的遊戲更新。 - + There is no update installed for this title. 此遊戲沒有已安裝的更新。 - + There are no DLC installed for this title. 此遊戲沒有已安裝的 DLC。 - + Successfully removed %1 installed DLC. 成功移除遊戲 %1 已安裝的 DLC。 - + Delete OpenGL Transferable Shader Cache? 刪除 OpenGL 模式的著色器快取? - + Delete Vulkan Transferable Shader Cache? 刪除 Vulkan 模式的著色器快取? - + Delete All Transferable Shader Caches? 刪除所有的著色器快取? - + Remove Custom Game Configuration? 移除額外遊戲設定? - + Remove Cache Storage? - 移除缓存? + 移除快取儲存空間? - + Remove File 刪除檔案 - - + + Error Removing Transferable Shader Cache 刪除通用著色器快取時發生錯誤 - - + + A shader cache for this title does not exist. 此遊戲沒有著色器快取 - + Successfully removed the transferable shader cache. 成功刪除著色器快取。 - + Failed to remove the transferable shader cache. 刪除通用著色器快取失敗。 - + Error Removing Vulkan Driver Pipeline Cache - 移除 Vulkan 驱动程序管线缓存时出错 + 移除 Vulkan 驅動程式管線快取時發生錯誤 - + Failed to remove the driver pipeline cache. - 删除驱动程序管线缓存失败。 + 無法移除驅動程式管線快取。 - - + + Error Removing Transferable Shader Caches 刪除通用著色器快取時發生錯誤 - + Successfully removed the transferable shader caches. 成功刪除通用著色器快取。 - + Failed to remove the transferable shader cache directory. 無法刪除著色器快取資料夾。 - - + + Error Removing Custom Configuration 移除額外遊戲設定時發生錯誤 - + A custom configuration for this title does not exist. 此遊戲沒有額外設定。 - + Successfully removed the custom game configuration. 成功移除額外遊戲設定。 - + Failed to remove the custom game configuration. 移除額外遊戲設定失敗。 - - + + RomFS Extraction Failed! RomFS 抽取失敗! - + There was an error copying the RomFS files or the user cancelled the operation. 複製 RomFS 檔案時發生錯誤或使用者取消動作。 - + Full 全部 - + Skeleton 部分 - + Select RomFS Dump Mode 選擇RomFS傾印模式 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. 請選擇如何傾印 RomFS。<br>「全部」會複製所有檔案到新資料夾中,而<br>「部分」只會建立資料夾結構。 - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 沒有足夠的空間用於抽取 RomFS。請確保有足夠的空間或於模擬 > 設定 >系統 >檔案系統 > 傾印根目錄中選擇其他資料夾。 - + Extracting RomFS... 抽取 RomFS 中... - - + + Cancel 取消 - + RomFS Extraction Succeeded! RomFS 抽取完成! - + The operation completed successfully. 動作已成功完成 - - - - - + + + + + Create Shortcut - 创建快捷方式 + 建立捷徑 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - 这将为当前的软件镜像创建快捷方式。但在其更新后,快捷方式可能无法正常使用。是否继续? + 這將會為目前的應用程式映像建立捷徑,可能在其更新後無法運作,仍要繼續嗎? - + Cannot create shortcut on desktop. Path "%1" does not exist. - 无法在桌面创建快捷方式。路径“ %1 ”不存在。 + 無法在桌面上建立捷徑,路徑「%1」不存在。 - + Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - 无法在应用程序菜单中创建快捷方式。路径“ %1 ”不存在且无法被创建。 + 無法在應用程式選單中建立捷徑,路徑「%1」不存在且無法建立。 - + Create Icon - 创建图标 + 建立圖示 - + Cannot create icon file. Path "%1" does not exist and cannot be created. - 无法创建图标文件。路径“ %1 ”不存在且无法被创建。 + 無法建立圖示檔案,路徑「%1」不存在且無法建立。 - + Start %1 with the yuzu Emulator - 使用 yuzu 启动 %1 + 使用 yuzu 模擬器啟動 %1 - + Failed to create a shortcut at %1 - 在 %1 处创建快捷方式时失败 + 無法在 %1 建立捷徑 - + Successfully created a shortcut to %1 - 成功地在 %1 处创建快捷方式 + 已成功在 %1 建立捷徑 - + Error Opening %1 開啟 %1 時發生錯誤 - + Select Directory 選擇資料夾 - + Properties 屬性 - + The game properties could not be loaded. 無法載入遊戲屬性 - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch 執行檔 (%1);;所有檔案 (*.*) - + Load File 開啟檔案 - + Open Extracted ROM Directory 開啟已抽取的 ROM 資料夾 - + Invalid Directory Selected 選擇的資料夾無效 - + The directory you have selected does not contain a 'main' file. 選擇的資料夾未包含「main」檔案。 - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) 可安装的 Switch 檔案 (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX 卡帶映像 (*.xci) - + Install Files 安裝檔案 - + %n file(s) remaining 剩餘 %n 個檔案 - + Installing file "%1"... 正在安裝檔案「%1」... - - + + Install Results 安裝結果 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 為了避免潛在的衝突,不建議將遊戲本體安裝至內部儲存空間。 此功能僅用於安裝遊戲更新和 DLC。 - + %n file(s) were newly installed 最近安裝了 %n 個檔案 - + %n file(s) were overwritten %n 個檔案被取代 - + %n file(s) failed to install %n 個檔案安裝失敗 - + System Application 系統應用程式 - + System Archive 系統檔案 - + System Application Update 系統應用程式更新 - + Firmware Package (Type A) 韌體包(A型) - + Firmware Package (Type B) 韌體包(B型) - + Game 遊戲 - + Game Update 遊戲更新 - + Game DLC 遊戲 DLC - + Delta Title Delta Title - + Select NCA Install Type... 選擇 NCA 安裝類型... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) 請選擇此 NCA 的安裝類型: (在多數情況下,選擇預設的「遊戲」即可。) - + Failed to Install 安裝失敗 - + The title type you selected for the NCA is invalid. 選擇的 NCA 安裝類型無效。 - + File not found 找不到檔案 - + File "%1" not found 找不到「%1」檔案 - + OK 確定 - - + + Hardware requirements not met - 硬件不满足要求 + 硬體不符合需求 - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - 您的系统不满足运行 yuzu 推荐的推荐配置。兼容性报告已被禁用。 + 您的系統不符合建議的硬體需求,相容性回報已停用。 - + Missing yuzu Account 未設定 yuzu 帳號 - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. 為了上傳相容性測試結果,您必須登入 yuzu 帳號。<br><br/>欲登入 yuzu 帳號請至模擬 &gt; 設定 &gt; 網路。 - + Error opening URL 開啟 URL 時發生錯誤 - + Unable to open the URL "%1". 無法開啟 URL:「%1」。 - + TAS Recording TAS 錄製 - + Overwrite file of player 1? 覆寫玩家 1 的檔案? - + Invalid config detected 偵測到無效設定 - + Handheld controller can't be used on docked mode. Pro controller will be selected. 掌機手把無法在主機模式中使用。將會選擇 Pro 手把。 - - + + Amiibo Amiibo - - + + The current amiibo has been removed - 当前的 Amiibo 已被移除。 + 目前 Amiibo 已被移除。 - + Error - 错误 + 錯誤 - - + + The current game is not looking for amiibos - 当前游戏并没有在寻找 Amiibos + 目前遊戲並未在尋找 Amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo 檔案 (%1);; 所有檔案 (*.*) - + Load Amiibo 開啟 Amiibo - + Error loading Amiibo data 載入 Amiibo 資料時發生錯誤 - + The selected file is not a valid amiibo - 选择的文件并不是有效的 amiibo + 選取的檔案不是有效的 Amiibo - + The selected file is already on use - 选择的文件已在使用中 + 選取的檔案已在使用中 - + An unknown error occurred - 发生了未知错误 + 發生了未知錯誤 - + Capture Screenshot 截圖 - + PNG Image (*.png) PNG 圖片 (*.png) - + TAS state: Running %1/%2 TAS 狀態:正在執行 %1/%2 - + TAS state: Recording %1 TAS 狀態:正在錄製 %1 - + TAS state: Idle %1/%2 TAS 狀態:閒置 %1/%2 - + TAS State: Invalid TAS 狀態:無效 - + &Stop Running &停止執行 - + &Start 開始(&S) - + Stop R&ecording 停止錄製 - + R&ecord 錄製 (&E) - + Building: %n shader(s) 正在編譯 %n 個著色器檔案 - + Scale: %1x %1 is the resolution scaling factor 縮放比例:%1x - + Speed: %1% / %2% 速度:%1% / %2% - + Speed: %1% 速度:%1% - + Game: %1 FPS (Unlocked) 遊戲: %1 FPS(未限制) - + Game: %1 FPS 遊戲:%1 FPS - + Frame: %1 ms 畫格延遲:%1 ms - - GPU NORMAL - GPU 一般效能 + + %1 %2 + %1 %2 - - GPU HIGH - GPU 高效能 - - - - GPU EXTREME - GPU 最高效能 - - - - GPU ERROR - GPU 錯誤 - - - - DOCKED - 主機模式 - - - - HANDHELD - 掌機模式 - - - - OPENGL - OPENGL - - - - VULKAN - VULKAN - - - - NULL - NULL - - - - NEAREST - 最近鄰域 - - - - - BILINEAR - 雙線性 - - - - BICUBIC - 雙三次 - - - - GAUSSIAN - 高斯 - - - - SCALEFORCE - 強制縮放 - - - + + FSR FSR - - + NO AA 抗鋸齒關 - - FXAA - FXAA - - - - SMAA - SMAA - - - + VOLUME: MUTE - 音量: 静音 + 音量: 靜音 - + VOLUME: %1% Volume percentage (e.g. 50%) 音量: %1% - + Confirm Key Rederivation 確認重新產生金鑰 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -5595,37 +5634,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 這將刪除您自動產生的金鑰檔案並重新執行產生金鑰模組。 - + Missing fuses 遺失項目 - + - Missing BOOT0 - 遺失 BOOT0 - + - Missing BCPKG2-1-Normal-Main - 遺失 BCPKG2-1-Normal-Main - + - Missing PRODINFO - 遺失 PRODINFO - + Derivation Components Missing 遺失產生元件 - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 缺少加密金鑰。 <br>請按照<a href='https://yuzu-emu.org/help/quickstart/'>《Yuzu快速入門指南》來取得所有金鑰、韌體、遊戲<br><br><small>(%1)。 - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -5634,49 +5673,49 @@ on your system's performance. 您的系統效能。 - + Deriving Keys 產生金鑰 - + System Archive Decryption Failed - 系统固件解密失败 + 系統封存解密失敗 - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - 当前密钥无法解密系统固件。<br>请查看<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速导航</a>以获得你的密钥、固件和游戏。 + 加密金鑰無法解密韌體。<br>請依循<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速開始指南</a>以取得您的金鑰、韌體和遊戲。 - + Select RomFS Dump Target 選擇 RomFS 傾印目標 - + Please select which RomFS you would like to dump. 請選擇希望傾印的 RomFS。 - + Are you sure you want to close yuzu? 您確定要關閉 yuzu 嗎? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. 您確定要停止模擬嗎?未儲存的進度將會遺失。 - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -5684,48 +5723,143 @@ Would you like to bypass this and exit anyway? 您希望忽略並退出嗎? + + + None + + + + + FXAA + FXAA + + + + SMAA + SMAA + + + + Nearest + 最近鄰 + + + + Bilinear + 雙線性 + + + + Bicubic + 雙立方 + + + + Gaussian + 高斯 + + + + ScaleForce + 強制縮放 + + + + Docked + TV + + + + Handheld + 掌机模式 + + + + Normal + 標準 + + + + High + + + + + Extreme + 極高 + + + + Vulkan + Vulkan + + + + OpenGL + OpenGL + + + + Null + + + + + GLSL + GLSL + + + + GLASM + GLASM + + + + SPIRV + SPIRV + GRenderWindow - - + + OpenGL not available! 無法使用 OpenGL 模式! - + OpenGL shared contexts are not supported. - 不支持 OpenGL 共享上下文。 + 不支援 OpenGL 共用的上下文。 - + yuzu has not been compiled with OpenGL support. yuzu 未以支援 OpenGL 的方式編譯。 - - + + Error while initializing OpenGL! 初始化 OpenGL 時發生錯誤! - + Your GPU may not support OpenGL, or you do not have the latest graphics driver. 您的 GPU 可能不支援 OpenGL,或是未安裝最新的圖形驅動程式 - + Error while initializing OpenGL 4.6! 初始化 OpenGL 4.6 時發生錯誤! - + Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.<br><br>GL Renderer:<br>%1 您的 GPU 可能不支援 OpenGL 4.6,或是未安裝最新的圖形驅動程式<br><br>GL 渲染器:<br>%1 - + Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 您的 GPU 可能不支援某些必需的 OpenGL 功能。請確保您已安裝最新的圖形驅動程式。<br><br>GL 渲染器:<br>%1<br><br>不支援的功能:<br>%2 @@ -5785,7 +5919,7 @@ Would you like to bypass this and exit anyway? Remove Cache Storage - 移除缓存 + 移除快取儲存空間 @@ -5831,17 +5965,17 @@ Would you like to bypass this and exit anyway? Create Shortcut - 创建快捷方式 + 建立捷徑 Add to Desktop - 添加到桌面 + 新增至桌面 Add to Applications Menu - 添加到应用程序菜单 + 新增至應用程式選單 @@ -5909,12 +6043,12 @@ Would you like to bypass this and exit anyway? Ingame - 进入游戏 + 遊戲內 Game starts, but crashes or major glitches prevent it from being completed. - 游戏可以开始,但会出现崩溃或严重故障导致游戏无法继续。 + 遊戲可以執行,但可能會出現當機或故障導致遊戲無法正常運作。 @@ -5924,17 +6058,17 @@ Would you like to bypass this and exit anyway? Game can be played without issues. - 游戏可以毫无问题地运行。 + 遊戲可以毫無問題的遊玩。 Playable - 可运行 + 可遊玩 Game functions with minor graphical or audio glitches and is playable from start to finish. - 游戏可以从头到尾完整地运行,但可能出现轻微的图形或音频故障。 + 遊戲自始至終可以正常遊玩,但可能會有一些輕微的圖形或音訊故障。 @@ -5944,7 +6078,7 @@ Would you like to bypass this and exit anyway? Game loads, but is unable to progress past the Start Screen. - 游戏可以加载,但无法通过标题页面。 + 遊戲可以載入,但無法通過開始畫面。 @@ -5998,22 +6132,22 @@ Would you like to bypass this and exit anyway? Create Room - 创建房间 + 建立房間 Room Name - 房间名称 + 房間名稱 Preferred Game - 首选游戏 + 偏好遊戲 Max Players - 最大玩家数 + 最大玩家數目 @@ -6023,32 +6157,32 @@ Would you like to bypass this and exit anyway? (Leave blank for open game) - (留空表示不限定游戏) + (空白表示開放式遊戲) Password - 密码 + 密碼 Port - 端口 + 連接埠 Room Description - 房间描述 + 房間敘述 Load Previous Ban List - 加载先前的封禁列表 + 載入先前的封鎖清單 Public - 公共 + 公用 @@ -6058,7 +6192,7 @@ Would you like to bypass this and exit anyway? Host Room - 管理房间 + 主機房間 @@ -6066,7 +6200,7 @@ Would you like to bypass this and exit anyway? Error - 错误 + 錯誤 @@ -6079,140 +6213,140 @@ Debug Message: Hotkeys - + Audio Mute/Unmute - 静音/关闭静音 + 靜音/取消靜音 - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Main Window - 主窗口 + 主要視窗 - + Audio Volume Down - 调低音量 + 音訊音量降低 - + Audio Volume Up - 调高音量 + 音訊音量提高 - + Capture Screenshot 截圖 - + Change Adapting Filter - 更改窗口滤镜 + 變更自適性過濾器 - + Change Docked Mode - 更改运行模式 + 變更底座模式 - + Change GPU Accuracy - 更改 GPU 精度 + 變更 GPU 精確度 - + Continue/Pause Emulation - 继续/暂停模拟 + 繼續/暫停模擬 - + Exit Fullscreen - 退出全屏 + 離開全螢幕 - + Exit yuzu - 退出 yuzu + 離開 yuzu - + Fullscreen 全屏 - + Load File 開啟檔案 - + Load/Remove Amiibo - 加载/移除 Amiibo + 載入/移除 Amiibo - + Restart Emulation - 重新启动模拟 + 重新啟動模擬 - + Stop Emulation - 停止模拟 + 停止模擬 - + TAS Record - TAS 录制 + TAS 錄製 - + TAS Reset - 重设 TAS + TAS 重設 - + TAS Start/Stop - TAS 开始/停止 + TAS 開始/停止 - + Toggle Filter Bar - 切换搜索栏 + 切換搜尋列 - + Toggle Framerate Limit - 切换帧率限制 + 切換影格速率限制 - + Toggle Mouse Panning - 切换鼠标平移 + 切換滑鼠移動 - + Toggle Status Bar - 切换状态栏 + 切換狀態列 @@ -6290,53 +6424,53 @@ Debug Message: Public Room Browser - 公共房间浏览器 + 公共房間瀏覽器 Nickname - 昵称 + 暱稱 Filters - 过滤器 + 過濾器 Search - 搜索 + 搜尋 Games I Own - 游戏 I 我的 + 我擁有的遊戲 Hide Empty Rooms - 隐藏空房间 + 隱藏空房間 Hide Full Rooms - 隐藏满员的房间 + 隱藏客滿的房間 Refresh Lobby - 刷新游戏大厅 + 重新整理遊戲大廳 Password Required to Join - 加入此房间需要密码 + 加入需要密碼 Password: - 密码: + 密碼: @@ -6346,27 +6480,27 @@ Debug Message: Room Name - 房间名称 + 房間名稱 Preferred Game - 首选游戏 + 偏好遊戲 Host - 管理 + 主機 Refreshing - 刷新中 + 正在重新整理 Refresh List - 刷新列表 + 重新整理清單 @@ -6529,27 +6663,27 @@ Debug Message: &Browse Public Game Lobby - 浏览公共游戏大厅 (&B) + 瀏覽公用遊戲大廳 (&B) &Create Room - 创建房间 (&C) + 建立房間 (&C) &Leave Room - 离开房间 (&L) + 離開房間 (&L) &Direct Connect to Room - 直接连接到房间 (&D) + 直接連線到房間 (&D) &Show Current Room - 显示当前房间 (&S) + 顯示目前的房間 (&S) @@ -6564,7 +6698,7 @@ Debug Message: Load/Remove &Amiibo... - 加载/移除 Amiibo... (&A) + 載入/移除 Amiibo... (&A) @@ -6635,48 +6769,48 @@ Debug Message: Moderation - 审核 + 仲裁 Ban List - 封禁列表 + 封鎖清單 Refreshing - 刷新中 + 正在重新整理 Unban - 解封 + 解除封鎖 Subject - 项目 + 主旨 Type - 类型 + 類型 Forum Username - 论坛用户名 + 論壇使用者名稱 IP Address - IP 地址 + IP 位址 Refresh - 刷新 + 重新整理 @@ -6684,17 +6818,17 @@ Debug Message: Current connection status - 当前连接状态 + 目前連線狀態 Not Connected. Click here to find a room! - 未连接。点击此处查找一个房间! + 尚未連線,按一下這裡以尋找房間! Not Connected - 未连接 + 尚未連線 @@ -6704,12 +6838,12 @@ Debug Message: New Messages Received - 收到了新消息 + 收到了新訊息 Error - 错误 + 錯誤 @@ -6840,7 +6974,7 @@ Proceed anyway? Leave Room - 离开房间 + 離開房間 @@ -6952,30 +7086,30 @@ p, li { white-space: pre-wrap; } - + Shift Shift - + Ctrl Ctrl - + Alt Alt - - - - + + + + [not set] [未設定] @@ -6986,14 +7120,14 @@ p, li { white-space: pre-wrap; } - - - - - - - - + + + + + + + + Axis %1%2 Axis %1%2 @@ -7004,322 +7138,322 @@ p, li { white-space: pre-wrap; } - - - - - - + + + + + + [unknown] [未知] - - + + Left - - + + Right - - + + Down - - + + Up - + Z Z - + R R - + L L - + A A - + B B - + X X - + Y Y - + Start 開始 - + L1 L1 - + L2 L2 - + L3 L3 - + R1 R1 - + R2 R2 - + R3 R3 - + Circle - + Cross - + Square - + Triangle Δ - + Share 分享 - + Options 選項 - + [undefined] [未指定] - + %1%2 %1%2 - - + + [invalid] [無效] - - + + %1%2Hat %3 %1%2Hat 控制器 %3 - - + - + + %1%2Axis %3 %1%2軸 %3 - - + + %1%2Axis %3,%4,%5 %1%2軸 %3,%4,%5 - - + + %1%2Motion %3 %1%2體感 %3 - - + + %1%2Button %3 %1%2按鈕 %3 - - + + [unused] [未使用] - + ZR ZR - + ZL ZL - + SR SR - + SL SL - + Stick L 左摇杆 - + Stick R 右摇杆 - + Plus - + Minus - - + + Home HOME - + Capture 截圖 - + Touch 觸控 - + Wheel Indicates the mouse wheel 滑鼠滾輪 - + Backward 後退 - + Forward 前進 - + Task 任務鍵 - + Extra 額外按鍵 - + %1%2%3%4 %1%2%3%4 - - + + %1%2%3Hat %4 %1%2%3 控制器 %4 - - + + %1%2%3Axis %4 %1%2%3轴 %4 - - + + %1%2%3Button %4 - %1%2%3 按键 %4 + %1%2%3 按鍵 %4 @@ -7327,12 +7461,12 @@ p, li { white-space: pre-wrap; } Amiibo Settings - Amiibo 设置 + Amiibo 設定 Amiibo Info - Amiibo 信息 + Amiibo 資訊 @@ -7352,7 +7486,7 @@ p, li { white-space: pre-wrap; } Amiibo Data - Amiibo 数据 + Amiibo 資料 @@ -7397,7 +7531,7 @@ p, li { white-space: pre-wrap; } Mount Amiibo - 挂载 Amiibo + 掛載 Amiibo