Skip to content

build: Allow custom screenshot impl for downstream SDKs#1697

Open
jpnurmi wants to merge 1 commit intomasterfrom
build/custom-screenshot
Open

build: Allow custom screenshot impl for downstream SDKs#1697
jpnurmi wants to merge 1 commit intomasterfrom
build/custom-screenshot

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented May 4, 2026

Allow downstream SDKs to select SENTRY_SCREENSHOT=custom so sentry-native skips the built-in screenshot capture source and expects an implementation from the embedding build.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7083f91. Configure here.

Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
endif()

if(SENTRY_SCREENSHOT STREQUAL "windows")
set(SENTRY_SCREENSHOT_WINDOWS TRUE)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing WIN32 guard for windows screenshot option

Low Severity

The SENTRY_SCREENSHOT "windows" branch doesn't validate that it's actually running on WIN32, unlike the analogous SENTRY_TRANSPORT "winhttp" check which includes if(NOT WIN32) message(FATAL_ERROR ...). If a user explicitly passes -DSENTRY_SCREENSHOT=windows on a non-Windows platform, it would attempt to compile sentry_screenshot_windows.c with Windows-specific APIs, leading to confusing compilation errors rather than a clear configuration-time error.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7083f91. Configure here.

Allow downstream SDKs to select SENTRY_SCREENSHOT=custom so sentry-native
skips the built-in screenshot capture source and expects an implementation
from the embedding build.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@jpnurmi jpnurmi force-pushed the build/custom-screenshot branch from 7083f91 to 9b6b206 Compare May 4, 2026 19:18
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