aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-05 21:25:59 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-05 21:25:59 +0200
commitae1897cf2ce6a447b253ffa8489b5c016a23fb41 (patch)
tree660a14cd189ce93abd4a158c69a55abc2bf95700 /src
parent041ee753b1253a2f66df0de6e8905774e2e33a77 (diff)
Resources path should use the same path as meson installed path
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8fb12cd..ed8fba7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -396,10 +396,15 @@ int main(int argc, char **argv) {
gsr::init_theme(gsr_info);
std::string project_dir;
- if(access("images/gpu_screen_recorder_logo.png", F_OK) == 0)
+ if(access("images/gpu_screen_recorder_logo.png", F_OK) == 0) {
project_dir = "./";
- else
+ } else {
+#ifdef GSR_OVERLAY_RESOURCES_PATH
+ project_dir = GSR_OVERLAY_RESOURCES_PATH "/";
+#else
project_dir = "/usr/share/gsr-overlay/";
+#endif
+ }
mgl::Init init;
Display *display = (Display*)mgl_get_context()->connection;