blob: 7d11b98dac2c16c1026678e208e057479d74501c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
--- ui/gtk/gtk_compat.cc.orig 2022-02-07 13:39:41 UTC
+++ ui/gtk/gtk_compat.cc
@@ -62,27 +62,47 @@ auto DlCast(void* symbol) {
}
void* GetLibGio() {
+#if defined(OS_BSD)
+ static void* libgio = DlOpen("libgio-2.0.so");
+#else
static void* libgio = DlOpen("libgio-2.0.so.0");
+#endif
return libgio;
}
void* GetLibGdkPixbuf() {
+#if defined(OS_BSD)
+ static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so");
+#else
static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
+#endif
return libgdk_pixbuf;
}
void* GetLibGdk3() {
+#if defined(OS_BSD)
+ static void* libgdk3 = DlOpen("libgdk-3.so");
+#else
static void* libgdk3 = DlOpen("libgdk-3.so.0");
+#endif
return libgdk3;
}
void* GetLibGtk3(bool check = true) {
+#if defined(OS_BSD)
+ static void* libgtk3 = DlOpen("libgtk-3.so", check);
+#else
static void* libgtk3 = DlOpen("libgtk-3.so.0", check);
+#endif
return libgtk3;
}
void* GetLibGtk4(bool check = true) {
+#if defined(OS_BSD)
+ static void* libgtk4 = DlOpen("libgtk-4.so", check);
+#else
static void* libgtk4 = DlOpen("libgtk-4.so.1", check);
+#endif
return libgtk4;
}
|