Files
haikuports/games-puzzle/sdllopan/patches/sdllopan-10.patchset
Adrien Destugues 1d59820519 Add SDL Lopan recipe.
* This could use better tileset and background graphics... any
suggestions?
2013-11-28 20:55:31 +01:00

28 lines
572 B
Plaintext

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