add ScreenSetTime
This commit is contained in:
@@ -48,6 +48,8 @@ public:
|
||||
virtual void EnterTimeCriticalSection() { }
|
||||
virtual void ExitTimeCriticalSection() { }
|
||||
|
||||
virtual void SetTime( tm newtime ) { }
|
||||
|
||||
protected:
|
||||
virtual void MessageBoxErrorPrivate( CString sMessage, CString ID ) { printf("Error: %s\n", sMessage.c_str()); }
|
||||
virtual void MessageBoxOKPrivate( CString sMessage, CString ID ) {}
|
||||
|
||||
@@ -202,6 +202,20 @@ void ArchHooks_Win32::ExitTimeCriticalSection()
|
||||
TimeCritMutex->Unlock();
|
||||
}
|
||||
|
||||
void ArchHooks_Win32::SetTime( tm newtime )
|
||||
{
|
||||
SYSTEMTIME st;
|
||||
ZERO( st );
|
||||
st.wYear = newtime.tm_year+1900;
|
||||
st.wMonth = newtime.tm_mon+1;
|
||||
st.wDay = newtime.tm_mday;
|
||||
st.wHour = newtime.tm_hour;
|
||||
st.wMinute = newtime.tm_min;
|
||||
st.wSecond = newtime.tm_sec;
|
||||
st.wMilliseconds = 0;
|
||||
BOOL b = SetLocalTime( &st );
|
||||
DWORD dw = GetLastError();
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002-2004 by the person(s) listed below. All rights reserved.
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
RageMutex *TimeCritMutex;
|
||||
void EnterTimeCriticalSection();
|
||||
void ExitTimeCriticalSection();
|
||||
void SetTime( tm newtime );
|
||||
};
|
||||
|
||||
#undef ARCH_HOOKS
|
||||
|
||||
Reference in New Issue
Block a user