diff --git a/CMakeLists.txt b/CMakeLists.txt index 05bb1fafa4..8f6ed82255 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2259,6 +2259,8 @@ add_library(${CoreLibName} ${CoreLinkType} Core/ELF/PrxDecrypter.h Core/ELF/ParamSFO.cpp Core/ELF/ParamSFO.h + Core/EmuThread.cpp + Core/EmuThread.h Core/FFMPEGCompat.h Core/FileSystems/tlzrc.cpp Core/FileSystems/BlobFileSystem.cpp @@ -2845,8 +2847,6 @@ set(WindowsFiles Windows/Hid/DualShock.cpp Windows/Hid/SwitchPro.h Windows/Hid/SwitchPro.cpp - Windows/EmuThread.cpp - Windows/EmuThread.h Windows/GPU/D3D11Context.cpp Windows/GPU/D3D11Context.h Windows/GPU/WindowsGLContext.cpp diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index 98d2207a6c..24ee48e684 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -463,6 +463,7 @@ + @@ -1000,6 +1001,7 @@ + diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters index 605f34d4b0..4ee53ae006 100644 --- a/Core/Core.vcxproj.filters +++ b/Core/Core.vcxproj.filters @@ -1393,6 +1393,9 @@ Core + + Core + @@ -2256,6 +2259,9 @@ Core + + Core + diff --git a/Windows/EmuThread.cpp b/Core/EmuThread.cpp similarity index 98% rename from Windows/EmuThread.cpp rename to Core/EmuThread.cpp index 09460c0bba..4f1b9de872 100644 --- a/Windows/EmuThread.cpp +++ b/Core/EmuThread.cpp @@ -1,3 +1,7 @@ +#include "ppsspp_config.h" + +#if PPSSPP_PLATFORM(WINDOWS) && !PPSSPP_PLATFORM(UWP) + #include #include #include @@ -13,9 +17,9 @@ #include "Common/GraphicsContext.h" #include "Common/Thread/ThreadUtil.h" -#include "Windows/EmuThread.h" #include "Windows/W32Util/Misc.h" #include "Windows/MainWindow.h" +#include "Core/EmuThread.h" #include "Core/Reporting.h" #include "Core/Core.h" #include "Core/System.h" @@ -290,3 +294,5 @@ void MainThreadFunc() { PostMessage(MainWindow::GetHWND(), MainWindow::WM_USER_UPDATE_UI, 0, 0); } + +#endif diff --git a/Windows/EmuThread.h b/Core/EmuThread.h similarity index 89% rename from Windows/EmuThread.h rename to Core/EmuThread.h index f630b50763..80b99ca297 100644 --- a/Windows/EmuThread.h +++ b/Core/EmuThread.h @@ -17,6 +17,9 @@ #pragma once +// Utilities to manage Emu and Render threads. +// TODO: Use across platforms, currently Windows-only. + void MainThread_Start(); void MainThread_Stop(); bool MainThread_Ready(); diff --git a/UWP/CoreUWP/CoreUWP.vcxproj b/UWP/CoreUWP/CoreUWP.vcxproj index 0110a45f01..8c249501e0 100644 --- a/UWP/CoreUWP/CoreUWP.vcxproj +++ b/UWP/CoreUWP/CoreUWP.vcxproj @@ -136,6 +136,7 @@ + @@ -407,6 +408,7 @@ + diff --git a/UWP/CoreUWP/CoreUWP.vcxproj.filters b/UWP/CoreUWP/CoreUWP.vcxproj.filters index 7e96f6ac8f..6bcf00da54 100644 --- a/UWP/CoreUWP/CoreUWP.vcxproj.filters +++ b/UWP/CoreUWP/CoreUWP.vcxproj.filters @@ -412,6 +412,7 @@ + @@ -686,6 +687,7 @@ + diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index fa7d37113f..a687957acf 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -46,6 +46,7 @@ #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/Debugger/SymbolMap.h" +#include "Core/EmuThread.h" #include "Core/Instance.h" #include "Core/KeyMap.h" #include "Core/MIPS/JitCommon/JitCommon.h" @@ -65,7 +66,6 @@ #ifndef _M_ARM #include "Windows/DinputDevice.h" #endif -#include "Windows/EmuThread.h" #include "Windows/resource.h" #include "Windows/MainWindow.h" diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj index ef7fdda4bb..30914b7727 100644 --- a/Windows/PPSSPP.vcxproj +++ b/Windows/PPSSPP.vcxproj @@ -664,7 +664,6 @@ true - true true @@ -1112,7 +1111,6 @@ true - true true diff --git a/Windows/PPSSPP.vcxproj.filters b/Windows/PPSSPP.vcxproj.filters index 1a6242c406..91195aec3a 100644 --- a/Windows/PPSSPP.vcxproj.filters +++ b/Windows/PPSSPP.vcxproj.filters @@ -103,9 +103,6 @@ Windows\Debugger - - Windows - Windows\Input @@ -326,9 +323,6 @@ Windows\Debugger - - Windows - Windows\Input diff --git a/Windows/main.cpp b/Windows/main.cpp index 3de86a2eac..e65ad214ec 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -55,7 +55,7 @@ #include "Core/Instance.h" #include "Core/HLE/Plugins.h" #include "Core/RetroAchievements.h" -#include "Windows/EmuThread.h" +#include "Core/EmuThread.h" #include "Windows/WindowsAudio.h" #include "ext/disarm.h" diff --git a/android/jni/Android.mk b/android/jni/Android.mk index ff6829ab39..37dc8e3d31 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -613,6 +613,7 @@ EXEC_AND_LIB_FILES := \ $(SRC)/Core/ConfigSettings.cpp \ $(SRC)/Core/CoreTiming.cpp \ $(SRC)/Core/CwCheat.cpp \ + $(SRC)/Core/EmuThread.cpp \ $(SRC)/Core/FrameTiming.cpp \ $(SRC)/Core/HDRemaster.cpp \ $(SRC)/Core/Instance.cpp \