aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/haiku/audio_driver_media_kit.cpp3
-rw-r--r--platform/haiku/haiku_direct_window.cpp4
-rw-r--r--platform/nacl/os_nacl.cpp3
-rw-r--r--platform/windows/detect.py2
-rw-r--r--platform/windows/os_windows.cpp13
-rw-r--r--platform/windows/os_windows.h2
-rw-r--r--platform/winrt/os_winrt.cpp3
-rw-r--r--platform/x11/detect.py6
8 files changed, 20 insertions, 16 deletions
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp
index 96fd868a8..c7eed1c7c 100644
--- a/platform/haiku/audio_driver_media_kit.cpp
+++ b/platform/haiku/audio_driver_media_kit.cpp
@@ -118,8 +118,7 @@ void AudioDriverMediaKit::unlock() {
}
void AudioDriverMediaKit::finish() {
- if (player)
- delete player;
+ delete player;
if (samples_in) {
memdelete_arr(samples_in);
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index 3914ee272..184d64f84 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -16,9 +16,7 @@ HaikuDirectWindow::HaikuDirectWindow(BRect p_frame)
HaikuDirectWindow::~HaikuDirectWindow() {
- if (update_runner) {
- delete update_runner;
- }
+ delete update_runner;
}
void HaikuDirectWindow::SetHaikuGLView(HaikuGLView* p_view) {
diff --git a/platform/nacl/os_nacl.cpp b/platform/nacl/os_nacl.cpp
index 43f6bd9c0..de6a15525 100644
--- a/platform/nacl/os_nacl.cpp
+++ b/platform/nacl/os_nacl.cpp
@@ -144,8 +144,7 @@ void OSNacl::finalize_core() {
if (mempool_dynamic)
memdelete( mempool_dynamic );
- if (mempool_static)
- delete mempool_static;
+ delete mempool_static;
};
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index a1366e763..c00d94a4f 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -262,7 +262,7 @@ def configure(env):
env.Append(CCFLAGS=["/I"+DIRECTX_PATH+"/Include"])
env.Append(LIBPATH=[DIRECTX_PATH+"/Lib/x86"])
env['ENV'] = os.environ;
- env["x86_opt_vc"]=True
+ env["x86_opt_vc"]=env["bits"]!="64"
else:
# Workaround for MinGW. See:
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 95bfa2ea9..79d8aa1a0 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1144,8 +1144,7 @@ void OS_Windows::finalize_core() {
if (mempool_dynamic)
memdelete( mempool_dynamic );
- if (mempool_static)
- delete mempool_static;
+ delete mempool_static;
TCPServerWinsock::cleanup();
@@ -1681,10 +1680,16 @@ uint64_t OS_Windows::get_unix_time() const {
return (*(uint64_t*)&ft - *(uint64_t*)&fep) / 10000000;
};
-uint64_t OS_Windows::get_system_time_msec() const {
+uint64_t OS_Windows::get_system_time_secs() const {
SYSTEMTIME st;
GetSystemTime(&st);
- return st.wMilliseconds;
+ FILETIME ft;
+ SystemTimeToFileTime(&st,&ft);
+ uint64_t ret;
+ ret=ft.dwHighDateTime;
+ ret<<=32;
+ ret|=ft.dwLowDateTime;
+ return ret;
}
void OS_Windows::delay_usec(uint32_t p_usec) const {
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index dfa2b4059..69bdcda27 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -231,7 +231,7 @@ public:
virtual Time get_time(bool utc) const;
virtual TimeZoneInfo get_time_zone_info() const;
virtual uint64_t get_unix_time() const;
- virtual uint64_t get_system_time_msec() const;
+ virtual uint64_t get_system_time_secs() const;
virtual bool can_draw() const;
virtual Error set_cwd(const String& p_cwd);
diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp
index 7c4b2dc66..f507c1aae 100644
--- a/platform/winrt/os_winrt.cpp
+++ b/platform/winrt/os_winrt.cpp
@@ -345,8 +345,7 @@ void OSWinrt::finalize_core() {
if (mempool_dynamic)
memdelete( mempool_dynamic );
- if (mempool_static)
- delete mempool_static;
+ delete mempool_static;
}
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 344545ab8..e035c7299 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -147,9 +147,13 @@ def configure(env):
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
- if platform.system() == 'Linux':
+
+ if os.system("pkg-config --exists alsa")==0:
+ print("Enabling ALSA")
env.Append(CPPFLAGS=["-DALSA_ENABLED"])
env.Append(LIBS=['asound'])
+ else:
+ print("ALSA libraries not found, disabling driver")
if (env["gamepad"]=="yes" and platform.system() == "Linux"):
# pkg-config returns 0 when the lib exists...