summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-06 23:00:08 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-13 05:08:06 +0100
commit0e0a007a2503d468391004c8ea2faae305232345 (patch)
tree75feea527bd46aa4c534b77b560c89d538757f7f /src/citra_qt/main.cpp
parentConvert old logging calls to new logging macros (diff)
downloadyuzu-0e0a007a2503d468391004c8ea2faae305232345.tar
yuzu-0e0a007a2503d468391004c8ea2faae305232345.tar.gz
yuzu-0e0a007a2503d468391004c8ea2faae305232345.tar.bz2
yuzu-0e0a007a2503d468391004c8ea2faae305232345.tar.lz
yuzu-0e0a007a2503d468391004c8ea2faae305232345.tar.xz
yuzu-0e0a007a2503d468391004c8ea2faae305232345.tar.zst
yuzu-0e0a007a2503d468391004c8ea2faae305232345.zip
Diffstat (limited to '')
-rw-r--r--src/citra_qt/main.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 5293263cd..817732167 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -11,6 +11,7 @@
#include "common/logging/text_formatter.h"
#include "common/logging/log.h"
#include "common/logging/backend.h"
+#include "common/logging/filter.h"
#include "common/platform.h"
#include "common/scope_exit.h"
@@ -42,14 +43,10 @@
GMainWindow::GMainWindow()
{
-
Pica::g_debug_context = Pica::DebugContext::Construct();
Config config;
- if (!Settings::values.enable_log)
- LogManager::Shutdown();
-
ui.setupUi(this);
statusBar()->hide();
@@ -277,7 +274,8 @@ void GMainWindow::closeEvent(QCloseEvent* event)
int __cdecl main(int argc, char* argv[])
{
std::shared_ptr<Log::Logger> logger = Log::InitGlobalLogger();
- std::thread logging_thread(Log::TextLoggingLoop, logger);
+ Log::Filter log_filter(Log::Level::Info);
+ std::thread logging_thread(Log::TextLoggingLoop, logger, &log_filter);
SCOPE_EXIT({
logger->Close();
logging_thread.join();
@@ -285,7 +283,11 @@ int __cdecl main(int argc, char* argv[])
QApplication::setAttribute(Qt::AA_X11InitThreads);
QApplication app(argc, argv);
+
GMainWindow main_window;
+ // After settings have been loaded by GMainWindow, apply the filter
+ log_filter.ParseFilterString(Settings::values.log_filter);
+
main_window.show();
return app.exec();
}