mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-30 14:20:32 +00:00
Add check for resolution ID
This commit is contained in:
parent
0a6d2a8102
commit
6dc5684da0
1 changed files with 32 additions and 0 deletions
|
@ -543,6 +543,38 @@ namespace Ryujinx.Ui.Windows
|
||||||
_directoryChanged = false;
|
_directoryChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_configureResolution.ActiveId != ""){
|
||||||
|
|
||||||
|
int _width = 0;
|
||||||
|
int _height = 0;
|
||||||
|
|
||||||
|
switch(_configureResolution.ActiveId){
|
||||||
|
|
||||||
|
case "0":
|
||||||
|
break;
|
||||||
|
case "1":
|
||||||
|
_width = 1280;
|
||||||
|
_height = 720;
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
_width = 1280;
|
||||||
|
_height = 720;
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
_width = 2160;
|
||||||
|
_height = 1440;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigurationState.Instance.Ui.WindowSizeWidth.Value = _width;
|
||||||
|
ConfigurationState.Instance.Ui.WindowSizeHeight.Value = _height;
|
||||||
|
|
||||||
|
_parent.UpdateWindowResolution();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!float.TryParse(_resScaleText.Buffer.Text.Replace(",", "."), out float resScaleCustom) || resScaleCustom <= 0.0f)
|
if (!float.TryParse(_resScaleText.Buffer.Text.Replace(",", "."), out float resScaleCustom) || resScaleCustom <= 0.0f)
|
||||||
{
|
{
|
||||||
resScaleCustom = 1.0f;
|
resScaleCustom = 1.0f;
|
||||||
|
|
Loading…
Reference in a new issue