Fix Windows build
This commit is contained in:
committed by
Joshua Granick
parent
3b0c6ced16
commit
d7064bd064
@@ -4,6 +4,10 @@
|
||||
|
||||
#include <app/Application.h>
|
||||
|
||||
#ifdef CreateWindow
|
||||
#undef CreateWindow
|
||||
#endif
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
@@ -12,10 +12,7 @@ namespace lime {
|
||||
|
||||
typedef unsigned char uint8;
|
||||
|
||||
//this was //HX_WINDOWS,
|
||||
//but we aren't using _wfopen by
|
||||
//default anymore
|
||||
#if 0
|
||||
#if HX_WINDOWS
|
||||
|
||||
typedef wchar_t OSChar;
|
||||
#define val_os_string val_wstring
|
||||
|
||||
@@ -164,26 +164,6 @@ extern int gFixedOrientation;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HX_WINDOWS
|
||||
ByteArray ByteArray::FromFile(const char *inFilename)
|
||||
{
|
||||
FILE *file = fopen(inFilename,"rb");
|
||||
if (!file)
|
||||
return ByteArray();
|
||||
|
||||
fseek(file,0,SEEK_END);
|
||||
int len = ftell(file);
|
||||
fseek(file,0,SEEK_SET);
|
||||
|
||||
ByteArray result(len);
|
||||
fread(result.Bytes(),len,1,file);
|
||||
fclose(file);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
value lime_byte_array_overwrite_file(value inFilename, value inBytes) {
|
||||
|
||||
// file is created if it doesn't exist,
|
||||
|
||||
Reference in New Issue
Block a user