|
@@ -48,6 +48,7 @@
|
|
#ifdef _WIN32
|
|
#ifdef _WIN32
|
|
#include <GL/wglew.h>
|
|
#include <GL/wglew.h>
|
|
#include <GL/wgl.h>
|
|
#include <GL/wgl.h>
|
|
|
|
+#include <shellscalingapi.h>
|
|
#endif
|
|
#endif
|
|
|
|
|
|
LA MAIN;
|
|
LA MAIN;
|
|
@@ -286,7 +287,7 @@ void la_OpenWacomWinTab(HWND hwnd){
|
|
|
|
|
|
assert(glogContext.lcOptions & CXO_SYSTEM);
|
|
assert(glogContext.lcOptions & CXO_SYSTEM);
|
|
wsprintf(glogContext.lcName, "PrsTest Digitizing %p", MAIN.hinstance);
|
|
wsprintf(glogContext.lcName, "PrsTest Digitizing %p", MAIN.hinstance);
|
|
- glogContext.lcOptions |= CXO_MESSAGES;
|
|
|
|
|
|
+ glogContext.lcOptions |= CXO_MESSAGES|CXO_CSRMESSAGES;
|
|
glogContext.lcPktData = PACKETDATA;
|
|
glogContext.lcPktData = PACKETDATA;
|
|
glogContext.lcPktMode = PACKETMODE;
|
|
glogContext.lcPktMode = PACKETMODE;
|
|
glogContext.lcMoveMask = PACKETDATA;
|
|
glogContext.lcMoveMask = PACKETDATA;
|
|
@@ -301,15 +302,36 @@ void la_OpenWacomWinTab(HWND hwnd){
|
|
AXIS tabletPressure = { 0 };
|
|
AXIS tabletPressure = { 0 };
|
|
gpWTInfoA(WTI_DEVICES, DVC_NPRESSURE, &tabletPressure); MAIN.WinTabMaxPenPressure = tabletPressure.axMax + 1;
|
|
gpWTInfoA(WTI_DEVICES, DVC_NPRESSURE, &tabletPressure); MAIN.WinTabMaxPenPressure = tabletPressure.axMax + 1;
|
|
|
|
|
|
- glogContext.lcInOrgX = 0;
|
|
|
|
- glogContext.lcInOrgY = 0;
|
|
|
|
- glogContext.lcInExtX = TabletX.axMax;
|
|
|
|
- glogContext.lcInExtY = TabletY.axMax;
|
|
|
|
-
|
|
|
|
- glogContext.lcOutOrgX = GetSystemMetrics(SM_XVIRTUALSCREEN);
|
|
|
|
|
|
+ //glogContext.lcInOrgX = 0;
|
|
|
|
+ //glogContext.lcInOrgY = 0;
|
|
|
|
+ //glogContext.lcInExtX = TabletX.axMax;
|
|
|
|
+ //glogContext.lcInExtY = TabletY.axMax;
|
|
|
|
+
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_INORGX, &glogContext.lcInOrgX);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_INORGY, &glogContext.lcInOrgY);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_INEXTX, &glogContext.lcInExtX);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_INEXTY, &glogContext.lcInExtY);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_OUTORGX, &glogContext.lcOutOrgX);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_OUTORGY, &glogContext.lcOutOrgY);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_OUTEXTX, &glogContext.lcOutExtX);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_OUTEXTY, &glogContext.lcOutExtY);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_SYSORGX, &glogContext.lcSysOrgX);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_SYSORGY, &glogContext.lcSysOrgY);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_SYSEXTX, &glogContext.lcSysExtX);
|
|
|
|
+ gpWTInfoA(WTI_DEFSYSCTX, CTX_SYSEXTY, &glogContext.lcSysExtY);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcInOrgX, glogContext.lcInOrgY);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcInExtX, glogContext.lcInExtY);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcOutOrgX, glogContext.lcOutOrgY);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcOutExtX, glogContext.lcOutExtY);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcSysOrgX, glogContext.lcSysOrgY);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcSysExtX, glogContext.lcSysExtY);
|
|
|
|
+
|
|
|
|
+ glogContext.lcOutOrgX = GetSystemMetrics(SM_XVIRTUALSCREEN);
|
|
glogContext.lcOutOrgY = GetSystemMetrics(SM_YVIRTUALSCREEN);
|
|
glogContext.lcOutOrgY = GetSystemMetrics(SM_YVIRTUALSCREEN);
|
|
glogContext.lcOutExtX = GetSystemMetrics(SM_CXVIRTUALSCREEN); //SM_CXSCREEN);
|
|
glogContext.lcOutExtX = GetSystemMetrics(SM_CXVIRTUALSCREEN); //SM_CXSCREEN);
|
|
glogContext.lcOutExtY = -GetSystemMetrics(SM_CYVIRTUALSCREEN); // lower left to upper left. SM_CYSCREEN);
|
|
glogContext.lcOutExtY = -GetSystemMetrics(SM_CYVIRTUALSCREEN); // lower left to upper left. SM_CYSCREEN);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcOutOrgX, glogContext.lcOutOrgY);
|
|
|
|
+ //printf("%d %d\n", glogContext.lcOutExtX, glogContext.lcOutExtY);
|
|
|
|
|
|
hctx = gpWTOpenA(hwnd, &glogContext, FALSE);
|
|
hctx = gpWTOpenA(hwnd, &glogContext, FALSE);
|
|
|
|
|
|
@@ -1039,6 +1061,8 @@ int laGetReadyWith(laInitArguments* ia){
|
|
#ifdef _WIN32
|
|
#ifdef _WIN32
|
|
logPrintNew("Initializing LaGUI...\n");
|
|
logPrintNew("Initializing LaGUI...\n");
|
|
|
|
|
|
|
|
+ SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
|
|
|
|
+
|
|
setlocale(LC_ALL, "zh_CN.utf8");
|
|
setlocale(LC_ALL, "zh_CN.utf8");
|
|
|
|
|
|
MAIN.hinstance = GetModuleHandle(NULL);
|
|
MAIN.hinstance = GetModuleHandle(NULL);
|