diff options
Diffstat (limited to 'src/emulator.rs')
-rw-r--r-- | src/emulator.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/emulator.rs b/src/emulator.rs index b0f2d51..ce89002 100644 --- a/src/emulator.rs +++ b/src/emulator.rs @@ -20,6 +20,7 @@ pub struct BedrockEmulator { initialising: bool, sleeping: bool, pixel_scale: u32, + fullscreen: bool, start_of_process: Instant, end_of_render: Instant, debug_mark: Instant, @@ -39,6 +40,7 @@ impl BedrockEmulator { initialising: true, sleeping: false, pixel_scale: 3, + fullscreen: false, start_of_process: Instant::now(), end_of_render: Instant::now(), debug_mark: Instant::now(), @@ -113,6 +115,10 @@ impl WindowController for BedrockEmulator { } } + fn fullscreen(&self) -> bool { + self.fullscreen + } + fn is_cursor_visible(&self) -> bool { let pos = self.vm.dev.input.pointer_position; let dim = self.vm.dev.screen.dimensions; @@ -185,6 +191,7 @@ impl WindowController for BedrockEmulator { match input.key { KeyCode::F5 => self.pixel_scale = max(1, self.pixel_scale - 1), KeyCode::F6 => self.pixel_scale = min(8, self.pixel_scale + 1), + KeyCode::F11 => self.fullscreen = !self.fullscreen, _ => (), } } |