Files
haikuports/games-puzzle/abrick/patches/abrick-1.12.patch
2014-09-06 09:59:06 +02:00

24 lines
642 B
Diff

--- abrick-1.12-src/main.cpp.org 2014-09-03 20:35:03.195821568 +0200
+++ abrick-1.12-src/main.cpp 2014-09-03 20:34:52.090177536 +0200
@@ -10,11 +10,20 @@
#include "config.h"
#include "menu.h"
#include "allmenus.h"
+
+#ifdef __HAIKU__
+#include <unistd.h>
+#include <libgen.h>
+#endif
+
SDL_Surface *Screen; // global object
//-----------------------------------------------------------------------------
//! initialize SDL, and start main menu
int main(int argc, char **argv)
{
+ #ifdef __HAIKU__
+ chdir(dirname(argv[0]));
+ #endif
Screen = 0;
bool Fullscreen = false; // defaults
bool SWSurface = true;