-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import platform | ||
import sys | ||
|
||
# This function detects the OS the user is running and if Valorant is officially supported in said platform | ||
# returns ["operating system" (string), "Runs Valorant" (bool)] | ||
def get_os(): | ||
# Handles Windows operating systems | ||
if platform.system() == "Windows": | ||
if platform.system() == "Windows" and platform.win32_ver()[0] == '10': | ||
return f"Windows {platform.win32_ver()[0]} {platform.win32_edition()} {platform.win32_ver()[1]}" | ||
|
||
elif sys.getwindowsversion().build >= 22000: | ||
return f"Windows 11 {platform.win32_edition()} {platform.win32_ver()[1]}" | ||
|
||
# Handles other operating systems, such as Linux or Mac OS | ||
else: | ||
return "Non-Windows operating system" |