diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 02ff8a4cc7..28428a9f01 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -110,6 +110,15 @@ void GMainWindow::ShowCallouts() { } GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { + Log::Filter log_filter; + log_filter.ParseFilterString(Settings::values.log_filter); + Log::SetGlobalFilter(log_filter); + FileUtil::CreateFullPath(FileUtil::GetUserPath(D_LOGS_IDX)); + Log::AddBackend( + std::make_unique(FileUtil::GetUserPath(D_LOGS_IDX) + LOG_FILE)); + Debugger::ToggleConsole(); + Settings::LogSettings(); + // register types to use in slots and signals qRegisterMetaType("size_t"); qRegisterMetaType("Service::AM::InstallStatus"); @@ -416,7 +425,6 @@ void GMainWindow::RestoreUIState() { ui.action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar); statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked()); - Debugger::ToggleConsole(); } void GMainWindow::ConnectWidgetEvents() { @@ -1473,14 +1481,6 @@ int main(int argc, char* argv[]) { setlocale(LC_ALL, "C"); GMainWindow main_window; - // After settings have been loaded by GMainWindow, apply the filter - Log::Filter log_filter; - log_filter.ParseFilterString(Settings::values.log_filter); - Log::SetGlobalFilter(log_filter); - FileUtil::CreateFullPath(FileUtil::GetUserPath(D_LOGS_IDX)); - Log::AddBackend( - std::make_unique(FileUtil::GetUserPath(D_LOGS_IDX) + LOG_FILE)); - Settings::LogSettings(); // Register CameraFactory Camera::RegisterFactory("image", std::make_unique());