windows build fix and other small things, Windows 2000 support broken

develop
Petr Mrázek 2009-12-13 19:46:40 +00:00
parent 1d25a995b8
commit e5fa10c268
3 changed files with 6 additions and 6 deletions

@ -63,11 +63,11 @@ using namespace std;
#include <fcntl.h>
#include <sys/wait.h>
#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 <windows.h>
#include <winbase.h>
//#include <winbase.h>
#include <winnt.h>
#include <psapi.h>
#include <tlhelp32.h>

@ -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);

@ -61,7 +61,7 @@ enum t_special
PAGE_UP,
PAGE_DOWN,
INSERT,
DELETE,
DFK_DELETE, // stupid windows fails here
HOME,
END,
KEYPAD_DIVIDE,