mirror of
https://github.com/citra-mirror/citra.git
synced 2024-08-20 18:33:24 +02: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
@ -110,6 +110,15 @@ void GMainWindow::ShowCallouts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
|
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
|
// register types to use in slots and signals
|
||||||
qRegisterMetaType<size_t>("size_t");
|
qRegisterMetaType<size_t>("size_t");
|
||||||
qRegisterMetaType<Service::AM::InstallStatus>("Service::AM::InstallStatus");
|
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);
|
ui.action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar);
|
||||||
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked());
|
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked());
|
||||||
Debugger::ToggleConsole();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::ConnectWidgetEvents() {
|
void GMainWindow::ConnectWidgetEvents() {
|
||||||
@ -1473,14 +1481,6 @@ int main(int argc, char* argv[]) {
|
|||||||
setlocale(LC_ALL, "C");
|
setlocale(LC_ALL, "C");
|
||||||
|
|
||||||
GMainWindow main_window;
|
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
|
// Register CameraFactory
|
||||||
Camera::RegisterFactory("image", std::make_unique<Camera::StillImageCameraFactory>());
|
Camera::RegisterFactory("image", std::make_unique<Camera::StillImageCameraFactory>());
|
||||||
|
Loading…
Reference in New Issue
Block a user