Skip to content

Commit 80d4931

Browse files
committed
main: allow overriding the backend with the value of the GAMESCOPE_BACKEND environment variable
1 parent 4265016 commit 80d4931

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,12 @@ int main(int argc, char **argv)
880880
g_pOriginalDisplay = getenv("DISPLAY");
881881
g_pOriginalWaylandDisplay = getenv("WAYLAND_DISPLAY");
882882

883+
const char *backend_override = getenv( "GAMESCOPE_BACKEND" );
884+
if ( backend_override != NULL )
885+
{
886+
eCurrentBackend = parse_backend_name( backend_override );
887+
}
888+
883889
if ( eCurrentBackend == gamescope::GamescopeBackend::Auto )
884890
{
885891
if ( g_pOriginalWaylandDisplay != NULL )

0 commit comments

Comments
 (0)