From e5fa10c268a9e1b069d0cabbf3120c5b33f73d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 13 Dec 2009 19:46:40 +0000 Subject: [PATCH] windows build fix and other small things, Windows 2000 support broken --- library/DFCommonInternal.h | 6 +++--- library/DFKeys-linux.cpp | 4 ++-- library/DFKeys.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/DFCommonInternal.h b/library/DFCommonInternal.h index 392e5b33b..d21bfd660 100644 --- a/library/DFCommonInternal.h +++ b/library/DFCommonInternal.h @@ -63,11 +63,11 @@ using namespace std; #include #include #else - #define _WIN32_WINNT 0x0500 // needed for INPUT struct - #define WINVER 0x0500 // OpenThread(), PSAPI, Toolhelp32 + #define _WIN32_WINNT 0x0501 // needed for INPUT struct + #define WINVER 0x0501 // OpenThread(), PSAPI, Toolhelp32 #define WIN32_LEAN_AND_MEAN #include - #include + //#include #include #include #include diff --git a/library/DFKeys-linux.cpp b/library/DFKeys-linux.cpp index 7b2463da1..a61119265 100644 --- a/library/DFKeys-linux.cpp +++ b/library/DFKeys-linux.cpp @@ -189,7 +189,7 @@ void API::TypeStr (const char *lpszString, int delay, bool useShift) { // HACK: the timing here is a strange beast xkeycode = XKeysymToKeycode (dpy, cChar); - send_xkeyevent(dpy,dfWin,rootWin,ksTable[DFHack::LEFT_SHIFT],0,false, realDelay); + send_xkeyevent(dpy,dfWin,rootWin,XKeysymToKeycode(dpy, ksTable[DFHack::LEFT_SHIFT]),0,false, realDelay); if (useShift || cChar >= 'A' && cChar <= 'Z') { send_xkeyevent(dpy,dfWin,rootWin,xkeycode,ShiftMask,true, realDelay); @@ -228,7 +228,7 @@ void API::TypeSpecial (t_special command, int count, int delay) // HACK: the timing here is a strange beast mykeysym = ksTable[command]; xkeycode = XKeysymToKeycode (dpy, mykeysym); - send_xkeyevent(dpy,dfWin,rootWin,ksTable[DFHack::LEFT_SHIFT],0,false, realDelay); + send_xkeyevent(dpy,dfWin,rootWin,XKeysymToKeycode(dpy, ksTable[DFHack::LEFT_SHIFT]),0,false, realDelay); send_xkeyevent(dpy,dfWin,rootWin,xkeycode,0,true, realDelay); send_xkeyevent(dpy,dfWin,rootWin,xkeycode,0,false, realDelay); XSync (dpy, false); diff --git a/library/DFKeys.h b/library/DFKeys.h index 7112fcf3d..3e48baa90 100644 --- a/library/DFKeys.h +++ b/library/DFKeys.h @@ -61,7 +61,7 @@ enum t_special PAGE_UP, PAGE_DOWN, INSERT, - DELETE, + DFK_DELETE, // stupid windows fails here HOME, END, KEYPAD_DIVIDE,