diff --git a/PCSX2_qt.sln b/PCSX2_qt.sln index f0f732c9e0..fa7a984c3d 100644 --- a/PCSX2_qt.sln +++ b/PCSX2_qt.sln @@ -26,8 +26,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_base", "3rdparty\wxwid EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\projects\vstudio\libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads4w", "3rdparty\pthreads4w\build\pthreads4w.vcxproj", "{0FAE817D-9A32-4830-857E-81DA57246E16}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baseclasses", "3rdparty\baseclasses\baseclasses.vcxproj", "{27F17499-A372-4408-8AFA-4F9F4584FBD3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "3rdparty\xz\liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}" @@ -170,18 +168,6 @@ Global {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release AVX2|x64.Build.0 = Release|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Debug AVX2|x64.ActiveCfg = Debug|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Debug AVX2|x64.Build.0 = Debug|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Debug|x64.ActiveCfg = Debug|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Debug|x64.Build.0 = Debug|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Devel AVX2|x64.ActiveCfg = Devel|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Devel AVX2|x64.Build.0 = Devel|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Devel|x64.ActiveCfg = Devel|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Devel|x64.Build.0 = Devel|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Release AVX2|x64.ActiveCfg = Release|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Release AVX2|x64.Build.0 = Release|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Release|x64.ActiveCfg = Release|x64 - {0FAE817D-9A32-4830-857E-81DA57246E16}.Release|x64.Build.0 = Release|x64 {27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug AVX2|x64.ActiveCfg = Debug|x64 {27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug AVX2|x64.Build.0 = Debug|x64 {27F17499-A372-4408-8AFA-4F9F4584FBD3}.Debug|x64.ActiveCfg = Debug|x64 @@ -410,7 +396,6 @@ Global {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} - {0FAE817D-9A32-4830-857E-81DA57246E16} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {27F17499-A372-4408-8AFA-4F9F4584FBD3} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {12728250-16EC-4DC6-94D7-E21DD88947F8} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {449AD25E-424A-4714-BABC-68706CDCC33B} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index f0ac231576..ba9301db18 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -170,7 +170,7 @@ endif() if(WIN32) enable_language(ASM_MASM) target_sources(common PRIVATE FastJmp.asm) - target_link_libraries(common PUBLIC WIL::WIL D3D12MemAlloc pthreads4w Winmm.lib) + target_link_libraries(common PUBLIC WIL::WIL D3D12MemAlloc Winmm.lib) target_sources(common PRIVATE CrashHandler.cpp CrashHandler.h diff --git a/common/common.vcxproj b/common/common.vcxproj index 50e9354df4..0e71e61899 100644 --- a/common/common.vcxproj +++ b/common/common.vcxproj @@ -21,7 +21,6 @@ - @@ -211,9 +210,6 @@ {ef6834a9-11f3-4331-bc34-21b325abb180} - - {0fae817d-9a32-4830-857e-81da57246e16} - {3fcc50c2-81e9-5db2-b8d8-2129427568b1} diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj index b8366e2815..db6a476990 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj +++ b/pcsx2-qt/pcsx2-qt.vcxproj @@ -21,7 +21,6 @@ - @@ -107,10 +106,6 @@ {47afdbef-f15f-4bc0-b436-5be443c3f80f} - - {0fae817d-9a32-4830-857e-81da57246e16} - false - {e9b51944-7e6d-4bcd-83f2-7bbd5a46182d} diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 89f5c5d02f..9dc3d3f829 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -1616,7 +1616,6 @@ endif() if(WIN32) target_link_libraries(PCSX2_FLAGS INTERFACE baseclasses - pthreads4w WIL::WIL D3D12MemAlloc setupapi.lib @@ -1635,6 +1634,11 @@ if(WIN32) opengl32.lib comsuppw.lib ) + if(NOT PCSX2_CORE) + target_link_libraries(PCSX2_FLAGS INTERFACE + pthreads4w + ) + endif() elseif(APPLE) target_link_libraries(PCSX2_FLAGS INTERFACE PCAP::PCAP diff --git a/pcsx2/PrecompiledHeader.h b/pcsx2/PrecompiledHeader.h index 095164f879..152fd8d7df 100644 --- a/pcsx2/PrecompiledHeader.h +++ b/pcsx2/PrecompiledHeader.h @@ -53,7 +53,11 @@ #include #include + +#ifndef PCSX2_CORE +// pthreadsw32 is not needed when compiling PCSX2-Qt. #include +#endif #undef TRUE diff --git a/pcsx2/pcsx2core.vcxproj b/pcsx2/pcsx2core.vcxproj index 35658da716..57a1f3b0c1 100644 --- a/pcsx2/pcsx2core.vcxproj +++ b/pcsx2/pcsx2core.vcxproj @@ -21,7 +21,6 @@ - @@ -756,10 +755,6 @@ {47afdbef-f15f-4bc0-b436-5be443c3f80f} - - {0fae817d-9a32-4830-857e-81da57246e16} - false - {e9b51944-7e6d-4bcd-83f2-7bbd5a46182d} diff --git a/pcsx2/x86/ix86-32/iR5900-32.cpp b/pcsx2/x86/ix86-32/iR5900-32.cpp index 9390d3ae9b..bedc310add 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.cpp +++ b/pcsx2/x86/ix86-32/iR5900-32.cpp @@ -31,6 +31,7 @@ #ifndef PCSX2_CORE #include "gui/SysThreads.h" +#include #else #include "VMManager.h" #endif @@ -733,13 +734,15 @@ static void recExecute() if (eeRecNeedsReset.load()) recResetRaw(); - int oldstate; m_cpuException = nullptr; m_Exception = nullptr; // setjmp will save the register context and will return 0 // A call to longjmp will restore the context (included the eip/rip) // but will return the longjmp 2nd parameter (here 1) +#ifndef PCSX2_CORE + int oldstate; +#endif if (!fastjmp_set(&m_SetJmp_StateCheck)) { eeCpuExecuting = true; @@ -749,14 +752,18 @@ static void recExecute() // in Linux, which cannot have a C++ exception cross the recompiler. Hence the changing // of the cancelstate here! +#ifndef PCSX2_CORE pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate); +#endif EnterRecompiledCode(); // Generally unreachable code here ... } else { +#ifndef PCSX2_CORE pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate); +#endif } eeCpuExecuting = false;