diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2024-08-04 16:44:51 +1200 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2024-08-04 16:44:51 +1200 |
commit | f07c3d277406b4338bbe6a3371d58da0da33905f (patch) | |
tree | 809adf458d31b2e65d06cdbf19dfe816ef900f0e | |
parent | 67d5d2c434db7d6b85d438f263ca51c26715a583 (diff) | |
download | bedrock-pc-f07c3d277406b4338bbe6a3371d58da0da33905f.zip |
Update cursor callback to latest version of Phosphor
The most recent Phosphor commit c141d8f unified the is_cursor_visible
and cursor_icon callbacks.
-rw-r--r-- | src/emulator.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emulator.rs b/src/emulator.rs index ce89002..78abc12 100644 --- a/src/emulator.rs +++ b/src/emulator.rs @@ -119,10 +119,13 @@ impl WindowController for BedrockEmulator { self.fullscreen } - fn is_cursor_visible(&self) -> bool { + fn cursor(&mut self) -> Option<CursorIcon> { let pos = self.vm.dev.input.pointer_position; let dim = self.vm.dev.screen.dimensions; - pos.x >= dim.width || pos.y >= dim.height + match pos.x >= dim.width || pos.y >= dim.height { + true => Some(CursorIcon::Default), + false => None, + } } fn pixel_scale(&self) -> NonZeroU32 { |