diff options
-rw-r--r-- | src/QuickMedia.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index a9087b1..5de8a0f 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -27,7 +27,7 @@ namespace QuickMedia { image_index(0) { window.setVerticalSyncEnabled(true); - if(!font.loadFromFile("fonts/Lato-Regular.ttf")) { + if(!font.loadFromFile("../../../fonts/Lato-Regular.ttf")) { fprintf(stderr, "Failed to load font!\n"); abort(); } diff --git a/src/main.cpp b/src/main.cpp index 1b85cbf..2899565 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,10 @@ #include "../include/QuickMedia.hpp" #include <X11/Xlib.h> +#include <libgen.h> +#include <unistd.h> int main(int argc, char **argv) { + chdir(dirname(argv[0])); XInitThreads(); QuickMedia::Program program; return program.run(argc, argv); |