mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-10-26 22:06:06 +03:00
chore(event): clean up assertions in input functions
This commit is contained in:
parent
09d77e1ba2
commit
6bebfe5e2f
@ -169,11 +169,8 @@ void PostSize(EvtContext* context, int32_t w, int32_t h) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ProcessInput(const int32_t param[], OSINPUT id, int32_t* shutdown, EvtContext* context) {
|
void ProcessInput(const int32_t param[], OSINPUT id, int32_t* shutdown, EvtContext* context) {
|
||||||
if (!context) {
|
STORM_ASSERT(context);
|
||||||
// TODO
|
STORM_VALIDATE(context, ERROR_INVALID_PARAMETER);
|
||||||
// nullsub_3();
|
|
||||||
// SErrSetLastError(0x57u);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case OS_INPUT_CAPTURE_CHANGED:
|
case OS_INPUT_CAPTURE_CHANGED:
|
||||||
@ -421,27 +418,19 @@ void IEvtInputInitialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t IEvtInputProcess(EvtContext* context, int32_t* shutdown) {
|
int32_t IEvtInputProcess(EvtContext* context, int32_t* shutdown) {
|
||||||
if (context) {
|
STORM_ASSERT(context);
|
||||||
// TODO
|
STORM_VALIDATE(context, ERROR_INVALID_PARAMETER, 0);
|
||||||
// nullsub_3();
|
|
||||||
|
|
||||||
int32_t v4 = 0;
|
int32_t v4 = 0;
|
||||||
OSINPUT id;
|
OSINPUT id;
|
||||||
int32_t param[4];
|
int32_t param[4];
|
||||||
|
|
||||||
while (OsInputGet(&id, ¶m[0], ¶m[1], ¶m[2], ¶m[3])) {
|
while (OsInputGet(&id, ¶m[0], ¶m[1], ¶m[2], ¶m[3])) {
|
||||||
v4 = 1;
|
v4 = 1;
|
||||||
ProcessInput(param, id, shutdown, context);
|
ProcessInput(param, id, shutdown, context);
|
||||||
}
|
|
||||||
|
|
||||||
return v4;
|
|
||||||
} else {
|
|
||||||
// TODO
|
|
||||||
// nullsub_3();
|
|
||||||
// SErrSetLastError(0x57u);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return v4;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* KeyCodeToString(KEY key) {
|
const char* KeyCodeToString(KEY key) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user