diff options
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/SCsub | 2 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 10 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/platform/windows/SCsub b/platform/windows/SCsub index 914cee0fa1..e53eb7af34 100644 --- a/platform/windows/SCsub +++ b/platform/windows/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 0ca5d3bd0f..286f5fb0b7 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1366,13 +1366,16 @@ void OS_Windows::set_mouse_mode(MouseMode p_mode) { POINT pos = { (int) center.x, (int) center.y }; ClientToScreen(hWnd, &pos); SetCursorPos(pos.x, pos.y); - ShowCursor(false); } else { - ShowCursor(true); ReleaseCapture(); ClipCursor(NULL); } + if (p_mode == MOUSE_MODE_CAPTURED || p_mode == MOUSE_MODE_HIDDEN) { + hCursor = SetCursor(NULL); + } else { + SetCursor(hCursor); + } } OS_Windows::MouseMode OS_Windows::get_mouse_mode() const{ @@ -2418,6 +2421,9 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) { #ifdef RTAUDIO_ENABLED AudioDriverManagerSW::add_driver(&driver_rtaudio); #endif +#ifdef XAUDIO2_ENABLED + AudioDriverManagerSW::add_driver(&driver_xaudio2); +#endif } diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 70ef694957..903dd10c70 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -41,6 +41,9 @@ #include "servers/audio/audio_server_sw.h" #include "servers/audio/sample_manager_sw.h" #include "drivers/rtaudio/audio_driver_rtaudio.h" +#ifdef XAUDIO2_ENABLED +#include "drivers/xaudio2/audio_driver_xaudio2.h" +#endif #include "servers/spatial_sound/spatial_sound_server_sw.h" #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h" #include "drivers/unix/ip_unix.h" @@ -137,6 +140,9 @@ class OS_Windows : public OS { #ifdef RTAUDIO_ENABLED AudioDriverRtAudio driver_rtaudio; #endif +#ifdef XAUDIO2_ENABLED + AudioDriverXAudio2 driver_xaudio2; +#endif void _drag_event(int p_x, int p_y, int idx); void _touch_event(bool p_pressed, int p_x, int p_y, int idx); |