chore(event): clean up assertions in input functions

This commit is contained in:
fallenoak 2023-01-02 15:56:45 -06:00 committed by GitHub
parent 09d77e1ba2
commit 6bebfe5e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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, &param[0], &param[1], &param[2], &param[3])) { while (OsInputGet(&id, &param[0], &param[1], &param[2], &param[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) {