-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
68 lines (55 loc) · 2.18 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from modules.steam import deck_ui
print("Initializing First-Time Setup")
game_width = input("Enter Width of game output: ")
game_height = input("Enter Height of game output: ")
window_width = input("Enter Width of rendered window: ")
window_height = input("Enter Height of rendered window: ")
upscaling_methods_list = [
"fsr: AMD FidelityFX™ Super Resolution 1.0",
"nis: NVIDIA Image Scaling v1.0.3",
"integer: Integer Scaling",
"nearest neighbor filter: Nearest Neighbor Filtering",
"none"
]
upscaling_method_number = 0
upscaling_method_numbers = []
for upscaling_method in upscaling_methods_list:
upscaling_method_number = upscaling_method_number + 1
upscaling_method_numbers.append(upscaling_method_number)
print(str(upscaling_method_number) + ". " + str(upscaling_method))
upscaling_method = None
while True:
upscaling_method = input(f"Enter Upscaling Method (1-{upscaling_method_number}): ")
upscaling_method_valid = True
if not upscaling_method.isnumeric():
print("Error: Invalid Choice")
upscaling_method_valid = False
if upscaling_method_valid:
if int(upscaling_method) not in upscaling_method_numbers:
print("Error: Invalid Choice")
upscaling_method_valid = False
else:
print(f"Upscaling Method: {upscaling_methods_list[int(upscaling_method) - 1]}")
upscaling_method = int(upscaling_method) - 1
break
valid_gamescope_version_options = ["y", "n"]
gamescope_version = None
while gamescope_version not in valid_gamescope_version_options:
gamescope_version = input("Are you using an older version of gamescope? (y, n): ")
if gamescope_version not in valid_gamescope_version_options:
print("Error: Invalid Choice")
if gamescope_version == "y":
gamescope_version = "old"
elif gamescope_version == "n":
gamescope_version = "new"
else:
print("bad gamescope option")
flags = {
"game_width": game_width,
"game_height": game_height,
"window_width": window_width,
"window_height": window_height,
"upscaling": upscaling_methods_list[int(upscaling_method)].split(":")[0],
"gamescope_version": gamescope_version
}
deck_ui(flags)