Skip to content

Minimal xbl#46

Draft
ChristopherHX wants to merge 4 commits into
Weather-OS:masterfrom
ChristopherHX:xuser-via-xgameruntime
Draft

Minimal xbl#46
ChristopherHX wants to merge 4 commits into
Weather-OS:masterfrom
ChristopherHX:xuser-via-xgameruntime

Conversation

@ChristopherHX
Copy link
Copy Markdown

@ChristopherHX ChristopherHX commented May 18, 2026

WIP

  • Missing UI, only TUI
  • Fallback to XUserless winegdk missing Done

If you replace MicrosoftGame.Config with this content login to Minecraft works.

<?xml version="1.0" encoding="utf-8"?>
<Game configVersion="1">

  <Identity Name="MICROSOFT.MINECRAFTUWP"
            Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" 
            Version="1.26.1202.0" />

  <TitleId>67b57dac</TitleId>
  <MSAAppId>0000000048183522</MSAAppId>
  <StoreId>9NBLGGH2JHXJ</StoreId>

  <ExecutableList>
    <Executable Name="a.out"
                TargetDeviceFamily="PC"
                Id="Game" />
  </ExecutableList>


  <AdvancedUserModel>true</AdvancedUserModel>

  <MSAFullTrust>true</MSAFullTrust>
</Game>

I could also auto replace that in xgameruntime.dll here, e.g. pass the config as static string to the real xgameruntime.dll.

Idl of IXuser copyright @olivi-r .

This is clean room code and does not integrate any xbox live logic into winegdk that have to be reverse engineered.

The original MicrosoftGame.Config blocks sign in via the login flow the cross platform implementation uses

Comment thread dlls/xgameruntime/main.c
@@ -178,15 +210,15 @@ HRESULT WINAPI QueryApiImpl( const GUID *runtimeClassId, REFIID interfaceId, voi

TRACE("runtimeClassId %s, interfaceId %s, out %p\n", debugstr_guid(runtimeClassId), debugstr_guid(interfaceId), out);

if ( IsEqualGUID( runtimeClassId, &CLSID_XSystemImpl ) )
if ( !func && IsEqualGUID( runtimeClassId, &CLSID_XSystemImpl ) )
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This implementations is wrong, therefore prefer the microsoft implementation

Comment thread dlls/xgameruntime/main.c
{
return IXSystemImpl_QueryInterface( x_system_impl, interfaceId, out );
}
else if ( IsEqualGUID( runtimeClassId, &CLSID_XGameRuntimeFeatureImpl ) )
{
return IXGameRuntimeFeatureImpl_QueryInterface( x_game_runtime_feature_impl, interfaceId, out );
}
else if ( IsEqualGUID( runtimeClassId, &CLSID_XSystemAnalyticsImpl ) )
else if ( !func && IsEqualGUID( runtimeClassId, &CLSID_XSystemAnalyticsImpl ) )
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

the replacement might work correctly, not tested

Comment thread dlls/xgameruntime/main.c
@@ -131,6 +161,8 @@ HRESULT WINAPI InitializeApiImplEx2( ULONG gdkVer, ULONG gsVer, CHAR mode, INITI
// There's no documented information about what `INITIALIZE_OPTIONS` is,
// and xgameruntime.lib never utilizes this argument anyway.
TRACE("gdkVer %ld, gsVer %ld, mode %d, options %p stub!\n", gdkVer, gsVer, mode, options);
static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
InitOnceExecuteOnce(&once, &SetUpXgameruntimeCrossPlatformMode, NULL, NULL);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ensure to only call SetUpXgameruntimeCrossPlatformMode once, so the callbacks are not added multiple times and to avoid side effects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant