binary and project now named ui48
This commit is contained in:
parent
236b046998
commit
50329fff2d
5 changed files with 39 additions and 14 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -52,4 +52,4 @@ Module.symvers
|
|||
Mkfile.old
|
||||
dkms.conf
|
||||
|
||||
/hp48-sdl2
|
||||
/ui48
|
||||
|
|
7
Makefile
7
Makefile
|
@ -1,6 +1,9 @@
|
|||
# Makefile
|
||||
|
||||
TARGETS = hp48-sdl2
|
||||
TARGETS = ui48
|
||||
VERSION_MAJOR = 0
|
||||
VERSION_MINOR = 0
|
||||
PATCHLEVEL = 0
|
||||
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
|
@ -71,7 +74,7 @@ LIBS = -lm \
|
|||
|
||||
all: $(TARGETS)
|
||||
|
||||
hp48-sdl2: $(DOTOS)
|
||||
ui48: $(DOTOS)
|
||||
|
||||
# Binaries
|
||||
$(TARGETS):
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# hp48-sdl2
|
||||
# ui48
|
||||
|
||||
HP48 UI in sdl2 (standalone)
|
||||
Standalone HP 48(SX/GX) front-end ready to be plugged into emulators.
|
||||
|
||||
Provide both GUI implemented in SDL2 and TUI in ncurses.
|
||||
|
||||
Extracted from x48ng.
|
||||
|
|
34
src/config.c
34
src/config.c
|
@ -13,7 +13,7 @@
|
|||
#include "config.h"
|
||||
|
||||
static config_t config = {
|
||||
.progname = ( char* )"ui48ng",
|
||||
.progname = ( char* )"ui48",
|
||||
|
||||
.gx = true,
|
||||
.verbose = false,
|
||||
|
@ -74,13 +74,31 @@ config_t* config_init( int argc, char* argv[] )
|
|||
{0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
const char* help_text = "usage: %s [options]\n options:\n -h --help what you "
|
||||
"are reading\n -V --verbose be verbose (default: false)\n "
|
||||
" --no-chrome only display the LCD (default: false)\n --fullscreen make the "
|
||||
"UI fullscreen (default: false)\n --scale=<number> make the UI scale <number> times "
|
||||
"(default: 1.0)\n --mono make the UI monochrome (default: false)\n "
|
||||
" --gray make the UI grayscale (default: false)\n "
|
||||
"--leave-shift-keys _not_ mapping the shift keys to let them free for numbers (default: false)\n";
|
||||
const char* help_text = "usage: %s [options]\n"
|
||||
"options:\n"
|
||||
" -h --help what you are reading\n"
|
||||
" --gui use graphical (SDL2) front-end (default: true)\n"
|
||||
" --tui use text front-end (default: false)\n"
|
||||
" --tui-small use text small front-end (2×2 pixels per character) (default: "
|
||||
"false)\n"
|
||||
" --tui-tiny use text tiny front-end (2×4 pixels per character) (default: "
|
||||
"false)\n"
|
||||
" --no-chrome only display the LCD (default: "
|
||||
"false)\n"
|
||||
" --fullscreen make the UI fullscreen "
|
||||
"(default: false)\n"
|
||||
" --scale=<number> make the UI scale <number> times "
|
||||
"(default: 1.0)\n"
|
||||
" --mono make the UI monochrome (default: "
|
||||
"false)\n"
|
||||
" --gray make the UI grayscale (default: "
|
||||
"false)\n"
|
||||
" --gx make the GUI looks like a HP 48GX (default: "
|
||||
"auto)\n"
|
||||
" --sx make the GUI looks like a HP 48SX (default: "
|
||||
"auto)\n"
|
||||
" --leave-shift-keys _not_ mapping the shift keys to let them free for numbers (default: "
|
||||
"false)\n";
|
||||
|
||||
while ( c != EOF ) {
|
||||
c = getopt_long( argc, argv, optstring, long_options, &option_index );
|
||||
|
|
|
@ -488,7 +488,7 @@ void ui_start_ncurses( config_t* conf )
|
|||
mvvline( 1, LCD_RIGHT, ACS_VLINE, LCD_BOTTOM - 1 );
|
||||
|
||||
mvprintw( 0, 2, "[ | | | | | ]" ); /* annunciators */
|
||||
mvprintw( 0, LCD_RIGHT - 18, "< %s >", config.progname );
|
||||
mvprintw( 0, LCD_RIGHT - 18, "< %s v%i.%i.%i >", config.progname, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL );
|
||||
|
||||
mvprintw( LCD_BOTTOM, 2, "[ wire: %s ]-[ IR: %s ]-[ contrast: %i ]", config.wire_name, config.ir_name, get_contrast() );
|
||||
|
||||
|
|
Loading…
Reference in a new issue