@@ -496,6 +496,9 @@ else if (id == R.id.use_custom_resolution)
496496 PreferenceManager .getDefaultSharedPreferences (GameLauncher .this ).edit ()
497497 .putBoolean (Q3EPreference .pref_ratio_use_custom_resolution , isChecked )
498498 .commit ();
499+
500+ if (V .rg_scrres .getCheckedRadioButtonId () == R .id .rg_scrres_scheme_ratio )
501+ UpdateCustomResolution (isChecked );
499502 UpdateResolutionText ();
500503 }
501504
@@ -1859,8 +1862,9 @@ public void onFocusChange(View v, boolean hasFocus) {
18591862 UpdateMouseManualMenu (!V .detectmouse .isChecked ());
18601863
18611864 SelectRadioGroup (V .rg_curpos , mPrefs .getInt (Q3EPreference .pref_mousepos , 3 ));
1865+ int scrres = mPrefs .getInt (Q3EPreference .pref_scrres_scheme , Q3EGlobals .SCREEN_FULL );
1866+ SelectRadioGroup (V .rg_scrres , scrres );
18621867 V .rg_scrres .setOnCheckedChangeListener (m_groupCheckChangeListener );
1863- SelectRadioGroup (V .rg_scrres , mPrefs .getInt (Q3EPreference .pref_scrres_scheme , Q3EGlobals .SCREEN_FULL ));
18641868 int scrresScheme = Utility .Step (mPrefs .getInt (Q3EPreference .pref_scrres_scale , 100 ), 10 );
18651869 V .res_scale .setProgress (scrresScheme );
18661870 V .tv_scale_current .setText (V .res_scale .getProgress () + "%" );
@@ -2020,6 +2024,8 @@ public void afterTextChanged(Editable s)
20202024 V .edt_harm_r_ambientLightingBrightness .setText (Q3EPreference .GetStringFromFloat (mPrefs , Q3EPreference .pref_harm_r_ambientLightingBrightness , 1.0f ));
20212025 V .edt_harm_r_maxFps .setText (Q3EPreference .GetStringFromInt (mPrefs , Q3EPreference .pref_harm_r_maxFps , 0 ));
20222026
2027+ V .use_custom_resolution .setChecked (mPrefs .getBoolean (Q3EPreference .pref_ratio_use_custom_resolution , false ));
2028+ V .use_custom_resolution .setOnCheckedChangeListener (m_checkboxChangeListener );
20232029 Runnable customResChanged = new Runnable () {
20242030 @ Override
20252031 public void run () {
@@ -2039,8 +2045,7 @@ public void run() {
20392045 V .onscreen_button_setting .setOnClickListener (m_buttonClickListener );
20402046 V .setup_onscreen_button_theme .setOnClickListener (m_buttonClickListener );
20412047 V .setup_controller .setOnClickListener (m_buttonClickListener );
2042- V .use_custom_resolution .setChecked (mPrefs .getBoolean (Q3EPreference .pref_ratio_use_custom_resolution , false ));
2043- V .use_custom_resolution .setOnCheckedChangeListener (m_checkboxChangeListener );
2048+ UpdateResolutionByType (scrres );
20442049
20452050 // SDL
20462051 SetupUI_SDL ();
@@ -3392,9 +3397,14 @@ else if(rgid == R.id.rg_scrres_scheme_ratio)
33923397 else
33933398 type = Q3EGlobals .SCREEN_FULL ;
33943399
3395- UpdateCustomerResolution (type == Q3EGlobals .SCREEN_CUSTOM || type == Q3EGlobals .SCREEN_FIXED_RATIO );
3400+ UpdateResolutionByType (type );
3401+ }
3402+
3403+ private void UpdateResolutionByType (int type )
3404+ {
3405+ UpdateCustomResolution (type == Q3EGlobals .SCREEN_CUSTOM || (type == Q3EGlobals .SCREEN_FIXED_RATIO && V .use_custom_resolution .isChecked ()));
33963406 UpdateResolutionScaleSchemeBar (type == Q3EGlobals .SCREEN_SCALE_BY_LENGTH || type == Q3EGlobals .SCREEN_SCALE_BY_AREA );
3397- UpdateCustomerRatio (type == Q3EGlobals .SCREEN_FIXED_RATIO );
3407+ UpdateCustomRatio (type == Q3EGlobals .SCREEN_FIXED_RATIO );
33983408 UpdateResolutionText ();
33993409 }
34003410
@@ -3416,15 +3426,15 @@ private void UpdateResolutionText()
34163426 V .tv_scrres_size .setText (size [0 ] + " x " + size [1 ]);
34173427 }
34183428
3419- private void UpdateCustomerResolution (boolean on )
3429+ private void UpdateCustomResolution (boolean on )
34203430 {
34213431 V .res_x .setEnabled (on );
34223432 V .res_y .setEnabled (on );
34233433 V .res_customlayout .setEnabled (on );
34243434 V .res_customlayout .setVisibility (on ? View .VISIBLE : View .GONE );
34253435 }
34263436
3427- private void UpdateCustomerRatio (boolean on )
3437+ private void UpdateCustomRatio (boolean on )
34283438 {
34293439 V .ratio_x .setEnabled (on );
34303440 V .ratio_y .setEnabled (on );
0 commit comments