Compare commits
1 Commits
v1.4.0-rc.
...
NetChannel
Author | SHA1 | Date | |
---|---|---|---|
d60d4c27ab |
@@ -10,7 +10,7 @@ namespace ehs
|
||||
{
|
||||
private:
|
||||
Array<InputHandler*> handlers;
|
||||
bool initalized;
|
||||
bool initialized;
|
||||
|
||||
public:
|
||||
~Input();
|
||||
@@ -31,13 +31,13 @@ namespace ehs
|
||||
|
||||
void Poll();
|
||||
|
||||
bool HasHandler(const UInt_64 hashId) const;
|
||||
bool HasHandler(UInt_64 hashId) const;
|
||||
|
||||
bool HasHandler(const Str_8& id) const;
|
||||
|
||||
bool AddHandler(InputHandler* handler);
|
||||
|
||||
const InputHandler* GetHandler(const UInt_64 hashId) const;
|
||||
const InputHandler* GetHandler(UInt_64 hashId) const;
|
||||
|
||||
const InputHandler* GetHandler(const Str_8& id) const;
|
||||
|
||||
|
@@ -31,9 +31,9 @@ namespace ehs
|
||||
|
||||
InputHandler& operator=(const InputHandler& ih);
|
||||
|
||||
bool operator==(const UInt_64 otherHashId) const;
|
||||
bool operator==(UInt_64 otherHashId) const;
|
||||
|
||||
bool operator!=(const UInt_64 otherHashId) const;
|
||||
bool operator!=(UInt_64 otherHashId) const;
|
||||
|
||||
virtual bool Initialize();
|
||||
|
||||
@@ -47,13 +47,13 @@ namespace ehs
|
||||
|
||||
void ResetAllStates();
|
||||
|
||||
bool HasDevice(const UInt_64 id) const;
|
||||
bool HasDevice(UInt_64 id) const;
|
||||
|
||||
bool AddDevice(HID* device);
|
||||
|
||||
HID* GetDevice(const UInt_64 id) const;
|
||||
HID* GetDevice(UInt_64 id) const;
|
||||
|
||||
HID* GetDeviceByType(const UInt_8 type) const;
|
||||
HID* GetDeviceByType(UInt_8 type) const;
|
||||
|
||||
virtual bool IsInitialized() const;
|
||||
};
|
||||
|
@@ -9,18 +9,18 @@ namespace ehs
|
||||
}
|
||||
|
||||
Input::Input()
|
||||
: initalized(false)
|
||||
: initialized(false)
|
||||
{
|
||||
}
|
||||
|
||||
Input::Input(Input&& input) noexcept
|
||||
: handlers((Array<InputHandler*>&&)input.handlers), initalized(input.initalized)
|
||||
: handlers((Array<InputHandler*>&&)input.handlers), initialized(input.initialized)
|
||||
{
|
||||
input.initalized = false;
|
||||
input.initialized = false;
|
||||
}
|
||||
|
||||
Input::Input(const Input& input)
|
||||
: initalized(false)
|
||||
: initialized(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ namespace ehs
|
||||
return *this;
|
||||
|
||||
handlers = (Array<InputHandler*>&&)input.handlers;
|
||||
initalized = input.initalized;
|
||||
initialized = input.initialized;
|
||||
|
||||
input.initalized = false;
|
||||
input.initialized = false;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -46,14 +46,14 @@ namespace ehs
|
||||
delete handlers;
|
||||
|
||||
handlers = Array<InputHandler*>();
|
||||
initalized = false;
|
||||
initialized = false;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Input::Initialize()
|
||||
{
|
||||
if (initalized)
|
||||
if (initialized)
|
||||
return;
|
||||
|
||||
UInt_64 i = 0;
|
||||
@@ -72,12 +72,12 @@ namespace ehs
|
||||
i++;
|
||||
}
|
||||
|
||||
initalized = true;
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
void Input::Release()
|
||||
{
|
||||
if (!initalized)
|
||||
if (!initialized)
|
||||
return;
|
||||
|
||||
UInt_64 i = 0;
|
||||
@@ -96,7 +96,7 @@ namespace ehs
|
||||
i++;
|
||||
}
|
||||
|
||||
initalized = false;
|
||||
initialized = false;
|
||||
}
|
||||
|
||||
void Input::Poll()
|
||||
@@ -124,7 +124,7 @@ namespace ehs
|
||||
if (HasHandler(handler->GetHashId()))
|
||||
return false;
|
||||
|
||||
if (initalized)
|
||||
if (initialized)
|
||||
{
|
||||
bool hInitialized = handler->Initialize();
|
||||
if (!hInitialized)
|
||||
@@ -155,6 +155,6 @@ namespace ehs
|
||||
|
||||
bool Input::IsInitialized() const
|
||||
{
|
||||
return initalized;
|
||||
return initialized;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user