Skip to content

Commit

Permalink
engine: platform: implement generic GetNativeObject for POSIX systems…
Browse files Browse the repository at this point in the history
… without SDL2
  • Loading branch information
a1batross committed Jun 7, 2023
1 parent 1855fab commit b84aba6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
5 changes: 0 additions & 5 deletions engine/platform/linux/vid_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,6 @@ void Platform_RunEvents( void )

}

void *Platform_GetNativeObject( const char *name )
{
return NULL;
}

void GAME_EXPORT Platform_GetMousePos( int *x, int *y )
{
*x = *y = 0;
Expand Down
14 changes: 11 additions & 3 deletions engine/platform/posix/sys_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,20 @@ void Posix_Daemonize( void )
}

#if !XASH_SDL && !XASH_ANDROID

void Platform_Init( void )
{
Posix_Daemonize();
}
void Platform_Shutdown( void ) {}

void Platform_Shutdown( void )
{

}

void *Platform_GetNativeObject( const char *name )
{
return NULL;
}
#endif

#if XASH_TIMER == TIMER_POSIX
Expand All @@ -161,7 +169,7 @@ double Platform_DoubleTime( void )
struct timespec ts;
#if XASH_IRIX
clock_gettime( CLOCK_SGI_CYCLE, &ts );
#else
#else
clock_gettime( CLOCK_MONOTONIC, &ts );
#endif
return (double) ts.tv_sec + (double) ts.tv_nsec/1000000000.0;
Expand Down

0 comments on commit b84aba6

Please sign in to comment.