mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
ReloadShaders: actually don't reload already loaded stuff unless forced
This commit is contained in:
parent
d9dd73bfc8
commit
f8306f80c1
1 changed files with 4 additions and 2 deletions
|
@ -114,7 +114,7 @@ SYMBOL_EXPORT void DestroyShader(struct Game* game, ALLEGRO_SHADER* shader) {
|
|||
|
||||
SYMBOL_INTERNAL void ReloadShaders(struct Game* game, bool force) {
|
||||
struct List* list = game->_priv.shaders;
|
||||
PrintConsole(game, "Reloading shaders...");
|
||||
PrintConsole(game, force ? "Reloading shaders..." : "Loading shaders...");
|
||||
while (list) {
|
||||
struct ShaderListItem* item = list->data;
|
||||
if (!item->loaded || force) {
|
||||
|
@ -127,11 +127,13 @@ SYMBOL_INTERNAL void ReloadShaders(struct Game* game, bool force) {
|
|||
if (log) {
|
||||
FatalError(game, false, "%s", log);
|
||||
}
|
||||
} else {
|
||||
item->loaded = true;
|
||||
}
|
||||
}
|
||||
list = list->next;
|
||||
}
|
||||
PrintConsole(game, "Shaders reloaded.");
|
||||
PrintConsole(game, "Shaders loaded.");
|
||||
}
|
||||
|
||||
SYMBOL_INTERNAL void DestroyShaders(struct Game* game) {
|
||||
|
|
Loading…
Reference in a new issue