28 lines
603 B
Python
28 lines
603 B
Python
"""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
|