Fix: Resize callback won't fire and canvas_get_size would return wrong size.
The canvas_get_size function now returns the number of visible pixels after scaling. The canvas resize callback now fires after a window was created or updated.
This commit is contained in:
parent
3221ab1841
commit
0090f518e9
2 changed files with 33 additions and 10 deletions
|
|
@ -129,9 +129,11 @@ void px_on_window_close() {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
canvas_start(1024, &px_on_window_close);
|
||||
canvas_setcb_key(&px_on_key);
|
||||
canvas_setcb_resize(&px_on_resize);
|
||||
|
||||
canvas_start(1024, &px_on_window_close);
|
||||
|
||||
net_start(1337, &px_on_connect, &px_on_read, &px_on_close);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue