Now game dir is the correct path.

Add experimental manage profile page.
This commit is contained in:
wei
2026-08-03 22:15:55 +08:00
parent c63c46a3b3
commit 6e8f2ac2eb
8 changed files with 481 additions and 8 deletions
+2 -2
View File
@@ -667,13 +667,13 @@ class ProfileManager(QObject):
if not isinstance(request.icon, str):
errors["icon"] = "Icon must be a string."
if request.game_dir is not _UNSET:
if request.game_dir is not _UNSET and request.game_dir is not None:
try:
Path(request.game_dir)
except (TypeError, ValueError):
errors["game_dir"] = "Game directory is invalid."
if request.game_dir is not _UNSET:
if request.resolution is not _UNSET and request.resolution is not None:
if not isinstance(request.resolution, tuple) or len(request.resolution) != 2:
errors["resolution"] = (
"Resolution must contain width and height."