| 137 | } |
| 138 | |
| 139 | void 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 |
no test coverage detected