From fd69a0e0aa70853c61618aa4eeb7c8f09b5fa18f Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Sat, 17 Jan 2009 14:16:07 +0000 Subject: [PATCH] ops... forgot update file :( - fix winport compile --- desmume/src/windows/inputdx.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/desmume/src/windows/inputdx.h b/desmume/src/windows/inputdx.h index 84876f88c..00a4120cd 100644 --- a/desmume/src/windows/inputdx.h +++ b/desmume/src/windows/inputdx.h @@ -26,14 +26,27 @@ #define DIRECTINPUT_VERSION 0x0800 #include "../common.h" -#include "..\types.h" -#include "directx\dinput.h" +#include "../types.h" +#include "directx/dinput.h" #define MAXKEYPAD 15 typedef void (*INPUTPROC)(BOOL, LPSTR); -class INPUTCLASS +class DI_CLASS +{ + friend BOOL CALLBACK EnumCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef); + friend BOOL CALLBACK EnumObjects(const DIDEVICEOBJECTINSTANCE* pdidoi,VOID* pContext); +public: + char JoystickName[255]; + BOOL Feedback; + LPDIRECTINPUTDEVICE8 EnumDevices(LPDIRECTINPUT8 pDI); +protected: + BOOL CALLBACK EnumCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef); + BOOL CALLBACK EnumObjects(const DIDEVICEOBJECTINSTANCE* pdidoi,VOID* pContext); +}; + +class INPUTCLASS : private DI_CLASS { private: HWND hParentWnd; @@ -44,6 +57,7 @@ private: LPDIRECTINPUTDEVICE8 pKeyboard; LPDIRECTINPUTDEVICE8 pJoystick; DIDEVCAPS DIJoycap; + LPDIRECTINPUTEFFECT pEffect; INPUTPROC inputProc; @@ -52,6 +66,7 @@ public: ~INPUTCLASS(); BOOL Init(HWND hParentWnd, INPUTPROC inputProc); BOOL JoystickEnabled(); + void JoystickFeedback(BOOL on); void process(); };