From 5e81298ef0147bf36c4aaafa35accc2700777bd3 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 22 Jun 2010 23:45:56 +0000 Subject: boring svn:eol-style native again... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5771 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../DirectInput/DirectInputMouse.h | 166 ++++++++++----------- 1 file changed, 83 insertions(+), 83 deletions(-) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputMouse.h') diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputMouse.h b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputMouse.h index c645d02727..57cc15ff5a 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputMouse.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInputMouse.h @@ -1,83 +1,83 @@ -#ifndef _CIFACE_DIRECTINPUT_MOUSE_H_ -#define _CIFACE_DIRECTINPUT_MOUSE_H_ - -#include "../ControllerInterface.h" - -#define DIRECTINPUT_VERSION 0x0800 -#define WIN32_LEAN_AND_MEAN -#define NOMINMAX -#include -#include - -namespace ciface -{ -namespace DirectInput -{ - -void InitMouse(IDirectInput8* const idi8, std::vector& devices); - -class Mouse : public ControllerInterface::Device -{ - friend class ControllerInterface; - friend class ControllerInterface::ControlReference; - -protected: - - class Input : public ControllerInterface::Device::Input - { - friend class Mouse; - protected: - virtual ControlState GetState(const DIMOUSESTATE2* const boardstate) const = 0; - }; - - class Button : public Input - { - friend class Mouse; - public: - std::string GetName() const; - protected: - Button(const unsigned int index) : m_index(index) {} - ControlState GetState(const DIMOUSESTATE2* const state) const; - private: - const unsigned int m_index; - }; - - class Axis : public Input - { - friend class Mouse; - public: - std::string GetName() const; - protected: - Axis(const unsigned int index, const LONG range) : m_index(index), m_range(range) {} - ControlState GetState(const DIMOUSESTATE2* const state) const; - private: - const unsigned int m_index; - const LONG m_range; - }; - - bool UpdateInput(); - bool UpdateOutput(); - - ControlState GetInputState( const ControllerInterface::Device::Input* const input ) const; - void SetOutputState( const ControllerInterface::Device::Output* const input, const ControlState state ); - -public: - Mouse(const LPDIRECTINPUTDEVICE8 mo_device, const int index); - ~Mouse(); - - std::string GetName() const; - int GetId() const; - std::string GetSource() const; - -private: - const LPDIRECTINPUTDEVICE8 m_mo_device; - const int m_index; - - DWORD m_last_update; - DIMOUSESTATE2 m_state_in; -}; - -} -} - -#endif +#ifndef _CIFACE_DIRECTINPUT_MOUSE_H_ +#define _CIFACE_DIRECTINPUT_MOUSE_H_ + +#include "../ControllerInterface.h" + +#define DIRECTINPUT_VERSION 0x0800 +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include +#include + +namespace ciface +{ +namespace DirectInput +{ + +void InitMouse(IDirectInput8* const idi8, std::vector& devices); + +class Mouse : public ControllerInterface::Device +{ + friend class ControllerInterface; + friend class ControllerInterface::ControlReference; + +protected: + + class Input : public ControllerInterface::Device::Input + { + friend class Mouse; + protected: + virtual ControlState GetState(const DIMOUSESTATE2* const boardstate) const = 0; + }; + + class Button : public Input + { + friend class Mouse; + public: + std::string GetName() const; + protected: + Button(const unsigned int index) : m_index(index) {} + ControlState GetState(const DIMOUSESTATE2* const state) const; + private: + const unsigned int m_index; + }; + + class Axis : public Input + { + friend class Mouse; + public: + std::string GetName() const; + protected: + Axis(const unsigned int index, const LONG range) : m_index(index), m_range(range) {} + ControlState GetState(const DIMOUSESTATE2* const state) const; + private: + const unsigned int m_index; + const LONG m_range; + }; + + bool UpdateInput(); + bool UpdateOutput(); + + ControlState GetInputState( const ControllerInterface::Device::Input* const input ) const; + void SetOutputState( const ControllerInterface::Device::Output* const input, const ControlState state ); + +public: + Mouse(const LPDIRECTINPUTDEVICE8 mo_device, const int index); + ~Mouse(); + + std::string GetName() const; + int GetId() const; + std::string GetSource() const; + +private: + const LPDIRECTINPUTDEVICE8 m_mo_device; + const int m_index; + + DWORD m_last_update; + DIMOUSESTATE2 m_state_in; +}; + +} +} + +#endif -- cgit v1.2.3