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() { | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | void AudioRenderer::ThreadFunc() { | 134 | void AudioRenderer::ThreadFunc() { |
| 135 | constexpr char name[]{"AudioRenderer"}; | 135 | static constexpr char name[]{"AudioRenderer"}; |
| 136 | MicroProfileOnThreadCreate(name); | 136 | MicroProfileOnThreadCreate(name); |
| 137 | Common::SetCurrentThreadName(name); | 137 | Common::SetCurrentThreadName(name); |
| 138 | Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); | 138 | 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 | |||
| 251 | 251 | ||
| 252 | const auto& parameter{ | 252 | const auto& parameter{ |
| 253 | *reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())}; | 253 | *reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())}; |
| 254 | const auto state{ | 254 | const auto state{reinterpret_cast<VoiceState::BiquadFilterState*>( |
| 255 | reinterpret_cast<VoiceState::BiquadFilterState*>(effect_info.GetStateBuffer())}; | 255 | effect_info.GetStateBuffer() + channel * sizeof(VoiceState::BiquadFilterState))}; |
| 256 | 256 | ||
| 257 | cmd.input = buffer_offset + parameter.inputs[channel]; | 257 | cmd.input = buffer_offset + parameter.inputs[channel]; |
| 258 | cmd.output = buffer_offset + parameter.outputs[channel]; | 258 | 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> | |||
| 244 | static void ApplyI3dl2ReverbEffect(I3dl2ReverbInfo::State& state, | 244 | static void ApplyI3dl2ReverbEffect(I3dl2ReverbInfo::State& state, |
| 245 | std::span<std::span<const s32>> inputs, | 245 | std::span<std::span<const s32>> inputs, |
| 246 | std::span<std::span<s32>> outputs, const u32 sample_count) { | 246 | std::span<std::span<s32>> outputs, const u32 sample_count) { |
| 247 | constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ | 247 | static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ |
| 248 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 248 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 249 | }; | 249 | }; |
| 250 | constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ | 250 | static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ |
| 251 | 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, | 251 | 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, |
| 252 | }; | 252 | }; |
| 253 | constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ | 253 | static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ |
| 254 | 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 3, 3, 3, | 254 | 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 3, 3, 3, |
| 255 | }; | 255 | }; |
| 256 | constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ | 256 | static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ |
| 257 | 2, 0, 0, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 0, 0, 0, 0, 5, 5, 5, | 257 | 2, 0, 0, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 0, 0, 0, 0, 5, 5, 5, |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
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> | |||
| 252 | static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, ReverbInfo::State& state, | 252 | static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, ReverbInfo::State& state, |
| 253 | std::vector<std::span<const s32>>& inputs, | 253 | std::vector<std::span<const s32>>& inputs, |
| 254 | std::vector<std::span<s32>>& outputs, const u32 sample_count) { | 254 | std::vector<std::span<s32>>& outputs, const u32 sample_count) { |
| 255 | constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ | 255 | static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{ |
| 256 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 256 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 257 | }; | 257 | }; |
| 258 | constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ | 258 | static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{ |
| 259 | 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, | 259 | 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, |
| 260 | }; | 260 | }; |
| 261 | constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ | 261 | static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{ |
| 262 | 0, 0, 1, 1, 0, 1, 2, 2, 3, 3, | 262 | 0, 0, 1, 1, 0, 1, 2, 2, 3, 3, |
| 263 | }; | 263 | }; |
| 264 | constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ | 264 | static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{ |
| 265 | 0, 0, 1, 1, 2, 2, 4, 4, 5, 5, | 265 | 0, 0, 1, 1, 2, 2, 4, 4, 5, 5, |
| 266 | }; | 266 | }; |
| 267 | 267 | ||
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 { | |||
| 19 | static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input, | 19 | static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input, |
| 20 | const u32 target_sample_count, const u32 source_sample_count, | 20 | const u32 target_sample_count, const u32 source_sample_count, |
| 21 | UpsamplerState* state) { | 21 | UpsamplerState* state) { |
| 22 | constexpr u32 WindowSize = 10; | 22 | static constexpr u32 WindowSize = 10; |
| 23 | constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc1{ | 23 | static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc1{ |
| 24 | 0.95376587f, -0.12872314f, 0.060028076f, -0.032470703f, 0.017669678f, | 24 | 0.95376587f, -0.12872314f, 0.060028076f, -0.032470703f, 0.017669678f, |
| 25 | -0.009124756f, 0.004272461f, -0.001739502f, 0.000579834f, -0.000091552734f, | 25 | -0.009124756f, 0.004272461f, -0.001739502f, 0.000579834f, -0.000091552734f, |
| 26 | }; | 26 | }; |
| 27 | constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc2{ | 27 | static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc2{ |
| 28 | 0.8230896f, -0.19161987f, 0.093444824f, -0.05090332f, 0.027557373f, | 28 | 0.8230896f, -0.19161987f, 0.093444824f, -0.05090332f, 0.027557373f, |
| 29 | -0.014038086f, 0.0064697266f, -0.002532959f, 0.00079345703f, -0.00012207031f, | 29 | -0.014038086f, 0.0064697266f, -0.002532959f, 0.00079345703f, -0.00012207031f, |
| 30 | }; | 30 | }; |
| 31 | constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc3{ | 31 | static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc3{ |
| 32 | 0.6298828f, -0.19274902f, 0.09725952f, -0.05319214f, 0.028625488f, | 32 | 0.6298828f, -0.19274902f, 0.09725952f, -0.05319214f, 0.028625488f, |
| 33 | -0.014373779f, 0.006500244f, -0.0024719238f, 0.0007324219f, -0.000091552734f, | 33 | -0.014373779f, 0.006500244f, -0.0024719238f, 0.0007324219f, -0.000091552734f, |
| 34 | }; | 34 | }; |
| 35 | constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc4{ | 35 | static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc4{ |
| 36 | 0.4057312f, -0.1468811f, 0.07601929f, -0.041656494f, 0.022216797f, | 36 | 0.4057312f, -0.1468811f, 0.07601929f, -0.041656494f, 0.022216797f, |
| 37 | -0.011016846f, 0.004852295f, -0.0017700195f, 0.00048828125f, -0.000030517578f, | 37 | -0.011016846f, 0.004852295f, -0.0017700195f, 0.00048828125f, -0.000030517578f, |
| 38 | }; | 38 | }; |
| 39 | constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc5{ | 39 | static constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc5{ |
| 40 | 0.1854248f, -0.075164795f, 0.03967285f, -0.021728516f, 0.011474609f, | 40 | 0.1854248f, -0.075164795f, 0.03967285f, -0.021728516f, 0.011474609f, |
| 41 | -0.005584717f, 0.0024108887f, -0.0008239746f, 0.00021362305f, 0.0f, | 41 | -0.005584717f, 0.0024108887f, -0.0008239746f, 0.00021362305f, 0.0f, |
| 42 | }; | 42 | }; |
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_) { | |||
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void SystemManager::ThreadFunc() { | 96 | void SystemManager::ThreadFunc() { |
| 97 | constexpr char name[]{"AudioRenderSystemManager"}; | 97 | static constexpr char name[]{"AudioRenderSystemManager"}; |
| 98 | MicroProfileOnThreadCreate(name); | 98 | MicroProfileOnThreadCreate(name); |
| 99 | Common::SetCurrentThreadName(name); | 99 | Common::SetCurrentThreadName(name); |
| 100 | Common::SetCurrentThreadPriority(Common::ThreadPriority::High); | 100 | 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) { | |||
| 35 | 35 | ||
| 36 | if (system_channels == 6 && device_channels == 2) { | 36 | if (system_channels == 6 && device_channels == 2) { |
| 37 | // We're given 6 channels, but our device only outputs 2, so downmix. | 37 | // We're given 6 channels, but our device only outputs 2, so downmix. |
| 38 | constexpr std::array<f32, 4> down_mix_coeff{1.0f, 0.707f, 0.251f, 0.707f}; | 38 | static constexpr std::array<f32, 4> down_mix_coeff{1.0f, 0.707f, 0.251f, 0.707f}; |
| 39 | 39 | ||
| 40 | for (u32 read_index = 0, write_index = 0; read_index < samples.size(); | 40 | for (u32 read_index = 0, write_index = 0; read_index < samples.size(); |
| 41 | read_index += system_channels, write_index += device_channels) { | 41 | read_index += system_channels, write_index += device_channels) { |
| @@ -202,7 +202,7 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz | |||
| 202 | // If we're paused or going to shut down, we don't want to consume buffers as coretiming is | 202 | // If we're paused or going to shut down, we don't want to consume buffers as coretiming is |
| 203 | // paused and we'll desync, so just play silence. | 203 | // paused and we'll desync, so just play silence. |
| 204 | if (system.IsPaused() || system.IsShuttingDown()) { | 204 | if (system.IsPaused() || system.IsShuttingDown()) { |
| 205 | constexpr std::array<s16, 6> silence{}; | 205 | static constexpr std::array<s16, 6> silence{}; |
| 206 | for (size_t i = frames_written; i < num_frames; i++) { | 206 | for (size_t i = frames_written; i < num_frames; i++) { |
| 207 | std::memcpy(&output_buffer[i * frame_size], &silence[0], frame_size_bytes); | 207 | std::memcpy(&output_buffer[i * frame_size], &silence[0], frame_size_bytes); |
| 208 | } | 208 | } |
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 | |||
| 384 | hle/service/am/omm.h | 384 | hle/service/am/omm.h |
| 385 | hle/service/am/spsm.cpp | 385 | hle/service/am/spsm.cpp |
| 386 | hle/service/am/spsm.h | 386 | hle/service/am/spsm.h |
| 387 | hle/service/am/tcap.cpp | ||
| 388 | hle/service/am/tcap.h | ||
| 389 | hle/service/aoc/aoc_u.cpp | 387 | hle/service/aoc/aoc_u.cpp |
| 390 | hle/service/aoc/aoc_u.h | 388 | hle/service/aoc/aoc_u.h |
| 391 | hle/service/apm/apm.cpp | 389 | hle/service/apm/apm.cpp |
| @@ -396,28 +394,18 @@ add_library(core STATIC | |||
| 396 | hle/service/apm/apm_interface.h | 394 | hle/service/apm/apm_interface.h |
| 397 | hle/service/audio/audctl.cpp | 395 | hle/service/audio/audctl.cpp |
| 398 | hle/service/audio/audctl.h | 396 | hle/service/audio/audctl.h |
| 399 | hle/service/audio/auddbg.cpp | ||
| 400 | hle/service/audio/auddbg.h | ||
| 401 | hle/service/audio/audin_a.cpp | ||
| 402 | hle/service/audio/audin_a.h | ||
| 403 | hle/service/audio/audin_u.cpp | 397 | hle/service/audio/audin_u.cpp |
| 404 | hle/service/audio/audin_u.h | 398 | hle/service/audio/audin_u.h |
| 405 | hle/service/audio/audio.cpp | 399 | hle/service/audio/audio.cpp |
| 406 | hle/service/audio/audio.h | 400 | hle/service/audio/audio.h |
| 407 | hle/service/audio/audout_a.cpp | ||
| 408 | hle/service/audio/audout_a.h | ||
| 409 | hle/service/audio/audout_u.cpp | 401 | hle/service/audio/audout_u.cpp |
| 410 | hle/service/audio/audout_u.h | 402 | hle/service/audio/audout_u.h |
| 411 | hle/service/audio/audrec_a.cpp | 403 | hle/service/audio/audrec_a.cpp |
| 412 | hle/service/audio/audrec_a.h | 404 | hle/service/audio/audrec_a.h |
| 413 | hle/service/audio/audrec_u.cpp | 405 | hle/service/audio/audrec_u.cpp |
| 414 | hle/service/audio/audrec_u.h | 406 | hle/service/audio/audrec_u.h |
| 415 | hle/service/audio/audren_a.cpp | ||
| 416 | hle/service/audio/audren_a.h | ||
| 417 | hle/service/audio/audren_u.cpp | 407 | hle/service/audio/audren_u.cpp |
| 418 | hle/service/audio/audren_u.h | 408 | hle/service/audio/audren_u.h |
| 419 | hle/service/audio/codecctl.cpp | ||
| 420 | hle/service/audio/codecctl.h | ||
| 421 | hle/service/audio/errors.h | 409 | hle/service/audio/errors.h |
| 422 | hle/service/audio/hwopus.cpp | 410 | hle/service/audio/hwopus.cpp |
| 423 | hle/service/audio/hwopus.h | 411 | hle/service/audio/hwopus.h |
| @@ -712,8 +700,6 @@ add_library(core STATIC | |||
| 712 | hle/service/sm/sm_controller.h | 700 | hle/service/sm/sm_controller.h |
| 713 | hle/service/sockets/bsd.cpp | 701 | hle/service/sockets/bsd.cpp |
| 714 | hle/service/sockets/bsd.h | 702 | hle/service/sockets/bsd.h |
| 715 | hle/service/sockets/ethc.cpp | ||
| 716 | hle/service/sockets/ethc.h | ||
| 717 | hle/service/sockets/nsd.cpp | 703 | hle/service/sockets/nsd.cpp |
| 718 | hle/service/sockets/nsd.h | 704 | hle/service/sockets/nsd.h |
| 719 | hle/service/sockets/sfdnsres.cpp | 705 | hle/service/sockets/sfdnsres.cpp |
| @@ -780,8 +766,6 @@ add_library(core STATIC | |||
| 780 | hle/service/vi/vi_s.h | 766 | hle/service/vi/vi_s.h |
| 781 | hle/service/vi/vi_u.cpp | 767 | hle/service/vi/vi_u.cpp |
| 782 | hle/service/vi/vi_u.h | 768 | hle/service/vi/vi_u.h |
| 783 | hle/service/wlan/wlan.cpp | ||
| 784 | hle/service/wlan/wlan.h | ||
| 785 | internal_network/network.cpp | 769 | internal_network/network.cpp |
| 786 | internal_network/network.h | 770 | internal_network/network.h |
| 787 | internal_network/network_interface.cpp | 771 | 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() { | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void CoreTiming::ThreadEntry(CoreTiming& instance) { | 47 | void CoreTiming::ThreadEntry(CoreTiming& instance) { |
| 48 | constexpr char name[] = "HostTiming"; | 48 | static constexpr char name[] = "HostTiming"; |
| 49 | MicroProfileOnThreadCreate(name); | 49 | MicroProfileOnThreadCreate(name); |
| 50 | Common::SetCurrentThreadName(name); | 50 | Common::SetCurrentThreadName(name); |
| 51 | Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); | 51 | 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 | |||
| 41 | 41 | ||
| 42 | // For sample XML files see the GDB source /gdb/features | 42 | // For sample XML files see the GDB source /gdb/features |
| 43 | // This XML defines what the registers are for this specific ARM device | 43 | // This XML defines what the registers are for this specific ARM device |
| 44 | std::string GDBStubA64::GetTargetXML() const { | 44 | std::string_view GDBStubA64::GetTargetXML() const { |
| 45 | constexpr const char* target_xml = | 45 | return R"(<?xml version="1.0"?> |
| 46 | R"(<?xml version="1.0"?> | ||
| 47 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> | 46 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> |
| 48 | <target version="1.0"> | 47 | <target version="1.0"> |
| 49 | <architecture>aarch64</architecture> | 48 | <architecture>aarch64</architecture> |
| @@ -178,8 +177,6 @@ std::string GDBStubA64::GetTargetXML() const { | |||
| 178 | <reg name="fpcr" bitsize="32"/> | 177 | <reg name="fpcr" bitsize="32"/> |
| 179 | </feature> | 178 | </feature> |
| 180 | </target>)"; | 179 | </target>)"; |
| 181 | |||
| 182 | return target_xml; | ||
| 183 | } | 180 | } |
| 184 | 181 | ||
| 185 | std::string GDBStubA64::RegRead(const Kernel::KThread* thread, size_t id) const { | 182 | std::string GDBStubA64::RegRead(const Kernel::KThread* thread, size_t id) const { |
| @@ -270,9 +267,8 @@ u32 GDBStubA64::BreakpointInstruction() const { | |||
| 270 | return 0xd4200000; | 267 | return 0xd4200000; |
| 271 | } | 268 | } |
| 272 | 269 | ||
| 273 | std::string GDBStubA32::GetTargetXML() const { | 270 | std::string_view GDBStubA32::GetTargetXML() const { |
| 274 | constexpr const char* target_xml = | 271 | return R"(<?xml version="1.0"?> |
| 275 | R"(<?xml version="1.0"?> | ||
| 276 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> | 272 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> |
| 277 | <target version="1.0"> | 273 | <target version="1.0"> |
| 278 | <architecture>arm</architecture> | 274 | <architecture>arm</architecture> |
| @@ -378,8 +374,6 @@ std::string GDBStubA32::GetTargetXML() const { | |||
| 378 | <reg name="fpscr" bitsize="32" type="int" group="float" regnum="80"/> | 374 | <reg name="fpscr" bitsize="32" type="int" group="float" regnum="80"/> |
| 379 | </feature> | 375 | </feature> |
| 380 | </target>)"; | 376 | </target>)"; |
| 381 | |||
| 382 | return target_xml; | ||
| 383 | } | 377 | } |
| 384 | 378 | ||
| 385 | std::string GDBStubA32::RegRead(const Kernel::KThread* thread, size_t id) const { | 379 | 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 { | |||
| 16 | class GDBStubArch { | 16 | class GDBStubArch { |
| 17 | public: | 17 | public: |
| 18 | virtual ~GDBStubArch() = default; | 18 | virtual ~GDBStubArch() = default; |
| 19 | virtual std::string GetTargetXML() const = 0; | 19 | virtual std::string_view GetTargetXML() const = 0; |
| 20 | virtual std::string RegRead(const Kernel::KThread* thread, size_t id) const = 0; | 20 | virtual std::string RegRead(const Kernel::KThread* thread, size_t id) const = 0; |
| 21 | virtual void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const = 0; | 21 | virtual void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const = 0; |
| 22 | virtual std::string ReadRegisters(const Kernel::KThread* thread) const = 0; | 22 | virtual std::string ReadRegisters(const Kernel::KThread* thread) const = 0; |
| @@ -27,7 +27,7 @@ public: | |||
| 27 | 27 | ||
| 28 | class GDBStubA64 final : public GDBStubArch { | 28 | class GDBStubA64 final : public GDBStubArch { |
| 29 | public: | 29 | public: |
| 30 | std::string GetTargetXML() const override; | 30 | std::string_view GetTargetXML() const override; |
| 31 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; | 31 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; |
| 32 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; | 32 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; |
| 33 | std::string ReadRegisters(const Kernel::KThread* thread) const override; | 33 | std::string ReadRegisters(const Kernel::KThread* thread) const override; |
| @@ -47,7 +47,7 @@ private: | |||
| 47 | 47 | ||
| 48 | class GDBStubA32 final : public GDBStubArch { | 48 | class GDBStubA32 final : public GDBStubArch { |
| 49 | public: | 49 | public: |
| 50 | std::string GetTargetXML() const override; | 50 | std::string_view GetTargetXML() const override; |
| 51 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; | 51 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; |
| 52 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; | 52 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; |
| 53 | std::string ReadRegisters(const Kernel::KThread* thread) const override; | 53 | 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) { | |||
| 41 | return IPSFileType::Error; | 41 | return IPSFileType::Error; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | constexpr std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}}; | 44 | static constexpr std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}}; |
| 45 | if (std::equal(magic.begin(), magic.end(), patch_magic.begin())) { | 45 | if (std::equal(magic.begin(), magic.end(), patch_magic.begin())) { |
| 46 | return IPSFileType::IPS; | 46 | return IPSFileType::IPS; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | constexpr std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}}; | 49 | static constexpr std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}}; |
| 50 | if (std::equal(magic.begin(), magic.end(), ips32_magic.begin())) { | 50 | if (std::equal(magic.begin(), magic.end(), ips32_magic.begin())) { |
| 51 | return IPSFileType::IPS32; | 51 | return IPSFileType::IPS32; |
| 52 | } | 52 | } |
| @@ -55,12 +55,12 @@ static IPSFileType IdentifyMagic(const std::vector<u8>& magic) { | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { | 57 | static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { |
| 58 | constexpr std::array<u8, 3> eof{{'E', 'O', 'F'}}; | 58 | static constexpr std::array<u8, 3> eof{{'E', 'O', 'F'}}; |
| 59 | if (type == IPSFileType::IPS && std::equal(data.begin(), data.end(), eof.begin())) { | 59 | if (type == IPSFileType::IPS && std::equal(data.begin(), data.end(), eof.begin())) { |
| 60 | return true; | 60 | return true; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | constexpr std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}}; | 63 | static constexpr std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}}; |
| 64 | return type == IPSFileType::IPS32 && std::equal(data.begin(), data.end(), eeof.begin()); | 64 | return type == IPSFileType::IPS32 && std::equal(data.begin(), data.end(), eeof.begin()); |
| 65 | } | 65 | } |
| 66 | 66 | ||
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 | |||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | static std::string GetCNMTName(TitleType type, u64 title_id) { | 73 | static std::string GetCNMTName(TitleType type, u64 title_id) { |
| 74 | constexpr std::array<const char*, 9> TITLE_TYPE_NAMES{ | 74 | static constexpr std::array<const char*, 9> TITLE_TYPE_NAMES{ |
| 75 | "SystemProgram", | 75 | "SystemProgram", |
| 76 | "SystemData", | 76 | "SystemData", |
| 77 | "SystemUpdate", | 77 | "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, | |||
| 16 | thread_activity); | 16 | thread_activity); |
| 17 | 17 | ||
| 18 | // Validate the activity. | 18 | // Validate the activity. |
| 19 | constexpr auto IsValidThreadActivity = [](ThreadActivity activity) { | 19 | static constexpr auto IsValidThreadActivity = [](ThreadActivity activity) { |
| 20 | return activity == ThreadActivity::Runnable || activity == ThreadActivity::Paused; | 20 | return activity == ThreadActivity::Runnable || activity == ThreadActivity::Paused; |
| 21 | }; | 21 | }; |
| 22 | R_UNLESS(IsValidThreadActivity(thread_activity), ResultInvalidEnumValue); | 22 | 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 @@ | |||
| 24 | #include "core/hle/service/am/idle.h" | 24 | #include "core/hle/service/am/idle.h" |
| 25 | #include "core/hle/service/am/omm.h" | 25 | #include "core/hle/service/am/omm.h" |
| 26 | #include "core/hle/service/am/spsm.h" | 26 | #include "core/hle/service/am/spsm.h" |
| 27 | #include "core/hle/service/am/tcap.h" | ||
| 28 | #include "core/hle/service/apm/apm_controller.h" | 27 | #include "core/hle/service/apm/apm_controller.h" |
| 29 | #include "core/hle/service/apm/apm_interface.h" | 28 | #include "core/hle/service/apm/apm_interface.h" |
| 30 | #include "core/hle/service/bcat/backend/backend.h" | 29 | #include "core/hle/service/bcat/backend/backend.h" |
| @@ -1571,7 +1570,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { | |||
| 1571 | const auto& version = res.first->GetVersionString(); | 1570 | const auto& version = res.first->GetVersionString(); |
| 1572 | std::copy(version.begin(), version.end(), version_string.begin()); | 1571 | std::copy(version.begin(), version.end(), version_string.begin()); |
| 1573 | } else { | 1572 | } else { |
| 1574 | constexpr char default_version[]{"1.0.0"}; | 1573 | static constexpr char default_version[]{"1.0.0"}; |
| 1575 | std::memcpy(version_string.data(), default_version, sizeof(default_version)); | 1574 | std::memcpy(version_string.data(), default_version, sizeof(default_version)); |
| 1576 | } | 1575 | } |
| 1577 | 1576 | ||
| @@ -1840,7 +1839,6 @@ void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger | |||
| 1840 | std::make_shared<IdleSys>(system)->InstallAsService(service_manager); | 1839 | std::make_shared<IdleSys>(system)->InstallAsService(service_manager); |
| 1841 | std::make_shared<OMM>(system)->InstallAsService(service_manager); | 1840 | std::make_shared<OMM>(system)->InstallAsService(service_manager); |
| 1842 | std::make_shared<SPSM>(system)->InstallAsService(service_manager); | 1841 | std::make_shared<SPSM>(system)->InstallAsService(service_manager); |
| 1843 | std::make_shared<TCAP>(system)->InstallAsService(service_manager); | ||
| 1844 | } | 1842 | } |
| 1845 | 1843 | ||
| 1846 | IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_) | 1844 | 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/am/tcap.h" | ||
| 5 | |||
| 6 | namespace Service::AM { | ||
| 7 | |||
| 8 | TCAP::TCAP(Core::System& system_) : ServiceFramework{system_, "tcap"} { | ||
| 9 | // clang-format off | ||
| 10 | static const FunctionInfo functions[] = { | ||
| 11 | {0, nullptr, "GetContinuousHighSkinTemperatureEvent"}, | ||
| 12 | {1, nullptr, "SetOperationMode"}, | ||
| 13 | {2, nullptr, "LoadAndApplySettings"}, | ||
| 14 | }; | ||
| 15 | // clang-format on | ||
| 16 | |||
| 17 | RegisterHandlers(functions); | ||
| 18 | } | ||
| 19 | |||
| 20 | TCAP::~TCAP() = default; | ||
| 21 | |||
| 22 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Core { | ||
| 9 | class System; | ||
| 10 | } | ||
| 11 | |||
| 12 | namespace Service::AM { | ||
| 13 | |||
| 14 | class TCAP final : public ServiceFramework<TCAP> { | ||
| 15 | public: | ||
| 16 | explicit TCAP(Core::System& system_); | ||
| 17 | ~TCAP() override; | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // 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) { | |||
| 14 | auto module_ = std::make_shared<Module>(); | 14 | auto module_ = std::make_shared<Module>(); |
| 15 | std::make_shared<APM>(system, module_, system.GetAPMController(), "apm") | 15 | std::make_shared<APM>(system, module_, system.GetAPMController(), "apm") |
| 16 | ->InstallAsService(system.ServiceManager()); | 16 | ->InstallAsService(system.ServiceManager()); |
| 17 | std::make_shared<APM>(system, module_, system.GetAPMController(), "apm:p") | ||
| 18 | ->InstallAsService(system.ServiceManager()); | ||
| 19 | std::make_shared<APM>(system, module_, system.GetAPMController(), "apm:am") | 17 | std::make_shared<APM>(system, module_, system.GetAPMController(), "apm:am") |
| 20 | ->InstallAsService(system.ServiceManager()); | 18 | ->InstallAsService(system.ServiceManager()); |
| 21 | std::make_shared<APM_Sys>(system, system.GetAPMController()) | 19 | 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, | |||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { | 58 | void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { |
| 59 | constexpr std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ | 59 | static constexpr std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ |
| 60 | PerformanceConfiguration::Config7, | 60 | PerformanceConfiguration::Config7, |
| 61 | PerformanceConfiguration::Config13, | 61 | PerformanceConfiguration::Config13, |
| 62 | PerformanceConfiguration::Config15, | 62 | 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/audio/auddbg.h" | ||
| 5 | |||
| 6 | namespace Service::Audio { | ||
| 7 | |||
| 8 | AudDbg::AudDbg(Core::System& system_, const char* name) : ServiceFramework{system_, name} { | ||
| 9 | // clang-format off | ||
| 10 | static const FunctionInfo functions[] = { | ||
| 11 | {0, nullptr, "RequestSuspendForDebug"}, | ||
| 12 | {1, nullptr, "RequestResumeForDebug"}, | ||
| 13 | }; | ||
| 14 | // clang-format on | ||
| 15 | |||
| 16 | RegisterHandlers(functions); | ||
| 17 | } | ||
| 18 | |||
| 19 | AudDbg::~AudDbg() = default; | ||
| 20 | |||
| 21 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Core { | ||
| 9 | class System; | ||
| 10 | } | ||
| 11 | |||
| 12 | namespace Service::Audio { | ||
| 13 | |||
| 14 | class AudDbg final : public ServiceFramework<AudDbg> { | ||
| 15 | public: | ||
| 16 | explicit AudDbg(Core::System& system_, const char* name); | ||
| 17 | ~AudDbg() override; | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/audio/audin_a.h" | ||
| 5 | |||
| 6 | namespace Service::Audio { | ||
| 7 | |||
| 8 | AudInA::AudInA(Core::System& system_) : ServiceFramework{system_, "audin:a"} { | ||
| 9 | // clang-format off | ||
| 10 | static const FunctionInfo functions[] = { | ||
| 11 | {0, nullptr, "RequestSuspend"}, | ||
| 12 | {1, nullptr, "RequestResume"}, | ||
| 13 | {2, nullptr, "GetProcessMasterVolume"}, | ||
| 14 | {3, nullptr, "SetProcessMasterVolume"}, | ||
| 15 | }; | ||
| 16 | // clang-format on | ||
| 17 | |||
| 18 | RegisterHandlers(functions); | ||
| 19 | } | ||
| 20 | |||
| 21 | AudInA::~AudInA() = default; | ||
| 22 | |||
| 23 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Core { | ||
| 9 | class System; | ||
| 10 | } | ||
| 11 | |||
| 12 | namespace Service::Audio { | ||
| 13 | |||
| 14 | class AudInA final : public ServiceFramework<AudInA> { | ||
| 15 | public: | ||
| 16 | explicit AudInA(Core::System& system_); | ||
| 17 | ~AudInA() override; | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // 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 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/service/audio/audctl.h" | 4 | #include "core/hle/service/audio/audctl.h" |
| 5 | #include "core/hle/service/audio/auddbg.h" | ||
| 6 | #include "core/hle/service/audio/audin_a.h" | ||
| 7 | #include "core/hle/service/audio/audin_u.h" | 5 | #include "core/hle/service/audio/audin_u.h" |
| 8 | #include "core/hle/service/audio/audio.h" | 6 | #include "core/hle/service/audio/audio.h" |
| 9 | #include "core/hle/service/audio/audout_a.h" | ||
| 10 | #include "core/hle/service/audio/audout_u.h" | 7 | #include "core/hle/service/audio/audout_u.h" |
| 11 | #include "core/hle/service/audio/audrec_a.h" | 8 | #include "core/hle/service/audio/audrec_a.h" |
| 12 | #include "core/hle/service/audio/audrec_u.h" | 9 | #include "core/hle/service/audio/audrec_u.h" |
| 13 | #include "core/hle/service/audio/audren_a.h" | ||
| 14 | #include "core/hle/service/audio/audren_u.h" | 10 | #include "core/hle/service/audio/audren_u.h" |
| 15 | #include "core/hle/service/audio/codecctl.h" | ||
| 16 | #include "core/hle/service/audio/hwopus.h" | 11 | #include "core/hle/service/audio/hwopus.h" |
| 17 | #include "core/hle/service/service.h" | 12 | #include "core/hle/service/service.h" |
| 18 | 13 | ||
| @@ -20,21 +15,12 @@ namespace Service::Audio { | |||
| 20 | 15 | ||
| 21 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { | 16 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { |
| 22 | std::make_shared<AudCtl>(system)->InstallAsService(service_manager); | 17 | std::make_shared<AudCtl>(system)->InstallAsService(service_manager); |
| 23 | std::make_shared<AudOutA>(system)->InstallAsService(service_manager); | ||
| 24 | std::make_shared<AudOutU>(system)->InstallAsService(service_manager); | 18 | std::make_shared<AudOutU>(system)->InstallAsService(service_manager); |
| 25 | std::make_shared<AudInA>(system)->InstallAsService(service_manager); | ||
| 26 | std::make_shared<AudInU>(system)->InstallAsService(service_manager); | 19 | std::make_shared<AudInU>(system)->InstallAsService(service_manager); |
| 27 | std::make_shared<AudRecA>(system)->InstallAsService(service_manager); | 20 | std::make_shared<AudRecA>(system)->InstallAsService(service_manager); |
| 28 | std::make_shared<AudRecU>(system)->InstallAsService(service_manager); | 21 | std::make_shared<AudRecU>(system)->InstallAsService(service_manager); |
| 29 | std::make_shared<AudRenA>(system)->InstallAsService(service_manager); | ||
| 30 | std::make_shared<AudRenU>(system)->InstallAsService(service_manager); | 22 | std::make_shared<AudRenU>(system)->InstallAsService(service_manager); |
| 31 | std::make_shared<CodecCtl>(system)->InstallAsService(service_manager); | ||
| 32 | std::make_shared<HwOpus>(system)->InstallAsService(service_manager); | 23 | std::make_shared<HwOpus>(system)->InstallAsService(service_manager); |
| 33 | |||
| 34 | std::make_shared<AudDbg>(system, "audin:d")->InstallAsService(service_manager); | ||
| 35 | std::make_shared<AudDbg>(system, "audout:d")->InstallAsService(service_manager); | ||
| 36 | std::make_shared<AudDbg>(system, "audrec:d")->InstallAsService(service_manager); | ||
| 37 | std::make_shared<AudDbg>(system, "audren:d")->InstallAsService(service_manager); | ||
| 38 | } | 24 | } |
| 39 | 25 | ||
| 40 | } // namespace Service::Audio | 26 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/audio/audout_a.h" | ||
| 5 | |||
| 6 | namespace Service::Audio { | ||
| 7 | |||
| 8 | AudOutA::AudOutA(Core::System& system_) : ServiceFramework{system_, "audout:a"} { | ||
| 9 | // clang-format off | ||
| 10 | static const FunctionInfo functions[] = { | ||
| 11 | {0, nullptr, "RequestSuspend"}, | ||
| 12 | {1, nullptr, "RequestResume"}, | ||
| 13 | {2, nullptr, "GetProcessMasterVolume"}, | ||
| 14 | {3, nullptr, "SetProcessMasterVolume"}, | ||
| 15 | {4, nullptr, "GetProcessRecordVolume"}, | ||
| 16 | {5, nullptr, "SetProcessRecordVolume"}, | ||
| 17 | }; | ||
| 18 | // clang-format on | ||
| 19 | |||
| 20 | RegisterHandlers(functions); | ||
| 21 | } | ||
| 22 | |||
| 23 | AudOutA::~AudOutA() = default; | ||
| 24 | |||
| 25 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Core { | ||
| 9 | class System; | ||
| 10 | } | ||
| 11 | |||
| 12 | namespace Service::Audio { | ||
| 13 | |||
| 14 | class AudOutA final : public ServiceFramework<AudOutA> { | ||
| 15 | public: | ||
| 16 | explicit AudOutA(Core::System& system_); | ||
| 17 | ~AudOutA() override; | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/audio/audren_a.h" | ||
| 5 | |||
| 6 | namespace Service::Audio { | ||
| 7 | |||
| 8 | AudRenA::AudRenA(Core::System& system_) : ServiceFramework{system_, "audren:a"} { | ||
| 9 | // clang-format off | ||
| 10 | static const FunctionInfo functions[] = { | ||
| 11 | {0, nullptr, "RequestSuspend"}, | ||
| 12 | {1, nullptr, "RequestResume"}, | ||
| 13 | {2, nullptr, "GetProcessMasterVolume"}, | ||
| 14 | {3, nullptr, "SetProcessMasterVolume"}, | ||
| 15 | {4, nullptr, "RegisterAppletResourceUserId"}, | ||
| 16 | {5, nullptr, "UnregisterAppletResourceUserId"}, | ||
| 17 | {6, nullptr, "GetProcessRecordVolume"}, | ||
| 18 | {7, nullptr, "SetProcessRecordVolume"}, | ||
| 19 | }; | ||
| 20 | // clang-format on | ||
| 21 | |||
| 22 | RegisterHandlers(functions); | ||
| 23 | } | ||
| 24 | |||
| 25 | AudRenA::~AudRenA() = default; | ||
| 26 | |||
| 27 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Core { | ||
| 9 | class System; | ||
| 10 | } | ||
| 11 | |||
| 12 | namespace Service::Audio { | ||
| 13 | |||
| 14 | class AudRenA final : public ServiceFramework<AudRenA> { | ||
| 15 | public: | ||
| 16 | explicit AudRenA(Core::System& system_); | ||
| 17 | ~AudRenA() override; | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/audio/codecctl.h" | ||
| 5 | |||
| 6 | namespace Service::Audio { | ||
| 7 | |||
| 8 | CodecCtl::CodecCtl(Core::System& system_) : ServiceFramework{system_, "codecctl"} { | ||
| 9 | static const FunctionInfo functions[] = { | ||
| 10 | {0, nullptr, "Initialize"}, | ||
| 11 | {1, nullptr, "Finalize"}, | ||
| 12 | {2, nullptr, "Sleep"}, | ||
| 13 | {3, nullptr, "Wake"}, | ||
| 14 | {4, nullptr, "SetVolume"}, | ||
| 15 | {5, nullptr, "GetVolumeMax"}, | ||
| 16 | {6, nullptr, "GetVolumeMin"}, | ||
| 17 | {7, nullptr, "SetActiveTarget"}, | ||
| 18 | {8, nullptr, "GetActiveTarget"}, | ||
| 19 | {9, nullptr, "BindHeadphoneMicJackInterrupt"}, | ||
| 20 | {10, nullptr, "IsHeadphoneMicJackInserted"}, | ||
| 21 | {11, nullptr, "ClearHeadphoneMicJackInterrupt"}, | ||
| 22 | {12, nullptr, "IsRequested"}, | ||
| 23 | }; | ||
| 24 | RegisterHandlers(functions); | ||
| 25 | } | ||
| 26 | |||
| 27 | CodecCtl::~CodecCtl() = default; | ||
| 28 | |||
| 29 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Core { | ||
| 9 | class System; | ||
| 10 | } | ||
| 11 | |||
| 12 | namespace Service::Audio { | ||
| 13 | |||
| 14 | class CodecCtl final : public ServiceFramework<CodecCtl> { | ||
| 15 | public: | ||
| 16 | explicit CodecCtl(Core::System& system_); | ||
| 17 | ~CodecCtl() override; | ||
| 18 | }; | ||
| 19 | |||
| 20 | } // 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: | |||
| 2734 | } | 2734 | } |
| 2735 | }; | 2735 | }; |
| 2736 | 2736 | ||
| 2737 | class HidTmp final : public ServiceFramework<HidTmp> { | ||
| 2738 | public: | ||
| 2739 | explicit HidTmp(Core::System& system_) : ServiceFramework{system_, "hid:tmp"} { | ||
| 2740 | // clang-format off | ||
| 2741 | static const FunctionInfo functions[] = { | ||
| 2742 | {0, nullptr, "GetConsoleSixAxisSensorCalibrationValues"}, | ||
| 2743 | }; | ||
| 2744 | // clang-format on | ||
| 2745 | |||
| 2746 | RegisterHandlers(functions); | ||
| 2747 | } | ||
| 2748 | }; | ||
| 2749 | |||
| 2750 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { | 2737 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { |
| 2751 | std::make_shared<Hid>(system)->InstallAsService(service_manager); | 2738 | std::make_shared<Hid>(system)->InstallAsService(service_manager); |
| 2752 | std::make_shared<HidBus>(system)->InstallAsService(service_manager); | 2739 | std::make_shared<HidBus>(system)->InstallAsService(service_manager); |
| 2753 | std::make_shared<HidDbg>(system)->InstallAsService(service_manager); | 2740 | std::make_shared<HidDbg>(system)->InstallAsService(service_manager); |
| 2754 | std::make_shared<HidSys>(system)->InstallAsService(service_manager); | 2741 | std::make_shared<HidSys>(system)->InstallAsService(service_manager); |
| 2755 | std::make_shared<HidTmp>(system)->InstallAsService(service_manager); | ||
| 2756 | 2742 | ||
| 2757 | std::make_shared<Service::IRS::IRS>(system)->InstallAsService(service_manager); | 2743 | std::make_shared<Service::IRS::IRS>(system)->InstallAsService(service_manager); |
| 2758 | std::make_shared<Service::IRS::IRS_SYS>(system)->InstallAsService(service_manager); | 2744 | 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: | |||
| 124 | //!< value | 124 | //!< value |
| 125 | }; | 125 | }; |
| 126 | 126 | ||
| 127 | constexpr static std::size_t SyncpointCount{192}; | 127 | static constexpr std::size_t SyncpointCount{192}; |
| 128 | std::array<SyncpointInfo, SyncpointCount> syncpoints{}; | 128 | std::array<SyncpointInfo, SyncpointCount> syncpoints{}; |
| 129 | std::mutex reservation_lock; | 129 | std::mutex reservation_lock; |
| 130 | 130 | ||
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: | |||
| 52 | } | 52 | } |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | class PCV_ARB final : public ServiceFramework<PCV_ARB> { | ||
| 56 | public: | ||
| 57 | explicit PCV_ARB(Core::System& system_) : ServiceFramework{system_, "pcv:arb"} { | ||
| 58 | // clang-format off | ||
| 59 | static const FunctionInfo functions[] = { | ||
| 60 | {0, nullptr, "ReleaseControl"}, | ||
| 61 | }; | ||
| 62 | // clang-format on | ||
| 63 | |||
| 64 | RegisterHandlers(functions); | ||
| 65 | } | ||
| 66 | }; | ||
| 67 | |||
| 68 | class PCV_IMM final : public ServiceFramework<PCV_IMM> { | ||
| 69 | public: | ||
| 70 | explicit PCV_IMM(Core::System& system_) : ServiceFramework{system_, "pcv:imm"} { | ||
| 71 | // clang-format off | ||
| 72 | static const FunctionInfo functions[] = { | ||
| 73 | {0, nullptr, "SetClockRate"}, | ||
| 74 | }; | ||
| 75 | // clang-format on | ||
| 76 | |||
| 77 | RegisterHandlers(functions); | ||
| 78 | } | ||
| 79 | }; | ||
| 80 | |||
| 81 | class IClkrstSession final : public ServiceFramework<IClkrstSession> { | 55 | class IClkrstSession final : public ServiceFramework<IClkrstSession> { |
| 82 | public: | 56 | public: |
| 83 | explicit IClkrstSession(Core::System& system_, DeviceCode deivce_code_) | 57 | explicit IClkrstSession(Core::System& system_, DeviceCode deivce_code_) |
| @@ -169,8 +143,6 @@ public: | |||
| 169 | 143 | ||
| 170 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 144 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { |
| 171 | std::make_shared<PCV>(system)->InstallAsService(sm); | 145 | std::make_shared<PCV>(system)->InstallAsService(sm); |
| 172 | std::make_shared<PCV_ARB>(system)->InstallAsService(sm); | ||
| 173 | std::make_shared<PCV_IMM>(system)->InstallAsService(sm); | ||
| 174 | std::make_shared<CLKRST>(system, "clkrst")->InstallAsService(sm); | 146 | std::make_shared<CLKRST>(system, "clkrst")->InstallAsService(sm); |
| 175 | std::make_shared<CLKRST>(system, "clkrst:i")->InstallAsService(sm); | 147 | std::make_shared<CLKRST>(system, "clkrst:i")->InstallAsService(sm); |
| 176 | std::make_shared<CLKRST_A>(system)->InstallAsService(sm); | 148 | 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 @@ | |||
| 68 | #include "core/hle/service/time/time.h" | 68 | #include "core/hle/service/time/time.h" |
| 69 | #include "core/hle/service/usb/usb.h" | 69 | #include "core/hle/service/usb/usb.h" |
| 70 | #include "core/hle/service/vi/vi.h" | 70 | #include "core/hle/service/vi/vi.h" |
| 71 | #include "core/hle/service/wlan/wlan.h" | ||
| 72 | #include "core/reporter.h" | 71 | #include "core/reporter.h" |
| 73 | 72 | ||
| 74 | namespace Service { | 73 | namespace Service { |
| @@ -306,7 +305,6 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system | |||
| 306 | Time::InstallInterfaces(system); | 305 | Time::InstallInterfaces(system); |
| 307 | USB::InstallInterfaces(*sm, system); | 306 | USB::InstallInterfaces(*sm, system); |
| 308 | VI::InstallInterfaces(*sm, system, *nv_flinger, *hos_binder_driver_server); | 307 | VI::InstallInterfaces(*sm, system, *nv_flinger, *hos_binder_driver_server); |
| 309 | WLAN::InstallInterfaces(*sm, system); | ||
| 310 | } | 308 | } |
| 311 | 309 | ||
| 312 | Services::~Services() = default; | 310 | 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/sockets/ethc.h" | ||
| 5 | |||
| 6 | namespace Service::Sockets { | ||
| 7 | |||
| 8 | ETHC_C::ETHC_C(Core::System& system_) : ServiceFramework{system_, "ethc:c"} { | ||
| 9 | // clang-format off | ||
| 10 | static const FunctionInfo functions[] = { | ||
| 11 | {0, nullptr, "Initialize"}, | ||
| 12 | {1, nullptr, "Cancel"}, | ||
| 13 | {2, nullptr, "GetResult"}, | ||
| 14 | {3, nullptr, "GetMediaList"}, | ||
| 15 | {4, nullptr, "SetMediaType"}, | ||
| 16 | {5, nullptr, "GetMediaType"}, | ||
| 17 | {6, nullptr, "Unknown6"}, | ||
| 18 | }; | ||
| 19 | // clang-format on | ||
| 20 | |||
| 21 | RegisterHandlers(functions); | ||
| 22 | } | ||
| 23 | |||
| 24 | ETHC_C::~ETHC_C() = default; | ||
| 25 | |||
| 26 | ETHC_I::ETHC_I(Core::System& system_) : ServiceFramework{system_, "ethc:i"} { | ||
| 27 | // clang-format off | ||
| 28 | static const FunctionInfo functions[] = { | ||
| 29 | {0, nullptr, "GetReadableHandle"}, | ||
| 30 | {1, nullptr, "Cancel"}, | ||
| 31 | {2, nullptr, "GetResult"}, | ||
| 32 | {3, nullptr, "GetInterfaceList"}, | ||
| 33 | {4, nullptr, "GetInterfaceCount"}, | ||
| 34 | }; | ||
| 35 | // clang-format on | ||
| 36 | |||
| 37 | RegisterHandlers(functions); | ||
| 38 | } | ||
| 39 | |||
| 40 | ETHC_I::~ETHC_I() = default; | ||
| 41 | |||
| 42 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | |||
| 8 | namespace Core { | ||
| 9 | class System; | ||
| 10 | } | ||
| 11 | |||
| 12 | namespace Service::Sockets { | ||
| 13 | |||
| 14 | class ETHC_C final : public ServiceFramework<ETHC_C> { | ||
| 15 | public: | ||
| 16 | explicit ETHC_C(Core::System& system_); | ||
| 17 | ~ETHC_C() override; | ||
| 18 | }; | ||
| 19 | |||
| 20 | class ETHC_I final : public ServiceFramework<ETHC_I> { | ||
| 21 | public: | ||
| 22 | explicit ETHC_I(Core::System& system_); | ||
| 23 | ~ETHC_I() override; | ||
| 24 | }; | ||
| 25 | |||
| 26 | } // 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 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/service/sockets/bsd.h" | 4 | #include "core/hle/service/sockets/bsd.h" |
| 5 | #include "core/hle/service/sockets/ethc.h" | ||
| 6 | #include "core/hle/service/sockets/nsd.h" | 5 | #include "core/hle/service/sockets/nsd.h" |
| 7 | #include "core/hle/service/sockets/sfdnsres.h" | 6 | #include "core/hle/service/sockets/sfdnsres.h" |
| 8 | #include "core/hle/service/sockets/sockets.h" | 7 | #include "core/hle/service/sockets/sockets.h" |
| @@ -14,9 +13,6 @@ void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system | |||
| 14 | std::make_shared<BSD>(system, "bsd:u")->InstallAsService(service_manager); | 13 | std::make_shared<BSD>(system, "bsd:u")->InstallAsService(service_manager); |
| 15 | std::make_shared<BSDCFG>(system)->InstallAsService(service_manager); | 14 | std::make_shared<BSDCFG>(system)->InstallAsService(service_manager); |
| 16 | 15 | ||
| 17 | std::make_shared<ETHC_C>(system)->InstallAsService(service_manager); | ||
| 18 | std::make_shared<ETHC_I>(system)->InstallAsService(service_manager); | ||
| 19 | |||
| 20 | std::make_shared<NSD>(system, "nsd:a")->InstallAsService(service_manager); | 16 | std::make_shared<NSD>(system, "nsd:a")->InstallAsService(service_manager); |
| 21 | std::make_shared<NSD>(system, "nsd:u")->InstallAsService(service_manager); | 17 | std::make_shared<NSD>(system, "nsd:u")->InstallAsService(service_manager); |
| 22 | 18 | ||
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) { | |||
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | static bool ParsePosixName(const char* name, TimeZoneRule& rule) { | 288 | static bool ParsePosixName(const char* name, TimeZoneRule& rule) { |
| 289 | constexpr char default_rule[]{",M4.1.0,M10.5.0"}; | 289 | static constexpr char default_rule[]{",M4.1.0,M10.5.0"}; |
| 290 | const char* std_name{name}; | 290 | const char* std_name{name}; |
| 291 | int std_len{}; | 291 | int std_len{}; |
| 292 | int offset{}; | 292 | 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include <memory> | ||
| 5 | |||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | #include "core/hle/service/sm/sm.h" | ||
| 8 | #include "core/hle/service/wlan/wlan.h" | ||
| 9 | |||
| 10 | namespace Service::WLAN { | ||
| 11 | |||
| 12 | class WLANInfra final : public ServiceFramework<WLANInfra> { | ||
| 13 | public: | ||
| 14 | explicit WLANInfra(Core::System& system_) : ServiceFramework{system_, "wlan:inf"} { | ||
| 15 | // clang-format off | ||
| 16 | static const FunctionInfo functions[] = { | ||
| 17 | {0, nullptr, "OpenMode"}, | ||
| 18 | {1, nullptr, "CloseMode"}, | ||
| 19 | {2, nullptr, "GetMacAddress"}, | ||
| 20 | {3, nullptr, "StartScan"}, | ||
| 21 | {4, nullptr, "StopScan"}, | ||
| 22 | {5, nullptr, "Connect"}, | ||
| 23 | {6, nullptr, "CancelConnect"}, | ||
| 24 | {7, nullptr, "Disconnect"}, | ||
| 25 | {8, nullptr, "GetConnectionEvent"}, | ||
| 26 | {9, nullptr, "GetConnectionStatus"}, | ||
| 27 | {10, nullptr, "GetState"}, | ||
| 28 | {11, nullptr, "GetScanResult"}, | ||
| 29 | {12, nullptr, "GetRssi"}, | ||
| 30 | {13, nullptr, "ChangeRxAntenna"}, | ||
| 31 | {14, nullptr, "GetFwVersion"}, | ||
| 32 | {15, nullptr, "RequestSleep"}, | ||
| 33 | {16, nullptr, "RequestWakeUp"}, | ||
| 34 | {17, nullptr, "RequestIfUpDown"}, | ||
| 35 | {18, nullptr, "Unknown18"}, | ||
| 36 | {19, nullptr, "Unknown19"}, | ||
| 37 | {20, nullptr, "Unknown20"}, | ||
| 38 | {21, nullptr, "Unknown21"}, | ||
| 39 | {22, nullptr, "Unknown22"}, | ||
| 40 | {23, nullptr, "Unknown23"}, | ||
| 41 | {24, nullptr, "Unknown24"}, | ||
| 42 | {25, nullptr, "Unknown25"}, | ||
| 43 | {26, nullptr, "Unknown26"}, | ||
| 44 | {27, nullptr, "Unknown27"}, | ||
| 45 | {28, nullptr, "Unknown28"}, | ||
| 46 | {29, nullptr, "Unknown29"}, | ||
| 47 | {30, nullptr, "Unknown30"}, | ||
| 48 | {31, nullptr, "Unknown31"}, | ||
| 49 | {32, nullptr, "Unknown32"}, | ||
| 50 | {33, nullptr, "Unknown33"}, | ||
| 51 | {34, nullptr, "Unknown34"}, | ||
| 52 | {35, nullptr, "Unknown35"}, | ||
| 53 | {36, nullptr, "Unknown36"}, | ||
| 54 | {37, nullptr, "Unknown37"}, | ||
| 55 | {38, nullptr, "Unknown38"}, | ||
| 56 | }; | ||
| 57 | // clang-format on | ||
| 58 | |||
| 59 | RegisterHandlers(functions); | ||
| 60 | } | ||
| 61 | }; | ||
| 62 | |||
| 63 | class WLANLocal final : public ServiceFramework<WLANLocal> { | ||
| 64 | public: | ||
| 65 | explicit WLANLocal(Core::System& system_) : ServiceFramework{system_, "wlan:lcl"} { | ||
| 66 | // clang-format off | ||
| 67 | static const FunctionInfo functions[] = { | ||
| 68 | {0, nullptr, "Unknown0"}, | ||
| 69 | {1, nullptr, "Unknown1"}, | ||
| 70 | {2, nullptr, "Unknown2"}, | ||
| 71 | {3, nullptr, "Unknown3"}, | ||
| 72 | {4, nullptr, "Unknown4"}, | ||
| 73 | {5, nullptr, "Unknown5"}, | ||
| 74 | {6, nullptr, "GetMacAddress"}, | ||
| 75 | {7, nullptr, "CreateBss"}, | ||
| 76 | {8, nullptr, "DestroyBss"}, | ||
| 77 | {9, nullptr, "StartScan"}, | ||
| 78 | {10, nullptr, "StopScan"}, | ||
| 79 | {11, nullptr, "Connect"}, | ||
| 80 | {12, nullptr, "CancelConnect"}, | ||
| 81 | {13, nullptr, "Join"}, | ||
| 82 | {14, nullptr, "CancelJoin"}, | ||
| 83 | {15, nullptr, "Disconnect"}, | ||
| 84 | {16, nullptr, "SetBeaconLostCount"}, | ||
| 85 | {17, nullptr, "Unknown17"}, | ||
| 86 | {18, nullptr, "Unknown18"}, | ||
| 87 | {19, nullptr, "Unknown19"}, | ||
| 88 | {20, nullptr, "GetBssIndicationEvent"}, | ||
| 89 | {21, nullptr, "GetBssIndicationInfo"}, | ||
| 90 | {22, nullptr, "GetState"}, | ||
| 91 | {23, nullptr, "GetAllowedChannels"}, | ||
| 92 | {24, nullptr, "AddIe"}, | ||
| 93 | {25, nullptr, "DeleteIe"}, | ||
| 94 | {26, nullptr, "Unknown26"}, | ||
| 95 | {27, nullptr, "Unknown27"}, | ||
| 96 | {28, nullptr, "CreateRxEntry"}, | ||
| 97 | {29, nullptr, "DeleteRxEntry"}, | ||
| 98 | {30, nullptr, "Unknown30"}, | ||
| 99 | {31, nullptr, "Unknown31"}, | ||
| 100 | {32, nullptr, "AddMatchingDataToRxEntry"}, | ||
| 101 | {33, nullptr, "RemoveMatchingDataFromRxEntry"}, | ||
| 102 | {34, nullptr, "GetScanResult"}, | ||
| 103 | {35, nullptr, "Unknown35"}, | ||
| 104 | {36, nullptr, "SetActionFrameWithBeacon"}, | ||
| 105 | {37, nullptr, "CancelActionFrameWithBeacon"}, | ||
| 106 | {38, nullptr, "CreateRxEntryForActionFrame"}, | ||
| 107 | {39, nullptr, "DeleteRxEntryForActionFrame"}, | ||
| 108 | {40, nullptr, "Unknown40"}, | ||
| 109 | {41, nullptr, "Unknown41"}, | ||
| 110 | {42, nullptr, "CancelGetActionFrame"}, | ||
| 111 | {43, nullptr, "GetRssi"}, | ||
| 112 | {44, nullptr, "Unknown44"}, | ||
| 113 | {45, nullptr, "Unknown45"}, | ||
| 114 | {46, nullptr, "Unknown46"}, | ||
| 115 | {47, nullptr, "Unknown47"}, | ||
| 116 | {48, nullptr, "Unknown48"}, | ||
| 117 | {49, nullptr, "Unknown49"}, | ||
| 118 | {50, nullptr, "Unknown50"}, | ||
| 119 | {51, nullptr, "Unknown51"}, | ||
| 120 | }; | ||
| 121 | // clang-format on | ||
| 122 | |||
| 123 | RegisterHandlers(functions); | ||
| 124 | } | ||
| 125 | }; | ||
| 126 | |||
| 127 | class WLANLocalGetFrame final : public ServiceFramework<WLANLocalGetFrame> { | ||
| 128 | public: | ||
| 129 | explicit WLANLocalGetFrame(Core::System& system_) : ServiceFramework{system_, "wlan:lg"} { | ||
| 130 | // clang-format off | ||
| 131 | static const FunctionInfo functions[] = { | ||
| 132 | {0, nullptr, "Unknown"}, | ||
| 133 | }; | ||
| 134 | // clang-format on | ||
| 135 | |||
| 136 | RegisterHandlers(functions); | ||
| 137 | } | ||
| 138 | }; | ||
| 139 | |||
| 140 | class WLANSocketGetFrame final : public ServiceFramework<WLANSocketGetFrame> { | ||
| 141 | public: | ||
| 142 | explicit WLANSocketGetFrame(Core::System& system_) : ServiceFramework{system_, "wlan:sg"} { | ||
| 143 | // clang-format off | ||
| 144 | static const FunctionInfo functions[] = { | ||
| 145 | {0, nullptr, "Unknown"}, | ||
| 146 | }; | ||
| 147 | // clang-format on | ||
| 148 | |||
| 149 | RegisterHandlers(functions); | ||
| 150 | } | ||
| 151 | }; | ||
| 152 | |||
| 153 | class WLANSocketManager final : public ServiceFramework<WLANSocketManager> { | ||
| 154 | public: | ||
| 155 | explicit WLANSocketManager(Core::System& system_) : ServiceFramework{system_, "wlan:soc"} { | ||
| 156 | // clang-format off | ||
| 157 | static const FunctionInfo functions[] = { | ||
| 158 | {0, nullptr, "Unknown0"}, | ||
| 159 | {1, nullptr, "Unknown1"}, | ||
| 160 | {2, nullptr, "Unknown2"}, | ||
| 161 | {3, nullptr, "Unknown3"}, | ||
| 162 | {4, nullptr, "Unknown4"}, | ||
| 163 | {5, nullptr, "Unknown5"}, | ||
| 164 | {6, nullptr, "GetMacAddress"}, | ||
| 165 | {7, nullptr, "SwitchTsfTimerFunction"}, | ||
| 166 | {8, nullptr, "Unknown8"}, | ||
| 167 | {9, nullptr, "Unknown9"}, | ||
| 168 | {10, nullptr, "Unknown10"}, | ||
| 169 | {11, nullptr, "Unknown11"}, | ||
| 170 | {12, nullptr, "Unknown12"}, | ||
| 171 | }; | ||
| 172 | // clang-format on | ||
| 173 | |||
| 174 | RegisterHandlers(functions); | ||
| 175 | } | ||
| 176 | }; | ||
| 177 | |||
| 178 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | ||
| 179 | std::make_shared<WLANInfra>(system)->InstallAsService(sm); | ||
| 180 | std::make_shared<WLANLocal>(system)->InstallAsService(sm); | ||
| 181 | std::make_shared<WLANLocalGetFrame>(system)->InstallAsService(sm); | ||
| 182 | std::make_shared<WLANSocketGetFrame>(system)->InstallAsService(sm); | ||
| 183 | std::make_shared<WLANSocketManager>(system)->InstallAsService(sm); | ||
| 184 | } | ||
| 185 | |||
| 186 | } // 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 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | namespace Core { | ||
| 7 | class System; | ||
| 8 | } | ||
| 9 | |||
| 10 | namespace Service::SM { | ||
| 11 | class ServiceManager; | ||
| 12 | } | ||
| 13 | |||
| 14 | namespace Service::WLAN { | ||
| 15 | |||
| 16 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | ||
| 17 | |||
| 18 | } // 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() { | |||
| 34 | mbedtls_entropy_context entropy; | 34 | mbedtls_entropy_context entropy; |
| 35 | mbedtls_entropy_init(&entropy); | 35 | mbedtls_entropy_init(&entropy); |
| 36 | mbedtls_ctr_drbg_context ctr_drbg; | 36 | mbedtls_ctr_drbg_context ctr_drbg; |
| 37 | constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}}; | 37 | static constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}}; |
| 38 | 38 | ||
| 39 | mbedtls_ctr_drbg_init(&ctr_drbg); | 39 | mbedtls_ctr_drbg_init(&ctr_drbg); |
| 40 | ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, | 40 | 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 | |||
| 390 | void Joycons::OnRingConUpdate(f32 ring_data) { | 390 | void Joycons::OnRingConUpdate(f32 ring_data) { |
| 391 | // To simplify ring detection it will always be mapped to an empty identifier for all | 391 | // To simplify ring detection it will always be mapped to an empty identifier for all |
| 392 | // controllers | 392 | // controllers |
| 393 | constexpr PadIdentifier identifier = { | 393 | static constexpr PadIdentifier identifier = { |
| 394 | .guid = Common::UUID{}, | 394 | .guid = Common::UUID{}, |
| 395 | .port = 0, | 395 | .port = 0, |
| 396 | .pad = 0, | 396 | .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) { | |||
| 616 | const auto joystick = | 616 | const auto joystick = |
| 617 | GetSDLJoystickByGUID(identifier.guid.RawString(), static_cast<int>(identifier.port)); | 617 | GetSDLJoystickByGUID(identifier.guid.RawString(), static_cast<int>(identifier.port)); |
| 618 | 618 | ||
| 619 | constexpr Common::Input::VibrationStatus test_vibration{ | 619 | static constexpr Common::Input::VibrationStatus test_vibration{ |
| 620 | .low_amplitude = 1, | 620 | .low_amplitude = 1, |
| 621 | .low_frequency = 160.0f, | 621 | .low_frequency = 160.0f, |
| 622 | .high_amplitude = 1, | 622 | .high_amplitude = 1, |
| @@ -624,7 +624,7 @@ bool SDLDriver::IsVibrationEnabled(const PadIdentifier& identifier) { | |||
| 624 | .type = Common::Input::VibrationAmplificationType::Exponential, | 624 | .type = Common::Input::VibrationAmplificationType::Exponential, |
| 625 | }; | 625 | }; |
| 626 | 626 | ||
| 627 | constexpr Common::Input::VibrationStatus zero_vibration{ | 627 | static constexpr Common::Input::VibrationStatus zero_vibration{ |
| 628 | .low_amplitude = 0, | 628 | .low_amplitude = 0, |
| 629 | .low_frequency = 160.0f, | 629 | .low_frequency = 160.0f, |
| 630 | .high_amplitude = 0, | 630 | .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() { | |||
| 258 | size_t Maxwell3D::EstimateIndexBufferSize() { | 258 | size_t Maxwell3D::EstimateIndexBufferSize() { |
| 259 | GPUVAddr start_address = regs.index_buffer.StartAddress(); | 259 | GPUVAddr start_address = regs.index_buffer.StartAddress(); |
| 260 | GPUVAddr end_address = regs.index_buffer.EndAddress(); | 260 | GPUVAddr end_address = regs.index_buffer.EndAddress(); |
| 261 | constexpr std::array<size_t, 4> max_sizes = { | 261 | static constexpr std::array<size_t, 4> max_sizes = { |
| 262 | std::numeric_limits<u8>::max(), std::numeric_limits<u16>::max(), | 262 | std::numeric_limits<u8>::max(), std::numeric_limits<u16>::max(), |
| 263 | std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; | 263 | std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; |
| 264 | const size_t byte_size = regs.index_buffer.FormatSizeInBytes(); | 264 | 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: | |||
| 216 | std::vector<u64> big_page_continous; | 216 | std::vector<u64> big_page_continous; |
| 217 | std::vector<std::pair<VAddr, std::size_t>> page_stash{}; | 217 | std::vector<std::pair<VAddr, std::size_t>> page_stash{}; |
| 218 | 218 | ||
| 219 | constexpr static size_t continous_bits = 64; | 219 | static constexpr size_t continous_bits = 64; |
| 220 | 220 | ||
| 221 | const size_t unique_identifier; | 221 | const size_t unique_identifier; |
| 222 | std::unique_ptr<VideoCommon::InvalidationAccumulator> accumulator; | 222 | 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> | |||
| 468 | } | 468 | } |
| 469 | 469 | ||
| 470 | void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { | 470 | void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { |
| 471 | constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ | 471 | static constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ |
| 472 | .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, | 472 | .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, |
| 473 | .baseMipLevel = 0, | 473 | .baseMipLevel = 0, |
| 474 | .levelCount = 1, | 474 | .levelCount = 1, |
| @@ -528,8 +528,8 @@ SMAA::SMAA(const Device& device, MemoryAllocator& allocator, size_t image_count, | |||
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | void SMAA::CreateImages() { | 530 | void SMAA::CreateImages() { |
| 531 | constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; | 531 | static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; |
| 532 | constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; | 532 | static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; |
| 533 | 533 | ||
| 534 | std::tie(m_static_images[Area], m_static_buffer_commits[Area]) = | 534 | std::tie(m_static_images[Area], m_static_buffer_commits[Area]) = |
| 535 | CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); | 535 | CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); |
| @@ -586,12 +586,12 @@ void SMAA::CreateSampler() { | |||
| 586 | 586 | ||
| 587 | void SMAA::CreateShaders() { | 587 | void SMAA::CreateShaders() { |
| 588 | // These match the order of the SMAAStage enum | 588 | // These match the order of the SMAAStage enum |
| 589 | constexpr std::array vert_shader_sources{ | 589 | static constexpr std::array vert_shader_sources{ |
| 590 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV), | 590 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV), |
| 591 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV), | 591 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV), |
| 592 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV), | 592 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV), |
| 593 | }; | 593 | }; |
| 594 | constexpr std::array frag_shader_sources{ | 594 | static constexpr std::array frag_shader_sources{ |
| 595 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV), | 595 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV), |
| 596 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV), | 596 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV), |
| 597 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV), | 597 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV), |
| @@ -675,8 +675,8 @@ void SMAA::UploadImages(Scheduler& scheduler) { | |||
| 675 | return; | 675 | return; |
| 676 | } | 676 | } |
| 677 | 677 | ||
| 678 | constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; | 678 | static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; |
| 679 | constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; | 679 | static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; |
| 680 | 680 | ||
| 681 | UploadImage(m_device, m_allocator, scheduler, m_static_images[Area], area_extent, | 681 | UploadImage(m_device, m_allocator, scheduler, m_static_images[Area], area_extent, |
| 682 | VK_FORMAT_R8G8_UNORM, ARRAY_TO_SPAN(areaTexBytes)); | 682 | 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: | |||
| 113 | std::optional<ASTCDecoderPass> astc_decoder_pass; | 113 | std::optional<ASTCDecoderPass> astc_decoder_pass; |
| 114 | const Settings::ResolutionScalingInfo& resolution; | 114 | const Settings::ResolutionScalingInfo& resolution; |
| 115 | 115 | ||
| 116 | constexpr static size_t indexing_slots = 8 * sizeof(size_t); | 116 | static constexpr size_t indexing_slots = 8 * sizeof(size_t); |
| 117 | std::array<vk::Buffer, indexing_slots> buffers{}; | 117 | std::array<vk::Buffer, indexing_slots> buffers{}; |
| 118 | std::array<std::unique_ptr<MemoryCommit>, indexing_slots> buffer_commits{}; | 118 | std::array<std::unique_ptr<MemoryCommit>, indexing_slots> buffer_commits{}; |
| 119 | }; | 119 | }; |
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) { | |||
| 48 | auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal); | 48 | auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal); |
| 49 | 49 | ||
| 50 | // Create the descriptor pool to contain our descriptor. | 50 | // Create the descriptor pool to contain our descriptor. |
| 51 | constexpr VkDescriptorPoolSize pool_size{ | 51 | static constexpr VkDescriptorPoolSize pool_size{ |
| 52 | .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, | 52 | .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, |
| 53 | .descriptorCount = 1, | 53 | .descriptorCount = 1, |
| 54 | }; | 54 | }; |
| @@ -63,7 +63,7 @@ void TurboMode::Run(std::stop_token stop_token) { | |||
| 63 | }); | 63 | }); |
| 64 | 64 | ||
| 65 | // Create the descriptor set layout from the pool. | 65 | // Create the descriptor set layout from the pool. |
| 66 | constexpr VkDescriptorSetLayoutBinding layout_binding{ | 66 | static constexpr VkDescriptorSetLayoutBinding layout_binding{ |
| 67 | .binding = 0, | 67 | .binding = 0, |
| 68 | .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, | 68 | .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, |
| 69 | .descriptorCount = 1, | 69 | .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) { | |||
| 29 | 29 | ||
| 30 | template <u32 mask, u32 incr_amount> | 30 | template <u32 mask, u32 incr_amount> |
| 31 | void incrpdep(u32& value) { | 31 | void incrpdep(u32& value) { |
| 32 | constexpr u32 swizzled_incr = pdep<mask>(incr_amount); | 32 | static constexpr u32 swizzled_incr = pdep<mask>(incr_amount); |
| 33 | value = ((value | ~mask) + swizzled_incr) & mask; | 33 | value = ((value | ~mask) + swizzled_incr) & mask; |
| 34 | } | 34 | } |
| 35 | 35 | ||
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() { | |||
| 219 | #ifdef _MSC_VER | 219 | #ifdef _MSC_VER |
| 220 | // It is possible that the name of the dll will change. | 220 | // It is possible that the name of the dll will change. |
| 221 | // vcruntime140.dll is for 2015 and onwards | 221 | // vcruntime140.dll is for 2015 and onwards |
| 222 | constexpr char runtime_dll_name[] = "vcruntime140.dll"; | 222 | static constexpr char runtime_dll_name[] = "vcruntime140.dll"; |
| 223 | UINT sz = GetFileVersionInfoSizeA(runtime_dll_name, nullptr); | 223 | UINT sz = GetFileVersionInfoSizeA(runtime_dll_name, nullptr); |
| 224 | bool runtime_version_inspection_worked = false; | 224 | bool runtime_version_inspection_worked = false; |
| 225 | if (sz > 0) { | 225 | if (sz > 0) { |