blob: 0fecbf4b051bd08dce89bc05b068f0422e8e87e6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// MIT License, Copyright (c) 2020 Marvin Borner
#include <def.h>
#include <gui.h>
#include <print.h>
int main()
{
print("[test loaded]\n");
struct window *win = gui_new_window();
u32 color[3] = { 0xff, 0, 0 };
gui_fill(win, color);
u32 last_time = 0;
while (1) {
u32 current_time = time();
if (current_time - last_time > 1000 / 60) { // 60Hz
win->x += 10;
};
last_time = current_time;
yield();
}
return 0;
}
|