Use different .cfg files depending on GUI API used
SDL1 => gfx2.cfg SDL2 => gfx2-sdl2.cfg Win32 => gfx2-win32.cfg X11 => gfx2-x11.cfg defaults to gfx2.cfg
This commit is contained in:
parent
b4005cbcb3
commit
5370670b10
@ -2136,8 +2136,9 @@ int Load_CFG(int reload_all)
|
||||
T_Config_video_mode cfg_video_mode;
|
||||
int key_conversion = 0;
|
||||
|
||||
strcpy(filename,Config_directory);
|
||||
strcat(filename,"gfx2.cfg");
|
||||
snprintf(filename, sizeof(filename), "%s%s", Config_directory, CONFIG_FILENAME);
|
||||
|
||||
GFX2_Log(GFX2_DEBUG, "Load_CFG() trying to load %s\n", filename);
|
||||
|
||||
file_size=File_length(filename);
|
||||
|
||||
|
||||
@ -89,6 +89,14 @@ void Set_config_directory(const char * program_dir, char * config_dir);
|
||||
/// Name of the binary file containing some configuration settings.
|
||||
#if defined (__MINT__)
|
||||
#define CONFIG_FILENAME "GFX2.CFG"
|
||||
#elif defined(USE_SDL)
|
||||
#define CONFIG_FILENAME "gfx2.cfg"
|
||||
#elif defined(USE_SDL2)
|
||||
#define CONFIG_FILENAME "gfx2-sdl2.cfg"
|
||||
#elif defined(USE_X11)
|
||||
#define CONFIG_FILENAME "gfx2-x11.cfg"
|
||||
#elif defined(WIN32)
|
||||
#define CONFIG_FILENAME "gfx2-win32.cfg"
|
||||
#else
|
||||
#define CONFIG_FILENAME "gfx2.cfg"
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user