summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-03-11 12:02:51 -0800
committerVito Caputo <vcaputo@pengaru.com>2022-03-11 12:07:00 -0800
commit009f16f93b2a055ec0e14751e6d779849f87ab04 (patch)
treece67ccf0c6a868faf118cef8086944f1f33ed8ee
parent078c3790b8b30b2198480160315edde3f884a42d (diff)
main: move til_init() to start of main
Currently this was done rather late for vestigial pre-libtil reasons; it used to be a local function for specifically "create rendering threads" purpose. But it's rather awkward now to see such an initializer called late after myriad other til_* API is being used, and there's nothing gauranteeing til_init() will continue to strictly create rendering threads. Nothing is actually changing in what til_init() does here, it's just a cosmetic movement of the call site and s/librototiller/libtil/ in the error message.
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 0cf41c0..a8a1988 100644
--- a/src/main.c
+++ b/src/main.c
@@ -233,6 +233,9 @@ int main(int argc, const char *argv[])
til_args_t args = {};
int r;
+ exit_if((r = til_init()) < 0,
+ "unable to initialize libtil: %s", strerror(-r));
+
exit_if(til_args_parse(argc, argv, &args) < 0,
"unable to process arguments");
@@ -254,9 +257,6 @@ int main(int argc, const char *argv[])
exit_if(!fps_setup(),
"unable to setup fps counter");
- exit_if((r = til_init()) < 0,
- "unable to initialize librototiller: %s", strerror(-r));
-
gettimeofday(&rototiller.start_tv, NULL);
exit_if((r = til_module_create_context(
rototiller.module,
© All Rights Reserved