diff options
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/joypad_windows.cpp | 4 | ||||
-rw-r--r-- | platform/windows/joypad_windows.h | 2 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 10 |
3 files changed, 9 insertions, 7 deletions
diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp index d1454c9096..2a5c8a7763 100644 --- a/platform/windows/joypad_windows.cpp +++ b/platform/windows/joypad_windows.cpp @@ -194,7 +194,7 @@ void JoypadWindows::setup_joypad_object(const DIDEVICEOBJECTINSTANCE *ob, int p_ HRESULT res; DIPROPRANGE prop_range; DIPROPDWORD dilong; - DWORD ofs; + LONG ofs; if (ob->guidType == GUID_XAxis) ofs = DIJOFS_X; else if (ob->guidType == GUID_YAxis) @@ -395,7 +395,7 @@ void JoypadWindows::process_joypads() { // on mingw, these constants are not constants int count = 8; - unsigned int axes[] = { DIJOFS_X, DIJOFS_Y, DIJOFS_Z, DIJOFS_RX, DIJOFS_RY, DIJOFS_RZ, DIJOFS_SLIDER(0), DIJOFS_SLIDER(1) }; + LONG axes[] = { DIJOFS_X, DIJOFS_Y, DIJOFS_Z, DIJOFS_RX, DIJOFS_RY, DIJOFS_RZ, (LONG)DIJOFS_SLIDER(0), (LONG)DIJOFS_SLIDER(1) }; int values[] = { js.lX, js.lY, js.lZ, js.lRx, js.lRy, js.lRz, js.rglSlider[0], js.rglSlider[1] }; for (int j = 0; j < joy->joy_axis.size(); j++) { diff --git a/platform/windows/joypad_windows.h b/platform/windows/joypad_windows.h index c961abf0a5..223b44fcd6 100644 --- a/platform/windows/joypad_windows.h +++ b/platform/windows/joypad_windows.h @@ -77,7 +77,7 @@ private: DWORD last_pad; LPDIRECTINPUTDEVICE8 di_joy; - List<DWORD> joy_axis; + List<LONG> joy_axis; GUID guid; dinput_gamepad() { diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index f73516b370..b108d74b2e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -244,7 +244,7 @@ void OS_Windows::finalize_core() { } Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { - String path = p_path; + String path = p_path.replace("/", "\\"); if (!FileAccess::exists(path)) { //this code exists so gdnative can load .dll files from within the executable path @@ -412,8 +412,10 @@ String OS_Windows::_quote_command_line_argument(const String &p_text) const { } Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) { + String path = p_path.replace("/", "\\"); + if (p_blocking && r_pipe) { - String argss = _quote_command_line_argument(p_path); + String argss = _quote_command_line_argument(path); for (const List<String>::Element *E = p_arguments.front(); E; E = E->next()) { argss += " " + _quote_command_line_argument(E->get()); } @@ -446,7 +448,7 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, return OK; } - String cmdline = _quote_command_line_argument(p_path); + String cmdline = _quote_command_line_argument(path); const List<String>::Element *I = p_arguments.front(); while (I) { cmdline += " " + _quote_command_line_argument(I->get()); @@ -509,7 +511,7 @@ Error OS_Windows::set_cwd(const String &p_cwd) { String OS_Windows::get_executable_path() const { WCHAR bufname[4096]; GetModuleFileNameW(nullptr, bufname, 4096); - String s = String::utf16((const char16_t *)bufname); + String s = String::utf16((const char16_t *)bufname).replace("\\", "/"); return s; } |