Web: Fullscreen Overhaul (#3063)

This commit is contained in:
daxpedda 2023-08-29 09:28:30 +02:00 committed by GitHub
parent 1dfca5a395
commit 0c8cf94a70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 225 additions and 148 deletions

View file

@ -49,6 +49,14 @@ impl AnimationFrameHandler {
self.handle.set(Some(handle));
}
pub fn cancel(&mut self) {
if let Some(handle) = self.handle.take() {
self.window
.cancel_animation_frame(handle)
.expect("Failed to cancel animation frame");
}
}
}
impl Drop for AnimationFrameHandler {