Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PC Game Pass support #856

Merged
merged 6 commits into from
Oct 23, 2022
Merged

PC Game Pass support #856

merged 6 commits into from
Oct 23, 2022

Conversation

starfi5h
Copy link
Contributor

Not sure about the platform naming, feel free to edit it.

@@ -4,5 +4,6 @@ export enum StorePlatform {
EPIC_GAMES_STORE = "Epic Games Store",
OCULUS_STORE = "Oculus Store",
ORIGIN = "Origin / EA Desktop",
PC_GAME_PASS = "PC Game Pass",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PC_GAME_PASS should be XBOX_GAME_PASS

Copy link
Contributor Author

@starfi5h starfi5h Oct 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like Xbox Game Pass is still a more recognizable name for players.
I wonder if this option can work for Windows store too.

@@ -79,6 +80,13 @@ const RUNNERS: RunnerType = {
"darwin": new DirectGameRunner(),
}
},
[StorePlatform.PC_GAME_PASS]: {
[PackageLoader.BEPINEX]: {
"win32": new DirectGameRunner(),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these should be calling DirectGameRunner as we want to execute gamelaunchhelper.exe right?

A separate runner would be better XboxGamePassGameRunner (probably?) which instead of calling the first found executable in the GameManager.ts executables list (like DirectGameRunner does), it'd instead look for and call the gamelaunchhelper executable.

We also wouldn't need to declare the other executable names now. Although this is all worth making sure that args are passed through to the game when calling that executable.

Also a minor thing but since game pass isn't available on neither Linux nor MacOS, I'd say you don't need them defined. We can add that at a later date if necessary.

@@ -114,6 +122,11 @@ const RESOLVERS: ResolverType = {
"linux": new DRMFreeDirectoryResolver(),
"darwin": new DRMFreeDirectoryResolver()
},
[StorePlatform.PC_GAME_PASS]: {
"win32": new XGPDirectoryResolver(),
"linux": new DRMFreeDirectoryResolver(),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same minor thing here about unnecessary definitions

@ebkr
Copy link
Owner

ebkr commented Oct 22, 2022

Sorry for the long wait time for getting around to this PR. I'm generally only available during weekends for them

Copy link
Owner

@ebkr ebkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested and this all works perfectly.

Thanks for the contribution!

@ebkr ebkr merged commit c0da2f8 into ebkr:develop Oct 23, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants