This commit is contained in:
LoafyLemon 2024-09-10 16:21:25 +01:00
parent 2a0f6a1966
commit e278a90b43

View File

@ -78,7 +78,7 @@ init -1 python:
def create_disk_cache(self, d, hash, size=None, type="img"): def create_disk_cache(self, d, hash, size=None, type="img"):
width, height = size or self.sizes width, height = size or self.sizes
filepath = os.path.join("cache", type, f"{hash}.png") filepath = os.path.join("cache", type, f"{hash}.png").replace("\\", "/") # Windows bleh
rendpath = os.path.join("game", filepath) rendpath = os.path.join("game", filepath)
syspath = os.path.join(config.gamedir, "cache", type) syspath = os.path.join(config.gamedir, "cache", type)
@ -96,7 +96,7 @@ init -1 python:
return d return d
def get_disk_cache(self, hash, type="img"): def get_disk_cache(self, hash, type="img"):
filepath = os.path.join("cache", type, f"{hash}.png") filepath = os.path.join("cache", type, f"{hash}.png").replace("\\", "/") # Windows bleh
return Image(filepath) if renpy.loadable(filepath) else None return Image(filepath) if renpy.loadable(filepath) else None