Skip to content

Commit

Permalink
use direct values from args read
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaczer committed Jul 24, 2024
1 parent 57b3994 commit 5fa675f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

**Usage:**

`boot-logo <logo_start[sec]> <logo_ending[sec]> <logo_speed[fps]>`
`boot-logo <logo_start[tick]> <logo_ending[tick]> <logo_speed[ppf]>`

- logo_start = delay until the logo start in [seconds]
- logo_ending = time from the moment the logo stops moving and sound is played until the logo app closes in [seconds]
- logo_start = delay until the logo start in [1/60th of a second]
- logo_ending = time from the moment the logo stops moving and sound is played until the logo app closes in [1/60th of a second]
- logo_speed = speed at which the logo moves in [pixels per frame]

You can customize your boot-logo output by modyfing following files:
Expand Down
12 changes: 5 additions & 7 deletions logo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ int main(int argc, char* argv[]) {
}

if (args) {
animdel = argint[1] * 60;
enddel = argint[2] * 60;
animdel = argint[1];
enddel = argint[2];
animspeed = argint[3];
} else {
animdel = ANIMDELAY;
enddel = ENDDELAY;
animspeed = ANIMSPEED;
printf("Usage: %s <logo_start[sec]> <logo_ending[sec]> <logo_speed[ppf]>\nRunning default setup: %s", argv[0], argv[0]);
if ((int)animdel%60 != 0 || (int)enddel%60 != 0)
printf(" %i.%i %i.%i %i\n", (int)animdel/60, (int)animdel%60, (int)enddel/60, (int)enddel%60, animspeed);
else
printf(" %i %i %i\n", (int)animdel/60, (int)enddel/60, animspeed);
printf("Usage: %s <logo_start[tick]> <logo_ending[tick]> <logo_speed[ppf]>\nRunning default setup: %s", argv[0], argv[0]);
printf(" %i %i %i\n", animdel, enddel, animspeed);
printf("tick - 1/60th of a second\nppf - pixels per frame\n");
}

homepath = getenv("HOME");
Expand Down

0 comments on commit 5fa675f

Please sign in to comment.