Revert !32
This commit is contained in:
parent
69a6b6ee8b
commit
d9a06596a7
6 changed files with 4 additions and 56 deletions
|
|
@ -36,14 +36,6 @@ password is printed to STDOUT. All other output happens on STDERR.
|
|||
horizontally by X pixels and vertically by Y pixels.
|
||||
*-d --dpi=N*
|
||||
Override the display's DPI value.
|
||||
*-r, --rotate=[0-3]*
|
||||
Rotate the UI to the given orientation. The
|
||||
values match the ones provided by the kernel in
|
||||
/sys/class/graphics/fbcon/rotate.
|
||||
* 0 - normal orientation (0 degree)
|
||||
* 1 - clockwise orientation (90 degrees)
|
||||
* 2 - upside down orientation (180 degrees)
|
||||
* 3 - counterclockwise orientation (270 degrees)
|
||||
*-h, --help*
|
||||
Print this message and exit.
|
||||
*-n*
|
||||
|
|
|
|||
|
|
@ -62,13 +62,6 @@ Mandatory arguments to long options are mandatory for short options too.
|
|||
vertical pixels, offset horizontally by X
|
||||
pixels and vertically by Y pixels
|
||||
-d --dpi=N Override the display's DPI value
|
||||
-r, --rotate=[0-3] Rotate the UI to the given orientation. The
|
||||
values match the ones provided by the kernel in
|
||||
/sys/class/graphics/fbcon/rotate.
|
||||
* 0 - normal orientation (0 degree)
|
||||
* 1 - clockwise orientation (90 degrees)
|
||||
* 2 - upside down orientation (180 degrees)
|
||||
* 3 - counterclockwise orientation (270 degrees)
|
||||
-h, --help Print this message and exit
|
||||
-n Do not append a newline character to a password
|
||||
-v, --verbose Enable more detailed logging output on STDERR
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ static void init_opts(ul_cli_opts *opts) {
|
|||
opts->x_offset = 0;
|
||||
opts->y_offset = 0;
|
||||
opts->dpi = 0;
|
||||
opts->rotation = LV_DISPLAY_ROTATION_0;
|
||||
opts->newline = true;
|
||||
opts->verbose = false;
|
||||
}
|
||||
|
|
@ -73,13 +72,6 @@ static void print_usage() {
|
|||
" vertical pixels, offset horizontally by X\n"
|
||||
" pixels and vertically by Y pixels\n"
|
||||
" -d --dpi=N Override the display's DPI value\n"
|
||||
" -r, --rotate=[0-3] Rotate the UI to the given orientation. The\n"
|
||||
" values match the ones provided by the kernel in\n"
|
||||
" /sys/class/graphics/fbcon/rotate.\n"
|
||||
" * 0 - normal orientation (0 degree)\n"
|
||||
" * 1 - clockwise orientation (90 degrees)\n"
|
||||
" * 2 - upside down orientation (180 degrees)\n"
|
||||
" * 3 - counterclockwise orientation (270 degrees)\n"
|
||||
" -h, --help Print this message and exit\n"
|
||||
" -n Do not append a newline character to a password\n"
|
||||
" -v, --verbose Enable more detailed logging output on STDERR\n"
|
||||
|
|
@ -100,7 +92,6 @@ void ul_cli_parse_opts(int argc, char *argv[], ul_cli_opts *opts) {
|
|||
{ "config-override", required_argument, NULL, 'C' },
|
||||
{ "geometry", required_argument, NULL, 'g' },
|
||||
{ "dpi", required_argument, NULL, 'd' },
|
||||
{ "rotate", required_argument, NULL, 'r' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ "verbose", no_argument, NULL, 'v' },
|
||||
{ "version", no_argument, NULL, 'V' },
|
||||
|
|
@ -109,7 +100,7 @@ void ul_cli_parse_opts(int argc, char *argv[], ul_cli_opts *opts) {
|
|||
|
||||
int opt, index = 0;
|
||||
|
||||
while ((opt = getopt_long(argc, argv, "m:C:g:d:r:hnvV", long_opts, &index)) != -1) {
|
||||
while ((opt = getopt_long(argc, argv, "m:C:g:d:hnvV", long_opts, &index)) != -1) {
|
||||
switch (opt) {
|
||||
case 'm':
|
||||
opts->message = strdup(optarg);
|
||||
|
|
@ -137,28 +128,6 @@ void ul_cli_parse_opts(int argc, char *argv[], ul_cli_opts *opts) {
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'r': {
|
||||
int orientation;
|
||||
if (sscanf(optarg, "%i", &orientation) != 1 || orientation < 0 || orientation > 3) {
|
||||
fprintf(stderr, "Invalid orientation argument \"%s\"\n", optarg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
switch (orientation) {
|
||||
case 0:
|
||||
opts->rotation = LV_DISPLAY_ROTATION_0;
|
||||
break;
|
||||
case 1:
|
||||
opts->rotation = LV_DISPLAY_ROTATION_270;
|
||||
break;
|
||||
case 2:
|
||||
opts->rotation = LV_DISPLAY_ROTATION_180;
|
||||
break;
|
||||
case 3:
|
||||
opts->rotation = LV_DISPLAY_ROTATION_90;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'h':
|
||||
print_usage();
|
||||
exit(EXIT_SUCCESS);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#define UL_COMMAND_LINE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "lvgl/lvgl.h"
|
||||
|
||||
/**
|
||||
* Options parsed from command line arguments
|
||||
|
|
@ -30,8 +29,6 @@ typedef struct {
|
|||
int y_offset;
|
||||
/* DPI */
|
||||
int dpi;
|
||||
/* Display rotation */
|
||||
lv_display_rotation_t rotation;
|
||||
/* If true, append a newline character to a password */
|
||||
bool newline;
|
||||
/* Verbose mode. If true, provide more detailed logging output on STDERR. */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/**
|
||||
* @file lv_conf.h
|
||||
* Configuration file for v9.2.2
|
||||
*/
|
||||
|
|
@ -990,7 +990,7 @@
|
|||
#define LV_USE_LINUX_FBDEV 1
|
||||
#if LV_USE_LINUX_FBDEV
|
||||
#define LV_LINUX_FBDEV_BSD 0
|
||||
#define LV_LINUX_FBDEV_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL
|
||||
#define LV_LINUX_FBDEV_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT
|
||||
#define LV_LINUX_FBDEV_BUFFER_COUNT 0
|
||||
#define LV_LINUX_FBDEV_BUFFER_SIZE 60
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -467,9 +467,6 @@ int main(int argc, char *argv[]) {
|
|||
lv_display_set_dpi(disp, cli_opts.dpi);
|
||||
}
|
||||
|
||||
/* Set up display rotation */
|
||||
lv_display_set_rotation(disp, cli_opts.rotation);
|
||||
|
||||
/* Prepare for routing physical keyboard input into the textarea */
|
||||
lv_group_t *keyboard_input_group = lv_group_create();
|
||||
bbx_indev_set_keyboard_input_group(keyboard_input_group);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue