File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,19 +11,25 @@ DFhackCExport const int32_t dfhooks_priority = 100;
1111// and the main event loop is initiated
1212DFhackCExport void dfhooks_init () {
1313 if (getenv (" DFHACK_DISABLE" )) {
14- fprintf (stdout , " dfhack: DFHACK_DISABLE detected in environment; disabling\n " );
14+ fprintf (stderr , " dfhack: DFHACK_DISABLE detected in environment; disabling\n " );
1515 disabled = true ;
1616 return ;
1717 }
1818
1919 // we need to init DF globals before we can check the commandline
20- if (!DFHack::Core::getInstance ().InitMainThread () || !df::global::game)
20+ if (!DFHack::Core::getInstance ().InitMainThread () || !df::global::game) {
21+ disabled = true ;
2122 return ;
23+ }
24+
2225 const std::string & cmdline = df::global::game->command_line .original ;
2326 if (cmdline.find (" --disable-dfhack" ) != std::string::npos) {
24- fprintf (stdout , " dfhack: --disable-dfhack specified on commandline; disabling\n " );
27+ fprintf (stderr , " dfhack: --disable-dfhack specified on commandline; disabling\n " );
2528 disabled = true ;
29+ return ;
2630 }
31+
32+ fprintf (stderr, " DFHack pre-init successful.\n " );
2733}
2834
2935// called from the main thread after the main event loops exits
You can’t perform that action at this time.
0 commit comments