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

Method saveDisplayWindowGeometryToConfig

pcsx2-qt/MainWindow.cpp:3106–3122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3104}
3105
3106void MainWindow::saveDisplayWindowGeometryToConfig()
3107{
3108 if (m_display_surface->isFullScreen())
3109 {
3110 // if we somehow ended up here, don't save the fullscreen state to the config
3111 return;
3112 }
3113
3114 const QByteArray geometry = m_display_surface->saveGeometry();
3115 const QByteArray geometry_b64 = geometry.toBase64();
3116 const std::string old_geometry_b64 = Host::GetBaseStringSettingValue("UI", "DisplayWindowGeometry");
3117 if (old_geometry_b64 != geometry_b64.constData())
3118 {
3119 Host::SetBaseStringSettingValue("UI", "DisplayWindowGeometry", geometry_b64.constData());
3120 Host::CommitBaseSettingChanges();
3121 }
3122}
3123
3124void MainWindow::restoreDisplayWindowGeometryFromConfig()
3125{

Callers

nothing calls this directly

Calls 2

isFullScreenMethod · 0.80
saveGeometryMethod · 0.80

Tested by

no test coverage detected