#pragma comment (lib, "dinput8.lib")\r
#pragma comment (lib, "dxguid.lib")\r
\r
-#endif WIN32\r
+#endif // WIN32\r
\r
//////////////////////////////////////////////////////////////////////\r
// Construction/Destruction\r
unsigned int CInputTask::buttons=0;\r
unsigned int CInputTask::oldButtons=0;\r
\r
-#ifdef WIN32\r
CInputTask::CInputTask()\r
{\r
+#ifdef WIN32\r
din = NULL;\r
dinkeyboard = NULL;\r
memset(keys, 0, 256);\r
\r
// set the control you will have over the keyboard\r
dinkeyboard->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);\r
+#endif // WIN32\r
}\r
\r
CInputTask::~CInputTask()\r
{\r
+#ifdef WIN32\r
if (dinkeyboard != NULL) \r
{\r
dinkeyboard->Unacquire();\r
dinkeyboard->Release();\r
}\r
if (din != NULL) din->Release();\r
+#endif // WIN32\r
}\r
\r
bool CInputTask::Start()\r
{\r
+#ifdef WIN32\r
dinkeyboard->Acquire();\r
+#endif // WIN32\r
\r
\r
// keys=SDL_GetKeyState(&keyCount);\r
\r
void CInputTask::Update()\r
{\r
+#ifdef WIN32\r
dinkeyboard->Acquire();\r
memcpy(oldKeys, keys, 256*sizeof(BYTE));\r
dinkeyboard->GetDeviceState(256, (LPVOID)keys);\r
\r
+#endif // WIN32\r
// SDL_PumpEvents();\r
// oldButtons=buttons;\r
// buttons=SDL_GetRelativeMouseState(&dX,&dY);\r
memset(keys, 0, 256);\r
memset(oldKeys, 0, 256);\r
}\r
-#endif // WIN32\r