From 48be73be5a706797842dab40040a4b2307df111b Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 14 Jul 2020 01:26:43 +1000 Subject: [PATCH] SDL: Fix crash when changing debug settings while running --- CMakeLists.txt | 2 +- src/duckstation-sdl/sdl_host_interface.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b865261d0..3cdc40f2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.8) project(duckstation C CXX) -message(INFO "CMake Version: ${CMAKE_VERSION}") +message("CMake Version: ${CMAKE_VERSION}") # Pull in modules. set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules/") diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp index 2760dde8b..14b179cf5 100644 --- a/src/duckstation-sdl/sdl_host_interface.cpp +++ b/src/duckstation-sdl/sdl_host_interface.cpp @@ -915,7 +915,7 @@ void SDLHostInterface::DrawDebugMenu() debug_settings_copy.show_spu_state = debug_settings.show_spu_state; debug_settings_copy.show_timers_state = debug_settings.show_timers_state; debug_settings_copy.show_mdec_state = debug_settings.show_mdec_state; - SaveAndUpdateSettings(); + RunLater([this]() { SaveAndUpdateSettings(); }); } }