Skip to content

Commit

Permalink
examples: Fix program names and call cog_init()
Browse files Browse the repository at this point in the history
Add calls to cog_init() to make the examples honor the
COG_PLATFORM_NAME, COG_PLATFORM_PARAMS, and COG_MODULEDIR
environment variables properly. While at it, fix their calls
to g_set_prgname().
  • Loading branch information
aperezdc committed Dec 19, 2023
1 parent 3039213 commit 6fa5157
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/viewport.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ main(int argc, char *argv[])
return EXIT_FAILURE;
}

g_set_prgname("view-stack");
g_set_prgname("viewport");
cog_init(NULL, NULL);

g_autoptr(CogShell) shell = cog_shell_new(g_get_prgname(), FALSE);
g_autoptr(GError) error = NULL;
Expand Down
3 changes: 2 additions & 1 deletion examples/viewports.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ main(int argc, char *argv[])
return EXIT_FAILURE;
}

g_set_prgname("view-stacks");
g_set_prgname("viewports");
cog_init(NULL, NULL);

g_autoptr(CogShell) shell = cog_shell_new(NULL, FALSE);
g_autoptr(GError) error = NULL;
Expand Down

0 comments on commit 6fa5157

Please sign in to comment.