Skip to content

Commit ce1c4e8

Browse files
committed
Adjust time per scene and scroll text a bit to introduce Jack! :-)
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent a56192b commit ce1c4e8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

demo.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,12 @@ void render_tunnel(DemoContext *ctx) {
417417

418418
/* Scroll text rendering with different styles */
419419
void render_scroll_text(DemoContext *ctx) {
420-
const char *text = " INFIX - CONTAINER DEMO *** GREETINGS TO THE DEMOSCENE *** "
421-
" NETCONF *** RESTCONF *** YANG *** SAY HI TO JACK! *** ";
420+
const char *text = " INFIX - CONTAINER DEMO"
421+
" *** GREETINGS TO THE DEMOSCENE"
422+
" *** NETCONF and RESTCONF APIs"
423+
" *** SAY HI TO JACK! :-) "
424+
" *** YANG is the real HERO tho ..."
425+
;
422426

423427
if (ctx->scroll_style == SCROLL_NONE) {
424428
return;
@@ -735,16 +739,17 @@ int main(int argc, char *argv[]) {
735739
/* Handle scene transitions with fade (only if not fixed) */
736740
if (ctx.fixed_scene == -1) {
737741
Uint32 scene_duration = current_time - scene_start;
742+
Uint32 scene_display_time = 15000; /* 15 seconds per scene */
738743
float fade_duration = 300.0f; /* 300ms fade */
739744

740-
if (scene_duration > 10000) {
745+
if (scene_duration > scene_display_time) {
741746
/* Start fade out */
742747
if (!ctx.fading) {
743748
ctx.fading = 1;
744749
ctx.fade_alpha = 1.0f;
745750
}
746751

747-
float fade_progress = (scene_duration - 10000) / fade_duration;
752+
float fade_progress = (scene_duration - scene_display_time) / fade_duration;
748753

749754
if (fade_progress < 1.0f) {
750755
/* Fade out */

0 commit comments

Comments
 (0)