diff options
Diffstat (limited to 'gdk-pixbuf/queryloaders.c')
-rw-r--r-- | gdk-pixbuf/queryloaders.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c index 037c39abf..6087bd8be 100644 --- a/gdk-pixbuf/queryloaders.c +++ b/gdk-pixbuf/queryloaders.c @@ -212,6 +212,35 @@ query_module (GString *contents, const char *dir, const char *file) g_free (path); } +#ifdef G_OS_WIN32 + +static char * +get_toplevel (void) +{ + static char *toplevel = NULL; + + if (toplevel == NULL) + toplevel = g_win32_get_package_installation_directory_of_module (NULL); + + return toplevel; +} + +static char * +get_libdir (void) +{ + static char *libdir = NULL; + + if (libdir == NULL) + libdir = g_build_filename (get_toplevel (), "lib", NULL); + + return libdir; +} + +#undef GDK_PIXBUF_LIBDIR +#define GDK_PIXBUF_LIBDIR get_libdir() + +#endif + static gchar * gdk_pixbuf_get_module_file (void) { |