engine: move Sys_SendKeyEvents to platform/win32
This commit is contained in:
parent
f41450127a
commit
bd0d6644e0
4 changed files with 24 additions and 17 deletions
|
@ -633,7 +633,7 @@ Called every frame, even if not generating commands
|
||||||
*/
|
*/
|
||||||
void Host_InputFrame( void )
|
void Host_InputFrame( void )
|
||||||
{
|
{
|
||||||
Sys_SendKeyEvents ();
|
Platform_SendKeyEvents();
|
||||||
|
|
||||||
IN_Commands();
|
IN_Commands();
|
||||||
|
|
||||||
|
|
|
@ -234,22 +234,6 @@ qboolean Sys_GetIntFromCmdLine( const char* argName, int *out )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sys_SendKeyEvents( void )
|
|
||||||
{
|
|
||||||
#if XASH_WIN32
|
|
||||||
MSG msg;
|
|
||||||
|
|
||||||
while( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ))
|
|
||||||
{
|
|
||||||
if( !GetMessage( &msg, NULL, 0, 0 ))
|
|
||||||
Sys_Quit ();
|
|
||||||
|
|
||||||
TranslateMessage( &msg );
|
|
||||||
DispatchMessage( &msg );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// DLL'S MANAGER SYSTEM
|
// DLL'S MANAGER SYSTEM
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
|
@ -227,6 +227,14 @@ static inline void Platform_SetTimer( float time )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if XASH_WIN32
|
||||||
|
void Platform_SendKeyEvents( void );
|
||||||
|
#else
|
||||||
|
static inline void Platform_SendKeyEvents( void )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
|
|
@ -55,3 +55,18 @@ void Platform_MessageBox( const char *title, const char *message, qboolean paren
|
||||||
MessageBox( parentMainWindow ? host.hWnd : NULL, message, title, MB_OK|MB_SETFOREGROUND|MB_ICONSTOP );
|
MessageBox( parentMainWindow ? host.hWnd : NULL, message, title, MB_OK|MB_SETFOREGROUND|MB_ICONSTOP );
|
||||||
}
|
}
|
||||||
#endif // XASH_MESSAGEBOX == MSGBOX_WIN32
|
#endif // XASH_MESSAGEBOX == MSGBOX_WIN32
|
||||||
|
|
||||||
|
// I don't know why we need this or what this does
|
||||||
|
void Platform_SendKeyEvents( void )
|
||||||
|
{
|
||||||
|
MSG msg;
|
||||||
|
|
||||||
|
while( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ))
|
||||||
|
{
|
||||||
|
if( !GetMessage( &msg, NULL, 0, 0 ))
|
||||||
|
Sys_Quit ();
|
||||||
|
|
||||||
|
TranslateMessage( &msg );
|
||||||
|
DispatchMessage( &msg );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue