mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
Fix code for Android
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#if defined( USE_SDL )
|
||||
#if defined( LINUX ) || defined( USE_SDL )
|
||||
|
||||
// We lazily load the SDL shared object, and only reference functions if it's
|
||||
// available, so this can be included on the dedicated server too.
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "xbox/xbox_console.h"
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#include "tier0/etwprof.h"
|
||||
|
||||
#ifndef STEAM
|
||||
@@ -313,6 +317,10 @@ static SpewRetval_t _SpewMessage( SpewType_t spewType, const char *pGroupName, i
|
||||
ret = s_SpewOutputFunc( spewType, pTempBuffer );
|
||||
g_pSpewInfo = (int)NULL;
|
||||
|
||||
#ifdef ANDROID
|
||||
__android_log_print( ANDROID_LOG_INFO, "SRCENGINE", "%s", pTempBuffer );
|
||||
#endif
|
||||
|
||||
switch (ret)
|
||||
{
|
||||
// Asserts put the break into the macro so it occurs in the right place
|
||||
@@ -903,6 +911,10 @@ void COM_TimestampedLog( char const *fmt, ... )
|
||||
XBX_rTimeStampLog( curStamp, string );
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
__android_log_print( ANDROID_LOG_INFO, "SRCENGINE", "%s", string );
|
||||
#endif
|
||||
|
||||
if ( IsPC() )
|
||||
{
|
||||
// If ETW profiling is enabled then do it only.
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
#include <linux/stat.h>
|
||||
#endif
|
||||
|
||||
#include "tier0/memdbgon.h"
|
||||
// Benchmark mode uses this heavy-handed method
|
||||
|
||||
@@ -23,8 +23,13 @@
|
||||
#elif defined(POSIX)
|
||||
|
||||
#if !defined(OSX)
|
||||
#if defined(ANDROID)
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/unistd.h>
|
||||
#endif
|
||||
#define sem_unlink( arg )
|
||||
#define OS_TO_PTHREAD(x) (x)
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user