Commit b9db93b6 authored by cutealien's avatar cutealien

Move SJoystickWin32Control back to the source file to avoid compile problems...

Move SJoystickWin32Control back to the source file to avoid compile problems when _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ is set. But at least keep distinction between declaration and definition to make it more visible all the functions of that struct are member-functions.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5007 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 0eacdd00
......@@ -57,6 +57,44 @@ namespace irr
namespace irr
{
struct SJoystickWin32Control
{
CIrrDeviceWin32* Device;
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_)
IDirectInput8* DirectInputDevice;
#endif
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
struct JoystickInfo
{
u32 Index;
#ifdef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
core::stringc Name;
GUID guid;
LPDIRECTINPUTDEVICE8 lpdijoy;
DIDEVCAPS devcaps;
u8 axisValid[8];
#else
JOYCAPS Caps;
#endif
};
core::array<JoystickInfo> ActiveJoysticks;
#endif
SJoystickWin32Control(CIrrDeviceWin32* dev);
~SJoystickWin32Control();
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_)
static BOOL CALLBACK EnumJoysticks(LPCDIDEVICEINSTANCE lpddi, LPVOID cp);
void directInputAddJoystick(LPCDIDEVICEINSTANCE lpddi);
#endif
void pollJoysticks();
bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo);
irr::core::stringc findJoystickName(int index, const JOYCAPS &caps) const;
};
SJoystickWin32Control::SJoystickWin32Control(CIrrDeviceWin32* dev) : Device(dev)
{
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_)
......
......@@ -421,44 +421,6 @@ namespace irr
SJoystickWin32Control* JoyControl;
};
struct SJoystickWin32Control
{
CIrrDeviceWin32* Device;
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_)
IDirectInput8* DirectInputDevice;
#endif
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
struct JoystickInfo
{
u32 Index;
#ifdef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
core::stringc Name;
GUID guid;
LPDIRECTINPUTDEVICE8 lpdijoy;
DIDEVCAPS devcaps;
u8 axisValid[8];
#else
JOYCAPS Caps;
#endif
};
core::array<JoystickInfo> ActiveJoysticks;
#endif
SJoystickWin32Control(CIrrDeviceWin32* dev);
~SJoystickWin32Control();
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) && defined(_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_)
static BOOL CALLBACK EnumJoysticks(LPCDIDEVICEINSTANCE lpddi, LPVOID cp);
void directInputAddJoystick(LPCDIDEVICEINSTANCE lpddi)
#endif
void pollJoysticks();
bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo);
irr::core::stringc findJoystickName(int index, const JOYCAPS &caps) const;
};
} // end namespace irr
#endif // _IRR_COMPILE_WITH_WINDOWS_DEVICE_
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment