From d85d9880fb0485a8401fcc2902ed876ada55e87f Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Thu, 22 Aug 2024 19:43:57 +0300 Subject: [PATCH] don't use texture_get_key path address optimization when compiled with hot reload support --- townengine/textures/textures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/townengine/textures/textures.c b/townengine/textures/textures.c index dd4d4ba..5d727ed 100644 --- a/townengine/textures/textures.c +++ b/townengine/textures/textures.c @@ -383,7 +383,7 @@ void textures_update_atlas(struct texture_cache *cache) { } /* EXPERIMANTAL: LIKELY TO BE REMOVED! */ -#ifdef __linux__ /* use rodata elf section for fast lookups of repeating textures */ +#if defined(__linux__) && !defined(HOT_RELOAD_SUPPORT) /* use rodata elf section for fast lookups of repeating textures */ #include "townengine/system/linux/elf.h" @@ -550,7 +550,7 @@ size_t textures_get_num_atlases(const struct texture_cache *cache) { } void textures_reset_state(void) { -#ifdef __linux__ +#if defined(__linux__) && !defined(HOT_RELOAD_SUPPORT) last_path = NULL; last_texture = (t_texture_key){0}; shfree(ptr_to_texture);