mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier0: drop SDK specific code for tools
Mathlib doesn't use some of the game-specific mutex stuff, but since our tools is now also including the mutex utilities, we have to block them out for _TOOLS as well.
This commit is contained in:
parent
a03603b0bd
commit
f989061e2d
@ -94,6 +94,7 @@ set_target_properties( ${PROJECT_NAME} PROPERTIES
|
|||||||
)
|
)
|
||||||
target_compile_definitions( ${PROJECT_NAME} PRIVATE
|
target_compile_definitions( ${PROJECT_NAME} PRIVATE
|
||||||
"WIN32"
|
"WIN32"
|
||||||
|
"_TOOLS"
|
||||||
)
|
)
|
||||||
target_precompile_headers( ${PROJECT_NAME} PRIVATE
|
target_precompile_headers( ${PROJECT_NAME} PRIVATE
|
||||||
"${ENGINE_SOURCE_DIR}/thirdparty/recast/Pch.h"
|
"${ENGINE_SOURCE_DIR}/thirdparty/recast/Pch.h"
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
#ifndef THREADTOOLS_H
|
#ifndef THREADTOOLS_H
|
||||||
#define THREADTOOLS_H
|
#define THREADTOOLS_H
|
||||||
#include "dbg.h"
|
#include "dbg.h"
|
||||||
#ifndef BUILDING_MATHLIB
|
|
||||||
#include "jobthread.h"
|
#ifdef BUILDING_MATHLIB
|
||||||
|
#define _TOOLS
|
||||||
#endif // BUILDING_MATHLIB
|
#endif // BUILDING_MATHLIB
|
||||||
|
|
||||||
|
#ifndef _TOOLS
|
||||||
|
#include "jobthread.h"
|
||||||
|
#endif // _TOOLS
|
||||||
|
|
||||||
inline void ThreadSleep(unsigned nMilliseconds)
|
inline void ThreadSleep(unsigned nMilliseconds)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -115,7 +120,7 @@ FORCEINLINE ThreadId_t ThreadGetCurrentId()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef BUILDING_MATHLIB
|
#ifndef _TOOLS
|
||||||
|
|
||||||
extern ThreadId_t* g_ThreadMainThreadID;
|
extern ThreadId_t* g_ThreadMainThreadID;
|
||||||
extern ThreadId_t* g_ThreadServerFrameThreadID;
|
extern ThreadId_t* g_ThreadServerFrameThreadID;
|
||||||
@ -128,7 +133,7 @@ PLATFORM_INTERFACE bool ThreadInMainOrServerFrameThread();
|
|||||||
PLATFORM_INTERFACE bool ThreadCouldDoServerWork();
|
PLATFORM_INTERFACE bool ThreadCouldDoServerWork();
|
||||||
PLATFORM_INTERFACE void ThreadJoinServerJob();
|
PLATFORM_INTERFACE void ThreadJoinServerJob();
|
||||||
|
|
||||||
#endif // !BUILDING_MATHLIB
|
#endif // !_TOOLS
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NOINLINE
|
#define NOINLINE
|
||||||
@ -262,11 +267,11 @@ private:
|
|||||||
typedef CInterlockedIntT<int> CInterlockedInt;
|
typedef CInterlockedIntT<int> CInterlockedInt;
|
||||||
typedef CInterlockedIntT<unsigned> CInterlockedUInt;
|
typedef CInterlockedIntT<unsigned> CInterlockedUInt;
|
||||||
|
|
||||||
#ifndef BUILDING_MATHLIB
|
#ifndef _TOOLS
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
|
||||||
#endif // !BUILDING_MATHLIB
|
#endif // !_TOOLS
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class CThreadFastMutex
|
class CThreadFastMutex
|
||||||
@ -557,7 +562,7 @@ void CThreadSpinRWLock::UnlockRead()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef BUILDING_MATHLIB
|
#ifndef _TOOLS
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class VThreadTools : public IDetour
|
class VThreadTools : public IDetour
|
||||||
{
|
{
|
||||||
@ -582,5 +587,5 @@ class VThreadTools : public IDetour
|
|||||||
};
|
};
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#endif // !BUILDING_MATHLIB
|
#endif // !_TOOLS
|
||||||
#endif // THREADTOOLS_H
|
#endif // THREADTOOLS_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user