desktop: Make F11 toggle fullscreen instead of just entering
This allows you to leave fullscreen the same you enter it.
This commit is contained in:
parent
eb3dec3d5d
commit
d8b4ec0404
|
@ -66,7 +66,8 @@ impl MenuBar {
|
||||||
}
|
}
|
||||||
if egui_ctx.input_mut(|input| input.consume_shortcut(&Self::SHORTCUT_FULLSCREEN)) {
|
if egui_ctx.input_mut(|input| input.consume_shortcut(&Self::SHORTCUT_FULLSCREEN)) {
|
||||||
if let Some(player) = &mut player {
|
if let Some(player) = &mut player {
|
||||||
player.set_fullscreen(true);
|
let is_fullscreen = player.is_fullscreen();
|
||||||
|
player.set_fullscreen(!is_fullscreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue