static void SaveVmSettings() { ScopedPtr<wxFileConfig> vmini( OpenFileConfig( GetVmSettingsFilename() ) ); IniSaver vmsaver( vmini ); g_Conf->EmuOptions.LoadSave( vmsaver ); sApp.DispatchVmSettingsEvent( vmsaver ); }
void roomOriginSize(room_s* r, vect3Di_s* o, vect3Di_s* s) { if(!r || (!o && !s))return; vect3Di_s m=vect3Di(8192,8192,8192); vect3Di_s M=vect3Di(0,0,0); listCell_s *lc=r->rectangles.first; while(lc) { m=vmini(lc->data.position,m); m=vmini(vaddi(lc->data.position,lc->data.size),m); M=vmaxi(lc->data.position,M); M=vmaxi(vaddi(lc->data.position,lc->data.size),M); lc=lc->next; } if(o)*o=m; if(s)*s=vsubi(M,m); }
static void LoadVmSettings() { // Load virtual machine options and apply some defaults overtop saved items, which // are regulated by the PCSX2 UI. ScopedPtr<wxFileConfig> vmini( OpenFileConfig( GetVmSettingsFilename() ) ); IniLoader vmloader( vmini ); g_Conf->EmuOptions.LoadSave( vmloader ); g_Conf->EmuOptions.GS.LimitScalar = g_Conf->Framerate.NominalScalar; if (g_Conf->EnablePresets){ g_Conf->IsOkApplyPreset(g_Conf->PresetIndex); } sApp.DispatchVmSettingsEvent( vmloader ); }