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 @@ ...@@ -50,7 +50,7 @@
RuntimeLibrary="3" RuntimeLibrary="3"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="4" DebugInformationFormat="4"
/> />
<Tool <Tool
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
RuntimeLibrary="3" RuntimeLibrary="3"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="4" DebugInformationFormat="4"
/> />
<Tool <Tool
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
PrecompiledHeaderThrough="StdAfx.h" PrecompiledHeaderThrough="StdAfx.h"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
CallingConvention="0" CallingConvention="0"
/> />
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)/$(TargetName).pch" PrecompiledHeaderFile="$(IntDir)/$(TargetName).pch"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)/$(TargetName).pch" PrecompiledHeaderFile="$(IntDir)/$(TargetName).pch"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
PrecompiledHeaderThrough="StdAfx.h" PrecompiledHeaderThrough="StdAfx.h"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="false"
DebugInformationFormat="3" DebugInformationFormat="3"
CallingConvention="0" CallingConvention="0"
/> />
......
...@@ -61,13 +61,15 @@ void Win32InputManager::_initialize( ParamList &paramList ) ...@@ -61,13 +61,15 @@ void Win32InputManager::_initialize( ParamList &paramList )
HINSTANCE hInst = 0; HINSTANCE hInst = 0;
HRESULT hr; HRESULT hr;
//TODO 64 bit proof this little conversion xxx wip
//First of all, get the Windows Handle and Instance //First of all, get the Windows Handle and Instance
ParamList::iterator i = paramList.find("WINDOW"); ParamList::iterator i = paramList.find("WINDOW");
if( i == paramList.end() ) if( i == paramList.end() )
OIS_EXCEPT( E_InvalidParam, "Win32InputManager::Win32InputManager >> No HWND found!" ); 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 ) if( IsWindow(hWnd) == 0 )
OIS_EXCEPT( E_General, "Win32InputManager::Win32InputManager >> The sent HWND is not valid!"); OIS_EXCEPT( E_General, "Win32InputManager::Win32InputManager >> The sent HWND is not valid!");
......
...@@ -649,6 +649,7 @@ void Win32JoyStick::CheckXInputDevices(JoyStickInfoList &joys) ...@@ -649,6 +649,7 @@ void Win32JoyStick::CheckXInputDevices(JoyStickInfoList &joys)
{ {
i->isXInput = true; i->isXInput = true;
i->xInputDev = xDevice; 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