Lots of bug fixes
- Toggling autoplay checkbox in debug now disallows saving the score - Fix crown of the song that was previously selected rendering above the genre - Outline of empty crowns is slightly darker - Fix rendering when there is a crown on oni and no crown on ura - Fix crowns overlapping the netplay 2P icon - Fix gauge in latency calibration - Fix debug to work on mobile, can be toggled with ctrl+alt+`;` on hacker's keyboard with permanent notification - Fix being unable to scroll the settings list without toggling something - Handle KeyboardInterrupt in server.py - Fix category jumping not working in session mode - Fix mouse cursor being hidden at results screen in session mode - Make "Issues" on the about screen and "An error occurred, please refresh" on loading screens translateable - CanvasCache uses integer increments for comparison instead of Date.now() - For imported songs, exclude song titles from genre comparisons if they appear in the name of the folder - Fix tja files with spaces in the notation - Fix second player's score on the results screen to have upside down appearance - Add fixed chinese strings
This commit is contained in:
@@ -4,6 +4,7 @@ class CanvasCache{
|
||||
if(w){
|
||||
this.resize(w, h, scale)
|
||||
}
|
||||
this.index = Number.MIN_SAFE_INTEGER
|
||||
}
|
||||
resize(w, h, scale){
|
||||
if(this.canvas){
|
||||
@@ -33,7 +34,7 @@ class CanvasCache{
|
||||
return
|
||||
}
|
||||
var saved = false
|
||||
var time = Date.now()
|
||||
var index = this.index++
|
||||
if(!img){
|
||||
var w = config.w
|
||||
var h = config.h
|
||||
@@ -44,11 +45,11 @@ class CanvasCache{
|
||||
}
|
||||
if(this.y + h > this.h){
|
||||
var clear = true
|
||||
var oldest = {time: time}
|
||||
var oldest = {index: index}
|
||||
this.map.forEach((oldImg, id) => {
|
||||
if(oldImg.time < oldest.time){
|
||||
if(oldImg.index < oldest.index){
|
||||
oldest.id = id
|
||||
oldest.time = oldImg.time
|
||||
oldest.index = oldImg.index
|
||||
}
|
||||
})
|
||||
var oldImg = this.map.get(oldest.id)
|
||||
@@ -84,7 +85,7 @@ class CanvasCache{
|
||||
this.map.set(config.id, img)
|
||||
callback(this.ctx)
|
||||
}
|
||||
img.time = time
|
||||
img.index = index
|
||||
if(setOnly){
|
||||
this.ctx.restore()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user