X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=0b775f49e50ead8cf723c07973af12636c2d1619;hb=635efa35743022a87d0eccf0509562e83fa86c0d;hp=48e1eceb6fb45cbe48e6de9d591f8ea830f92a49;hpb=ed586cc08f8ea818882cf5385901a3330a9def7f;p=rugen diff --git a/src/main.c b/src/main.c index 48e1ece..0b775f4 100644 --- a/src/main.c +++ b/src/main.c @@ -49,6 +49,7 @@ int main( int argc, char *argv[] ) gtk_init( &argc, &argv ); // Linux hack to determine path of the executable + memset(path, 0, sizeof(path)); readlink( "/proc/self/exe", path, 512 ); if ( strstr( path, "/bin/rugen" ) ) { @@ -56,6 +57,12 @@ int main( int argc, char *argv[] ) strcat( path, "/share/rugen/pixmaps" ); add_pixmap_directory( path ); } + else if ( strstr( path, "/src/rugen" ) ) + { + ( *strstr( path, "/src/rugen" ) ) = '\0'; + strcat( path, "/pixmaps" ); + add_pixmap_directory( path ); + } else { add_pixmap_directory( PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps" );