Fix Android compile
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<set name="LIME_HARFBUZZ" value="1" />
|
||||
<!-- <set name="LIME_NEKO" value="1" if="linux" /> -->
|
||||
<set name="LIME_OGG" value="1" />
|
||||
<set name="LIME_OPENAL" value="1" />
|
||||
<set name="LIME_OPENAL" value="1" unless="android" />
|
||||
<set name="LIME_OPENGL" value="1" />
|
||||
<set name="LIME_PNG" value="1" />
|
||||
<set name="LIME_SDL" value="1" />
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
|
||||
#ifdef ANDROID
|
||||
#define LOG_SOUND(args,...) ELOG(args, ##__VA_ARGS__)
|
||||
#define LOG_SOUND(args,...) __android_log_print(ANDROID_LOG_INFO, "Lime", args, ##__VA_ARGS__)
|
||||
#else
|
||||
#ifdef IPHONE
|
||||
//#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
|
||||
|
||||
@@ -51,6 +51,20 @@ namespace lime {
|
||||
};
|
||||
|
||||
|
||||
#ifdef ANDROID
|
||||
ByteArray AndroidGetAssetBytes(const char *);
|
||||
|
||||
struct FileInfo
|
||||
{
|
||||
int fd;
|
||||
off_t offset;
|
||||
off_t length;
|
||||
};
|
||||
|
||||
FileInfo AndroidGetAssetFD(const char *);
|
||||
#endif
|
||||
|
||||
|
||||
/*#ifdef HX_WINDOWS
|
||||
typedef wchar_t OSChar;
|
||||
#define val_os_string val_wstring
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace lime {
|
||||
|
||||
|
||||
extern int fclose (FILE *stream);
|
||||
extern FILE *fdopen (int fd, const char *mode);
|
||||
extern FILE* fopen (const char *filename, const char *mode);
|
||||
//extern FILE* freopen (const char *filename, const char *mode, FILE *stream);
|
||||
extern size_t fread (void *ptr, size_t size, size_t count, FILE *stream);
|
||||
|
||||
Submodule project/lib/sdl updated: c3405178a2...2c58bd673b
@@ -33,6 +33,7 @@ typedef uint64_t __int64;
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <android/log.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#ifdef TIZEN
|
||||
|
||||
@@ -89,6 +89,33 @@ namespace lime {
|
||||
}
|
||||
|
||||
|
||||
// Put in asset stubs for now, until we have a final system in place
|
||||
|
||||
#ifdef ANDROID
|
||||
FileInfo AndroidGetAssetFD(const char *inResource)
|
||||
{
|
||||
FileInfo info;
|
||||
info.fd = 0;
|
||||
info.offset = 0;
|
||||
info.length = 0;
|
||||
|
||||
// TODO
|
||||
|
||||
return info;
|
||||
|
||||
}
|
||||
|
||||
|
||||
ByteArray AndroidGetAssetBytes(const char *inResource) {
|
||||
|
||||
ByteArray result;
|
||||
|
||||
// TODO
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,13 @@ namespace lime {
|
||||
}
|
||||
|
||||
|
||||
FILE *fdopen (int fd, const char *mode) {
|
||||
|
||||
return ::fdopen (fd, mode);
|
||||
|
||||
}
|
||||
|
||||
|
||||
FILE* fopen (const char *filename, const char *mode) {
|
||||
|
||||
#ifdef HX_MACOS
|
||||
|
||||
Reference in New Issue
Block a user