Skip to content

Commit

Permalink
fixed a weird bug with switching displays
Browse files Browse the repository at this point in the history
  • Loading branch information
Trystan-Schmits committed Oct 30, 2023
1 parent 772717c commit 0e2ef73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _posts/2023-10-25-Game.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ function Fadeframe(oldDisplay,newDisplay,ac1,ac2,func){
fadingFrame = (fadingFrame+1)%(2*fps);

if(fadingFrame < fps){
if(fadingFrame !==0){
mainDisplay.activeDisplay = [oldDisplay,fadingDisplay];
}
fadingCtx.clearRect(0,0,fadingCanvas.width,fadingCanvas.height)
var imageData = new ImageData(fadingCanvas.width,fadingCanvas.height);
var data = imageData.data;
Expand Down

0 comments on commit 0e2ef73

Please sign in to comment.