aboutsummaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
authorgeequlim2018-01-20 21:40:52 +0800
committerGeequlim2018-01-31 09:40:33 +0800
commit3be04f73f567b9c39efae697e2a9b7d3c6185fc3 (patch)
tree0b338fde77fb415bcb8ab9d148db97372dd5ef61 /platform/windows/os_windows.cpp
parent20a52aa39db9a6e35738ee486848bd3dd28510cb (diff)
downloadgodot-3be04f73f567b9c39efae697e2a9b7d3c6185fc3.tar.gz
godot-3be04f73f567b9c39efae697e2a9b7d3c6185fc3.tar.zst
godot-3be04f73f567b9c39efae697e2a9b7d3c6185fc3.zip
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index a2a51f10a..de51c811b 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -2442,6 +2442,24 @@ String OS_Windows::get_user_data_dir() const {
return ProjectSettings::get_singleton()->get_resource_path();
}
+String OS_Windows::get_unique_id() const {
+
+ HW_PROFILE_INFO HwProfInfo;
+ ERR_FAIL_COND_V(!GetCurrentHwProfile(&HwProfInfo), "");
+ return String(HwProfInfo.szHwProfileGuid);
+}
+
+void OS_Windows::set_ime_position(const Point2 &p_pos) {
+
+ HIMC himc = ImmGetContext(hWnd);
+ COMPOSITIONFORM cps;
+ cps.dwStyle = CFS_FORCE_POSITION;
+ cps.ptCurrentPos.x = p_pos.x;
+ cps.ptCurrentPos.y = p_pos.y;
+ ImmSetCompositionWindow(himc, &cps);
+ ImmReleaseContext(hWnd, himc);
+}
+
bool OS_Windows::is_joy_known(int p_device) {
return input->is_joy_mapped(p_device);
}