mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 12:30:31 +00:00
Merge remote-tracking branch 'smally/platform_type_consistency' into platform-type-consistency
Conflicts: Engine/source/platform/platformCPUCount.cpp
This commit is contained in:
commit
87d9e245b7
210 changed files with 896 additions and 896 deletions
|
|
@ -191,9 +191,9 @@ INT CreateMiniDump( LPEXCEPTION_POINTERS ExceptionInfo)
|
|||
//-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
// MiniDumpDialogProc - Used By DisplayMiniDumpDialog
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
const int ID_TEXT=200;
|
||||
const int ID_USERTEXT=300;
|
||||
const int ID_DONE=400;
|
||||
const S32 ID_TEXT=200;
|
||||
const S32 ID_USERTEXT=300;
|
||||
const S32 ID_DONE=400;
|
||||
BOOL CALLBACK MiniDumpDialogProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char text[128]= "";
|
||||
|
|
@ -259,7 +259,7 @@ LRESULT DisplayMiniDumpDialog(HINSTANCE hinst, HWND hwndOwner)
|
|||
*lpw++ = 0; // Predefined dialog box class (by default)
|
||||
|
||||
LPWSTR lpwsz = (LPWSTR)lpw;
|
||||
int nchar = 1 + MultiByteToWideChar(CP_ACP, 0, "MiniDump Crash Report", -1, lpwsz, 50);
|
||||
S32 nchar = 1 + MultiByteToWideChar(CP_ACP, 0, "MiniDump Crash Report", -1, lpwsz, 50);
|
||||
lpw += nchar;
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
#endif
|
||||
|
||||
// Entry for each Callstack-Entry
|
||||
const int STACKWALK_MAX_NAMELEN = 1024; // max name length for symbols
|
||||
const S32 STACKWALK_MAX_NAMELEN = 1024; // max name length for symbols
|
||||
struct CallstackEntry
|
||||
{
|
||||
DWORD64 offset; // if 0, we have no valid entry
|
||||
|
|
@ -393,7 +393,7 @@ bool StackWalker::ShowCallstack(HANDLE hThread, CONTEXT const & context, PReadPr
|
|||
IMAGEHLP_SYMBOL64 *pSym = NULL;
|
||||
IMAGEHLP_MODULE64 Module;
|
||||
IMAGEHLP_LINE64 Line;
|
||||
int frameNum;
|
||||
S32 frameNum;
|
||||
|
||||
if (!m_modulesLoaded) LoadModules();
|
||||
|
||||
|
|
@ -687,7 +687,7 @@ bool StackWalker::GetModuleListTH32(HANDLE hProcess, DWORD pid)
|
|||
return false;
|
||||
|
||||
keepGoing = !!pM32F( hSnap, &me );
|
||||
int cnt = 0;
|
||||
S32 cnt = 0;
|
||||
while (keepGoing)
|
||||
{
|
||||
this->LoadModule(hProcess, me.szExePath, me.szModule, (DWORD64) me.modBaseAddr, me.modBaseSize);
|
||||
|
|
@ -715,7 +715,7 @@ bool StackWalker::GetModuleListPSAPI(HANDLE hProcess)
|
|||
char *tt = NULL;
|
||||
char *tt2 = NULL;
|
||||
const SIZE_T TTBUFLEN = 8096;
|
||||
int cnt = 0;
|
||||
S32 cnt = 0;
|
||||
|
||||
hMods = (HMODULE*) malloc(sizeof(HMODULE) * (TTBUFLEN / sizeof HMODULE));
|
||||
tt = (char*) malloc(sizeof(char) * TTBUFLEN);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ private:
|
|||
DWORD m_dwProcessId;
|
||||
bool m_modulesLoaded;
|
||||
LPSTR m_szSymPath;
|
||||
int m_options;
|
||||
S32 m_options;
|
||||
char * m_pOutputBuffer;
|
||||
|
||||
static BOOL __stdcall myReadProcMem(HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public:
|
|||
// Neccesary because Thread::run() is provided as a non-threaded
|
||||
// way to execute the thread's run function. So we have to keep
|
||||
// track of the thread's lock here.
|
||||
static unsigned int __stdcall ThreadRunHandler(void * arg)
|
||||
static U32 __stdcall ThreadRunHandler(void * arg)
|
||||
{
|
||||
PlatformThreadData* mData = reinterpret_cast<PlatformThreadData*>(arg);
|
||||
mData->mThreadID = GetCurrentThreadId();
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ WinConsole::~WinConsole()
|
|||
void WinConsole::printf(const char *s, ...)
|
||||
{
|
||||
// Get the line into a buffer.
|
||||
static const int BufSize = 4096;
|
||||
static const S32 BufSize = 4096;
|
||||
static char buffer[4096];
|
||||
DWORD bytes;
|
||||
va_list args;
|
||||
|
|
|
|||
|
|
@ -896,8 +896,8 @@ bool DInputDevice::buildEvent( DWORD offset, S32 newData, S32 oldData )
|
|||
// Scale to the range -1.0 to 1.0:
|
||||
if ( objInfo.mMin != DIPROPRANGE_NOMIN && objInfo.mMax != DIPROPRANGE_NOMAX )
|
||||
{
|
||||
float range = float( objInfo.mMax - objInfo.mMin );
|
||||
newEvent.fValue = float( ( 2 * newData ) - objInfo.mMax - objInfo.mMin ) / range;
|
||||
F32 range = F32( objInfo.mMax - objInfo.mMin );
|
||||
newEvent.fValue = F32( ( 2 * newData ) - objInfo.mMax - objInfo.mMin ) / range;
|
||||
}
|
||||
else
|
||||
newEvent.fValue = (F32)newData;
|
||||
|
|
@ -1041,7 +1041,7 @@ bool DInputDevice::buildEvent( DWORD offset, S32 newData, S32 oldData )
|
|||
return true;
|
||||
}
|
||||
|
||||
void DInputDevice::rumble(float x, float y)
|
||||
void DInputDevice::rumble(F32 x, F32 y)
|
||||
{
|
||||
LONG rglDirection[2] = { 0, 0 };
|
||||
DICONSTANTFORCE cf = { 0 };
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class DInputDevice : public InputDevice
|
|||
const char* getProductName();
|
||||
|
||||
// Constant Effect Force Feedback
|
||||
void rumble( float x, float y );
|
||||
void rumble( F32 x, F32 y );
|
||||
|
||||
// Console interface functions:
|
||||
const char* getJoystickAxesString();
|
||||
|
|
|
|||
|
|
@ -437,14 +437,14 @@ bool DInputManager::isXInputEnabled()
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool DInputManager::isXInputConnected(int controllerID)
|
||||
bool DInputManager::isXInputConnected(S32 controllerID)
|
||||
{
|
||||
return( mXInputStateNew[controllerID].bConnected );
|
||||
}
|
||||
|
||||
int DInputManager::getXInputState(int controllerID, int property, bool current)
|
||||
int DInputManager::getXInputState(S32 controllerID, S32 property, bool current)
|
||||
{
|
||||
int retVal;
|
||||
S32 retVal;
|
||||
|
||||
switch(property)
|
||||
{
|
||||
|
|
@ -511,7 +511,7 @@ void DInputManager::deactivateXInput()
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool DInputManager::rumble( const char *pDeviceName, float x, float y )
|
||||
bool DInputManager::rumble( const char *pDeviceName, F32 x, F32 y )
|
||||
{
|
||||
// Determine the device
|
||||
U32 deviceType;
|
||||
|
|
@ -566,7 +566,7 @@ bool DInputManager::rumble( const char *pDeviceName, float x, float y )
|
|||
}
|
||||
}
|
||||
|
||||
void DInputManager::buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, float fValue )
|
||||
void DInputManager::buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue )
|
||||
{
|
||||
InputEventInfo newEvent;
|
||||
|
||||
|
|
@ -586,7 +586,7 @@ void DInputManager::buildXInputEvent( U32 deviceInst, InputEventType objType, In
|
|||
// "mXInputStateReset" is the exception and is true whenever DirectInput gets reset (because
|
||||
// the user ALT-TABBED away, for example). That means that after every context switch,
|
||||
// you will get a full set of updates on the "true" state of the controller.
|
||||
inline void DInputManager::fireXInputConnectEvent( int controllerID, bool condition, bool connected )
|
||||
inline void DInputManager::fireXInputConnectEvent( S32 controllerID, bool condition, bool connected )
|
||||
{
|
||||
if ( mXInputStateReset || condition )
|
||||
{
|
||||
|
|
@ -597,7 +597,7 @@ inline void DInputManager::fireXInputConnectEvent( int controllerID, bool condit
|
|||
}
|
||||
}
|
||||
|
||||
inline void DInputManager::fireXInputMoveEvent( int controllerID, bool condition, InputObjectInstances objInst, float fValue )
|
||||
inline void DInputManager::fireXInputMoveEvent( S32 controllerID, bool condition, InputObjectInstances objInst, F32 fValue )
|
||||
{
|
||||
if ( mXInputStateReset || condition )
|
||||
{
|
||||
|
|
@ -620,7 +620,7 @@ inline void DInputManager::fireXInputMoveEvent( int controllerID, bool condition
|
|||
}
|
||||
}
|
||||
|
||||
inline void DInputManager::fireXInputButtonEvent( int controllerID, bool forceFire, int button, InputObjectInstances objInst )
|
||||
inline void DInputManager::fireXInputButtonEvent( S32 controllerID, bool forceFire, S32 button, InputObjectInstances objInst )
|
||||
{
|
||||
if ( mXInputStateReset || forceFire || ((mXInputStateNew[controllerID].state.Gamepad.wButtons & button) != (mXInputStateOld[controllerID].state.Gamepad.wButtons & button)) )
|
||||
{
|
||||
|
|
@ -663,7 +663,7 @@ void DInputManager::processXInput( void )
|
|||
|
||||
if ( mfnXInputGetState )
|
||||
{
|
||||
for ( int i=0; i<4; i++ )
|
||||
for ( S32 i=0; i<4; i++ )
|
||||
{
|
||||
// Calling XInputGetState on a disconnected controller takes a fair
|
||||
// amount of time (probably because it tries to locate it), so we
|
||||
|
|
@ -855,7 +855,7 @@ ConsoleFunction( isXInputConnected, bool, 2, 2, "( int controllerID )"
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
ConsoleFunction( getXInputState, int, 3, 4, "( int controllerID, string property, bool current )"
|
||||
ConsoleFunction( getXInputState, S32, 3, 4, "( int controllerID, string property, bool current )"
|
||||
"@brief Queries the current state of a connected Xbox 360 controller.\n\n"
|
||||
"XInput Properties:\n\n"
|
||||
" - XI_THUMBLX, XI_THUMBLY - X and Y axes of the left thumbstick. \n"
|
||||
|
|
|
|||
|
|
@ -85,10 +85,10 @@ class DInputManager : public InputManager
|
|||
void unacquire( U8 deviceType, U8 deviceID );
|
||||
|
||||
// XInput worker functions
|
||||
void buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, float fValue );
|
||||
void fireXInputConnectEvent( int controllerID, bool condition, bool connected );
|
||||
void fireXInputMoveEvent( int controllerID, bool condition, InputObjectInstances objInst, float fValue );
|
||||
void fireXInputButtonEvent( int controllerID, bool forceFire, int button, InputObjectInstances objInst );
|
||||
void buildXInputEvent( U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue );
|
||||
void fireXInputConnectEvent( S32 controllerID, bool condition, bool connected );
|
||||
void fireXInputMoveEvent( S32 controllerID, bool condition, InputObjectInstances objInst, F32 fValue );
|
||||
void fireXInputButtonEvent( S32 controllerID, bool forceFire, S32 button, InputObjectInstances objInst );
|
||||
void processXInput();
|
||||
|
||||
public:
|
||||
|
|
@ -120,13 +120,13 @@ class DInputManager : public InputManager
|
|||
void deactivateXInput();
|
||||
bool isXInputActive() { return( mXInputActive ); }
|
||||
void resetXInput() { mXInputStateReset = true; }
|
||||
bool isXInputConnected(int controllerID);
|
||||
int getXInputState(int controllerID, int property, bool current);
|
||||
bool isXInputConnected(S32 controllerID);
|
||||
S32 getXInputState(S32 controllerID, S32 property, bool current);
|
||||
|
||||
// Console interface:
|
||||
const char* getJoystickAxesString( U32 deviceID );
|
||||
|
||||
bool rumble( const char *pDeviceName, float x, float y );
|
||||
bool rumble( const char *pDeviceName, F32 x, F32 y );
|
||||
};
|
||||
|
||||
#endif // _H_WINDIRECTINPUT_
|
||||
|
|
|
|||
|
|
@ -1140,7 +1140,7 @@ void Platform::getVolumeNamesList( Vector<const char*>& out_rNameVector, bool bO
|
|||
|
||||
out_rNameVector.clear();
|
||||
|
||||
for(int i = 0; i < 32; i++ )
|
||||
for(S32 i = 0; i < 32; i++ )
|
||||
{
|
||||
dMemset(driveLetter,0,12);
|
||||
if( dwDrives & dwMask )
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ void dRealFree(void* p)
|
|||
free(p);
|
||||
}
|
||||
|
||||
void *dMalloc_aligned(dsize_t in_size, int alignment)
|
||||
void *dMalloc_aligned(dsize_t in_size, S32 alignment)
|
||||
{
|
||||
return _mm_malloc(in_size, alignment);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ String Platform::localTimeToString( const LocalTime < )
|
|||
|
||||
TCHAR buffer[1024] = {0};
|
||||
|
||||
int result = 0;
|
||||
S32 result = 0;
|
||||
|
||||
String outStr;
|
||||
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ S32 PASCAL WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, S32)
|
|||
// Add the word to the argument list.
|
||||
if (*word)
|
||||
{
|
||||
int len = ptr - word;
|
||||
S32 len = ptr - word;
|
||||
char *arg = (char *) dMalloc(len + 1);
|
||||
dStrncpy(arg, word, len);
|
||||
arg[len] = 0;
|
||||
|
|
@ -373,12 +373,12 @@ S32 PASCAL WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, S32)
|
|||
|
||||
extern "C"
|
||||
{
|
||||
bool torque_engineinit(int argc, const char **argv);
|
||||
int torque_enginetick();
|
||||
bool torque_engineinit(S32 argc, const char **argv);
|
||||
S32 torque_enginetick();
|
||||
bool torque_engineshutdown();
|
||||
};
|
||||
|
||||
int TorqueMain(int argc, const char **argv)
|
||||
S32 TorqueMain(int argc, const char **argv)
|
||||
{
|
||||
if (!torque_engineinit(argc, argv))
|
||||
return 1;
|
||||
|
|
@ -442,7 +442,7 @@ S32 torque_winmain( HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, S32)
|
|||
// Add the word to the argument list.
|
||||
if (*word)
|
||||
{
|
||||
int len = ptr - word;
|
||||
S32 len = ptr - word;
|
||||
char *arg = (char *) dMalloc(len + 1);
|
||||
dStrncpy(arg, word, len);
|
||||
arg[len] = 0;
|
||||
|
|
@ -499,7 +499,7 @@ bool Platform::openWebBrowser( const char* webAddress )
|
|||
return( false );
|
||||
}
|
||||
|
||||
if ( RegQueryValueEx( regKey, dT(""), NULL, NULL, (unsigned char *)sWebKey, &size ) != ERROR_SUCCESS )
|
||||
if ( RegQueryValueEx( regKey, dT(""), NULL, NULL, (U8 *)sWebKey, &size ) != ERROR_SUCCESS )
|
||||
{
|
||||
Con::errorf( ConsoleLogEntry::General, "Platform::openWebBrowser - Failed to query the open command registry key!!!" );
|
||||
return( false );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue