Skip to content

Commit

Permalink
engine: get rid of SendKeyEvents function, it only listened for WM_QU…
Browse files Browse the repository at this point in the history
…IT on Windows and we don't use that with SDL
  • Loading branch information
a1batross committed Dec 27, 2024
1 parent d50927f commit 3576e47
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 25 deletions.
2 changes: 0 additions & 2 deletions engine/client/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,6 @@ Called every frame, even if not generating commands
*/
void Host_InputFrame( void )
{
Platform_SendKeyEvents();

IN_Commands();

IN_MouseMove();
Expand Down
1 change: 0 additions & 1 deletion engine/common/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ void Sys_DebugBreak( void );
#define Sys_GetParmFromCmdLine( parm, out ) _Sys_GetParmFromCmdLine( parm, out, sizeof( out ))
qboolean _Sys_GetParmFromCmdLine( const char *parm, char *out, size_t size );
qboolean Sys_GetIntFromCmdLine( const char *parm, int *out );
void Sys_SendKeyEvents( void );
void Sys_Print( const char *pMsg );
void Sys_PrintLog( const char *pMsg );
void Sys_InitLog( void );
Expand Down
8 changes: 0 additions & 8 deletions engine/platform/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,6 @@ static inline char *Platform_Input( void )
#endif
}

#if XASH_WIN32
void Platform_SendKeyEvents( void );
#else
static inline void Platform_SendKeyEvents( void )
{
}
#endif

/*
==============================================================================
Expand Down
14 changes: 0 additions & 14 deletions engine/platform/win32/sys_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,3 @@ void Platform_MessageBox( const char *title, const char *message, qboolean paren
}
#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 );
}
}

0 comments on commit 3576e47

Please sign in to comment.