MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / initialize

Method initialize

pcsx2-qt/MainWindow.cpp:139–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void MainWindow::initialize()
140{
141#ifdef __APPLE__
142 // The cocoa backing isn't initialized yet, delay this until stuff is set up with a `RunOnUIThread` call
143 QtHost::RunOnUIThread([this] {
144 CocoaTools::MarkHelpMenu(m_ui.menuHelp->toNSMenu());
145 });
146#endif
147 m_ui.setupUi(this);
148 setupAdditionalUi();
149 connectSignals();
150 connectVMThreadSignals(g_emu_thread);
151
152 restoreStateFromConfig();
153 switchToGameListView();
154 updateWindowTitle();
155 updateGameDependentActions();
156 updateEmulationActions(false, s_vm_valid, false);
157 updateStatusBarWidgetVisibility();
158
159 if (s_vm_paused)
160 {
161 m_ui.actionPause->setChecked(true);
162 m_ui.actionToolbarPause->setChecked(true);
163 }
164
165#ifdef _WIN32
166 registerForDeviceNotifications();
167#endif
168
169 if (Host::GetBoolSettingValue("EmuCore", "EnableMouseLock", false))
170 setupMouseMoveHandler();
171}
172
173// TODO: Figure out how to set this in the .ui file
174/// Marks the icons for all actions in the given menu as mask icons

Callers 3

setupAdditionalUiMethod · 0.45
recreateMethod · 0.45
mainFunction · 0.45

Calls 1

setupUiMethod · 0.45

Tested by

no test coverage detected