From ab0e9741ab67ff315bf965ac03eb8ef6010dc7d9 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Fri, 26 Jun 2026 17:04:59 +0200 Subject: [PATCH] feat: allow Xbox to override sentry_init for custom device context Add SENTRY_PLATFORM_XBOX to the preprocessor guard that exposes sentry__native_init, enabling the Xbox console SDK to provide its own sentry_init with device model detection. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/sentry_core.c | 3 ++- src/sentry_core.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sentry_core.c b/src/sentry_core.c index 6fdc4116dd..5343bc5bb7 100644 --- a/src/sentry_core.c +++ b/src/sentry_core.c @@ -100,7 +100,8 @@ generate_propagation_context(sentry_value_t propagation_context) sentry_value_get_by_key(propagation_context, "trace")); } -#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) +#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) \ + || defined(SENTRY_PLATFORM_XBOX) int sentry__native_init(sentry_options_t *options) #else diff --git a/src/sentry_core.h b/src/sentry_core.h index ad3026e9bf..454eae3c9a 100644 --- a/src/sentry_core.h +++ b/src/sentry_core.h @@ -149,7 +149,8 @@ bool sentry__should_send_transaction( sentry_value_t tx_ctx, sentry_sampling_context_t *sampling_ctx); #endif -#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) +#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) \ + || defined(SENTRY_PLATFORM_XBOX) int sentry__native_init(sentry_options_t *options); #endif