修复高清画布缩放问题

This commit is contained in:
strawberry 2025-10-13 14:16:19 +08:00
parent d4d70e0c9a
commit bc8148fea8

View File

@ -37,7 +37,7 @@ maps.prototype._resetFloorImages = function () {
maps.prototype._setHDCanvasSize = function (ctx, width, height) {
if (main.replayChecking) return
ctx.setTransform(1, 0, 0, 1, 0, 0);
var ratio = core.domStyle.scale;
var ratio = core.domStyle.ratio;
ratio *= devicePixelRatio;
if (width != null) ctx.canvas.width = width * ratio;
if (height != null) ctx.canvas.height = height * ratio;