6 Commits

Author SHA1 Message Date
5e4f4e27f6 Merge pull request 'Fixed Button dll input/output.' (#21) from NetChannels into main
Some checks failed
Build & Release / Windows-AMD64-Build (push) Failing after 2m8s
Build & Release / Linux-AARCH64-Build (push) Failing after 13s
Build & Release / Linux-AMD64-Build (push) Successful in 7m37s
Reviewed-on: #21
2025-08-13 21:35:56 -07:00
a6eb7f6e97 Merge pull request 'NetChannels' (#20) from NetChannels into main
Reviewed-on: #20
2025-08-13 19:32:54 -07:00
fd452f6643 Merge pull request 'NetChannels' (#19) from NetChannels into main
Reviewed-on: #19
2025-03-28 23:11:54 -07:00
389fa61fba Merge pull request 'Fixed gitea workflow.' (#18) from NetChannels into main
Some checks failed
Build & Release / Windows-AMD64-Build (push) Failing after 21s
Build & Release / Linux-AARCH64-Build (push) Successful in 43m31s
Build & Release / Linux-AMD64-Build (push) Successful in 15m15s
Reviewed-on: #18
2025-03-25 18:43:47 -07:00
a67197766e Merge pull request 'Fixed gitea workflow.' (#17) from NetChannels into main
Some checks failed
Build & Release / Windows-AMD64-Build (push) Failing after 25s
Build & Release / Linux-AMD64-Build (push) Failing after 11m42s
Build & Release / Linux-AARCH64-Build (push) Successful in 43m39s
Reviewed-on: #17
2025-03-25 18:37:27 -07:00
ae414c5c99 Merge pull request 'Added CPU::GetCacheLineSize() definition for Windows.' (#16) from NetChannels into main
Reviewed-on: #16
2025-03-25 16:50:40 -07:00
6 changed files with 27 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.25.1) cmake_minimum_required(VERSION 3.30.4)
set(IS_OS_WINDOWS FALSE) set(IS_OS_WINDOWS FALSE)
set(IS_OS_LINUX FALSE) set(IS_OS_LINUX FALSE)

View File

@@ -105,13 +105,13 @@ int main()
if (!response.IsNum()) if (!response.IsNum())
{ {
ehs::Console::Clear(); // Clear the console's buffer. ehs::Console::Clear(); // Clear the console's buffer.
return main(); // Repeat process if given response is not a number. return main(); // Repeat process if given response is not a number.
} }
ehs::UInt_8 age = response.ToDecimal<ehs::UInt_8>(); // Converts the string number into a number based primitive. ehs::UInt_8 age = response.ToDecimal<ehs::UInt_8>(); // Converts the string number into a number based primitive.
ehs::Console::Write_8("Your age is " + ehs::Str_8::FromNum(age) + "."); // Write the console with the age converted back to string. ehs::Console::Write("Your age is " + ehs::Str_8::FromNum(age) + "."); // Write the console with the age converted back to string.
ehs::Uninitialize(); ehs::Uninitialize();

View File

@@ -10,7 +10,7 @@ namespace ehs
{ {
private: private:
Array<InputHandler*> handlers; Array<InputHandler*> handlers;
bool initialized; bool initalized;
public: public:
~Input(); ~Input();
@@ -31,13 +31,13 @@ namespace ehs
void Poll(); void Poll();
bool HasHandler(UInt_64 hashId) const; bool HasHandler(const UInt_64 hashId) const;
bool HasHandler(const Str_8& id) const; bool HasHandler(const Str_8& id) const;
bool AddHandler(InputHandler* handler); bool AddHandler(InputHandler* handler);
const InputHandler* GetHandler(UInt_64 hashId) const; const InputHandler* GetHandler(const UInt_64 hashId) const;
const InputHandler* GetHandler(const Str_8& id) const; const InputHandler* GetHandler(const Str_8& id) const;

View File

@@ -31,9 +31,9 @@ namespace ehs
InputHandler& operator=(const InputHandler& ih); InputHandler& operator=(const InputHandler& ih);
bool operator==(UInt_64 otherHashId) const; bool operator==(const UInt_64 otherHashId) const;
bool operator!=(UInt_64 otherHashId) const; bool operator!=(const UInt_64 otherHashId) const;
virtual bool Initialize(); virtual bool Initialize();
@@ -47,13 +47,13 @@ namespace ehs
void ResetAllStates(); void ResetAllStates();
bool HasDevice(UInt_64 id) const; bool HasDevice(const UInt_64 id) const;
bool AddDevice(HID* device); bool AddDevice(HID* device);
HID* GetDevice(UInt_64 id) const; HID* GetDevice(const UInt_64 id) const;
HID* GetDeviceByType(UInt_8 type) const; HID* GetDeviceByType(const UInt_8 type) const;
virtual bool IsInitialized() const; virtual bool IsInitialized() const;
}; };

View File

@@ -9,18 +9,18 @@ namespace ehs
} }
Input::Input() Input::Input()
: initialized(false) : initalized(false)
{ {
} }
Input::Input(Input&& input) noexcept Input::Input(Input&& input) noexcept
: handlers((Array<InputHandler*>&&)input.handlers), initialized(input.initialized) : handlers((Array<InputHandler*>&&)input.handlers), initalized(input.initalized)
{ {
input.initialized = false; input.initalized = false;
} }
Input::Input(const Input& input) Input::Input(const Input& input)
: initialized(false) : initalized(false)
{ {
} }
@@ -30,9 +30,9 @@ namespace ehs
return *this; return *this;
handlers = (Array<InputHandler*>&&)input.handlers; handlers = (Array<InputHandler*>&&)input.handlers;
initialized = input.initialized; initalized = input.initalized;
input.initialized = false; input.initalized = false;
return *this; return *this;
} }
@@ -46,14 +46,14 @@ namespace ehs
delete handlers; delete handlers;
handlers = Array<InputHandler*>(); handlers = Array<InputHandler*>();
initialized = false; initalized = false;
return *this; return *this;
} }
void Input::Initialize() void Input::Initialize()
{ {
if (initialized) if (initalized)
return; return;
UInt_64 i = 0; UInt_64 i = 0;
@@ -72,12 +72,12 @@ namespace ehs
i++; i++;
} }
initialized = true; initalized = true;
} }
void Input::Release() void Input::Release()
{ {
if (!initialized) if (!initalized)
return; return;
UInt_64 i = 0; UInt_64 i = 0;
@@ -96,7 +96,7 @@ namespace ehs
i++; i++;
} }
initialized = false; initalized = false;
} }
void Input::Poll() void Input::Poll()
@@ -124,7 +124,7 @@ namespace ehs
if (HasHandler(handler->GetHashId())) if (HasHandler(handler->GetHashId()))
return false; return false;
if (initialized) if (initalized)
{ {
bool hInitialized = handler->Initialize(); bool hInitialized = handler->Initialize();
if (!hInitialized) if (!hInitialized)
@@ -155,6 +155,6 @@ namespace ehs
bool Input::IsInitialized() const bool Input::IsInitialized() const
{ {
return initialized; return initalized;
} }
} }

View File

@@ -415,7 +415,7 @@ namespace ehs
return hdl != EHS_INVALID_SOCKET; return hdl != EHS_INVALID_SOCKET;
} }
void TCP::Bind_v6(const Str_8 &address, const UInt_16 &port) void TCP::Bind_v6(const Str_8& address, UInt_16 port)
{ {
sockaddr_in6 result = {}; sockaddr_in6 result = {};
result.sin6_family = AF_INET6; result.sin6_family = AF_INET6;
@@ -451,7 +451,7 @@ namespace ehs
} }
} }
void TCP::Bind_v4(const Str_8 &address, const UInt_16 &port) void TCP::Bind_v4(const Str_8& address, UInt_16 port)
{ {
sockaddr_in result = {}; sockaddr_in result = {};
result.sin_family = AF_INET; result.sin_family = AF_INET;