summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-02-13 18:03:28 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-02-13 18:03:28 -0300
commit58cda02a389759d18176216c06f375d364cefef1 (patch)
tree4102902585d12ea6807ceaee1370136d29b601e1 /platform/windows
parent1adc330b68b1f6ca18aac05daf88c7d4d757fd0a (diff)
-fixed export templates not loading/exporting on Windows
-fixed TouchScreenButton with stretch2d -fixed(?) OSX crash on startup (test!!) -compilation fixes on windows -CollisionPolygon editor works again -find buttons en find dialog -TileMap editor cleanup (removed "error", made nicer) -viewport flicker fixed -make .scn default extension for saving scenes -export the rest of the network classes to gdscript
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/os_windows.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index efeb813a2d..eaf62a3e0a 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1534,7 +1534,9 @@ void OS_Windows::set_icon(const Image& p_icon) {
/* Create temporary bitmap buffer */
int icon_len = 40 + h * w * 4;
- BYTE *icon_bmp = (BYTE*)alloca(icon_len);
+ Vector<BYTE> v;
+ v.resize(icon_len);
+ BYTE *icon_bmp = &v[0];
encode_uint32(40,&icon_bmp[0]);
encode_uint32(w,&icon_bmp[4]);
@@ -1582,7 +1584,11 @@ bool OS_Windows::has_environment(const String& p_var) const {
String OS_Windows::get_environment(const String& p_var) const {
- return getenv(p_var.utf8().get_data());
+ char* val = getenv(p_var.utf8().get_data());
+ if (val)
+ return val;
+
+ return "";
};
String OS_Windows::get_stdin_string(bool p_block) {