Browse Source

UI: Fix relocatable Linux builds using legacy portable build flag

PatTheMav 1 năm trước cách đây
mục cha
commit
34c846cad9
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      UI/platform-x11.cpp

+ 5 - 2
UI/platform-x11.cpp

@@ -184,7 +184,7 @@ static inline bool check_path(const char *data, const char *path,
 	return (access(output.c_str(), R_OK) == 0);
 }
 
-#define INSTALL_DATA_PATH OBS_INSTALL_PREFIX OBS_DATA_PATH "/obs-studio/"
+#define INSTALL_DATA_PATH OBS_INSTALL_PREFIX "/" OBS_DATA_PATH "/obs-studio/"
 
 bool GetDataFilePath(const char *data, string &output)
 {
@@ -200,7 +200,10 @@ bool GetDataFilePath(const char *data, string &output)
 	if (relative_data_path) {
 		bool result = check_path(data, relative_data_path, output);
 		bfree(relative_data_path);
-		return result;
+
+		if (result) {
+			return true;
+		}
 	}
 
 	if (check_path(data, OBS_DATA_PATH "/obs-studio/", output))