From dbb277f749ee9d23b4c54be372ffbf6b51e23d00 Mon Sep 17 00:00:00 2001 From: flyinghead Date: Sat, 27 Nov 2021 14:13:24 +0100 Subject: [PATCH] Potential crash when starting game with non-default renderer Renderer is switched to default and back to the selected one during reset on the emu thread. The render thread may pick up this change. --- core/cfg/option.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/cfg/option.h b/core/cfg/option.h index 620c788ec..548606aba 100644 --- a/core/cfg/option.h +++ b/core/cfg/option.h @@ -403,6 +403,11 @@ public: #endif RenderType& operator=(const RenderType& v) { set(v); return value; } + + void reset() override { + // don't reset the value to avoid quick switching when starting a game + overridden = false; + } }; extern RendererOption RendererType; extern Option UseMipmaps;