Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to specify dispmanx layer #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions eop.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ static void signalHandler(int signalNumber)
void usage(const char *program)
{
fprintf(stderr, "Usage: %s ", program);
fprintf(stderr, "<file> [x y w h]\n");
fprintf(stderr, "<file> l [x y w h]\n");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [] here denotes optional param so I think the layer should also be denoted as optional > [l] [

fprintf(stderr, " file png or jpeg file to display\n");
fprintf(stderr, " l layer, if not specified, layer will be 1.\n");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"dispmanx layer to use; defaults to 1\n"

Also the full stop is not needed

fprintf(stderr, " x horizontal offset\n");
fprintf(stderr, " y vertical offset\n");
fprintf(stderr, " w width to use [0 for height constrained]\n");
Expand Down Expand Up @@ -61,7 +62,7 @@ int endsWith(const char *str, const char *suffix)

int main(int argc, char *argv[])
{
int32_t layer = 1;
int layer = 1;
uint32_t displayNumber = 0;
int xOffset = 0;
int yOffset = 0;
Expand All @@ -77,13 +78,25 @@ int main(int argc, char *argv[])
case 2:
f_name = argv[1];
break;
case 6:
case 3:
f_name = argv[1];
layer = atoi(argv[2]);
break;
case 6:
f_name = argv[1];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistent tab

xOffset = atoi(argv[2]);
yOffset = atoi(argv[3]);
width = atoi(argv[4]);
height = atoi(argv[5]);
break;
case 7:
f_name = argv[1];
layer = atoi(argv[2]);
xOffset = atoi(argv[3]);
yOffset = atoi(argv[4]);
width = atoi(argv[5]);
height = atoi(argv[6]);
break;
default:
usage(program);
return 1;
Expand Down