diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index 215cef9c..14c2d2c4 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -2939,10 +2939,15 @@ pfnGetMousePos */ static void GAME_EXPORT pfnGetMousePos( struct tagPOINT *ppt ) { + int x, y; + if( !ppt ) return; - Platform_GetMousePos( &ppt->x, &ppt->y ); + Platform_GetMousePos( &x, &y ); + + ppt->x = x; + ppt->y = y; } /* diff --git a/engine/client/identification.c b/engine/client/identification.c index b6745bd4..fefbaee7 100644 --- a/engine/client/identification.c +++ b/engine/client/identification.c @@ -471,7 +471,7 @@ static int ID_ProcessWMIC( bloomfilter_t *value, const wchar_t *cmdline ) return 0; pbuf = COM_ParseFile( buffer, token, sizeof( token )); // Header - while( pbuf = COM_ParseFile( pbuf, token, sizeof( token ))) + while(( pbuf = COM_ParseFile( pbuf, token, sizeof( token )))) { if( !ID_VerifyHEX( token )) continue; @@ -492,7 +492,7 @@ static int ID_CheckWMIC( bloomfilter_t value, const wchar_t *cmdline ) return 0; pbuf = COM_ParseFile( buffer, token, sizeof( token )); // Header - while( pbuf = COM_ParseFile( pbuf, token, sizeof( token ))) + while(( pbuf = COM_ParseFile( pbuf, token, sizeof( token )))) { bloomfilter_t filter; diff --git a/engine/client/input.c b/engine/client/input.c index ac29cd1d..9eff8d7a 100644 --- a/engine/client/input.c +++ b/engine/client/input.c @@ -26,12 +26,14 @@ GNU General Public License for more details. #include "cursor_type.h" #include "platform/platform.h" -void* in_mousecursor; -qboolean in_mouseactive; // false when not focus app -qboolean in_mouseinitialized; -qboolean in_mouse_suspended; -POINT in_lastvalidpos; -qboolean in_mouse_savedpos; +static qboolean in_mouseactive; // false when not focus app +static qboolean in_mouseinitialized; +static qboolean in_mouse_suspended; +static struct +{ + int x, y; +} in_lastvalidpos; +static qboolean in_mouse_savedpos; static int in_mstate = 0; static struct inputstate_s { diff --git a/engine/client/input.h b/engine/client/input.h index 432696af..1668fdfc 100644 --- a/engine/client/input.h +++ b/engine/client/input.h @@ -30,7 +30,6 @@ INPUT // // input.c // -extern qboolean in_mouseinitialized; void IN_Init( void ); void Host_InputFrame( void ); void IN_Shutdown( void ); diff --git a/engine/common/system.c b/engine/common/system.c index 9193b099..936b04fb 100644 --- a/engine/common/system.c +++ b/engine/common/system.c @@ -95,7 +95,7 @@ void Sys_DebugBreak( void ) Platform_SetMouseGrab( false ); } -#if _MSC_VER +#if XASH_WIN32 // both MSVC and MinGW support it __debugbreak(); #else // !_MSC_VER INLINE_RAISE( SIGINT ); diff --git a/engine/platform/win32/con_win.c b/engine/platform/win32/con_win.c index 9b0e5443..2776706f 100644 --- a/engine/platform/win32/con_win.c +++ b/engine/platform/win32/con_win.c @@ -201,7 +201,7 @@ static void Wcon_Clear_f( void ) Wcon_PrintInternal( "\n", 0 ); } -static void Wcon_EventUpArrow() +static void Wcon_EventUpArrow( void ) { int nLastCommandInHistory = s_wcd.inputLine + 1; if( nLastCommandInHistory > s_wcd.totalLines ) @@ -236,7 +236,7 @@ static void Wcon_EventUpArrow() s_wcd.cursorPosition = s_wcd.consoleTextLen; } -static void Wcon_EventDownArrow() +static void Wcon_EventDownArrow( void ) { if( s_wcd.browseLine == s_wcd.inputLine ) return; @@ -267,7 +267,7 @@ static void Wcon_EventDownArrow() s_wcd.cursorPosition = s_wcd.consoleTextLen; } -static void Wcon_EventLeftArrow() +static void Wcon_EventLeftArrow( void ) { if( s_wcd.cursorPosition == 0 ) return; @@ -276,7 +276,7 @@ static void Wcon_EventLeftArrow() s_wcd.cursorPosition--; } -static void Wcon_EventRightArrow() +static void Wcon_EventRightArrow( void ) { if( s_wcd.cursorPosition == s_wcd.consoleTextLen ) return; @@ -285,7 +285,7 @@ static void Wcon_EventRightArrow() s_wcd.cursorPosition++; } -static int Wcon_EventNewline() +static int Wcon_EventNewline( void ) { int nLen; @@ -315,7 +315,7 @@ static int Wcon_EventNewline() return nLen; } -static void Wcon_EventBackspace() +static void Wcon_EventBackspace( void ) { int nCount; @@ -347,7 +347,7 @@ static void Wcon_EventBackspace() s_wcd.browseLine = s_wcd.inputLine; } -static void Wcon_EventTab() +static void Wcon_EventTab( void ) { s_wcd.consoleText[s_wcd.consoleTextLen] = '\0'; Cmd_AutoComplete( s_wcd.consoleText ); @@ -385,7 +385,7 @@ static void Wcon_EventCharacter(char c) s_wcd.browseLine = s_wcd.inputLine; } -static void Wcon_UpdateStatusLine() +static void Wcon_UpdateStatusLine( void ) { COORD coord; WORD wAttrib; diff --git a/engine/platform/win32/net.h b/engine/platform/win32/net.h index ff2fe5b8..eb364e94 100644 --- a/engine/platform/win32/net.h +++ b/engine/platform/win32/net.h @@ -15,7 +15,7 @@ GNU General Public License for more details. #ifndef NET_H #define NET_H -#include +#include typedef int WSAsize_t; #endif // NET_H