Commit de0813bd authored by Phillip Castaneda's avatar Phillip Castaneda
Browse files

64 bit proofing HWND conversion

Removing compiler flag for 64 bit compat checking (causes warning)
Fixing xinput axis enumeration - was not incrementing counter
parent 34431daf
......@@ -50,7 +50,7 @@
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
......@@ -132,7 +132,7 @@
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
......
......@@ -50,7 +50,7 @@
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
......@@ -132,7 +132,7 @@
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
......
......@@ -54,7 +54,7 @@
UsePrecompiledHeader="0"
PrecompiledHeaderThrough="StdAfx.h"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CallingConvention="0"
/>
......@@ -128,7 +128,7 @@
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)/$(TargetName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
......@@ -201,7 +201,7 @@
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)/$(TargetName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
......@@ -283,7 +283,7 @@
UsePrecompiledHeader="0"
PrecompiledHeaderThrough="StdAfx.h"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CallingConvention="0"
/>
......
......@@ -61,13 +61,15 @@ void Win32InputManager::_initialize( ParamList &paramList )
HINSTANCE hInst = 0;
HRESULT hr;
//TODO 64 bit proof this little conversion xxx wip
//First of all, get the Windows Handle and Instance
ParamList::iterator i = paramList.find("WINDOW");
if( i == paramList.end() )
OIS_EXCEPT( E_InvalidParam, "Win32InputManager::Win32InputManager >> No HWND found!" );
hWnd = (HWND)strtoul(i->second.c_str(), 0, 10);
// Get number as 64 bit and then convert. Handles the case of 32 or 64 bit HWND
unsigned __int64 handle = _strtoui64(i->second.c_str(), 0, 10);
hWnd = (HWND)handle;
if( IsWindow(hWnd) == 0 )
OIS_EXCEPT( E_General, "Win32InputManager::Win32InputManager >> The sent HWND is not valid!");
......
......@@ -649,6 +649,7 @@ void Win32JoyStick::CheckXInputDevices(JoyStickInfoList &joys)
{
i->isXInput = true;
i->xInputDev = xDevice;
++xDevice;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment