Compare commits

..

No commits in common. "6a319c55b0e3ed93c0a43a9b7cdc5b69dd4198e3" and "795f10986f2ae55ad9d0c109059ac9d393254ae6" have entirely different histories.

2 changed files with 5 additions and 2 deletions

View file

@ -26,7 +26,10 @@ recieve_mouse_event := fn(): ?^MouseEvent {
// Read out of the Mouse buffer here // Read out of the Mouse buffer here
buffer.recv(MouseEvent, buf_id, mem_page) buffer.recv(MouseEvent, buf_id, mem_page)
if *mem_page != 0 { if *mem_page == 0 {
// log.info("Haha\0")
} else {
log.info("Mouse event recieved in horizon.\0")
dx := *mem_page dx := *mem_page
dy := *mem_page + 1 dy := *mem_page + 1
mevent := MouseEvent.(dx, dy, 0, 0, 0) mevent := MouseEvent.(dx, dy, 0, 0, 0)

View file

@ -71,7 +71,7 @@ main := fn(): int {
mouse_event := intouch.recieve_mouse_event() mouse_event := intouch.recieve_mouse_event()
if mouse_event != null { if mouse_event != null {
mouse_x += mouse_event.x_change mouse_x += mouse_event.x_change
mouse_y += mouse_event.y_change mouse_y -= mouse_event.y_change
} }
// render mouse // render mouse
render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white) render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white)