From 0032b3ad832bc8945ff48a71b265e5166b81715a Mon Sep 17 00:00:00 2001 From: TabularElf Date: Mon, 19 Sep 2022 02:44:15 +1000 Subject: [PATCH] Minor changes --- objects/obj_test_manual_write/Draw_64.gml | 1 - objects/obj_test_manual_write/obj_test_manual_write.yy | 1 - scripts/Canvas/Canvas.gml | 6 ++---- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 objects/obj_test_manual_write/Draw_64.gml diff --git a/objects/obj_test_manual_write/Draw_64.gml b/objects/obj_test_manual_write/Draw_64.gml deleted file mode 100644 index 7f304ce..0000000 --- a/objects/obj_test_manual_write/Draw_64.gml +++ /dev/null @@ -1 +0,0 @@ -draw_text(8,8, "Canvas Status: " + string(__prevStatus)); \ No newline at end of file diff --git a/objects/obj_test_manual_write/obj_test_manual_write.yy b/objects/obj_test_manual_write/obj_test_manual_write.yy index 2de7079..b74a2b0 100644 --- a/objects/obj_test_manual_write/obj_test_manual_write.yy +++ b/objects/obj_test_manual_write/obj_test_manual_write.yy @@ -22,7 +22,6 @@ {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, - {"isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, {"isDnD":false,"eventNum":2,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, ], "properties": [], diff --git a/scripts/Canvas/Canvas.gml b/scripts/Canvas/Canvas.gml index ac8c466..e02864d 100644 --- a/scripts/Canvas/Canvas.gml +++ b/scripts/Canvas/Canvas.gml @@ -287,12 +287,10 @@ function Canvas(_width, _height) constructor { static UpdateCache = function() { switch(GetStatus()) { - case CanvasStatus.HAS_DATA_CACHED: - Restore(); - __UpdateCache(); - break; case CanvasStatus.NO_DATA: + case CanvasStatus.HAS_DATA_CACHED: __init(); + CheckSurface(); case CanvasStatus.HAS_DATA: __UpdateCache(); break;