Start Logger After Launcher UI
This commit is contained in:
parent
0ccf578478
commit
c6048ec4fb
@ -56,21 +56,21 @@ void handle_non_launch_client_only_commands(const options_t &options) {
|
||||
void configure_client(const options_t &options) {
|
||||
// Load Cache
|
||||
State state;
|
||||
if (!options.no_cache) {
|
||||
bool save_settings = !options.no_cache;
|
||||
if (save_settings) {
|
||||
state = load_cache();
|
||||
}
|
||||
|
||||
// Read From Environment
|
||||
state.update(false);
|
||||
|
||||
// --default
|
||||
bool save_settings = !options.no_cache;
|
||||
if (!options.use_default) {
|
||||
// Show UI
|
||||
if (!options.use_default) {
|
||||
ConfigurationUI *ui = new ConfigurationUI(state, save_settings);
|
||||
const int ret = ui->run();
|
||||
delete ui;
|
||||
if (ret <= 0) {
|
||||
// Cancel Launch
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
@ -52,30 +52,30 @@ static void start_game(const options_t &options) {
|
||||
// Disable stdout Buffering
|
||||
setvbuf(stdout, nullptr, _IONBF, 0);
|
||||
|
||||
// Setup Crash Reporting
|
||||
if (!options.disable_logger) {
|
||||
setup_logger();
|
||||
}
|
||||
|
||||
// Configure Client Options
|
||||
if (!reborn_is_server()) {
|
||||
configure_client(options);
|
||||
}
|
||||
|
||||
// Start Logging
|
||||
if (!options.disable_logger) {
|
||||
setup_logger();
|
||||
}
|
||||
|
||||
// Bootstrap
|
||||
bootstrap(options);
|
||||
}
|
||||
|
||||
// Main
|
||||
int main(int argc, char *argv[]) {
|
||||
int main(const int argc, char *argv[]) {
|
||||
// Parse Options
|
||||
options_t options = parse_options(argc, argv);
|
||||
const options_t options = parse_options(argc, argv);
|
||||
|
||||
// Set Debug Tag
|
||||
reborn_debug_tag = "(Launcher) ";
|
||||
|
||||
// Debug Logging
|
||||
unsetenv(_MCPI_LOG_FD_ENV);
|
||||
reborn_set_log(-1);
|
||||
bind_to_env(MCPI_DEBUG_ENV, options.debug);
|
||||
|
||||
// Setup Environment
|
||||
|
@ -20,7 +20,7 @@ bool _feature_has(const char *name, const int server_default) {
|
||||
if (!loaded) {
|
||||
const char *env = getenv(MCPI_FEATURE_FLAGS_ENV);
|
||||
if (env) {
|
||||
flags.from_string(env);
|
||||
env_value_to_obj(flags, env);
|
||||
}
|
||||
loaded = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user