mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 17:12:37 -06:00
Merge pull request #4013 from jroweboy/init-logging-sooner
citra-qt: Init logging sooner so we dont miss some logs on startup
This commit is contained in:
commit
2f84dd31f0
1 changed files with 9 additions and 9 deletions
|
@ -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 a new issue