From 033aa51d878f01be158cb7a8e82d10f7db631c09 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Thu, 13 Feb 2020 22:58:04 +0000 Subject: [PATCH] testfilesystem: Don't exit the application if SDL_GetBasePath isn't supported --- test/testfilesystem.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/testfilesystem.c b/test/testfilesystem.c index 64b56dfa3..c9a82d025 100644 --- a/test/testfilesystem.c +++ b/test/testfilesystem.c @@ -32,28 +32,28 @@ main(int argc, char *argv[]) if(base_path == NULL){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n", SDL_GetError()); - return 1; + } else { + SDL_Log("base path: '%s'\n", base_path); + SDL_free(base_path); } - SDL_Log("base path: '%s'\n", base_path); - SDL_free(base_path); pref_path = SDL_GetPrefPath("libsdl", "testfilesystem"); if(pref_path == NULL){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n", SDL_GetError()); - return 1; + } else { + SDL_Log("pref path: '%s'\n", pref_path); + SDL_free(pref_path); } - SDL_Log("pref path: '%s'\n", pref_path); - SDL_free(pref_path); pref_path = SDL_GetPrefPath(NULL, "testfilesystem"); if(pref_path == NULL){ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path without organization: %s\n", SDL_GetError()); - return 1; + } else { + SDL_Log("pref path: '%s'\n", pref_path); + SDL_free(pref_path); } - SDL_Log("pref path: '%s'\n", pref_path); - SDL_free(pref_path); SDL_Quit(); return 0;