WIP: native win64 support
This commit is contained in:
@@ -184,7 +184,7 @@ LLMutex* LLFastTimer::sLogLock = NULL;
|
||||
std::queue<LLSD> LLFastTimer::sLogQueue;
|
||||
const int LLFastTimer::NamedTimer::HISTORY_NUM = 300;
|
||||
|
||||
#if LL_WINDOWS
|
||||
#if defined(LL_WINDOWS) && !defined(_WIN64)
|
||||
#define USE_RDTSC 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ static F64 calculate_cpu_frequency(U32 measure_msecs)
|
||||
unsigned long dwCurPriorityClass = GetPriorityClass(hProcess);
|
||||
int iCurThreadPriority = GetThreadPriority(hThread);
|
||||
unsigned long dwProcessMask, dwSystemMask, dwNewMask = 1;
|
||||
GetProcessAffinityMask(hProcess, &dwProcessMask, &dwSystemMask);
|
||||
GetProcessAffinityMask(hProcess, (PDWORD_PTR)&dwProcessMask, (PDWORD_PTR)&dwSystemMask);
|
||||
|
||||
SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS);
|
||||
SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);
|
||||
|
||||
@@ -140,7 +140,7 @@ inline F64 llabs(const F64 a)
|
||||
|
||||
inline S32 lltrunc( F32 f )
|
||||
{
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER )
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && !defined(_WIN64)
|
||||
// Avoids changing the floating point control word.
|
||||
// Add or subtract 0.5 - epsilon and then round
|
||||
const static U32 zpfp[] = { 0xBEFFFFFF, 0x3EFFFFFF };
|
||||
@@ -166,7 +166,7 @@ inline S32 lltrunc( F64 f )
|
||||
|
||||
inline S32 llfloor( F32 f )
|
||||
{
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER )
|
||||
#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && !defined(_WIN64)
|
||||
// Avoids changing the floating point control word.
|
||||
// Accurate (unlike Stereopsis version) for all values between S32_MIN and S32_MAX and slightly faster than Stereopsis version.
|
||||
// Add -(0.5 - epsilon) and then round
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#error "Please include llmath.h before this file."
|
||||
#endif
|
||||
|
||||
#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 ) )
|
||||
#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 ) && !defined(_WIN64) )
|
||||
#error SSE2 not enabled. LLVector4a and related class will not compile.
|
||||
#endif
|
||||
|
||||
|
||||
@@ -749,7 +749,7 @@ void LLWindowWin32::close()
|
||||
LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL;
|
||||
|
||||
// Don't process events in our mainWindowProc any longer.
|
||||
SetWindowLong(mWindowHandle, GWL_USERDATA, NULL);
|
||||
SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, NULL);
|
||||
|
||||
// Make sure we don't leave a blank toolbar button.
|
||||
ShowWindow(mWindowHandle, SW_HIDE);
|
||||
@@ -1660,7 +1660,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
|
||||
LL_DEBUGS("Window") << "Keeping vertical sync" << LL_ENDL;
|
||||
}
|
||||
|
||||
SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this);
|
||||
SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, (LONG_PTR)this);
|
||||
|
||||
// register this window as handling drag/drop events from the OS
|
||||
DragAcceptFiles( mWindowHandle, TRUE );
|
||||
@@ -1983,7 +1983,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
||||
// This helps prevent avatar walking after maximizing the window by double-clicking the title bar.
|
||||
static bool sHandleLeftMouseUp = true;
|
||||
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA);
|
||||
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr(h_wnd, GWLP_USERDATA);
|
||||
|
||||
|
||||
if (NULL != window_imp)
|
||||
|
||||
Reference in New Issue
Block a user