Emscripten fix

This commit is contained in:
Joshua Granick
2018-08-09 14:27:57 -07:00
parent 3b5f666aed
commit ad3784f245

View File

@@ -701,6 +701,7 @@ namespace lime {
HL_PRIM vbyte* hl_lime_file_dialog_open_directory (hl_vstring* title, hl_vstring* filter, hl_vstring* defaultPath) {
#ifndef EMSCRIPTEN
#ifdef LIME_TINYFILEDIALOGS
std::wstring* _title = hxstring_to_wstring (title);
@@ -728,6 +729,7 @@ namespace lime {
}
#endif
#endif
return NULL;
@@ -770,6 +772,7 @@ namespace lime {
HL_PRIM vbyte* hl_lime_file_dialog_open_file (hl_vstring* title, hl_vstring* filter, hl_vstring* defaultPath) {
#ifndef EMSCRIPTEN
#ifdef LIME_TINYFILEDIALOGS
std::wstring* _title = hxstring_to_wstring (title);
@@ -797,6 +800,7 @@ namespace lime {
}
#endif
#endif
return NULL;
@@ -839,6 +843,7 @@ namespace lime {
HL_PRIM hl_varray* hl_lime_file_dialog_open_files (hl_vstring* title, hl_vstring* filter, hl_vstring* defaultPath) {
#ifndef EMSCRIPTEN
#ifdef LIME_TINYFILEDIALOGS
std::wstring* _title = hxstring_to_wstring (title);
@@ -869,6 +874,7 @@ namespace lime {
#else
hl_varray* result = hl_alloc_array (&hlt_bytes, 0);
#endif
#endif
return result;
@@ -910,6 +916,7 @@ namespace lime {
HL_PRIM vbyte* hl_lime_file_dialog_save_file (hl_vstring* title, hl_vstring* filter, hl_vstring* defaultPath) {
#ifndef EMSCRIPTEN
#ifdef LIME_TINYFILEDIALOGS
std::wstring* _title = hxstring_to_wstring (title);
@@ -937,6 +944,7 @@ namespace lime {
}
#endif
#endif
return NULL;
@@ -2635,6 +2643,8 @@ namespace lime {
HL_PRIM vbyte* hl_lime_system_get_device_model () {
#ifndef EMSCRIPTEN
std::wstring* model = System::GetDeviceModel ();
if (model) {
@@ -2646,12 +2656,12 @@ namespace lime {
return (vbyte*)result;
} else {
return 0;
}
#endif
return 0;
}
@@ -2676,6 +2686,8 @@ namespace lime {
HL_PRIM vbyte* hl_lime_system_get_device_vendor () {
#ifndef EMSCRIPTEN
std::wstring* vendor = System::GetDeviceVendor ();
if (vendor) {
@@ -2687,12 +2699,12 @@ namespace lime {
return (vbyte*)result;
} else {
return 0;
}
#endif
return 0;
}
@@ -2717,6 +2729,8 @@ namespace lime {
HL_PRIM vbyte* hl_lime_system_get_directory (int type, hl_vstring* company, hl_vstring* title) {
#ifndef EMSCRIPTEN
std::wstring* path = System::GetDirectory ((SystemDirectory)type, company ? (char*)hl_to_utf8 ((const uchar*)company->bytes) : NULL, title ? (char*)hl_to_utf8 ((const uchar*)title->bytes) : NULL);
if (path) {
@@ -2728,12 +2742,12 @@ namespace lime {
return (vbyte*)result;
} else {
return 0;
}
#endif
return 0;
}
@@ -2809,6 +2823,8 @@ namespace lime {
HL_PRIM vbyte* hl_lime_system_get_platform_label () {
#ifndef EMSCRIPTEN
std::wstring* label = System::GetPlatformLabel ();
if (label) {
@@ -2820,12 +2836,12 @@ namespace lime {
return (vbyte*)result;
} else {
return 0;
}
#endif
return 0;
}
@@ -2850,6 +2866,8 @@ namespace lime {
HL_PRIM vbyte* hl_lime_system_get_platform_name () {
#ifndef EMSCRIPTEN
std::wstring* name = System::GetPlatformName ();
if (name) {
@@ -2861,12 +2879,12 @@ namespace lime {
return (vbyte*)result;
} else {
return 0;
}
#endif
return 0;
}
@@ -2891,6 +2909,8 @@ namespace lime {
HL_PRIM vbyte* hl_lime_system_get_platform_version () {
#ifndef EMSCRIPTEN
std::wstring* version = System::GetPlatformVersion ();
if (version) {
@@ -2902,12 +2922,12 @@ namespace lime {
return (vbyte*)result;
} else {
return 0;
}
#endif
return 0;
}