MCPcopy Create free account
hub / github.com/cemu-project/Cemu / LoadSettings

Method LoadSettings

src/gui/MainWindow.cpp:1265–1302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1263}
1264
1265void MainWindow::LoadSettings()
1266{
1267 g_config.Load();
1268 const auto& config = GetConfig();
1269
1270 if(config.check_update)
1271 m_update_available = CemuUpdateWindow::IsUpdateAvailableAsync();
1272
1273 if (config.window_position != Vector2i{ -1,-1 })
1274 this->SetPosition({ config.window_position.x, config.window_position.y });
1275
1276 if (config.window_size != Vector2i{ -1,-1 })
1277 {
1278 this->SetSize({ config.window_size.x, config.window_size.y });
1279
1280 if (config.window_maximized)
1281 this->Maximize();
1282 }
1283
1284 if (config.pad_position != Vector2i{ -1,-1 })
1285 {
1286 g_window_info.restored_pad_x = config.pad_position.x;
1287 g_window_info.restored_pad_y = config.pad_position.y;
1288 }
1289
1290 if (config.pad_size != Vector2i{ -1,-1 })
1291 {
1292 g_window_info.restored_pad_width = config.pad_size.x;
1293 g_window_info.restored_pad_height = config.pad_size.y;
1294
1295 g_window_info.pad_maximized = config.pad_maximized;
1296 }
1297
1298 this->TogglePadView();
1299
1300 if(m_game_list)
1301 m_game_list->LoadConfig();
1302}
1303
1304void MainWindow::SaveSettings()
1305{

Callers

nothing calls this directly

Calls 4

TogglePadViewMethod · 0.95
LoadConfigMethod · 0.80
LoadMethod · 0.45
SetPositionMethod · 0.45

Tested by

no test coverage detected