diff --git a/4JLibs.sln b/4JLibs.sln index ca041f7..3d2716b 100644 --- a/4JLibs.sln +++ b/4JLibs.sln @@ -112,8 +112,7 @@ Global {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|PS3.ActiveCfg = Debug|PS3 {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Windows64.ActiveCfg = Debug|x64 {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Windows64.Build.0 = Debug|x64 - {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Xbox 360.ActiveCfg = Debug|x64 {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Durango.ActiveCfg = Release|Durango {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Durango.Build.0 = Release|Durango {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Durango.Deploy.0 = Release|Durango @@ -122,7 +121,7 @@ Global {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|PS3.ActiveCfg = Release|PS3 {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Windows64.ActiveCfg = Release|x64 {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Windows64.Build.0 = Release|x64 - {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Xbox 360.ActiveCfg = Release|x64 {22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Durango.ActiveCfg = Debug|Durango {22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Durango.Build.0 = Debug|Durango {22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Durango.Deploy.0 = Debug|Durango @@ -132,7 +131,6 @@ Global {22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Windows64.ActiveCfg = Debug|x64 {22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Windows64.Build.0 = Debug|x64 {22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 {22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Durango.ActiveCfg = Release|Durango {22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Durango.Build.0 = Release|Durango {22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Durango.Deploy.0 = Release|Durango @@ -151,7 +149,6 @@ Global {2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Windows64.ActiveCfg = Debug|x64 {2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Windows64.Build.0 = Debug|x64 {2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 {2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Durango.ActiveCfg = Release|Durango {2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Durango.Build.0 = Release|Durango {2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Durango.Deploy.0 = Release|Durango @@ -169,7 +166,6 @@ Global {D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|PS3.ActiveCfg = Debug|PS3 {D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Windows64.ActiveCfg = Debug|x64 {D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 {D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|Durango.ActiveCfg = Release|Durango {D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|ORBIS.ActiveCfg = Release|ORBIS {D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|PS3.ActiveCfg = Release|PS3 diff --git a/4J_Input/4J_Input.vcxproj b/4J_Input/4J_Input.vcxproj index 37dc846..f967243 100644 --- a/4J_Input/4J_Input.vcxproj +++ b/4J_Input/4J_Input.vcxproj @@ -1362,6 +1362,7 @@ StaticLibrary + true StaticLibrary @@ -1515,18 +1516,19 @@ ../Headers/Xbox;../Headers;$(ProjectDir); - _XBOX;%(PreprocessorDefinitions) - MultiThreaded + _XBOX;_LIB;_DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug true $(ProjectDir)\stdafx.h; - Full - Speed + Disabled + Neither + false ../Headers/Xbox;../Headers;$(ProjectDir); - _XBOX;%(PreprocessorDefinitions) + _XBOX;_LIB;NDEBUG;%(PreprocessorDefinitions) MultiThreaded true $(ProjectDir)\stdafx.h; diff --git a/4J_Input/PS3/INP_Main.cpp b/4J_Input/PS3/INP_Main.cpp index cd77e9c..4d7cef1 100644 --- a/4J_Input/PS3/INP_Main.cpp +++ b/4J_Input/PS3/INP_Main.cpp @@ -83,7 +83,7 @@ void CInput::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char uc m_iEffectiveRange = m_iMovementRangeMax - m_iDeadzone; m_fEffectiveRange = (float)m_iEffectiveRange; - m_iHalfRange = m_iEffectiveRange * 0.75; + m_iHalfRange = static_cast(m_iEffectiveRange * 0.75); for (int i = 0; i < MAX_JOYPADS; i++) { diff --git a/4J_Input/PS3/INP_Main.h b/4J_Input/PS3/INP_Main.h index c3bf795..ecdd84a 100644 --- a/4J_Input/PS3/INP_Main.h +++ b/4J_Input/PS3/INP_Main.h @@ -54,7 +54,7 @@ public: BYTE *m_pucRightTriggerAxisMap; unsigned char m_ucMappingValue; - unsigned char m_ucInputStateIndex; + int m_ucInputStateIndex; CellPadData *m_pInputStates; }; diff --git a/4J_Input/Windows64/INP_Main.cpp b/4J_Input/Windows64/INP_Main.cpp index 736559e..5318931 100644 --- a/4J_Input/Windows64/INP_Main.cpp +++ b/4J_Input/Windows64/INP_Main.cpp @@ -530,22 +530,22 @@ bool CInput::ButtonDown(int iPad, unsigned char ucAction) float CInput::GetJoypadStick_Menu_LX(unsigned char ucPad) { - return m_Joypads[ucPad].m_iNormalizedLeftThumbX; + return static_cast(m_Joypads[ucPad].m_iNormalizedLeftThumbX); } float CInput::GetJoypadStick_Menu_LY(unsigned char ucPad) { - return m_Joypads[ucPad].m_iNormalizedLeftThumbY; + return static_cast(m_Joypads[ucPad].m_iNormalizedLeftThumbY); } float CInput::GetJoypadStick_Menu_RX(unsigned char ucPad) { - return m_Joypads[ucPad].m_iNormalizedRightThumbX; + return static_cast(m_Joypads[ucPad].m_iNormalizedRightThumbX); } float CInput::GetJoypadStick_Menu_RY(unsigned char ucPad) { - return m_Joypads[ucPad].m_iNormalizedRightThumbY; + return static_cast(m_Joypads[ucPad].m_iNormalizedRightThumbY); } unsigned char CInput::GetJoypadLTrigger_Menu(unsigned char ucPad) @@ -631,7 +631,7 @@ void CInput::SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs) void CInput::SetDebugSequence(const char *chSequenceA, int (*Func)(LPVOID), LPVOID lpParam) { - int iLen = strlen(chSequenceA); + int iLen = static_cast(strlen(chSequenceA)); m_sDebugSequenceName = (char *)operator new[](iLen); strcpy(m_sDebugSequenceName, chSequenceA); @@ -885,7 +885,7 @@ void CInput::InitTime(void) LARGE_INTEGER qwTicksPerSec; QueryPerformanceFrequency(&qwTicksPerSec); - m_fTickToSeconds = 1.0 / (float)(int)qwTicksPerSec.LowPart; + m_fTickToSeconds = static_cast(1.0 / qwTicksPerSec.LowPart); for (int i = 0; i < MAX_JOYPADS; i++) { m_LastActivityTime[i].QuadPart = 0; diff --git a/4J_Input/Windows64/INP_Main.h b/4J_Input/Windows64/INP_Main.h index 5b6f529..f5c630e 100644 --- a/4J_Input/Windows64/INP_Main.h +++ b/4J_Input/Windows64/INP_Main.h @@ -73,7 +73,7 @@ public: BYTE *m_pucRightTriggerAxisMap; unsigned char m_ucMappingValue; - unsigned char m_ucInputStateIndex; + int m_ucInputStateIndex; SDL_Gamepad *m_pGamepad; }; diff --git a/4J_Input/Xbox/INP_Keyboard.cpp b/4J_Input/Xbox/INP_Keyboard.cpp index e427d11..331a9d7 100644 --- a/4J_Input/Xbox/INP_Keyboard.cpp +++ b/4J_Input/Xbox/INP_Keyboard.cpp @@ -4,11 +4,12 @@ CKeyboard::CKeyboard() { bActive = false; + pwchResult = L""; } void CKeyboard::Tick(void) { - if (bActive == true && KeyboardOverlap.InternalLow != ERROR_IO_PENDING) + if (bActive && KeyboardOverlap.InternalLow != ERROR_IO_PENDING) { if(Func != NULL) Func(lpParam, KeyboardOverlap.dwExtendedError == 0); bActive = false; @@ -17,7 +18,7 @@ void CKeyboard::Tick(void) C_4JInput::EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode) { - if (bActive == true) + if (bActive) return C_4JInput::EKeyboard_Cancelled; this->iPad = (int)dwPad; @@ -57,7 +58,7 @@ C_4JInput::EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR u //str1k3r - These 2 only exist cause of iggy C_4JInput::EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode) { - ; + return RequestKeyboard(uiTitle, uiText, uiDesc, dwPad, pwchResult, uiMaxChars, Func, lpParam, eMode); } void CKeyboard::GetText(uint16_t *UTF16String) diff --git a/4J_Input/Xbox/INP_Main.h b/4J_Input/Xbox/INP_Main.h index ad6e859..11e3506 100644 --- a/4J_Input/Xbox/INP_Main.h +++ b/4J_Input/Xbox/INP_Main.h @@ -48,7 +48,7 @@ public: BYTE *m_pucRightTriggerAxisMap; unsigned char m_ucMappingValue; - unsigned char m_ucInputStateIndex; + int m_ucInputStateIndex; XINPUT_STATE *m_pInputStates; }; diff --git a/4J_Input/stdafx.h b/4J_Input/stdafx.h index 62f1c95..da12b25 100644 --- a/4J_Input/stdafx.h +++ b/4J_Input/stdafx.h @@ -24,9 +24,7 @@ #include #include #include "4J_Storage.h" -#endif - -#ifndef _XBOX +#else #include "extraX64.h" #endif diff --git a/Headers/extraX64.h b/Headers/extraX64.h index cd53654..8f1f415 100644 --- a/Headers/extraX64.h +++ b/Headers/extraX64.h @@ -32,7 +32,6 @@ typedef SQRNetworkManager_Orbis::PresenceSyncInfo INVITE_INFO; #include #include #include -#include #include #include "Ps3Types.h"