Integrated the changes by PheeL for Caanoo support
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1629 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
14
src/setup.c
14
src/setup.c
@@ -44,7 +44,7 @@
|
||||
#include "io.h"
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(__GP2X__)
|
||||
#if defined(__GP2X__) || defined(__WIZ__) || defined(__CAANOO__)
|
||||
// This is a random default value ...
|
||||
#define PATH_MAX 32768
|
||||
#endif
|
||||
@@ -115,7 +115,7 @@ void Set_data_directory(const char * program_dir, char * data_dir)
|
||||
#if defined(__macosx__)
|
||||
strcat(data_dir,"Contents/Resources/");
|
||||
// On GP2X, executable is not in bin/
|
||||
#elif defined (__gp2x__)
|
||||
#elif defined (__GP2X__) || defined (__gp2x__) || defined (__WIZ__) || defined (__CAANOO__)
|
||||
strcat(data_dir,"share/grafx2/");
|
||||
// All other targets, program is in a "bin" subdirectory
|
||||
#else
|
||||
@@ -140,7 +140,7 @@ void Set_config_directory(const char * program_dir, char * config_dir)
|
||||
#if defined(__amigaos4__) || defined(__AROS__)
|
||||
strcpy(config_dir,"PROGDIR:");
|
||||
// GP2X
|
||||
#elif defined(__GP2X__)
|
||||
#elif defined(__GP2X__) || defined(__WIZ__) || defined(__CAANOO__)
|
||||
// On the GP2X, the program is installed to the sdcard, and we don't want to mess with the system tree which is
|
||||
// on an internal flash chip. So, keep these settings locals.
|
||||
strcpy(config_dir,program_dir);
|
||||
@@ -149,9 +149,9 @@ void Set_config_directory(const char * program_dir, char * config_dir)
|
||||
|
||||
// In priority: check root directory
|
||||
strcpy(config_dir, program_dir);
|
||||
// On all these targets except OSX and GP2X, the executable is in ./bin
|
||||
#if !defined(__macosx__) && !defined(__gp2x__)
|
||||
strcat(config_dir, "../");
|
||||
// On all the remaining targets except OSX, the executable is in ./bin
|
||||
#if !defined(__macosx__)
|
||||
strcat(config_dir, "../");
|
||||
#endif
|
||||
strcpy(filename, config_dir);
|
||||
strcat(filename, "gfx2.cfg");
|
||||
@@ -203,7 +203,7 @@ void Set_config_directory(const char * program_dir, char * config_dir)
|
||||
{
|
||||
// Echec: on se rabat sur le repertoire de l'executable.
|
||||
strcpy(config_dir,program_dir);
|
||||
#if !defined(__macosx__) && !defined(__gp2x__)
|
||||
#if defined(__macosx__)
|
||||
strcat(config_dir, "../");
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user