summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-02-15 02:01:39 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-02-15 02:02:41 -0300
commit9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852 (patch)
treed25ef63dfe50d59987b4a611c1d1773185a3e35d /platform/windows
parentb0870e487c6cc68bb0a2cef7174f3f5697667a2e (diff)
-fixed bug in Button now exporting font property
-made GUI Theme editor usable -editor does not allow to export or create .pck in the same path as a project -changed .pck format (lacked support for versioning so couldn't change it), previous was causing crashes and is now incompatible, just re-export. -will not look for .pck files recursively, was causing unexpected behaviors -fixed execution of Godot in paths with non unicode characters in Windows, OSX and Linux.
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/os_windows.cpp17
-rw-r--r--platform/windows/os_windows.h1
2 files changed, 16 insertions, 2 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index eaf62a3e0a..090fe64b19 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1475,10 +1475,14 @@ Error OS_Windows::execute(const String& p_path, const List<String>& p_arguments,
ZeroMemory( &pi.si, sizeof(pi.si) );
pi.si.cb = sizeof(pi.si);
ZeroMemory( &pi.pi, sizeof(pi.pi) );
+ LPSTARTUPINFOW si_w = (LPSTARTUPINFOW) &pi.si;
print_line("running cmdline: "+cmdline);
-
- int ret = CreateProcess(NULL, (LPSTR)cmdline.utf8().get_data(), NULL, NULL, 0, NORMAL_PRIORITY_CLASS, NULL, NULL, &pi.si, &pi.pi);
+ Vector<CharType> modstr; //windows wants to change this no idea why
+ modstr.resize(cmdline.size());
+ for(int i=0;i<cmdline.size();i++)
+ modstr[i]=cmdline[i];
+ int ret = CreateProcessW(NULL, modstr.ptr(), NULL, NULL, 0, NORMAL_PRIORITY_CLASS, NULL, NULL, si_w, &pi.pi);
ERR_FAIL_COND_V(ret == 0, ERR_CANT_FORK);
if (p_blocking) {
@@ -1523,6 +1527,15 @@ Error OS_Windows::set_cwd(const String& p_cwd) {
return OK;
}
+String OS_Windows::get_executable_path() const {
+
+ wchar_t bufname[4096];
+ GetModuleFileNameW(NULL,bufname,4096);
+ String s= bufname;
+ print_line("EXEC PATHPó: "+s);
+ return s;
+}
+
void OS_Windows::set_icon(const Image& p_icon) {
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 5587d89763..6d75ca8d7b 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -235,6 +235,7 @@ public:
void set_cursor_shape(CursorShape p_shape);
void set_icon(const Image& p_icon);
+ virtual String get_executable_path() const;
virtual String get_locale() const;