Fixed filesystem test program to compile with older versions of C.

This commit is contained in:
Philipp Wiesemann 2015-12-01 22:21:29 +01:00
parent fd9f06a0c2
commit b2445f7bbd
1 changed files with 5 additions and 2 deletions

View File

@ -17,6 +17,9 @@
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
char *base_path;
char *pref_path;
/* Enable standard application logging */ /* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
@ -25,7 +28,7 @@ main(int argc, char *argv[])
return 1; return 1;
} }
char *base_path = SDL_GetBasePath(); base_path = SDL_GetBasePath();
if(base_path == NULL){ if(base_path == NULL){
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n", SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n",
SDL_GetError()); SDL_GetError());
@ -35,7 +38,7 @@ main(int argc, char *argv[])
SDL_Log("base path: '%s'\n", base_path); SDL_Log("base path: '%s'\n", base_path);
SDL_free(base_path); SDL_free(base_path);
char *pref_path = SDL_GetPrefPath("libsdl", "testfilesystem"); pref_path = SDL_GetPrefPath("libsdl", "testfilesystem");
if(pref_path == NULL){ if(pref_path == NULL){
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n", SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n",
SDL_GetError()); SDL_GetError());