$OpenBSD: patch-source_Files_cpp,v 1.1.1.1 2018/09/04 21:56:09 bcallah Exp $

SDL_GetBasePath() doesn't work?
Add OpenBSD and correct path search.

Index: source/Files.cpp
--- source/Files.cpp.orig
+++ source/Files.cpp
@@ -101,24 +101,23 @@ void Files::Init(const char * const *argv)
 	{
 		// Find the path to the resource directory. This will depend on the
 		// operating system, and can be overridden by a command line argument.
-		char *str = SDL_GetBasePath();
+		char *str = "/usr/local/share/endless-sky";
 		if(!str)
 			throw runtime_error("Unable to get path to resource directory!");
 		
 		resources = str;
-		SDL_free(str);
 	}
 #if defined _WIN32
 	FixWindowsSlashes(resources);
 #endif
 	if(resources.back() != '/')
 		resources += '/';
-#if defined __linux__ || defined __FreeBSD__ || defined __DragonFly__
+#if defined __linux__ || defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__
 	// Special case, for Linux: the resource files are not in the same place as
 	// the executable, but are under the same prefix (/usr or /usr/local).
 	static const string LOCAL_PATH = "/usr/local/";
 	static const string STANDARD_PATH = "/usr/";
-	static const string RESOURCE_PATH = "share/games/endless-sky/";
+	static const string RESOURCE_PATH = "share/endless-sky/";
 	if(!resources.compare(0, LOCAL_PATH.length(), LOCAL_PATH))
 		resources = LOCAL_PATH + RESOURCE_PATH;
 	else if(!resources.compare(0, STANDARD_PATH.length(), STANDARD_PATH))
