mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Remove windoze include from hsThread.h
This commit is contained in:
@ -82,6 +82,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
typedef HINSTANCE hsWindowInst;
|
typedef HINSTANCE hsWindowInst;
|
||||||
typedef HINSTANCE HMODULE;
|
typedef HINSTANCE HMODULE;
|
||||||
typedef long HRESULT;
|
typedef long HRESULT;
|
||||||
|
typedef void* HANDLE;
|
||||||
#else
|
#else
|
||||||
typedef int32_t* hsWindowHndl;
|
typedef int32_t* hsWindowHndl;
|
||||||
typedef int32_t* hsWindowInst;
|
typedef int32_t* hsWindowInst;
|
||||||
|
@ -46,9 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
typedef uint32_t hsMilliseconds;
|
typedef uint32_t hsMilliseconds;
|
||||||
|
|
||||||
#ifdef HS_BUILD_FOR_WIN32
|
#ifdef HS_BUILD_FOR_UNIX
|
||||||
# include "hsWindows.h"
|
|
||||||
#elif defined(HS_BUILD_FOR_UNIX)
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
// We can't wait with a timeout with semas
|
// We can't wait with a timeout with semas
|
||||||
@ -64,7 +62,7 @@ class hsThread
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if HS_BUILD_FOR_WIN32
|
#if HS_BUILD_FOR_WIN32
|
||||||
typedef DWORD ThreadId;
|
typedef uint32_t ThreadId;
|
||||||
#elif HS_BUILD_FOR_UNIX
|
#elif HS_BUILD_FOR_UNIX
|
||||||
typedef pthread_t ThreadId;
|
typedef pthread_t ThreadId;
|
||||||
#endif
|
#endif
|
||||||
@ -88,7 +86,7 @@ public:
|
|||||||
virtual ~hsThread(); // calls Stop()
|
virtual ~hsThread(); // calls Stop()
|
||||||
#if HS_BUILD_FOR_WIN32
|
#if HS_BUILD_FOR_WIN32
|
||||||
ThreadId GetThreadId() { return fThreadId; }
|
ThreadId GetThreadId() { return fThreadId; }
|
||||||
static ThreadId GetMyThreadId() { return GetCurrentThreadId(); }
|
static ThreadId GetMyThreadId();
|
||||||
#elif HS_BUILD_FOR_UNIX
|
#elif HS_BUILD_FOR_UNIX
|
||||||
ThreadId GetThreadId() { return fPThread; }
|
ThreadId GetThreadId() { return fPThread; }
|
||||||
static ThreadId GetMyThreadId() { return pthread_self(); }
|
static ThreadId GetMyThreadId() { return pthread_self(); }
|
||||||
@ -204,13 +202,7 @@ public:
|
|||||||
class hsSleep
|
class hsSleep
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if HS_BUILD_FOR_UNIX
|
|
||||||
static void Sleep(uint32_t millis);
|
static void Sleep(uint32_t millis);
|
||||||
|
|
||||||
#elif HS_BUILD_FOR_WIN32
|
|
||||||
static void Sleep(uint32_t millis) { ::Sleep(millis); }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -40,9 +40,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
*==LICENSE==*/
|
*==LICENSE==*/
|
||||||
|
|
||||||
#include <process.h>
|
|
||||||
|
|
||||||
#include "hsThread.h"
|
#include "hsThread.h"
|
||||||
|
#include "hsWindows.h"
|
||||||
|
#include <process.h>
|
||||||
#include "hsExceptions.h"
|
#include "hsExceptions.h"
|
||||||
#include "hsMemory.h"
|
#include "hsMemory.h"
|
||||||
|
|
||||||
@ -79,6 +79,11 @@ hsThread::~hsThread()
|
|||||||
this->Stop();
|
this->Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hsThread::ThreadId hsThread::GetMyThreadId()
|
||||||
|
{
|
||||||
|
return GetCurrentThreadId();
|
||||||
|
}
|
||||||
|
|
||||||
void hsThread::Start()
|
void hsThread::Start()
|
||||||
{
|
{
|
||||||
if (fThreadH == nil)
|
if (fThreadH == nil)
|
||||||
@ -237,4 +242,11 @@ bool hsEvent::Wait(hsMilliseconds timeToWait)
|
|||||||
void hsEvent::Signal()
|
void hsEvent::Signal()
|
||||||
{
|
{
|
||||||
::SetEvent(fEvent);
|
::SetEvent(fEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void hsSleep::Sleep(uint32_t millis)
|
||||||
|
{
|
||||||
|
::Sleep(millis);
|
||||||
|
}
|
||||||
|
@ -39,6 +39,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
Mead, WA 99021
|
Mead, WA 99021
|
||||||
|
|
||||||
*==LICENSE==*/
|
*==LICENSE==*/
|
||||||
|
|
||||||
|
#include "hsWindows.h"
|
||||||
#include "hsTimer.h"
|
#include "hsTimer.h"
|
||||||
#include "pfDispatchLog.h"
|
#include "pfDispatchLog.h"
|
||||||
#include "plStatusLog/plStatusLog.h"
|
#include "plStatusLog/plStatusLog.h"
|
||||||
|
@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
#include "plCrashCli.h"
|
#include "plCrashCli.h"
|
||||||
#include "plCrash_Private.h"
|
#include "plCrash_Private.h"
|
||||||
#include "plString.h"
|
|
||||||
|
|
||||||
#ifdef HS_BUILD_FOR_WIN32
|
#ifdef HS_BUILD_FOR_WIN32
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#define _pfCrashCli_h_
|
#define _pfCrashCli_h_
|
||||||
|
|
||||||
#include "HeadSpin.h"
|
#include "HeadSpin.h"
|
||||||
|
#include "hsWindows.h"
|
||||||
#include "plCrashBase.h"
|
#include "plCrashBase.h"
|
||||||
|
|
||||||
struct plCrashMemLink;
|
struct plCrashMemLink;
|
||||||
|
@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#define _pfCrash_Private_h_
|
#define _pfCrash_Private_h_
|
||||||
|
|
||||||
#include "HeadSpin.h"
|
#include "HeadSpin.h"
|
||||||
|
#include "hsWindows.h"
|
||||||
|
|
||||||
#define CRASH_NOTIFY_SUFFIX "CrashNotify"
|
#define CRASH_NOTIFY_SUFFIX "CrashNotify"
|
||||||
#define CRASH_HANDLE_SUFFIX "CrashHandled"
|
#define CRASH_HANDLE_SUFFIX "CrashHandled"
|
||||||
|
@ -47,10 +47,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "HeadSpin.h"
|
#include "HeadSpin.h"
|
||||||
|
#include "hsWindows.h"
|
||||||
#include "hsThread.h"
|
#include "hsThread.h"
|
||||||
|
|
||||||
#ifndef EAX_SDK_AVAILABLE
|
#ifndef EAX_SDK_AVAILABLE
|
||||||
#include "plEAXStructures.h"
|
# include "plEAXStructures.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "plEAXEffects.h"
|
#include "plEAXEffects.h"
|
||||||
#include "plAudioCore/plAudioCore.h"
|
#include "plAudioCore/plAudioCore.h"
|
||||||
#include "plDSoundBuffer.h"
|
#include "plDSoundBuffer.h"
|
||||||
|
@ -402,7 +402,7 @@ bool plSimulationMgr::InitSimulation()
|
|||||||
if ( !plPXConvert::Validate() )
|
if ( !plPXConvert::Validate() )
|
||||||
{
|
{
|
||||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||||
hsMessageBox("Ageia's PhysX or Plasma offsets have changed, need to rewrite conversion code.","PhysX Error",MB_OK);
|
hsMessageBox("Ageia's PhysX or Plasma offsets have changed, need to rewrite conversion code.","PhysX Error",hsMBoxOk);
|
||||||
#endif
|
#endif
|
||||||
return false; // client will handle this and ask user to install
|
return false; // client will handle this and ask user to install
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user