mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-24 16:49:59 +01:00
-d commandline parameter for reloaded
git-svn-id: svn://code.dyne.org/veejay/trunk@737 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include "vj-api.h"
|
||||
static int port_num = 3490;
|
||||
static char hostname[255];
|
||||
static char datadir_str[1024];
|
||||
static int datadir =0;
|
||||
static int gveejay_theme = 1;
|
||||
static int verbosity = 0;
|
||||
static int timer = 6;
|
||||
@@ -56,6 +58,7 @@ static void usage(char *progname)
|
||||
printf( "-s/--size\t\tSet bank resolution (row X columns)\n");
|
||||
printf( "-X/\t\tSet number of tracks\n");
|
||||
printf( "-P/--preview\t\tSet main preview geometry (default to 112x96)" );
|
||||
printf( "-d/--datadir\t\tDirectory to gveejay.reloaded.glade file" );
|
||||
printf( "\n\n");
|
||||
exit(-1);
|
||||
}
|
||||
@@ -76,6 +79,11 @@ static int set_option( const char *name, char *value )
|
||||
{
|
||||
n_tracks = atoi(optarg);
|
||||
}
|
||||
else if (strcmp(name, "d") == 0 || strcmp(name, "datadir") == 0 )
|
||||
{
|
||||
strcpy( datadir_str, optarg );
|
||||
datadir=1;
|
||||
}
|
||||
else if( strcmp(name, "n") == 0 || strcmp(name, "no-theme") == 0)
|
||||
{
|
||||
gveejay_theme = 0;
|
||||
@@ -122,7 +130,7 @@ int main(int argc, char *argv[]) {
|
||||
// default host to connect to
|
||||
sprintf(hostname, "localhost");
|
||||
|
||||
while( ( n = getopt( argc, argv, "s:h:pP::nvHf:X:")) != EOF )
|
||||
while( ( n = getopt( argc, argv, "s:h:pP::nvHf:X:d:")) != EOF )
|
||||
{
|
||||
sprintf(option, "%c", n );
|
||||
err += set_option( option, optarg);
|
||||
@@ -148,6 +156,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
vevo_strict_init();
|
||||
|
||||
if( datadir )
|
||||
set_gd( datadir_str );
|
||||
|
||||
vj_gui_theme_setup(gveejay_theme);
|
||||
vj_gui_set_debug_level( verbosity , n_tracks,pw,ph);
|
||||
vj_gui_set_timeout(timer);
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#endif
|
||||
|
||||
static int TIMEOUT_SECONDS = 0;
|
||||
|
||||
static char *custom_path_ = NULL;
|
||||
/* Stream type identifiers */
|
||||
|
||||
void vj_gui_set_timeout(int timer)
|
||||
@@ -5817,15 +5817,30 @@ static void update_gui()
|
||||
|
||||
}
|
||||
|
||||
void set_gd( char *buf )
|
||||
{
|
||||
if(custom_path_)
|
||||
free(custom_path_);
|
||||
custom_path_ = strdup( buf );
|
||||
}
|
||||
|
||||
void get_gd(char *buf, char *suf, const char *filename)
|
||||
{
|
||||
char *str = NULL;
|
||||
|
||||
if( !custom_path_ )
|
||||
str = strdup(GVEEJAY_DATADIR);
|
||||
else
|
||||
str = strdup( custom_path_ );
|
||||
|
||||
if(filename !=NULL && suf != NULL)
|
||||
sprintf(buf, "%s/%s/%s", GVEEJAY_DATADIR,suf, filename );
|
||||
sprintf(buf, "%s/%s/%s", str,suf, filename );
|
||||
if(filename !=NULL && suf==NULL)
|
||||
sprintf(buf, "%s/%s", GVEEJAY_DATADIR, filename);
|
||||
sprintf(buf, "%s/%s", str, filename);
|
||||
if(filename == NULL && suf != NULL)
|
||||
sprintf(buf, "%s/%s/" , GVEEJAY_DATADIR, suf);
|
||||
sprintf(buf, "%s/%s/" , str, suf);
|
||||
|
||||
free(str);
|
||||
}
|
||||
/*
|
||||
static void veejay_untick(gpointer data)
|
||||
|
||||
Reference in New Issue
Block a user