From f07c3d277406b4338bbe6a3371d58da0da33905f Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Sun, 4 Aug 2024 16:44:51 +1200 Subject: Update cursor callback to latest version of Phosphor The most recent Phosphor commit c141d8f unified the is_cursor_visible and cursor_icon callbacks. --- src/emulator.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/emulator.rs') 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 { 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 { -- cgit v1.2.3-70-g09d2