summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/DirectInputBase.h
diff options
context:
space:
mode:
authorJohn Peterson <jpeterson57@gmail.com>2009-02-15 18:23:42 +0000
committerJohn Peterson <jpeterson57@gmail.com>2009-02-15 18:23:42 +0000
commita8e35e976acddc06eb316821d41d695d81421828 (patch)
tree2b5da453b223c7c8d21d684100f3ddadd65d0310 /Source/Core/InputCommon/Src/DirectInputBase.h
parentc49f9695635fa4f947eb8f5082553ed2c07e89d6 (diff)
Emulated Wiimote: Added customizable controls for the Wiimote and the Nunchuck
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2259 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src/DirectInputBase.h')
-rw-r--r--Source/Core/InputCommon/Src/DirectInputBase.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/Src/DirectInputBase.h b/Source/Core/InputCommon/Src/DirectInputBase.h
new file mode 100644
index 0000000000..7e90048451
--- /dev/null
+++ b/Source/Core/InputCommon/Src/DirectInputBase.h
@@ -0,0 +1,58 @@
+// Copyright (C) 2003-2008 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#ifndef _DIRECTINPUTBASE_H
+#define _DIRECTINPUTBASE_H
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// Include
+// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+#include <windows.h> // System
+#include <stdio.h>
+
+#define DIRECTINPUT_VERSION 0x0800 // DirectInput
+#include <dinput.h>
+
+//#include "ConsoleWindow.h" // Common
+///////////////////////////////
+
+
+class DInput
+{
+ public:
+
+ DInput();
+ ~DInput();
+
+ static void DInput::DIKToString(unsigned int keycode, char *keyStr);
+
+ HRESULT Init(HWND hWnd);
+ void Free();
+ HRESULT Read();
+
+
+ BYTE diks[256]; // DirectInput keyboard state buffer
+
+ private:
+
+ LPDIRECTINPUT8 g_pDI; // The DirectInput object
+ LPDIRECTINPUTDEVICE8 g_pKeyboard; // The keyboard device
+};
+
+#endif
+