From 2ef63f997e1eb5290a6305256da03f4c57f961fb Mon Sep 17 00:00:00 2001 From: Benau Date: Sat, 17 Apr 2021 13:16:27 +0800 Subject: [PATCH] Allow texture console reloading GEGLTexture --- src/graphics/sp/sp_texture_manager.cpp | 2 ++ src/utils/debug.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/graphics/sp/sp_texture_manager.cpp b/src/graphics/sp/sp_texture_manager.cpp index 24281efde..307885f85 100644 --- a/src/graphics/sp/sp_texture_manager.cpp +++ b/src/graphics/sp/sp_texture_manager.cpp @@ -36,6 +36,8 @@ SPTextureManager::SPTextureManager() ((unsigned)std::thread::hardware_concurrency()), m_gl_cmd_function_count(0) { + if (!CVS->isGLSL()) + return; if (m_max_threaded_load_obj.load() == 0) { m_max_threaded_load_obj.store(2); diff --git a/src/utils/debug.cpp b/src/utils/debug.cpp index dc0b9fd4e..1469f95c0 100644 --- a/src/utils/debug.cpp +++ b/src/utils/debug.cpp @@ -37,6 +37,7 @@ #include "graphics/sp/sp_shader.hpp" #include "graphics/sp/sp_texture_manager.hpp" #include "graphics/sp/sp_uniform_assigner.hpp" +#include "graphics/stk_tex_manager.hpp" #include "guiengine/modaldialog.hpp" #include "guiengine/screen_keyboard.hpp" #include "guiengine/widgets/label_widget.hpp" @@ -1002,6 +1003,8 @@ bool handleContextMenuAction(s32 cmd_id) sptm->dumpAllTextures(); return false; } + if (t.empty()) + STKTexManager::getInstance()->reloadAllTextures(); lw->setText(sptm->reloadTexture(t), true); #endif // Don't close the dialog after each run