Browse Source

engine: client: fixed compilation errors on Android

pull/2/head
SNMetamorph 2 years ago committed by a1batross
parent
commit
641f0632ef
  1. 4
      engine/client/vgui/vgui_draw.c
  2. 16
      engine/platform/android/android.c
  3. 4
      engine/platform/sdl/in_sdl.c

4
engine/client/vgui/vgui_draw.c

@ -24,7 +24,7 @@ GNU General Public License for more details.
#include "platform/platform.h" #include "platform/platform.h"
static enum VGUI_KeyCode s_pVirtualKeyTrans[256]; 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 HINSTANCE s_pVGuiSupport; // vgui_support library
static convar_t *vgui_utf8 = NULL; 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; *_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 ); Platform_SetCursorType( cursor );
s_currentCursor = cursor; s_currentCursor = cursor;

16
engine/platform/android/android.c

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

4
engine/platform/sdl/in_sdl.c

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

Loading…
Cancel
Save