From f07e32e07b5e76444b923e468a8782b4678a9439 Mon Sep 17 00:00:00 2001 From: Struma Date: Tue, 5 Jul 2022 21:37:18 -0400 Subject: [PATCH] don't crash when no conf is present --- meson.build | 5 ++++- src/config.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d5be3e4b..540bc96a 100644 --- a/meson.build +++ b/meson.build @@ -165,6 +165,9 @@ if steamworks == true if get_option('steamshim_debug') == true shim_args += '-DSTEAMSHIM_DEBUG' + shim_ws = 'console' + else + shim_ws = 'windows' endif executable(meson.project_name(), @@ -172,7 +175,7 @@ if steamworks == true dependencies: steamlib, cpp_args: shim_args, link_args: la.split(), - gui_app: (get_option('steamshim_debug') == false), + win_subsystem: shim_ws, install: (host_system != 'windows')) endif diff --git a/src/config.cpp b/src/config.cpp index 0a919ba6..a3a2e4f0 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -101,7 +101,7 @@ json::value readConfFile(const char *path) { json::value ret(0); if (!mkxp_fs::fileExists(path)) { - return ret; + return json::object({}); } try {