mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-19 11:30:09 +03:00
feat(event): split out OsInputGet by platform
This commit is contained in:
parent
7dbb4af868
commit
788dde31ef
@ -566,34 +566,6 @@ const char* KeyCodeToString(KEY key) {
|
|||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t OsInputGet(OSINPUT* id, int32_t* param0, int32_t* param1, int32_t* param2, int32_t* param3) {
|
|
||||||
#if defined(WHOA_SYSTEM_WIN)
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(WHOA_SYSTEM_MAC)
|
|
||||||
// TODO
|
|
||||||
// Unknown logic
|
|
||||||
|
|
||||||
if (!OsInputIsUsingCocoaEventLoop()) {
|
|
||||||
// Legacy Carbon input handling
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// Steelseries WoW Mouse logic
|
|
||||||
|
|
||||||
if (Input::s_queueTail == Input::s_queueHead) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
OsQueueSetParam(3, OsGetAsyncTimeMs());
|
|
||||||
|
|
||||||
return OsQueueGet(id, param0, param1, param2, param3);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void OsInputInitialize() {
|
void OsInputInitialize() {
|
||||||
#if defined(WHOA_SYSTEM_WIN)
|
#if defined(WHOA_SYSTEM_WIN)
|
||||||
Input::s_numlockState = GetAsyncKeyState(144);
|
Input::s_numlockState = GetAsyncKeyState(144);
|
||||||
|
6
src/event/linux/Input.cpp
Normal file
6
src/event/linux/Input.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "event/Input.hpp"
|
||||||
|
|
||||||
|
int32_t OsInputGet(OSINPUT* id, int32_t* param0, int32_t* param1, int32_t* param2, int32_t* param3) {
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
22
src/event/mac/Input.cpp
Normal file
22
src/event/mac/Input.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include "event/Input.hpp"
|
||||||
|
|
||||||
|
int32_t OsInputGet(OSINPUT* id, int32_t* param0, int32_t* param1, int32_t* param2, int32_t* param3) {
|
||||||
|
// TODO
|
||||||
|
// Unknown logic
|
||||||
|
|
||||||
|
if (!OsInputIsUsingCocoaEventLoop()) {
|
||||||
|
// Legacy Carbon input handling
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// Steelseries WoW Mouse logic
|
||||||
|
|
||||||
|
if (Input::s_queueTail == Input::s_queueHead) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
OsQueueSetParam(3, OsGetAsyncTimeMs());
|
||||||
|
|
||||||
|
return OsQueueGet(id, param0, param1, param2, param3);
|
||||||
|
}
|
6
src/event/win/Input.cpp
Normal file
6
src/event/win/Input.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "event/Input.hpp"
|
||||||
|
|
||||||
|
int32_t OsInputGet(OSINPUT* id, int32_t* param0, int32_t* param1, int32_t* param2, int32_t* param3) {
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user