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.model = MODEL_50G;
|
||||
opt.name = NULL;
|
||||
opt.scale = 1.0;
|
||||
|
||||
#if defined( __linux__ )
|
||||
opt.font = "urw gothic l";
|
||||
|
@ -52,6 +53,7 @@ void config_init( char* progname, int argc, char* argv[] )
|
|||
{"49gp", no_argument, NULL, 496},
|
||||
{"49gp-newrpl", no_argument, NULL, 497},
|
||||
{"name", required_argument, NULL, 'n'},
|
||||
{"scale", required_argument, NULL, 's'},
|
||||
|
||||
{"font", required_argument, NULL, 't'},
|
||||
|
||||
|
@ -74,7 +76,8 @@ void config_init( char* progname, int argc, char* argv[] )
|
|||
" --49gp show HP 49g+ faceplate\n"
|
||||
" --49gp-newrpl show HP 49g+ faceplate with newRPL labels\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"
|
||||
" (default port: %u)\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':
|
||||
opt.name = strdup( optarg );
|
||||
break;
|
||||
case 's':
|
||||
opt.scale = atof( optarg );
|
||||
break;
|
||||
case 't':
|
||||
opt.font = strdup( optarg );
|
||||
break;
|
||||
|
|
|
@ -26,6 +26,7 @@ struct options {
|
|||
char* name;
|
||||
|
||||
char* font;
|
||||
double scale;
|
||||
};
|
||||
|
||||
extern struct options opt;
|
||||
|
|
Loading…
Reference in a new issue