4 protected BaseContainer m_DisplayUserSettings;
5 protected UserSettings m_VideoUserSettings;
6 protected BaseContainer m_VideoSettings;
8 protected const int COMBO_OPTION_QUALITY = 0;
9 protected const int COMBO_OPTION_PERFORMANCE = 1;
12 void SetConsolePreset(
int presetIndex)
15 m_DisplayUserSettings =
GetGame().GetEngineUserSettings().GetModule(
"DisplayUserSettings");
16 m_VideoUserSettings =
GetGame().GetEngineUserSettings().GetModule(
"VideoUserSettings");
17 m_VideoSettings =
GetGame().GetGameUserSettings().GetModule(
"SCR_VideoSettings");
19 if (!m_DisplayUserSettings || !m_VideoUserSettings || !m_VideoSettings)
22 if (presetIndex == EVideoQualityPreset.SERIES_S_PRESET_QUALITY)
24 m_DisplayUserSettings.Set(
"OverallQuality", EVideoQualityPreset.SERIES_S_PRESET_QUALITY);
25 m_VideoUserSettings.Set(
"ResolutionScale", 0.7);
26 m_VideoUserSettings.Set(
"Fsaa", 2);
27 m_VideoSettings.Set(
"m_bNearDofEffect",
false);
29 m_VideoUserSettings.Set(
"MaxFps", 30);
30 m_VideoUserSettings.Set(
"Vsynch",
true);
31 m_VideoSettings.Set(
"m_iLastUsedPreset", EVideoQualityPreset.SERIES_S_PRESET_QUALITY);
33 else if (presetIndex == EVideoQualityPreset.SERIES_S_PRESET_PERFORMANCE)
35 m_DisplayUserSettings.Set(
"OverallQuality", EVideoQualityPreset.SERIES_S_PRESET_PERFORMANCE);
36 m_VideoUserSettings.Set(
"ResolutionScale", 0.60);
37 m_VideoUserSettings.Set(
"Fsaa", 0);
38 m_VideoSettings.Set(
"m_bNearDofEffect",
false);
40 m_VideoUserSettings.Set(
"MaxFps", 60);
41 m_VideoUserSettings.Set(
"Vsynch",
true);
42 m_VideoSettings.Set(
"m_iLastUsedPreset", EVideoQualityPreset.SERIES_S_PRESET_PERFORMANCE);
44 else if (presetIndex == EVideoQualityPreset.SERIES_X_PRESET_QUALITY)
46 m_DisplayUserSettings.Set(
"OverallQuality", EVideoQualityPreset.SERIES_X_PRESET_QUALITY);
47 m_VideoUserSettings.Set(
"ResolutionScale", 0.75);
48 m_VideoUserSettings.Set(
"Fsaa", 2);
49 m_VideoSettings.Set(
"m_bNearDofEffect",
false);
51 m_VideoUserSettings.Set(
"MaxFps", 30);
52 m_VideoUserSettings.Set(
"Vsynch",
true);
53 m_VideoSettings.Set(
"m_iLastUsedPreset", EVideoQualityPreset.SERIES_X_PRESET_QUALITY);
55 else if (presetIndex == EVideoQualityPreset.SERIES_X_PRESET_PERFORMANCE)
57 m_DisplayUserSettings.Set(
"OverallQuality", EVideoQualityPreset.SERIES_X_PRESET_PERFORMANCE);
58 m_VideoUserSettings.Set(
"ResolutionScale", 0.50);
59 m_VideoUserSettings.Set(
"Fsaa", 2);
60 m_VideoSettings.Set(
"m_bNearDofEffect",
false);
62 m_VideoUserSettings.Set(
"MaxFps", 60);
63 m_VideoUserSettings.Set(
"Vsynch",
true);
64 m_VideoSettings.Set(
"m_iLastUsedPreset", EVideoQualityPreset.SERIES_X_PRESET_PERFORMANCE);
67 GetGame().ApplySettingsPreset();
68 GetGame().UserSettingsChanged();
79 enum EVideoQualityPreset