Compare commits
2 commits
795f10986f
...
6a319c55b0
Author | SHA1 | Date | |
---|---|---|---|
Able | 6a319c55b0 | ||
Able | 879bbfa173 |
|
@ -26,10 +26,7 @@ recieve_mouse_event := fn(): ?^MouseEvent {
|
|||
|
||||
// Read out of the Mouse buffer here
|
||||
buffer.recv(MouseEvent, buf_id, mem_page)
|
||||
if *mem_page == 0 {
|
||||
// log.info("Haha\0")
|
||||
} else {
|
||||
log.info("Mouse event recieved in horizon.\0")
|
||||
if *mem_page != 0 {
|
||||
dx := *mem_page
|
||||
dy := *mem_page + 1
|
||||
mevent := MouseEvent.(dx, dy, 0, 0, 0)
|
||||
|
|
|
@ -71,7 +71,7 @@ main := fn(): int {
|
|||
mouse_event := intouch.recieve_mouse_event()
|
||||
if mouse_event != null {
|
||||
mouse_x += mouse_event.x_change
|
||||
mouse_y -= mouse_event.y_change
|
||||
mouse_y += mouse_event.y_change
|
||||
}
|
||||
// render mouse
|
||||
render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white)
|
||||
|
|
Loading…
Reference in a new issue