mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-05 22:35:38 +00:00
PowerControl: All options accept String
This commit is contained in:
parent
29e373d169
commit
81d4be30ce
17 changed files with 120 additions and 125 deletions
|
|
@ -22,6 +22,13 @@ namespace PowerControl.Helpers
|
|||
|
||||
public DisplayResolution(int width, int height) { Width = width; Height = height; }
|
||||
|
||||
public DisplayResolution(String text)
|
||||
{
|
||||
var options = text.Split("x", 2);
|
||||
Width = int.Parse(options[0]);
|
||||
Height = int.Parse(options[1]);
|
||||
}
|
||||
|
||||
public static bool operator ==(DisplayResolution sz1, DisplayResolution sz2) => sz1.Width == sz2.Width && sz1.Height == sz2.Height;
|
||||
|
||||
public static bool operator !=(DisplayResolution sz1, DisplayResolution sz2) => !(sz1 == sz2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue