mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-09-24 09:03:32 +02:00
worst code ever written, make it less bad later
This commit is contained in:
parent
92cfdcb6b8
commit
4c9851f847
@ -560,6 +560,11 @@ int main() {
|
|||||||
Font unscii = LoadFont("unscii-16-full.ttf");
|
Font unscii = LoadFont("unscii-16-full.ttf");
|
||||||
|
|
||||||
double lastTime = nn_realTime();
|
double lastTime = nn_realTime();
|
||||||
|
|
||||||
|
static int release_check_list[256];
|
||||||
|
memset(release_check_list, 0, sizeof(int)*256);
|
||||||
|
uint8_t release_check_ptr;
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
if(WindowShouldClose()) break;
|
if(WindowShouldClose()) break;
|
||||||
|
|
||||||
@ -571,6 +576,10 @@ int main() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keycode != 0) {
|
||||||
|
release_check_list[release_check_ptr++] = keycode;
|
||||||
|
}
|
||||||
|
|
||||||
nn_value values[5];
|
nn_value values[5];
|
||||||
|
|
||||||
values[0] = nn_values_cstring("key_down");
|
values[0] = nn_values_cstring("key_down");
|
||||||
@ -585,13 +594,27 @@ int main() {
|
|||||||
// well fuck
|
// well fuck
|
||||||
printf("error happened when eventing the keyboarding: %s\n", error);;;;;;
|
printf("error happened when eventing the keyboarding: %s\n", error);;;;;;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
values[0] = nn_values_cstring("key_up");
|
for (int i = 0; i < 256; i++) {
|
||||||
error = nn_pushSignal(computer, values, 5);
|
int key = release_check_list[i];
|
||||||
|
if (key != 0) {
|
||||||
|
if (IsKeyReleased(key)) {
|
||||||
|
// omg
|
||||||
|
nn_value values[5];
|
||||||
|
values[0] = nn_values_cstring("key_up");
|
||||||
|
values[1] = nn_values_cstring("shitty keyboard");
|
||||||
|
values[2] = nn_values_integer(0); // we can't really know, unless we store it, which i am way too lazy to do.
|
||||||
|
values[3] = nn_values_integer(keycode_to_oc(key));
|
||||||
|
values[4] = nn_values_cstring("USER");
|
||||||
|
|
||||||
if (error != NULL) {
|
const char* error = nn_pushSignal(computer, values, 5);
|
||||||
// well fuck
|
|
||||||
printf("error happened when eventing the keyboarding: %s\n", error);;;;;;
|
if (error != NULL) {
|
||||||
|
// well fuck
|
||||||
|
printf("error happened when eventing the keyboarding: %s\n", error);;;;;;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user