From fcf96daf34037734d3abe86f7ffd2d5502932d6b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 25 Aug 2018 22:29:22 +0300 Subject: [PATCH] Fix compilation without WITH_THREADED_CPU --- newcpu.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/newcpu.cpp b/newcpu.cpp index 3066344c..0b2a998d 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5197,17 +5197,6 @@ static uae_thread_id cpu_thread_tid; static bool m68k_cs_initialized; -void custom_reset_cpu(bool hardreset, bool keyboardreset) -{ - if (cpu_thread_tid != uae_thread_get_id()) { - custom_reset(hardreset, keyboardreset); - return; - } - cpu_thread_reset = 1 | (hardreset ? 2 : 0) | (keyboardreset ? 4 : 0); - uae_sem_post(&cpu_wakeup_sema); - uae_sem_wait(&cpu_in_sema); -} - static int do_specialties_thread(void) { if (regs.spcflags & SPCFLAG_MODE_CHANGE) @@ -5458,6 +5447,21 @@ static void run_cpu_thread(void *(*f)(void *)) #endif +void custom_reset_cpu(bool hardreset, bool keyboardreset) +{ +#ifdef WITH_THREADED_CPU + if (cpu_thread_tid != uae_thread_get_id()) { + custom_reset(hardreset, keyboardreset); + return; + } + cpu_thread_reset = 1 | (hardreset ? 2 : 0) | (keyboardreset ? 4 : 0); + uae_sem_post(&cpu_wakeup_sema); + uae_sem_wait(&cpu_in_sema); +#else + custom_reset(hardreset, keyboardreset); +#endif +} + #ifdef JIT /* Completely different run_2 replacement */ void do_nothing (void) -- 2.47.3