Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ elseif(SENTRY_BACKEND_NATIVE)
# Native backend sources and configuration are in src/CMakeLists.txt
# The native backend requires C11 for atomics (set in src/CMakeLists.txt)

if(WIN32)
if(WIN32 AND NOT XBOX)
add_library(sentry-wer SHARED
src/backends/native/sentry_wer.c
src/backends/native/sentry_wer.def
Expand Down Expand Up @@ -879,15 +879,15 @@ elseif(SENTRY_BACKEND_NATIVE)

# Make sentry library depend on crash daemon so it's always built together
add_dependencies(sentry sentry-crash)
if(WIN32)
if(WIN32 AND NOT XBOX)
add_dependencies(sentry sentry-wer)
endif()

# Install daemon
install(TARGETS sentry-crash
RUNTIME DESTINATION bin
)
if(WIN32)
if(WIN32 AND NOT XBOX)
install(TARGETS sentry-wer
RUNTIME DESTINATION bin
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
Expand Down
10 changes: 6 additions & 4 deletions src/backends/sentry_backend_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# if defined(SENTRY_PLATFORM_LINUX) || defined(SENTRY_PLATFORM_ANDROID)
# include <sys/prctl.h>
# endif
#elif defined(SENTRY_PLATFORM_WINDOWS)
#elif defined(SENTRY_PLATFORM_WINDOWS) && !defined(SENTRY_PLATFORM_XBOX)
# include <werapi.h>
#endif

Expand Down Expand Up @@ -65,7 +65,7 @@ static sentry_mutex_t g_ipc_init_mutex = SENTRY__MUTEX_INIT;
# endif
#endif

#if defined(SENTRY_PLATFORM_WINDOWS)
#if defined(SENTRY_PLATFORM_WINDOWS) && !defined(SENTRY_PLATFORM_XBOX)
static sentry_wer_registration_t g_wer_registration = { 0 };

static sentry_path_t *g_wer_path = NULL;
Expand Down Expand Up @@ -520,7 +520,7 @@ native_backend_startup(
SENTRY_DEBUG("Daemon signaled ready");
}

# if defined(SENTRY_PLATFORM_WINDOWS)
# if defined(SENTRY_PLATFORM_WINDOWS) && !defined(SENTRY_PLATFORM_XBOX)
wer_register_module(tid);
# endif

Expand All @@ -529,7 +529,9 @@ native_backend_startup(
# if defined(SENTRY_PLATFORM_UNIX)
kill(state->daemon_pid, SIGTERM);
# elif defined(SENTRY_PLATFORM_WINDOWS)
# if !defined(SENTRY_PLATFORM_XBOX)
wer_unregister_module();
# endif
// On Windows, terminate the daemon process
HANDLE hDaemon
= OpenProcess(PROCESS_TERMINATE, FALSE, state->daemon_pid);
Expand Down Expand Up @@ -559,7 +561,7 @@ native_backend_shutdown(sentry_backend_t *backend)
return;
}

#if defined(SENTRY_PLATFORM_WINDOWS)
#if defined(SENTRY_PLATFORM_WINDOWS) && !defined(SENTRY_PLATFORM_XBOX)
wer_unregister_module();
#endif

Expand Down
Loading