try loading resources from share, fallback to cwd

This commit is contained in:
ouwou
2021-06-30 18:15:03 -04:00
parent 220aa6d13a
commit 698ec52d5c
12 changed files with 80 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
#include "imgmanager.hpp"
#include "util.hpp"
#include "abaddon.hpp"
ImageManager::ImageManager() {
m_cb_dispatcher.connect(sigc::mem_fun(*this, &ImageManager::RunCallbacks));
@@ -112,7 +113,7 @@ Glib::RefPtr<Gdk::Pixbuf> ImageManager::GetPlaceholder(int size) {
return m_pixs.at(name);
try {
auto buf = Gdk::Pixbuf::create_from_file("res/decamarks.png", size, size);
auto buf = Gdk::Pixbuf::create_from_file(Abaddon::Get().GetResPath() + "/decamarks.png", size, size);
m_pixs[name] = buf;
return buf;
} catch (std::exception &e) {