Skip to content

Commit f5e310b

Browse files
committed
feat: allow mouse input when using Space to pause
1 parent 6593eff commit f5e310b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

prpr/src/scene/game.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ impl GameScene {
545545
let now = tm.now();
546546
tm.speed = res.config.speed as _;
547547
tm.resume();
548+
#[cfg(target_os = "windows")]
548549
set_multitouch(res.config.windows_multitouch_mode, true);
549550
tm.seek_to(now - 3.);
550551
self.pause_rewind = Some(tm.now() - 0.2);
@@ -924,13 +925,15 @@ impl Scene for GameScene {
924925
if matches!(self.state, State::Playing) {
925926
self.music.play()?;
926927
tm.resume();
928+
#[cfg(target_os = "windows")]
927929
set_multitouch(res.config.windows_multitouch_mode, true);
928930
}
929931
} else if matches!(self.state, State::Playing | State::BeforeMusic) {
930932
if !self.music.paused() {
931933
self.music.pause()?;
932934
}
933935
tm.pause();
936+
#[cfg(target_os = "windows")]
934937
set_multitouch(res.config.windows_multitouch_mode, false);
935938
}
936939
}

0 commit comments

Comments
 (0)