Skip to content

Commit

Permalink
fix: delay resize
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Oct 17, 2023
1 parent a16338d commit 8e38eb6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/core/classes/emulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,11 @@ export class Emulator {
} catch {}
}

private resizeCanvas() {
requestAnimationFrame(() => {
this.nostalgist?.resize({
width: innerWidth,
height: innerHeight,
})
private async resizeCanvas() {
await delay(100)
this.nostalgist?.resize({
width: innerWidth,
height: innerHeight,
})
}

Expand Down

0 comments on commit 8e38eb6

Please sign in to comment.