summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorAnton Yabchinskiy <arn@bestmx.ru>2015-03-10 11:44:40 +0300
committerAnton Yabchinskiy <arn@bestmx.ru>2015-03-10 11:44:40 +0300
commit43713810deaadfec6a1656767cf5520073e58a06 (patch)
tree8b1c7e82562494e1889b1550b58b3d953f076696 /platform/windows
parent19a99afa81354ed69e1c07b6050aeb438e4ee2cb (diff)
parent91744e9ed3124ca48e0837ee72bfe7182fd31701 (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/detect.py4
-rw-r--r--platform/windows/os_windows.cpp11
2 files changed, 10 insertions, 5 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 16dd695c59..62bab00f7b 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -115,7 +115,7 @@ def configure(env):
env.Append(CCFLAGS=['/DGLES2_ENABLED'])
env.Append(CCFLAGS=['/DGLEW_ENABLED'])
- LIBS=['winmm','opengl32','dsound','kernel32','ole32','user32','gdi32', 'IPHLPAPI', 'wsock32', 'shell32','advapi32']
+ LIBS=['winmm','opengl32','dsound','kernel32','ole32','user32','gdi32', 'IPHLPAPI','Shlwapi', 'wsock32', 'shell32','advapi32']
env.Append(LINKFLAGS=[p+env["LIBSUFFIX"] for p in LIBS])
env.Append(LIBPATH=[os.getenv("WindowsSdkDir")+"/Lib"])
@@ -229,7 +229,7 @@ def configure(env):
env.Append(CCFLAGS=['-DWINDOWS_ENABLED','-mwindows'])
env.Append(CPPFLAGS=['-DRTAUDIO_ENABLED'])
env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLEW_ENABLED'])
- env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','wsock32','kernel32'])
+ env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','shlwapi','wsock32','kernel32'])
if (env["bits"]=="32" and env["mingw64_for_32"]!="yes"):
# env.Append(LIBS=['gcc_s'])
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 13f2c32e77..e392a56aa8 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -715,9 +715,14 @@ String OS_Windows::get_joystick_name(int id, JOYCAPS jcaps)
return "";
_snprintf( buffer, sizeof(buffer), "%s\\%s", REGSTR_PATH_JOYOEM, OEM);
- res = RegOpenKeyEx ( HKEY_LOCAL_MACHINE, buffer, 0, KEY_QUERY_VALUE, &hKey);
- if (res != ERROR_SUCCESS)
- return "";
+ res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, buffer, 0, KEY_QUERY_VALUE, &hKey);
+ if (res != ERROR_SUCCESS)
+ {
+ res = RegOpenKeyEx(HKEY_CURRENT_USER, buffer, 0, KEY_QUERY_VALUE, &hKey);
+ if (res != ERROR_SUCCESS)
+ return "";
+ }
+
sz = sizeof(buffer);
res = RegQueryValueEx(hKey, REGSTR_VAL_JOYOEMNAME, 0, 0, (LPBYTE) buffer,