Separate X and Y dpi_scale

This commit is contained in:
Henrik Rydgård committed 2017-08-07 13:37:01 +02:00
1 parent 11c75476f7
commit f4cf501cf6
16 files changed
+128 -105

No files matched your search

+3 -10
View File
@@ -10,20 +10,13 @@
#include "base/NativeApp.h"
#include "Windows/MainWindow.h"
TouchInputHandler::TouchInputHandler() :
touchInfo(nullptr),
closeTouch(nullptr),
registerTouch(nullptr)
{
TouchInputHandler::TouchInputHandler() {
touchInfo = (getTouchInputProc) GetProcAddress(
GetModuleHandle(TEXT("User32.dll")),
"GetTouchInputInfo");
closeTouch = (closeTouchInputProc) GetProcAddress(
GetModuleHandle(TEXT("User32.dll")),
"CloseTouchInputHandle");
registerTouch = (registerTouchProc) GetProcAddress(
GetModuleHandle(TEXT("User32.dll")),
"RegisterTouchWindow");
@@ -65,8 +58,8 @@ bool TouchInputHandler::GetTouchPoint(HWND hWnd, const TOUCHINPUT &input, float
point.x = (LONG)(TOUCH_COORD_TO_PIXEL(input.x));
point.y = (LONG)(TOUCH_COORD_TO_PIXEL(input.y));
if (ScreenToClient(hWnd, &point)) {
x = point.x * g_dpi_scale;
y = point.y * g_dpi_scale;
x = point.x * g_dpi_scale_x;
y = point.y * g_dpi_scale_y;
return true;
}