aboutsummaryrefslogtreecommitdiff
path: root/games/yquake2/files/patch-src_client_vid_vid.c
blob: 3238c79518d5443024068ee5b5c1cc8ddcb6912a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- src/client/vid/vid.c.orig	2022-01-22 08:51:28 UTC
+++ src/client/vid/vid.c
@@ -318,7 +318,13 @@ const char* lib_ext = "so";
 static void
 VID_GetRendererLibPath(const char *renderer, char *path, size_t len)
 {
-	snprintf(path, len, "%sref_%s.%s", Sys_GetBinaryDir(), renderer, lib_ext);
+	char *next_path = NULL;
+
+	while ((next_path = FS_GetNextRawPath (next_path)) != NULL) {
+		snprintf(path, len, "%s/ref_%s.%s", next_path, renderer, lib_ext);
+		if (Sys_IsFile(path))
+			break;
+	}
 }
 
 /*