engine: client: fixed compilation errors on Android

This commit is contained in:
SNMetamorph 2022-04-27 23:09:20 +04:00 committed by a1batross
parent 974f0787a4
commit 641f0632ef
3 changed files with 20 additions and 4 deletions

View File

@ -24,7 +24,7 @@ GNU General Public License for more details.
#include "platform/platform.h"
static enum VGUI_KeyCode s_pVirtualKeyTrans[256];
static enum VGUI_DefaultCursor s_currentCursor;
static VGUI_DefaultCursor s_currentCursor;
static HINSTANCE s_pVGuiSupport; // vgui_support library
static convar_t *vgui_utf8 = NULL;
@ -48,7 +48,7 @@ void GAME_EXPORT VGUI_GetMousePos( int *_x, int *_y )
*_x = x / xscale, *_y = y / yscale;
}
void GAME_EXPORT VGUI_CursorSelect( enum VGUI_DefaultCursor cursor )
void GAME_EXPORT VGUI_CursorSelect( VGUI_DefaultCursor cursor )
{
Platform_SetCursorType( cursor );
s_currentCursor = cursor;

View File

@ -776,17 +776,29 @@ void Platform_ShellExecute( const char *path, const char *parms )
// no need to free jstr
}
void Platform_GetClipboardText( char *buffer, size_t size )
int Platform_GetClipboardText( char *buffer, size_t size )
{
// stub
if( size ) buffer[0] = 0;
return 0;
}
void Platform_SetClipboardText( const char *buffer, size_t size )
void Platform_SetClipboardText( const char *buffer )
{
// stub
}
void Platform_SetCursorType( VGUI_DefaultCursor cursor )
{
// stub
}
key_modifier_t Platform_GetKeyModifiers( void )
{
// stub
return KeyModifier_None;
}
void Platform_PreCreateMove( void )
{
// stub

View File

@ -332,6 +332,7 @@ Platform_GetKeyModifiers
*/
key_modifier_t Platform_GetKeyModifiers( void )
{
#if SDL_VERSION_ATLEAST( 2, 0, 0 )
SDL_Keymod modFlags;
key_modifier_t resultFlags;
@ -359,6 +360,9 @@ key_modifier_t Platform_GetKeyModifiers( void )
SetBits( resultFlags, KeyModifier_LeftSuper );
return resultFlags;
#else
return KeyModifier_None;
#endif
}
#endif // XASH_DEDICATED