mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-06 06:43:49 +00:00
Allow changing resolution
This commit is contained in:
parent
15369826f9
commit
a3bb9e19ff
3 changed files with 128 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Navigation;
|
||||
using static PowerControl.Helpers.PhysicalMonitorBrightnessController;
|
||||
|
||||
namespace PowerControl
|
||||
{
|
||||
|
|
@ -50,6 +51,29 @@ namespace PowerControl
|
|||
}
|
||||
},
|
||||
new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "Resolution",
|
||||
ApplyDelay = 1000,
|
||||
OptionsValues = delegate()
|
||||
{
|
||||
var resolutions = Helpers.PhysicalMonitorBrightnessController.GetAllResolutions();
|
||||
if (resolutions.Count() > 1)
|
||||
return resolutions.Select(item => (object)item).ToArray();
|
||||
return null;
|
||||
},
|
||||
CurrentValue = delegate()
|
||||
{
|
||||
return Helpers.PhysicalMonitorBrightnessController.GetResolution();
|
||||
},
|
||||
ApplyValue = delegate(object selected)
|
||||
{
|
||||
Helpers.PhysicalMonitorBrightnessController.SetResolution((DisplayResolution)selected);
|
||||
Root["Refresh Rate"].Update(); // force refresh Refresh Rate
|
||||
Root["FPS Limit"].Update(); // force refresh FPS limit
|
||||
return Helpers.PhysicalMonitorBrightnessController.GetResolution();
|
||||
}
|
||||
},
|
||||
new Menu.MenuItemWithOptions()
|
||||
{
|
||||
Name = "Refresh Rate",
|
||||
ApplyDelay = 1000,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue