-
-
Save cynthia/fe95daed5322109f567c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ui/base/touch/touch_device_win.cc b/ui/base/touch/touch_device_win.cc | |
index ba5c260..7862780 100644 | |
--- a/ui/base/touch/touch_device_win.cc | |
+++ b/ui/base/touch/touch_device_win.cc | |
@@ -4,6 +4,7 @@ | |
#include "ui/base/touch/touch_device.h" | |
#include "base/win/windows_version.h" | |
+#include "base/win/win_util.h" | |
#include <windows.h> | |
namespace ui { | |
@@ -15,7 +16,8 @@ bool IsTouchDevicePresent() { | |
} | |
int MaxTouchPoints() { | |
- return GetSystemMetrics(SM_MAXIMUMTOUCHES); | |
+ return (base::win::IsTouchEnabledDevice()) ? | |
+ GetSystemMetrics(SM_MAXIMUMTOUCHES) : 0; | |
} | |
} // namespace ui |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment