Light cleanup to a little bit of InputCommon. Replaces much of the iterators that litter this section of the codebase.

Also clean up a little bit of the comments that describe the interface classes.
This commit is contained in:
Lioncash
2014-01-30 19:51:21 -05:00
parent b5b02de663
commit d91a5abba1
13 changed files with 301 additions and 386 deletions

View File

@ -25,9 +25,9 @@ private:
{
EffectState(LPDIRECTINPUTEFFECT eff) : iface(eff), params(NULL), size(0) {}
LPDIRECTINPUTEFFECT iface;
void* params; // null when force hasn't changed
u8 size; // zero when force should stop
LPDIRECTINPUTEFFECT iface;
void* params; // null when force hasn't changed
u8 size; // zero when force should stop
};
class Button : public Input
@ -76,9 +76,9 @@ private:
P params;
const u8 m_index;
};
typedef Force<DICONSTANTFORCE> ForceConstant;
typedef Force<DIRAMPFORCE> ForceRamp;
typedef Force<DIPERIODIC> ForcePeriodic;
typedef Force<DICONSTANTFORCE> ForceConstant;
typedef Force<DIRAMPFORCE> ForceRamp;
typedef Force<DIPERIODIC> ForcePeriodic;
public:
bool UpdateInput();
@ -94,13 +94,13 @@ public:
std::string GetSource() const;
private:
const LPDIRECTINPUTDEVICE8 m_device;
const unsigned int m_index;
const LPDIRECTINPUTDEVICE8 m_device;
const unsigned int m_index;
DIJOYSTATE m_state_in;
std::list<EffectState> m_state_out;
DIJOYSTATE m_state_in;
std::list<EffectState> m_state_out;
bool m_buffered;
bool m_buffered;
};
}