* Make it so that the binary can be run from anywhere.
This commit is contained in:
jean.chalard
2009-01-01 23:25:47 +00:00
parent ec8900dd5c
commit f452bf89f1

View File

@@ -1,3 +1,4 @@
#include <unistd.h>
#include <GL/gl.h> // Header File For The OpenGL32 Library
#include <GL/glu.h> // Header File For The GLu32 Library
#include <GL/glx.h>
@@ -393,6 +394,12 @@ void fullscreen()
int main(int argc, char* argv[])
{
char* path = argv[0];
while (*path) ++path;
while ((*path != '/') && (path > argv[0])) --path;
if ('/' == *path) *path = 0;
if (strlen(argv[0]) != 0) chdir(argv[0]);
g_launcher = new JGameLauncher();
u32 flags = g_launcher->GetInitFlags();