Mercurial > repos > blastem
comparison nuklear_ui/filechooser_gtk.c @ 2356:12d594e69e04
Don't use absolute paths for GTK so things work across distros without extra work
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 22 Oct 2023 11:57:53 -0700 |
parents | 94cf5cc89227 |
children |
comparison
equal
deleted
inserted
replaced
2355:94cf5cc89227 | 2356:12d594e69e04 |
---|---|
36 #define LOAD_SYM(s, t, name) t->name = dlsym(s, #name); if (!t->name) { fputs("filechooser_gtk: Failed to load " #name "\n", stderr); goto error_cleanup; } | 36 #define LOAD_SYM(s, t, name) t->name = dlsym(s, #name); if (!t->name) { fputs("filechooser_gtk: Failed to load " #name "\n", stderr); goto error_cleanup; } |
37 | 37 |
38 static gtk* check_init_gtk(void) | 38 static gtk* check_init_gtk(void) |
39 { | 39 { |
40 static const char *so_paths[] = { | 40 static const char *so_paths[] = { |
41 #ifdef X86_64 | 41 "libgtk-3.so.0", |
42 "/usr/lib/x86_64-linux-gnu/libgtk-3.so.0", | 42 "libgtk-x11-2.0.so.0", |
43 "/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0", | |
44 #elif X86_32 | |
45 "/usr/lib/i386-linux-gnu/libgtk-3.so.0", | |
46 "/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0", | |
47 #else | |
48 //TODO: what are these paths on ARM? | |
49 #endif | |
50 }; | 43 }; |
51 static gtk *funcs; | 44 static gtk *funcs; |
52 static uint8_t already_init; | 45 static uint8_t already_init; |
53 if (!already_init) { | 46 if (!already_init) { |
54 void *so = NULL; | 47 void *so = NULL; |