From 8b7cb205038e4b4973530d528b1fbbe41a3087ff Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Thu, 13 Apr 2023 12:42:32 +0200 Subject: [PATCH] allow external update request --- src/gpufont/shader_catalog.cpp | 7 +++++++ src/gpufont/shader_catalog.hpp | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gpufont/shader_catalog.cpp b/src/gpufont/shader_catalog.cpp index b3ed7d4..b6012dc 100644 --- a/src/gpufont/shader_catalog.cpp +++ b/src/gpufont/shader_catalog.cpp @@ -52,6 +52,9 @@ class ShaderCatalog::Impl { public: Impl(const std::string & dir) : dir(dir){ } + void requestUpdate(const std::string & name){ + list.requestUpdate(name); + } private: std::string readFile(const std::string & filename, std::string & error){ @@ -190,4 +193,8 @@ std::shared_ptr ShaderCatalog::get(const std::string & na void ShaderCatalog::update(){ impl->update(); } + +void ShaderCatalog::requestUpdate(const std::string & name){ + impl->requestUpdate(name); +} } diff --git a/src/gpufont/shader_catalog.hpp b/src/gpufont/shader_catalog.hpp index e27f7f6..b1c95fd 100644 --- a/src/gpufont/shader_catalog.hpp +++ b/src/gpufont/shader_catalog.hpp @@ -26,6 +26,7 @@ class ShaderCatalog { std::shared_ptr get(const std::string & name); void update(); + void requestUpdate(const std::string & name); private: class Impl;