Skip to content

Commit

Permalink
main: hide disabled backends from user
Browse files Browse the repository at this point in the history
  • Loading branch information
HanabishiRecca authored and misyltoad committed Jun 3, 2024
1 parent 3805bd7 commit 2ada4a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ const char usage[] =
" -s, --mouse-sensitivity multiply mouse movement by given decimal number\n"
" --backend select rendering backend\n"
" auto => autodetect (default)\n"
#if HAVE_DRM
" drm => use DRM backend (standalone display session)\n"
#endif
#if HAVE_SDL2
" sdl => use SDL backend\n"
#endif
#if HAVE_OPENVR
" openvr => use OpenVR backend (outputs as a VR overlay)\n"
#endif
Expand Down Expand Up @@ -399,10 +403,14 @@ static enum gamescope::GamescopeBackend parse_backend_name(const char *str)
{
if (strcmp(str, "auto") == 0) {
return gamescope::GamescopeBackend::Auto;
#if HAVE_DRM
} else if (strcmp(str, "drm") == 0) {
return gamescope::GamescopeBackend::DRM;
#endif
#if HAVE_SDL2
} else if (strcmp(str, "sdl") == 0) {
return gamescope::GamescopeBackend::SDL;
#endif
#if HAVE_OPENVR
} else if (strcmp(str, "openvr") == 0) {
return gamescope::GamescopeBackend::OpenVR;
Expand Down

0 comments on commit 2ada4a4

Please sign in to comment.