From e3ccf5397d0576d6d629b504ebed761f03a08c9d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 28 Nov 2013 20:44:31 +0100
Subject: Search data in app directory.


diff --git a/lopan.c b/lopan.c
index d653914..a597b9f 100644
--- a/lopan.c
+++ b/lopan.c
@@ -1,3 +1,4 @@
+#include <libgen.h>
 #include <stdlib.h>
 #include <sys/time.h>
 #include <unistd.h>
@@ -543,6 +544,8 @@ int code;
 unsigned char redraw;
 int backup;
 
+	chdir(dirname(argv[0]));
+
 	bgsetnumber=tilesetnumber=-1;
 	randomize();
 	opendisplay(640,400);
-- 
1.8.3.4

