mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 20:14:17 +01:00
citra-qt: Init logging sooner so we dont miss some logs on startup
This commit is contained in:
parent
5c52c6e64a
commit
6a973cc0bb
@ -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<Log::FileBackend>(FileUtil::GetUserPath(D_LOGS_IDX) + LOG_FILE));
|
||||
Debugger::ToggleConsole();
|
||||
Settings::LogSettings();
|
||||
|
||||
// register types to use in slots and signals
|
||||
qRegisterMetaType<size_t>("size_t");
|
||||
qRegisterMetaType<Service::AM::InstallStatus>("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<Log::FileBackend>(FileUtil::GetUserPath(D_LOGS_IDX) + LOG_FILE));
|
||||
Settings::LogSettings();
|
||||
|
||||
// Register CameraFactory
|
||||
Camera::RegisterFactory("image", std::make_unique<Camera::StillImageCameraFactory>());
|
||||
|
Loading…
Reference in New Issue
Block a user