diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/address_space.inc | 2 | ||||
| -rw-r--r-- | src/common/scratch_buffer.h | 9 | ||||
| -rw-r--r-- | src/common/settings.cpp | 2 | ||||
| -rw-r--r-- | src/common/settings.h | 3 |
4 files changed, 15 insertions, 1 deletions
diff --git a/src/common/address_space.inc b/src/common/address_space.inc index c97dc8651..1ee82df53 100644 --- a/src/common/address_space.inc +++ b/src/common/address_space.inc @@ -336,7 +336,7 @@ ALLOC_MEMBER(VaType)::Allocate(VaType size) { ASSERT_MSG(false, "Unexpected allocator state!"); } - auto search_predecessor{this->blocks.begin()}; + auto search_predecessor{std::next(this->blocks.begin())}; auto search_successor{std::next(search_predecessor)}; while (search_successor != this->blocks.end() && diff --git a/src/common/scratch_buffer.h b/src/common/scratch_buffer.h index 26d4e76dc..a69a5a7af 100644 --- a/src/common/scratch_buffer.h +++ b/src/common/scratch_buffer.h @@ -23,7 +23,10 @@ public: buffer{Common::make_unique_for_overwrite<T[]>(initial_capacity)} {} ~ScratchBuffer() = default; + ScratchBuffer(const ScratchBuffer&) = delete; + ScratchBuffer& operator=(const ScratchBuffer&) = delete; ScratchBuffer(ScratchBuffer&&) = default; + ScratchBuffer& operator=(ScratchBuffer&&) = default; /// This will only grow the buffer's capacity if size is greater than the current capacity. /// The previously held data will remain intact. @@ -87,6 +90,12 @@ public: return buffer_capacity; } + void swap(ScratchBuffer& other) noexcept { + std::swap(last_requested_size, other.last_requested_size); + std::swap(buffer_capacity, other.buffer_capacity); + std::swap(buffer, other.buffer); + } + private: size_t last_requested_size{}; size_t buffer_capacity{}; diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 61b5d0c1a..ba617aea1 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -62,6 +62,7 @@ void LogSettings() { log_setting("Renderer_AccelerateASTC", values.accelerate_astc.GetValue()); log_setting("Renderer_AsyncASTC", values.async_astc.GetValue()); log_setting("Renderer_UseVsync", values.vsync_mode.GetValue()); + log_setting("Renderer_UseReactiveFlushing", values.use_reactive_flushing.GetValue()); log_setting("Renderer_ShaderBackend", values.shader_backend.GetValue()); log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue()); log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue()); @@ -223,6 +224,7 @@ void RestoreGlobalState(bool is_powered_on) { values.nvdec_emulation.SetGlobal(true); values.accelerate_astc.SetGlobal(true); values.async_astc.SetGlobal(true); + values.use_reactive_flushing.SetGlobal(true); values.shader_backend.SetGlobal(true); values.use_asynchronous_shaders.SetGlobal(true); values.use_fast_gpu_time.SetGlobal(true); diff --git a/src/common/settings.h b/src/common/settings.h index 573597f3d..36ffcd693 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -465,6 +465,7 @@ struct Values { SwitchableSetting<bool> async_astc{false, "async_astc"}; Setting<VSyncMode, true> vsync_mode{VSyncMode::FIFO, VSyncMode::Immediate, VSyncMode::FIFORelaxed, "use_vsync"}; + SwitchableSetting<bool> use_reactive_flushing{true, "use_reactive_flushing"}; SwitchableSetting<ShaderBackend, true> shader_backend{ShaderBackend::GLSL, ShaderBackend::GLSL, ShaderBackend::SPIRV, "shader_backend"}; SwitchableSetting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"}; @@ -535,6 +536,8 @@ struct Values { Setting<bool> enable_ir_sensor{false, "enable_ir_sensor"}; Setting<std::string> ir_sensor_device{"auto", "ir_sensor_device"}; + Setting<bool> random_amiibo_id{false, "random_amiibo_id"}; + // Data Storage Setting<bool> use_virtual_sd{true, "use_virtual_sd"}; Setting<bool> gamecard_inserted{false, "gamecard_inserted"}; |
