summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-21 21:52:42 +0200
committerLioncash <mathew1800@gmail.com>2018-07-21 22:21:19 +0200
commitd66b43dadfac1e9324fee48e97361e2f858f8af5 (patch)
tree6007104127ffaa62cb5cb94f5c47fadf4c192fb8 /src/yuzu_cmd
parentMerge pull request #754 from lioncash/part (diff)
downloadyuzu-d66b43dadfac1e9324fee48e97361e2f858f8af5.tar
yuzu-d66b43dadfac1e9324fee48e97361e2f858f8af5.tar.gz
yuzu-d66b43dadfac1e9324fee48e97361e2f858f8af5.tar.bz2
yuzu-d66b43dadfac1e9324fee48e97361e2f858f8af5.tar.lz
yuzu-d66b43dadfac1e9324fee48e97361e2f858f8af5.tar.xz
yuzu-d66b43dadfac1e9324fee48e97361e2f858f8af5.tar.zst
yuzu-d66b43dadfac1e9324fee48e97361e2f858f8af5.zip
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp2
-rw-r--r--src/yuzu_cmd/yuzu.cpp21
2 files changed, 14 insertions, 9 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 723e8b4cc..cea1a5e62 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -15,7 +15,7 @@
Config::Config() {
// TODO: Don't hardcode the path; let the frontend decide where to put the config files.
- sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini";
+ sdl2_config_loc = FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) + "sdl2-config.ini";
sdl2_config = std::make_unique<INIReader>(sdl2_config_loc);
Reload();
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 24db1065a..b5392c499 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -56,6 +56,18 @@ static void PrintVersion() {
std::cout << "yuzu " << Common::g_scm_branch << " " << Common::g_scm_desc << std::endl;
}
+static void InitializeLogging() {
+ Log::Filter log_filter(Log::Level::Debug);
+ log_filter.ParseFilterString(Settings::values.log_filter);
+ Log::SetGlobalFilter(log_filter);
+
+ Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
+
+ const std::string& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir);
+ FileUtil::CreateFullPath(log_dir);
+ Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE));
+}
+
/// Application entry point
int main(int argc, char** argv) {
Config config;
@@ -124,14 +136,7 @@ int main(int argc, char** argv) {
LocalFree(argv_w);
#endif
- Log::Filter log_filter(Log::Level::Debug);
- log_filter.ParseFilterString(Settings::values.log_filter);
- Log::SetGlobalFilter(log_filter);
-
- Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
- FileUtil::CreateFullPath(FileUtil::GetUserPath(D_LOGS_IDX));
- Log::AddBackend(
- std::make_unique<Log::FileBackend>(FileUtil::GetUserPath(D_LOGS_IDX) + LOG_FILE));
+ InitializeLogging();
MicroProfileOnThreadCreate("EmuThread");
SCOPE_EXIT({ MicroProfileShutdown(); });