Skip to content

Commit

Permalink
update SourceSDK
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Jun 11, 2024
1 parent 47260f4 commit 44df467
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/SourceSDK/tier0/cpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//========= Copyright ?1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
Expand Down
2 changes: 1 addition & 1 deletion include/SourceSDK/tier0/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ double Plat_FloatTime()

double fRawSeconds = (double)( CurrentTime.QuadPart - g_ClockStart.QuadPart ) / (double)(g_PerformanceFrequency.QuadPart);

#if 0 && !defined(STEAM) && !defined(_X360)
#if defined(USE_VCRMODE) && !defined(NO_VCR) && !defined(STEAM) && !defined(_X360)
if (g_VCRMode == VCR_Disabled)
return fRawSeconds;

Expand Down
16 changes: 10 additions & 6 deletions include/SourceSDK/tier0/threadtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ ThreadHandle_t CreateSimpleThread( ThreadFunc_t pfnThread, void *pParam, ThreadI
ThreadId_t idIgnored;
if ( !pID )
pID = &idIgnored;
#if defined(USE_VCRMODE) && !defined(NO_VCR)
return (ThreadHandle_t)VCRHook_CreateThread(NULL, stackSize, (LPTHREAD_START_ROUTINE)ThreadProcConvert, new ThreadProcInfo_t( pfnThread, pParam ), 0, pID);
#else
return (ThreadHandle_t)VCRHook_CreateThread(NULL, stackSize, (_beginthreadex_proc_type)ThreadProcConvert, new ThreadProcInfo_t(pfnThread, pParam), 0, (unsigned*)pID);
#endif

#elif _LINUX
pthread_t tid;
pthread_create(&tid, NULL, ThreadProcConvert, new ThreadProcInfo_t( pfnThread, pParam ) );
Expand Down Expand Up @@ -1369,12 +1374,11 @@ bool CThread::Start( unsigned nBytesStack )
HANDLE hThread;
CThreadEvent createComplete;
ThreadInit_t init = { this, &createComplete, &bInitSuccess };
m_hThread = hThread = (HANDLE)VCRHook_CreateThread( NULL,
nBytesStack,
(LPTHREAD_START_ROUTINE)GetThreadProc(),
new ThreadInit_t(init),
0,
&m_threadId );
#if defined(USE_VCRMODE) && !defined(NO_VCR)
m_hThread = hThread = (HANDLE)VCRHook_CreateThread( NULL, nBytesStack, (LPTHREAD_START_ROUTINE)GetThreadProc(), new ThreadInit_t(init), 0, &m_threadId );
#else
m_hThread = hThread = (HANDLE)VCRHook_CreateThread(NULL, nBytesStack, (_beginthreadex_proc_type)GetThreadProc(), new ThreadInit_t(init), 0, (unsigned *) & m_threadId);
#endif
if ( !hThread )
{
AssertMsg1( 0, "Failed to create thread (error 0x%x)", GetLastError() );
Expand Down
Binary file modified tools/global_common.props
Binary file not shown.

0 comments on commit 44df467

Please sign in to comment.