forked from Miroirs/x49gp
add --scale option
This commit is contained in:
parent
01408a338f
commit
c729b553ff
2 changed files with 8 additions and 1 deletions
|
@ -28,6 +28,7 @@ void config_init( char* progname, int argc, char* argv[] )
|
||||||
opt.firmware = NULL;
|
opt.firmware = NULL;
|
||||||
opt.model = MODEL_50G;
|
opt.model = MODEL_50G;
|
||||||
opt.name = NULL;
|
opt.name = NULL;
|
||||||
|
opt.scale = 1.0;
|
||||||
|
|
||||||
#if defined( __linux__ )
|
#if defined( __linux__ )
|
||||||
opt.font = "urw gothic l";
|
opt.font = "urw gothic l";
|
||||||
|
@ -52,6 +53,7 @@ void config_init( char* progname, int argc, char* argv[] )
|
||||||
{"49gp", no_argument, NULL, 496},
|
{"49gp", no_argument, NULL, 496},
|
||||||
{"49gp-newrpl", no_argument, NULL, 497},
|
{"49gp-newrpl", no_argument, NULL, 497},
|
||||||
{"name", required_argument, NULL, 'n'},
|
{"name", required_argument, NULL, 'n'},
|
||||||
|
{"scale", required_argument, NULL, 's'},
|
||||||
|
|
||||||
{"font", required_argument, NULL, 't'},
|
{"font", required_argument, NULL, 't'},
|
||||||
|
|
||||||
|
@ -75,6 +77,7 @@ void config_init( char* progname, int argc, char* argv[] )
|
||||||
" --49gp-newrpl show HP 49g+ faceplate with newRPL labels\n"
|
" --49gp-newrpl show HP 49g+ faceplate with newRPL labels\n"
|
||||||
" -n --name[=<name>] set alternate UI name\n"
|
" -n --name[=<name>] set alternate UI name\n"
|
||||||
" -t --font[=<fontname>] set alternate UI font\n"
|
" -t --font[=<fontname>] set alternate UI font\n"
|
||||||
|
" -s --scale[=<X.x>] scale GUI by X.x\n"
|
||||||
" -D --enable-debug[=<port>] enable the debugger interface\n"
|
" -D --enable-debug[=<port>] enable the debugger interface\n"
|
||||||
" (default port: %u)\n"
|
" (default port: %u)\n"
|
||||||
" -d --debug use along -D to also start the debugger immediately\n"
|
" -d --debug use along -D to also start the debugger immediately\n"
|
||||||
|
@ -126,6 +129,9 @@ void config_init( char* progname, int argc, char* argv[] )
|
||||||
case 'n':
|
case 'n':
|
||||||
opt.name = strdup( optarg );
|
opt.name = strdup( optarg );
|
||||||
break;
|
break;
|
||||||
|
case 's':
|
||||||
|
opt.scale = atof( optarg );
|
||||||
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
opt.font = strdup( optarg );
|
opt.font = strdup( optarg );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct options {
|
||||||
char* name;
|
char* name;
|
||||||
|
|
||||||
char* font;
|
char* font;
|
||||||
|
double scale;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct options opt;
|
extern struct options opt;
|
||||||
|
|
Loading…
Reference in a new issue