diff options
Diffstat (limited to 'src')
50 files changed, 56 insertions, 683 deletions
diff --git a/src/audio_core/renderer/adsp/audio_renderer.cpp b/src/audio_core/renderer/adsp/audio_renderer.cpp index d982ef630..78c15629b 100644 --- a/src/audio_core/renderer/adsp/audio_renderer.cpp +++ b/src/audio_core/renderer/adsp/audio_renderer.cpp @@ -132,7 +132,7 @@ void AudioRenderer::CreateSinkStreams() { } void AudioRenderer::ThreadFunc() { - constexpr char name[]{"AudioRenderer"}; + static constexpr char name[]{"AudioRenderer"}; MicroProfileOnThreadCreate(name); Common::SetCurrentThreadName(name); Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); diff --git a/src/audio_core/renderer/command/command_buffer.cpp b/src/audio_core/renderer/command/command_buffer.cpp index 8c6fe97e7..0bd418306 100644 --- a/src/audio_core/renderer/command/command_buffer.cpp +++ b/src/audio_core/renderer/command/command_buffer.cpp @@ -251,8 +251,8 @@ void CommandBuffer::GenerateBiquadFilterCommand(const s32 node_id, EffectInfoBas const auto& parameter{ *reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())}; - const auto state{ - reinterpret_cast<VoiceState::BiquadFilterState*>(effect_info.GetStateBuffer())}; + const auto state{reinterpret_cast<VoiceState::BiquadFilterState*>( + effect_info.GetStateBuffer() + channel * sizeof(VoiceState::BiquadFilterState))}; cmd.input = buffer_offset + parameter.inputs[channel]; cmd.output = buffer_offset + parameter.outputs[channel]; diff --git a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp index 2187d8a65..27d8b9844 100644 --- a/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp +++ b/src/audio_core/renderer/command/effect/i3dl2_reverb.cpp @@ -244,16 +244,16 @@ template <size_t NumChannels> static void ApplyI3dl2ReverbEffect(I3dl2ReverbInfo::State& state, std::span<std::span<const s32>> inputs, std::span<std::span<s32>> outputs, const u32 sample_count) { - constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ + static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ + static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, }; - constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ + static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 3, 3, 3, }; - constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ + static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ 2, 0, 0, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 0, 0, 0, 0, 5, 5, 5, }; diff --git a/src/audio_core/renderer/command/effect/reverb.cpp b/src/audio_core/renderer/command/effect/reverb.cpp index 427489214..6fe844ff0 100644 --- a/src/audio_core/renderer/command/effect/reverb.cpp +++ b/src/audio_core/renderer/command/effect/reverb.cpp @@ -252,16 +252,16 @@ template <size_t NumChannels> static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, ReverbInfo::State& state, std::vector<std::span<const s32>>& inputs, std::vector<std::span<s32>>& outputs, const u32 sample_count) { - constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ + static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ + static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, }; - constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ + static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ 0, 0, 1, 1, 0, 1, 2, 2, 3, 3, }; - constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ + static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ 0, 0, 1, 1, 2, 2, 4, 4, 5, 5, }; diff --git a/src/audio_core/renderer/command/resample/upsample.cpp b/src/audio_core/renderer/command/resample/upsample.cpp index 5f7db12ca..86ddee1a4 100644 --- a/src/audio_core/renderer/command/resample/upsample.cpp +++ b/src/audio_core/renderer/command/resample/upsample.cpp @@ -19,24 +19,24 @@ namespace AudioCore::AudioRenderer { static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input, const u32 target_sample_count, const u32 source_sample_count, UpsamplerState* state) { - constexpr u32 WindowSize = 10; - constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc1{ + static constexpr u32 WindowSize = 10; + static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc1{ 0.95376587f, -0.12872314f, 0.060028076f, -0.032470703f, 0.017669678f, -0.009124756f, 0.004272461f, -0.001739502f, 0.000579834f, -0.000091552734f, }; - constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc2{ + static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc2{ 0.8230896f, -0.19161987f, 0.093444824f, -0.05090332f, 0.027557373f, -0.014038086f, 0.0064697266f, -0.002532959f, 0.00079345703f, -0.00012207031f, }; - constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc3{ + static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc3{ 0.6298828f, -0.19274902f, 0.09725952f, -0.05319214f, 0.028625488f, -0.014373779f, 0.006500244f, -0.0024719238f, 0.0007324219f, -0.000091552734f, }; - constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc4{ + static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc4{ 0.4057312f, -0.1468811f, 0.07601929f, -0.041656494f, 0.022216797f, -0.011016846f, 0.004852295f, -0.0017700195f, 0.00048828125f, -0.000030517578f, }; - constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc5{ + static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc5{ 0.1854248f, -0.075164795f, 0.03967285f, -0.021728516f, 0.011474609f, -0.005584717f, 0.0024108887f, -0.0008239746f, 0.00021362305f, 0.0f, }; diff --git a/src/audio_core/renderer/system_manager.cpp b/src/audio_core/renderer/system_manager.cpp index f66b2b890..ce631f810 100644 --- a/src/audio_core/renderer/system_manager.cpp +++ b/src/audio_core/renderer/system_manager.cpp @@ -94,7 +94,7 @@ bool SystemManager::Remove(System& system_) { } void SystemManager::ThreadFunc() { - constexpr char name[]{"AudioRenderSystemManager"}; + static constexpr char name[]{"AudioRenderSystemManager"}; MicroProfileOnThreadCreate(name); Common::SetCurrentThreadName(name); Common::SetCurrentThreadPriority(Common::ThreadPriority::High); diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp index 76889b375..39a21b0f0 100644 --- a/src/audio_core/sink/sink_stream.cpp +++ b/src/audio_core/sink/sink_stream.cpp @@ -35,7 +35,7 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector<s16>& samples) { if (system_channels == 6 && device_channels == 2) { // We're given 6 channels, but our device only outputs 2, so downmix. - constexpr std::array<f32, 4> down_mix_coeff{1.0f, 0.707f, 0.251f, 0.707f}; + static constexpr std::array<f32, 4> down_mix_coeff{1.0f, 0.707f, 0.251f, 0.707f}; for (u32 read_index = 0, write_index = 0; read_index < samples.size(); read_index += system_channels, write_index += device_channels) { @@ -202,7 +202,7 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz // If we're paused or going to shut down, we don't want to consume buffers as coretiming is // paused and we'll desync, so just play silence. if (system.IsPaused() || system.IsShuttingDown()) { - constexpr std::array<s16, 6> silence{}; + static constexpr std::array<s16, 6> silence{}; for (size_t i = frames_written; i < num_frames; i++) { std::memcpy(&output_buffer[i * frame_size], &silence[0], frame_size_bytes); } diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8ef1fcaa8..16ced4595 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -384,8 +384,6 @@ add_library(core STATIC hle/service/am/omm.h hle/service/am/spsm.cpp hle/service/am/spsm.h - hle/service/am/tcap.cpp - hle/service/am/tcap.h hle/service/aoc/aoc_u.cpp hle/service/aoc/aoc_u.h hle/service/apm/apm.cpp @@ -396,28 +394,18 @@ add_library(core STATIC hle/service/apm/apm_interface.h hle/service/audio/audctl.cpp hle/service/audio/audctl.h - hle/service/audio/auddbg.cpp - hle/service/audio/auddbg.h - hle/service/audio/audin_a.cpp - hle/service/audio/audin_a.h hle/service/audio/audin_u.cpp hle/service/audio/audin_u.h hle/service/audio/audio.cpp hle/service/audio/audio.h - hle/service/audio/audout_a.cpp - hle/service/audio/audout_a.h hle/service/audio/audout_u.cpp hle/service/audio/audout_u.h hle/service/audio/audrec_a.cpp hle/service/audio/audrec_a.h hle/service/audio/audrec_u.cpp hle/service/audio/audrec_u.h - hle/service/audio/audren_a.cpp - hle/service/audio/audren_a.h hle/service/audio/audren_u.cpp hle/service/audio/audren_u.h - hle/service/audio/codecctl.cpp - hle/service/audio/codecctl.h hle/service/audio/errors.h hle/service/audio/hwopus.cpp hle/service/audio/hwopus.h @@ -712,8 +700,6 @@ add_library(core STATIC hle/service/sm/sm_controller.h hle/service/sockets/bsd.cpp hle/service/sockets/bsd.h - hle/service/sockets/ethc.cpp - hle/service/sockets/ethc.h hle/service/sockets/nsd.cpp hle/service/sockets/nsd.h hle/service/sockets/sfdnsres.cpp @@ -780,8 +766,6 @@ add_library(core STATIC hle/service/vi/vi_s.h hle/service/vi/vi_u.cpp hle/service/vi/vi_u.h - hle/service/wlan/wlan.cpp - hle/service/wlan/wlan.h internal_network/network.cpp internal_network/network.h internal_network/network_interface.cpp diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 6bac6722f..3a63b52e3 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -45,7 +45,7 @@ CoreTiming::~CoreTiming() { } void CoreTiming::ThreadEntry(CoreTiming& instance) { - constexpr char name[] = "HostTiming"; + static constexpr char name[] = "HostTiming"; MicroProfileOnThreadCreate(name); Common::SetCurrentThreadName(name); Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); diff --git a/src/core/debugger/gdbstub_arch.cpp b/src/core/debugger/gdbstub_arch.cpp index 4bef09bd7..831c48513 100644 --- a/src/core/debugger/gdbstub_arch.cpp +++ b/src/core/debugger/gdbstub_arch.cpp @@ -41,9 +41,8 @@ static void PutSIMDRegister(std::array<u32, 64>& simd_regs, size_t offset, const // For sample XML files see the GDB source /gdb/features // This XML defines what the registers are for this specific ARM device -std::string GDBStubA64::GetTargetXML() const { - constexpr const char* target_xml = - R"(<?xml version="1.0"?> +std::string_view GDBStubA64::GetTargetXML() const { + return R"(<?xml version="1.0"?> <!DOCTYPE target SYSTEM "gdb-target.dtd"> <target version="1.0"> <architecture>aarch64</architecture> @@ -178,8 +177,6 @@ std::string GDBStubA64::GetTargetXML() const { <reg name="fpcr" bitsize="32"/> </feature> </target>)"; - - return target_xml; } std::string GDBStubA64::RegRead(const Kernel::KThread* thread, size_t id) const { @@ -270,9 +267,8 @@ u32 GDBStubA64::BreakpointInstruction() const { return 0xd4200000; } -std::string GDBStubA32::GetTargetXML() const { - constexpr const char* target_xml = - R"(<?xml version="1.0"?> +std::string_view GDBStubA32::GetTargetXML() const { + return R"(<?xml version="1.0"?> <!DOCTYPE target SYSTEM "gdb-target.dtd"> <target version="1.0"> <architecture>arm</architecture> @@ -378,8 +374,6 @@ std::string GDBStubA32::GetTargetXML() const { <reg name="fpscr" bitsize="32" type="int" group="float" regnum="80"/> </feature> </target>)"; - - return target_xml; } std::string GDBStubA32::RegRead(const Kernel::KThread* thread, size_t id) const { diff --git a/src/core/debugger/gdbstub_arch.h b/src/core/debugger/gdbstub_arch.h index 2540d6456..34530c788 100644 --- a/src/core/debugger/gdbstub_arch.h +++ b/src/core/debugger/gdbstub_arch.h @@ -16,7 +16,7 @@ namespace Core { class GDBStubArch { public: virtual ~GDBStubArch() = default; - virtual std::string GetTargetXML() const = 0; + virtual std::string_view GetTargetXML() const = 0; virtual std::string RegRead(const Kernel::KThread* thread, size_t id) const = 0; virtual void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const = 0; virtual std::string ReadRegisters(const Kernel::KThread* thread) const = 0; @@ -27,7 +27,7 @@ public: class GDBStubA64 final : public GDBStubArch { public: - std::string GetTargetXML() const override; + std::string_view GetTargetXML() const override; std::string RegRead(const Kernel::KThread* thread, size_t id) const override; void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; std::string ReadRegisters(const Kernel::KThread* thread) const override; @@ -47,7 +47,7 @@ private: class GDBStubA32 final : public GDBStubArch { public: - std::string GetTargetXML() const override; + std::string_view GetTargetXML() const override; std::string RegRead(const Kernel::KThread* thread, size_t id) const override; void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; std::string ReadRegisters(const Kernel::KThread* thread) const override; diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp index 5aab428bb..efdf18cee 100644 --- a/src/core/file_sys/ips_layer.cpp +++ b/src/core/file_sys/ips_layer.cpp @@ -41,12 +41,12 @@ static IPSFileType IdentifyMagic(const std::vector<u8>& magic) { return IPSFileType::Error; } - constexpr std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}}; + static constexpr std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}}; if (std::equal(magic.begin(), magic.end(), patch_magic.begin())) { return IPSFileType::IPS; } - constexpr std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}}; + static constexpr std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}}; if (std::equal(magic.begin(), magic.end(), ips32_magic.begin())) { return IPSFileType::IPS32; } @@ -55,12 +55,12 @@ static IPSFileType IdentifyMagic(const std::vector<u8>& magic) { } static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { - constexpr std::array<u8, 3> eof{{'E', 'O', 'F'}}; + static constexpr std::array<u8, 3> eof{{'E', 'O', 'F'}}; if (type == IPSFileType::IPS && std::equal(data.begin(), data.end(), eof.begin())) { return true; } - constexpr std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}}; + static constexpr std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}}; return type == IPSFileType::IPS32 && std::equal(data.begin(), data.end(), eeof.begin()); } diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index 878d832c2..a6960170c 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -71,7 +71,7 @@ static std::string GetRelativePathFromNcaID(const std::array<u8, 16>& nca_id, bo } static std::string GetCNMTName(TitleType type, u64 title_id) { - constexpr std::array<const char*, 9> TITLE_TYPE_NAMES{ + static constexpr std::array<const char*, 9> TITLE_TYPE_NAMES{ "SystemProgram", "SystemData", "SystemUpdate", diff --git a/src/core/hle/kernel/svc/svc_activity.cpp b/src/core/hle/kernel/svc/svc_activity.cpp index 2e7b680d0..63bc08555 100644 --- a/src/core/hle/kernel/svc/svc_activity.cpp +++ b/src/core/hle/kernel/svc/svc_activity.cpp @@ -16,7 +16,7 @@ Result SetThreadActivity(Core::System& system, Handle thread_handle, thread_activity); // Validate the activity. - constexpr auto IsValidThreadActivity = [](ThreadActivity activity) { + static constexpr auto IsValidThreadActivity = [](ThreadActivity activity) { return activity == ThreadActivity::Runnable || activity == ThreadActivity::Paused; }; R_UNLESS(IsValidThreadActivity(thread_activity), ResultInvalidEnumValue); diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 615dd65f3..beb2da06e 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -24,7 +24,6 @@ #include "core/hle/service/am/idle.h" #include "core/hle/service/am/omm.h" #include "core/hle/service/am/spsm.h" -#include "core/hle/service/am/tcap.h" #include "core/hle/service/apm/apm_controller.h" #include "core/hle/service/apm/apm_interface.h" #include "core/hle/service/bcat/backend/backend.h" @@ -1571,7 +1570,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { const auto& version = res.first->GetVersionString(); std::copy(version.begin(), version.end(), version_string.begin()); } else { - constexpr char default_version[]{"1.0.0"}; + static constexpr char default_version[]{"1.0.0"}; std::memcpy(version_string.data(), default_version, sizeof(default_version)); } @@ -1840,7 +1839,6 @@ void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger std::make_shared<IdleSys>(system)->InstallAsService(service_manager); std::make_shared<OMM>(system)->InstallAsService(service_manager); std::make_shared<SPSM>(system)->InstallAsService(service_manager); - std::make_shared<TCAP>(system)->InstallAsService(service_manager); } IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_) diff --git a/src/core/hle/service/am/tcap.cpp b/src/core/hle/service/am/tcap.cpp deleted file mode 100644 index 818420e22..000000000 --- a/src/core/hle/service/am/tcap.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/am/tcap.h" - -namespace Service::AM { - -TCAP::TCAP(Core::System& system_) : ServiceFramework{system_, "tcap"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetContinuousHighSkinTemperatureEvent"}, - {1, nullptr, "SetOperationMode"}, - {2, nullptr, "LoadAndApplySettings"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -TCAP::~TCAP() = default; - -} // namespace Service::AM diff --git a/src/core/hle/service/am/tcap.h b/src/core/hle/service/am/tcap.h deleted file mode 100644 index 6b2148c29..000000000 --- a/src/core/hle/service/am/tcap.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::AM { - -class TCAP final : public ServiceFramework<TCAP> { -public: - explicit TCAP(Core::System& system_); - ~TCAP() override; -}; - -} // namespace Service::AM diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cpp index 8a338d9b1..44b2927a6 100644 --- a/src/core/hle/service/apm/apm.cpp +++ b/src/core/hle/service/apm/apm.cpp @@ -14,8 +14,6 @@ void InstallInterfaces(Core::System& system) { auto module_ = std::make_shared<Module>(); std::make_shared<APM>(system, module_, system.GetAPMController(), "apm") ->InstallAsService(system.ServiceManager()); - std::make_shared<APM>(system, module_, system.GetAPMController(), "apm:p") - ->InstallAsService(system.ServiceManager()); std::make_shared<APM>(system, module_, system.GetAPMController(), "apm:am") ->InstallAsService(system.ServiceManager()); std::make_shared<APM_Sys>(system, system.GetAPMController()) diff --git a/src/core/hle/service/apm/apm_controller.cpp b/src/core/hle/service/apm/apm_controller.cpp index d6de84066..227fdd0cf 100644 --- a/src/core/hle/service/apm/apm_controller.cpp +++ b/src/core/hle/service/apm/apm_controller.cpp @@ -56,7 +56,7 @@ void Controller::SetPerformanceConfiguration(PerformanceMode mode, } void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { - constexpr std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ + static constexpr std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ PerformanceConfiguration::Config7, PerformanceConfiguration::Config13, PerformanceConfiguration::Config15, diff --git a/src/core/hle/service/audio/auddbg.cpp b/src/core/hle/service/audio/auddbg.cpp deleted file mode 100644 index 5541af300..000000000 --- a/src/core/hle/service/audio/auddbg.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/audio/auddbg.h" - -namespace Service::Audio { - -AudDbg::AudDbg(Core::System& system_, const char* name) : ServiceFramework{system_, name} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestSuspendForDebug"}, - {1, nullptr, "RequestResumeForDebug"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -AudDbg::~AudDbg() = default; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/auddbg.h b/src/core/hle/service/audio/auddbg.h deleted file mode 100644 index 8f26be5dc..000000000 --- a/src/core/hle/service/audio/auddbg.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Audio { - -class AudDbg final : public ServiceFramework<AudDbg> { -public: - explicit AudDbg(Core::System& system_, const char* name); - ~AudDbg() override; -}; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audin_a.cpp b/src/core/hle/service/audio/audin_a.cpp deleted file mode 100644 index 98f4a6048..000000000 --- a/src/core/hle/service/audio/audin_a.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/audio/audin_a.h" - -namespace Service::Audio { - -AudInA::AudInA(Core::System& system_) : ServiceFramework{system_, "audin:a"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestSuspend"}, - {1, nullptr, "RequestResume"}, - {2, nullptr, "GetProcessMasterVolume"}, - {3, nullptr, "SetProcessMasterVolume"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -AudInA::~AudInA() = default; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audin_a.h b/src/core/hle/service/audio/audin_a.h deleted file mode 100644 index 19a927de5..000000000 --- a/src/core/hle/service/audio/audin_a.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Audio { - -class AudInA final : public ServiceFramework<AudInA> { -public: - explicit AudInA(Core::System& system_); - ~AudInA() override; -}; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audio.cpp b/src/core/hle/service/audio/audio.cpp index 97da71dfa..ed36e3448 100644 --- a/src/core/hle/service/audio/audio.cpp +++ b/src/core/hle/service/audio/audio.cpp @@ -2,17 +2,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/audio/audctl.h" -#include "core/hle/service/audio/auddbg.h" -#include "core/hle/service/audio/audin_a.h" #include "core/hle/service/audio/audin_u.h" #include "core/hle/service/audio/audio.h" -#include "core/hle/service/audio/audout_a.h" #include "core/hle/service/audio/audout_u.h" #include "core/hle/service/audio/audrec_a.h" #include "core/hle/service/audio/audrec_u.h" -#include "core/hle/service/audio/audren_a.h" #include "core/hle/service/audio/audren_u.h" -#include "core/hle/service/audio/codecctl.h" #include "core/hle/service/audio/hwopus.h" #include "core/hle/service/service.h" @@ -20,21 +15,12 @@ namespace Service::Audio { void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { std::make_shared<AudCtl>(system)->InstallAsService(service_manager); - std::make_shared<AudOutA>(system)->InstallAsService(service_manager); std::make_shared<AudOutU>(system)->InstallAsService(service_manager); - std::make_shared<AudInA>(system)->InstallAsService(service_manager); std::make_shared<AudInU>(system)->InstallAsService(service_manager); std::make_shared<AudRecA>(system)->InstallAsService(service_manager); std::make_shared<AudRecU>(system)->InstallAsService(service_manager); - std::make_shared<AudRenA>(system)->InstallAsService(service_manager); std::make_shared<AudRenU>(system)->InstallAsService(service_manager); - std::make_shared<CodecCtl>(system)->InstallAsService(service_manager); std::make_shared<HwOpus>(system)->InstallAsService(service_manager); - - std::make_shared<AudDbg>(system, "audin:d")->InstallAsService(service_manager); - std::make_shared<AudDbg>(system, "audout:d")->InstallAsService(service_manager); - std::make_shared<AudDbg>(system, "audrec:d")->InstallAsService(service_manager); - std::make_shared<AudDbg>(system, "audren:d")->InstallAsService(service_manager); } } // namespace Service::Audio diff --git a/src/core/hle/service/audio/audout_a.cpp b/src/core/hle/service/audio/audout_a.cpp deleted file mode 100644 index 5ecb99236..000000000 --- a/src/core/hle/service/audio/audout_a.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/audio/audout_a.h" - -namespace Service::Audio { - -AudOutA::AudOutA(Core::System& system_) : ServiceFramework{system_, "audout:a"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestSuspend"}, - {1, nullptr, "RequestResume"}, - {2, nullptr, "GetProcessMasterVolume"}, - {3, nullptr, "SetProcessMasterVolume"}, - {4, nullptr, "GetProcessRecordVolume"}, - {5, nullptr, "SetProcessRecordVolume"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -AudOutA::~AudOutA() = default; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audout_a.h b/src/core/hle/service/audio/audout_a.h deleted file mode 100644 index f641cffeb..000000000 --- a/src/core/hle/service/audio/audout_a.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Audio { - -class AudOutA final : public ServiceFramework<AudOutA> { -public: - explicit AudOutA(Core::System& system_); - ~AudOutA() override; -}; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audren_a.cpp b/src/core/hle/service/audio/audren_a.cpp deleted file mode 100644 index e775ac3bf..000000000 --- a/src/core/hle/service/audio/audren_a.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/audio/audren_a.h" - -namespace Service::Audio { - -AudRenA::AudRenA(Core::System& system_) : ServiceFramework{system_, "audren:a"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestSuspend"}, - {1, nullptr, "RequestResume"}, - {2, nullptr, "GetProcessMasterVolume"}, - {3, nullptr, "SetProcessMasterVolume"}, - {4, nullptr, "RegisterAppletResourceUserId"}, - {5, nullptr, "UnregisterAppletResourceUserId"}, - {6, nullptr, "GetProcessRecordVolume"}, - {7, nullptr, "SetProcessRecordVolume"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -AudRenA::~AudRenA() = default; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audren_a.h b/src/core/hle/service/audio/audren_a.h deleted file mode 100644 index 9e08b4245..000000000 --- a/src/core/hle/service/audio/audren_a.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Audio { - -class AudRenA final : public ServiceFramework<AudRenA> { -public: - explicit AudRenA(Core::System& system_); - ~AudRenA() override; -}; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/codecctl.cpp b/src/core/hle/service/audio/codecctl.cpp deleted file mode 100644 index 81b956d7e..000000000 --- a/src/core/hle/service/audio/codecctl.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/audio/codecctl.h" - -namespace Service::Audio { - -CodecCtl::CodecCtl(Core::System& system_) : ServiceFramework{system_, "codecctl"} { - static const FunctionInfo functions[] = { - {0, nullptr, "Initialize"}, - {1, nullptr, "Finalize"}, - {2, nullptr, "Sleep"}, - {3, nullptr, "Wake"}, - {4, nullptr, "SetVolume"}, - {5, nullptr, "GetVolumeMax"}, - {6, nullptr, "GetVolumeMin"}, - {7, nullptr, "SetActiveTarget"}, - {8, nullptr, "GetActiveTarget"}, - {9, nullptr, "BindHeadphoneMicJackInterrupt"}, - {10, nullptr, "IsHeadphoneMicJackInserted"}, - {11, nullptr, "ClearHeadphoneMicJackInterrupt"}, - {12, nullptr, "IsRequested"}, - }; - RegisterHandlers(functions); -} - -CodecCtl::~CodecCtl() = default; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/codecctl.h b/src/core/hle/service/audio/codecctl.h deleted file mode 100644 index 34da98212..000000000 --- a/src/core/hle/service/audio/codecctl.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Audio { - -class CodecCtl final : public ServiceFramework<CodecCtl> { -public: - explicit CodecCtl(Core::System& system_); - ~CodecCtl() override; -}; - -} // namespace Service::Audio diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index b0d06ee55..eb3c45a58 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -2734,25 +2734,11 @@ private: } }; -class HidTmp final : public ServiceFramework<HidTmp> { -public: - explicit HidTmp(Core::System& system_) : ServiceFramework{system_, "hid:tmp"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetConsoleSixAxisSensorCalibrationValues"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { std::make_shared<Hid>(system)->InstallAsService(service_manager); std::make_shared<HidBus>(system)->InstallAsService(service_manager); std::make_shared<HidDbg>(system)->InstallAsService(service_manager); std::make_shared<HidSys>(system)->InstallAsService(service_manager); - std::make_shared<HidTmp>(system)->InstallAsService(service_manager); std::make_shared<Service::IRS::IRS>(system)->InstallAsService(service_manager); std::make_shared<Service::IRS::IRS_SYS>(system)->InstallAsService(service_manager); diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.h b/src/core/hle/service/nvdrv/core/syncpoint_manager.h index 4f2cefae5..7728ff596 100644 --- a/src/core/hle/service/nvdrv/core/syncpoint_manager.h +++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.h @@ -124,7 +124,7 @@ private: //!< value }; - constexpr static std::size_t SyncpointCount{192}; + static constexpr std::size_t SyncpointCount{192}; std::array<SyncpointInfo, SyncpointCount> syncpoints{}; std::mutex reservation_lock; diff --git a/src/core/hle/service/pcv/pcv.cpp b/src/core/hle/service/pcv/pcv.cpp index f7a497a14..98037a8d4 100644 --- a/src/core/hle/service/pcv/pcv.cpp +++ b/src/core/hle/service/pcv/pcv.cpp @@ -52,32 +52,6 @@ public: } }; -class PCV_ARB final : public ServiceFramework<PCV_ARB> { -public: - explicit PCV_ARB(Core::System& system_) : ServiceFramework{system_, "pcv:arb"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "ReleaseControl"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - -class PCV_IMM final : public ServiceFramework<PCV_IMM> { -public: - explicit PCV_IMM(Core::System& system_) : ServiceFramework{system_, "pcv:imm"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "SetClockRate"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - class IClkrstSession final : public ServiceFramework<IClkrstSession> { public: explicit IClkrstSession(Core::System& system_, DeviceCode deivce_code_) @@ -169,8 +143,6 @@ public: void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { std::make_shared<PCV>(system)->InstallAsService(sm); - std::make_shared<PCV_ARB>(system)->InstallAsService(sm); - std::make_shared<PCV_IMM>(system)->InstallAsService(sm); std::make_shared<CLKRST>(system, "clkrst")->InstallAsService(sm); std::make_shared<CLKRST>(system, "clkrst:i")->InstallAsService(sm); std::make_shared<CLKRST_A>(system)->InstallAsService(sm); diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 0de67f1e1..1ffc1c694 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -68,7 +68,6 @@ #include "core/hle/service/time/time.h" #include "core/hle/service/usb/usb.h" #include "core/hle/service/vi/vi.h" -#include "core/hle/service/wlan/wlan.h" #include "core/reporter.h" namespace Service { @@ -306,7 +305,6 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system Time::InstallInterfaces(system); USB::InstallInterfaces(*sm, system); VI::InstallInterfaces(*sm, system, *nv_flinger, *hos_binder_driver_server); - WLAN::InstallInterfaces(*sm, system); } Services::~Services() = default; diff --git a/src/core/hle/service/sockets/ethc.cpp b/src/core/hle/service/sockets/ethc.cpp deleted file mode 100644 index c12ea999b..000000000 --- a/src/core/hle/service/sockets/ethc.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/sockets/ethc.h" - -namespace Service::Sockets { - -ETHC_C::ETHC_C(Core::System& system_) : ServiceFramework{system_, "ethc:c"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "Initialize"}, - {1, nullptr, "Cancel"}, - {2, nullptr, "GetResult"}, - {3, nullptr, "GetMediaList"}, - {4, nullptr, "SetMediaType"}, - {5, nullptr, "GetMediaType"}, - {6, nullptr, "Unknown6"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -ETHC_C::~ETHC_C() = default; - -ETHC_I::ETHC_I(Core::System& system_) : ServiceFramework{system_, "ethc:i"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetReadableHandle"}, - {1, nullptr, "Cancel"}, - {2, nullptr, "GetResult"}, - {3, nullptr, "GetInterfaceList"}, - {4, nullptr, "GetInterfaceCount"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -ETHC_I::~ETHC_I() = default; - -} // namespace Service::Sockets diff --git a/src/core/hle/service/sockets/ethc.h b/src/core/hle/service/sockets/ethc.h deleted file mode 100644 index 7c5759a96..000000000 --- a/src/core/hle/service/sockets/ethc.h +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Sockets { - -class ETHC_C final : public ServiceFramework<ETHC_C> { -public: - explicit ETHC_C(Core::System& system_); - ~ETHC_C() override; -}; - -class ETHC_I final : public ServiceFramework<ETHC_I> { -public: - explicit ETHC_I(Core::System& system_); - ~ETHC_I() override; -}; - -} // namespace Service::Sockets diff --git a/src/core/hle/service/sockets/sockets.cpp b/src/core/hle/service/sockets/sockets.cpp index 8d3ba6f96..b191b5cf5 100644 --- a/src/core/hle/service/sockets/sockets.cpp +++ b/src/core/hle/service/sockets/sockets.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/sockets/bsd.h" -#include "core/hle/service/sockets/ethc.h" #include "core/hle/service/sockets/nsd.h" #include "core/hle/service/sockets/sfdnsres.h" #include "core/hle/service/sockets/sockets.h" @@ -14,9 +13,6 @@ void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system std::make_shared<BSD>(system, "bsd:u")->InstallAsService(service_manager); std::make_shared<BSDCFG>(system)->InstallAsService(service_manager); - std::make_shared<ETHC_C>(system)->InstallAsService(service_manager); - std::make_shared<ETHC_I>(system)->InstallAsService(service_manager); - std::make_shared<NSD>(system, "nsd:a")->InstallAsService(service_manager); std::make_shared<NSD>(system, "nsd:u")->InstallAsService(service_manager); diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index f9ada7c93..973f7837a 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp @@ -286,7 +286,7 @@ static constexpr int TransitionTime(int year, Rule rule, int offset) { } static bool ParsePosixName(const char* name, TimeZoneRule& rule) { - constexpr char default_rule[]{",M4.1.0,M10.5.0"}; + static constexpr char default_rule[]{",M4.1.0,M10.5.0"}; const char* std_name{name}; int std_len{}; int offset{}; diff --git a/src/core/hle/service/wlan/wlan.cpp b/src/core/hle/service/wlan/wlan.cpp deleted file mode 100644 index 226e3034c..000000000 --- a/src/core/hle/service/wlan/wlan.cpp +++ /dev/null @@ -1,186 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include <memory> - -#include "core/hle/service/service.h" -#include "core/hle/service/sm/sm.h" -#include "core/hle/service/wlan/wlan.h" - -namespace Service::WLAN { - -class WLANInfra final : public ServiceFramework<WLANInfra> { -public: - explicit WLANInfra(Core::System& system_) : ServiceFramework{system_, "wlan:inf"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "OpenMode"}, - {1, nullptr, "CloseMode"}, - {2, nullptr, "GetMacAddress"}, - {3, nullptr, "StartScan"}, - {4, nullptr, "StopScan"}, - {5, nullptr, "Connect"}, - {6, nullptr, "CancelConnect"}, - {7, nullptr, "Disconnect"}, - {8, nullptr, "GetConnectionEvent"}, - {9, nullptr, "GetConnectionStatus"}, - {10, nullptr, "GetState"}, - {11, nullptr, "GetScanResult"}, - {12, nullptr, "GetRssi"}, - {13, nullptr, "ChangeRxAntenna"}, - {14, nullptr, "GetFwVersion"}, - {15, nullptr, "RequestSleep"}, - {16, nullptr, "RequestWakeUp"}, - {17, nullptr, "RequestIfUpDown"}, - {18, nullptr, "Unknown18"}, - {19, nullptr, "Unknown19"}, - {20, nullptr, "Unknown20"}, - {21, nullptr, "Unknown21"}, - {22, nullptr, "Unknown22"}, - {23, nullptr, "Unknown23"}, - {24, nullptr, "Unknown24"}, - {25, nullptr, "Unknown25"}, - {26, nullptr, "Unknown26"}, - {27, nullptr, "Unknown27"}, - {28, nullptr, "Unknown28"}, - {29, nullptr, "Unknown29"}, - {30, nullptr, "Unknown30"}, - {31, nullptr, "Unknown31"}, - {32, nullptr, "Unknown32"}, - {33, nullptr, "Unknown33"}, - {34, nullptr, "Unknown34"}, - {35, nullptr, "Unknown35"}, - {36, nullptr, "Unknown36"}, - {37, nullptr, "Unknown37"}, - {38, nullptr, "Unknown38"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - -class WLANLocal final : public ServiceFramework<WLANLocal> { -public: - explicit WLANLocal(Core::System& system_) : ServiceFramework{system_, "wlan:lcl"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "Unknown0"}, - {1, nullptr, "Unknown1"}, - {2, nullptr, "Unknown2"}, - {3, nullptr, "Unknown3"}, - {4, nullptr, "Unknown4"}, - {5, nullptr, "Unknown5"}, - {6, nullptr, "GetMacAddress"}, - {7, nullptr, "CreateBss"}, - {8, nullptr, "DestroyBss"}, - {9, nullptr, "StartScan"}, - {10, nullptr, "StopScan"}, - {11, nullptr, "Connect"}, - {12, nullptr, "CancelConnect"}, - {13, nullptr, "Join"}, - {14, nullptr, "CancelJoin"}, - {15, nullptr, "Disconnect"}, - {16, nullptr, "SetBeaconLostCount"}, - {17, nullptr, "Unknown17"}, - {18, nullptr, "Unknown18"}, - {19, nullptr, "Unknown19"}, - {20, nullptr, "GetBssIndicationEvent"}, - {21, nullptr, "GetBssIndicationInfo"}, - {22, nullptr, "GetState"}, - {23, nullptr, "GetAllowedChannels"}, - {24, nullptr, "AddIe"}, - {25, nullptr, "DeleteIe"}, - {26, nullptr, "Unknown26"}, - {27, nullptr, "Unknown27"}, - {28, nullptr, "CreateRxEntry"}, - {29, nullptr, "DeleteRxEntry"}, - {30, nullptr, "Unknown30"}, - {31, nullptr, "Unknown31"}, - {32, nullptr, "AddMatchingDataToRxEntry"}, - {33, nullptr, "RemoveMatchingDataFromRxEntry"}, - {34, nullptr, "GetScanResult"}, - {35, nullptr, "Unknown35"}, - {36, nullptr, "SetActionFrameWithBeacon"}, - {37, nullptr, "CancelActionFrameWithBeacon"}, - {38, nullptr, "CreateRxEntryForActionFrame"}, - {39, nullptr, "DeleteRxEntryForActionFrame"}, - {40, nullptr, "Unknown40"}, - {41, nullptr, "Unknown41"}, - {42, nullptr, "CancelGetActionFrame"}, - {43, nullptr, "GetRssi"}, - {44, nullptr, "Unknown44"}, - {45, nullptr, "Unknown45"}, - {46, nullptr, "Unknown46"}, - {47, nullptr, "Unknown47"}, - {48, nullptr, "Unknown48"}, - {49, nullptr, "Unknown49"}, - {50, nullptr, "Unknown50"}, - {51, nullptr, "Unknown51"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - -class WLANLocalGetFrame final : public ServiceFramework<WLANLocalGetFrame> { -public: - explicit WLANLocalGetFrame(Core::System& system_) : ServiceFramework{system_, "wlan:lg"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "Unknown"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - -class WLANSocketGetFrame final : public ServiceFramework<WLANSocketGetFrame> { -public: - explicit WLANSocketGetFrame(Core::System& system_) : ServiceFramework{system_, "wlan:sg"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "Unknown"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - -class WLANSocketManager final : public ServiceFramework<WLANSocketManager> { -public: - explicit WLANSocketManager(Core::System& system_) : ServiceFramework{system_, "wlan:soc"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "Unknown0"}, - {1, nullptr, "Unknown1"}, - {2, nullptr, "Unknown2"}, - {3, nullptr, "Unknown3"}, - {4, nullptr, "Unknown4"}, - {5, nullptr, "Unknown5"}, - {6, nullptr, "GetMacAddress"}, - {7, nullptr, "SwitchTsfTimerFunction"}, - {8, nullptr, "Unknown8"}, - {9, nullptr, "Unknown9"}, - {10, nullptr, "Unknown10"}, - {11, nullptr, "Unknown11"}, - {12, nullptr, "Unknown12"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - -void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { - std::make_shared<WLANInfra>(system)->InstallAsService(sm); - std::make_shared<WLANLocal>(system)->InstallAsService(sm); - std::make_shared<WLANLocalGetFrame>(system)->InstallAsService(sm); - std::make_shared<WLANSocketGetFrame>(system)->InstallAsService(sm); - std::make_shared<WLANSocketManager>(system)->InstallAsService(sm); -} - -} // namespace Service::WLAN diff --git a/src/core/hle/service/wlan/wlan.h b/src/core/hle/service/wlan/wlan.h deleted file mode 100644 index 535c3bf0d..000000000 --- a/src/core/hle/service/wlan/wlan.h +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -namespace Core { -class System; -} - -namespace Service::SM { -class ServiceManager; -} - -namespace Service::WLAN { - -void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); - -} // namespace Service::WLAN diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 8d5f2be2f..9178b00ca 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -34,7 +34,7 @@ static u64 GenerateTelemetryId() { mbedtls_entropy_context entropy; mbedtls_entropy_init(&entropy); mbedtls_ctr_drbg_context ctr_drbg; - constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}}; + static constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}}; mbedtls_ctr_drbg_init(&ctr_drbg); ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp index afc33db57..b4cd39a20 100644 --- a/src/input_common/drivers/joycon.cpp +++ b/src/input_common/drivers/joycon.cpp @@ -390,7 +390,7 @@ void Joycons::OnMotionUpdate(std::size_t port, Joycon::ControllerType type, int void Joycons::OnRingConUpdate(f32 ring_data) { // To simplify ring detection it will always be mapped to an empty identifier for all // controllers - constexpr PadIdentifier identifier = { + static constexpr PadIdentifier identifier = { .guid = Common::UUID{}, .port = 0, .pad = 0, diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 88cacd615..5c20b3426 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -616,7 +616,7 @@ bool SDLDriver::IsVibrationEnabled(const PadIdentifier& identifier) { const auto joystick = GetSDLJoystickByGUID(identifier.guid.RawString(), static_cast<int>(identifier.port)); - constexpr Common::Input::VibrationStatus test_vibration{ + static constexpr Common::Input::VibrationStatus test_vibration{ .low_amplitude = 1, .low_frequency = 160.0f, .high_amplitude = 1, @@ -624,7 +624,7 @@ bool SDLDriver::IsVibrationEnabled(const PadIdentifier& identifier) { .type = Common::Input::VibrationAmplificationType::Exponential, }; - constexpr Common::Input::VibrationStatus zero_vibration{ + static constexpr Common::Input::VibrationStatus zero_vibration{ .low_amplitude = 0, .low_frequency = 160.0f, .high_amplitude = 0, diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index ae9da6290..7195f2bc1 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -258,7 +258,7 @@ u32 Maxwell3D::GetMaxCurrentVertices() { size_t Maxwell3D::EstimateIndexBufferSize() { GPUVAddr start_address = regs.index_buffer.StartAddress(); GPUVAddr end_address = regs.index_buffer.EndAddress(); - constexpr std::array<size_t, 4> max_sizes = { + static constexpr std::array<size_t, 4> max_sizes = { std::numeric_limits<u8>::max(), std::numeric_limits<u16>::max(), std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; const size_t byte_size = regs.index_buffer.FormatSizeInBytes(); diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index 9ebfb6179..cf56392ef 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h @@ -216,7 +216,7 @@ private: std::vector<u64> big_page_continous; std::vector<std::pair<VAddr, std::size_t>> page_stash{}; - constexpr static size_t continous_bits = 64; + static constexpr size_t continous_bits = 64; const size_t unique_identifier; std::unique_ptr<VideoCommon::InvalidationAccumulator> accumulator; diff --git a/src/video_core/renderer_vulkan/vk_smaa.cpp b/src/video_core/renderer_vulkan/vk_smaa.cpp index 8eb735489..f8735189d 100644 --- a/src/video_core/renderer_vulkan/vk_smaa.cpp +++ b/src/video_core/renderer_vulkan/vk_smaa.cpp @@ -468,7 +468,7 @@ VkWriteDescriptorSet CreateWriteDescriptorSet(std::vector<VkDescriptorImageInfo> } void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { - constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ + static constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, .baseMipLevel = 0, .levelCount = 1, @@ -528,8 +528,8 @@ SMAA::SMAA(const Device& device, MemoryAllocator& allocator, size_t image_count, } void SMAA::CreateImages() { - constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; - constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; + 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); @@ -586,12 +586,12 @@ void SMAA::CreateSampler() { void SMAA::CreateShaders() { // These match the order of the SMAAStage enum - constexpr std::array vert_shader_sources{ + static constexpr std::array vert_shader_sources{ ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV), ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV), ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV), }; - constexpr std::array frag_shader_sources{ + static constexpr std::array frag_shader_sources{ ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV), ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV), ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV), @@ -675,8 +675,8 @@ void SMAA::UploadImages(Scheduler& scheduler) { return; } - constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; - constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; + static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; + static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; UploadImage(m_device, m_allocator, scheduler, m_static_images[Area], area_extent, VK_FORMAT_R8G8_UNORM, ARRAY_TO_SPAN(areaTexBytes)); diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index b9ee83de7..0ce39616f 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -113,7 +113,7 @@ public: std::optional<ASTCDecoderPass> astc_decoder_pass; const Settings::ResolutionScalingInfo& resolution; - constexpr static size_t indexing_slots = 8 * sizeof(size_t); + static constexpr size_t indexing_slots = 8 * sizeof(size_t); std::array<vk::Buffer, indexing_slots> buffers{}; std::array<std::unique_ptr<MemoryCommit>, indexing_slots> buffer_commits{}; }; diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp index c42594149..db04943eb 100644 --- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp +++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp @@ -48,7 +48,7 @@ void TurboMode::Run(std::stop_token stop_token) { auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal); // Create the descriptor pool to contain our descriptor. - constexpr VkDescriptorPoolSize pool_size{ + static constexpr VkDescriptorPoolSize pool_size{ .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, .descriptorCount = 1, }; @@ -63,7 +63,7 @@ void TurboMode::Run(std::stop_token stop_token) { }); // Create the descriptor set layout from the pool. - constexpr VkDescriptorSetLayoutBinding layout_binding{ + static constexpr VkDescriptorSetLayoutBinding layout_binding{ .binding = 0, .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, .descriptorCount = 1, diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 59120cd09..95bcdd37b 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp @@ -29,7 +29,7 @@ constexpr u32 pdep(u32 value) { template <u32 mask, u32 incr_amount> void incrpdep(u32& value) { - constexpr u32 swizzled_incr = pdep<mask>(incr_amount); + static constexpr u32 swizzled_incr = pdep<mask>(incr_amount); value = ((value | ~mask) + swizzled_incr) & mask; } diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 94ae441e5..a1c18ff90 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -219,7 +219,7 @@ static void LogRuntimes() { #ifdef _MSC_VER // It is possible that the name of the dll will change. // vcruntime140.dll is for 2015 and onwards - constexpr char runtime_dll_name[] = "vcruntime140.dll"; + static constexpr char runtime_dll_name[] = "vcruntime140.dll"; UINT sz = GetFileVersionInfoSizeA(runtime_dll_name, nullptr); bool runtime_version_inspection_worked = false; if (sz > 0) { |