Init
This commit is contained in:
27
ptlinux/gamebox.py
Normal file
27
ptlinux/gamebox.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Native X11 command construction for the clean borderless game window."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from typing import Sequence
|
||||
|
||||
from .settings import Settings
|
||||
|
||||
|
||||
def build_gamebox_command(
|
||||
game_command: Sequence[str],
|
||||
settings: Settings,
|
||||
) -> list[str]:
|
||||
if not game_command:
|
||||
raise ValueError("game command cannot be empty")
|
||||
command = [
|
||||
sys.executable,
|
||||
"-m",
|
||||
"ptlinux.gamebox_runtime",
|
||||
"--window-title",
|
||||
"PristonTale EU",
|
||||
]
|
||||
if settings.borderless:
|
||||
command.append("--borderless")
|
||||
command.extend(("--", *[str(value) for value in game_command]))
|
||||
return command
|
||||
Reference in New Issue
Block a user