Skip to content

xgameprotocol: add stubs#31

Open
LukasPAH wants to merge 1 commit into
Weather-OS:masterfrom
LukasPAH:master
Open

xgameprotocol: add stubs#31
LukasPAH wants to merge 1 commit into
Weather-OS:masterfrom
LukasPAH:master

Conversation

@LukasPAH
Copy link
Copy Markdown

@LukasPAH LukasPAH commented Feb 11, 2026

Added some stubs for XGameProtocol (https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xgameprotocol/xgameprotocol_members?view=gdk-2510).

Minecraft GDK builds make an early call to XGameProtocolRegisterForActivation during startup and assert/crash on non-publish (i.e. partner) versions if the HRESULT isn't S_OK. Same deal for XGameProtocolUnregisterForActivation when closing the game if the result isn't true/false.

LMK if changes are needed since they are pretty quick and dirty stubs.

@LukasPAH LukasPAH mentioned this pull request Apr 24, 2026
Copy link
Copy Markdown
Contributor

@olivi-r olivi-r left a comment

Choose a reason for hiding this comment

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

XGameProtocolActivationCallback is a caller defined function passed to XGameProtocolRegisterForActivation

Comment on lines +71 to +75
static void WINAPI x_gameprotocol_XGameProtocolActivationCallback(IXGameProtocolImpl *iface, void *context, const LPSTR protocolUri)
{
FIXME("iface %p, context %p, protocolUri %p stub!\n", iface, context, protocolUri);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
static void WINAPI x_gameprotocol_XGameProtocolActivationCallback(IXGameProtocolImpl *iface, void *context, const LPSTR protocolUri)
{
FIXME("iface %p, context %p, protocolUri %p stub!\n", iface, context, protocolUri);
}

/* IXGameProtocolImpl methods */
x_gameprotocol_XGameProtocolRegisterForActivation,
x_gameprotocol_XGameProtocolUnregisterForActivation,
x_gameprotocol_XGameProtocolActivationCallback,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
x_gameprotocol_XGameProtocolActivationCallback,

{
HRESULT XGameProtocolRegisterForActivation( [in] XTaskQueueHandle queue, [in] void *context, [in] void *callback, [out] XTaskQueueRegistrationToken *token );
BOOLEAN XGameProtocolUnregisterForActivation( XTaskQueueRegistrationToken *token, boolean wait );
void XGameProtocolActivationCallback( [in] void *context, [in] LPSTR protocolUri );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
void XGameProtocolActivationCallback( [in] void *context, [in] LPSTR protocolUri );

]
interface IXGameProtocolImpl : IUnknown
{
HRESULT XGameProtocolRegisterForActivation( [in] XTaskQueueHandle queue, [in] void *context, [in] void *callback, [out] XTaskQueueRegistrationToken *token );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
HRESULT XGameProtocolRegisterForActivation( [in] XTaskQueueHandle queue, [in] void *context, [in] void *callback, [out] XTaskQueueRegistrationToken *token );
HRESULT XGameProtocolRegisterForActivation( [in] XTaskQueueHandle queue, [in] void *context, [in] XGameProtocolActivationCallback *callback, [out] XTaskQueueRegistrationToken *token );

typedef struct XSystemAnalyticsInfo XSystemAnalyticsInfo;
typedef struct XTaskQueueObject* XTaskQueueHandle;
typedef struct XTaskQueueRegistrationToken XTaskQueueRegistrationToken;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
typedef void __stdcall XGameProtocolActivationCallback( void* context, const char *protocolUri );

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.

2 participants