engine: platform: make most input platform functions optional, patch fbdev/evdev to compile

This commit is contained in:
Alibek Omarov
2025-05-11 16:14:36 +03:00
parent 8209a8a681
commit ffc8bf30d7
7 changed files with 54 additions and 126 deletions

View File

@@ -98,7 +98,7 @@ static void SDLash_KeyEvent( SDL_KeyboardEvent key )
int down = key.state != SDL_RELEASED;
int keynum = key.keysym.sym;
if( SDL_IsTextInputActive( ) && down )
if( host.textmode && down )
{
// this is how engine understands ctrl+c, ctrl+v and other hotkeys
if( cls.key_dest != key_game && FBitSet( SDL_GetModState(), KMOD_CTRL ))

View File

@@ -95,17 +95,6 @@ void Platform_SetClipboardText( const char *buffer )
{
}
/*
=============
Platform_EnableTextInput
=============
*/
void Platform_EnableTextInput( qboolean enable )
{
}
/*
========================
Platform_SetCursorType
@@ -163,14 +152,3 @@ void Platform_SetMouseGrab( qboolean enable )
{
SDL_WM_GrabInput( enable ? SDL_GRAB_ON : SDL_GRAB_OFF );
}
/*
========================
Platform_GetKeyModifiers
========================
*/
key_modifier_t Platform_GetKeyModifiers( void )
{
return KeyModifier_None;
}