BizHawkClient: Avoid error launching BizHawkClient via Launcher CLI (#3554)

* Core, BizHawkClient: Support launching BizHawkClient via Launcher command line

* Revert changes to LauncherComponents.py
This commit is contained in:
Remy Jette
2024-09-18 11:42:22 -07:00
committed by GitHub
parent db5d9fbf70
commit 0d35cd4679
3 changed files with 5 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ if TYPE_CHECKING:
def launch_client(*args) -> None:
from .context import launch
launch_subprocess(launch, name="BizHawkClient")
launch_subprocess(launch, name="BizHawkClient", args=args)
component = Component("BizHawk Client", "BizHawkClient", component_type=Type.CLIENT, func=launch_client,

View File

@@ -239,11 +239,11 @@ async def _patch_and_run_game(patch_file: str):
logger.exception(exc)
def launch() -> None:
def launch(*launch_args) -> None:
async def main():
parser = get_base_parser()
parser.add_argument("patch_file", default="", type=str, nargs="?", help="Path to an Archipelago patch file")
args = parser.parse_args()
args = parser.parse_args(launch_args)
ctx = BizHawkClientContext(args.connect, args.password)
ctx.server_task = asyncio.create_task(server_loop(ctx), name="ServerLoop")