# Force the use of the system SDL library, for use with native games
# USAGE: launcher_tweak_sdl_override
launcher_tweak_sdl_override() {
	local path_libraries
	path_libraries=$(path_libraries_system)
	cat <<- EOF
	# Force the use of the system SDL library
	if [ -z "\${SDL_DYNAMIC_API:-}" ]; then
	    export SDL_DYNAMIC_API="${path_libraries}/libSDL2-2.0.so.0"
	fi

	EOF
}

# Force use of SDL x11 video backend.
# This should be called in pre-run actions for games not working with SDL wayland backend.
# USAGE: launcher_tweak_sdl_force_x11
launcher_tweak_sdl_force_x11() {
	cat <<- EOF
	# Force use of SDL X11 video backend.
	export SDL_VIDEODRIVER=x11

	EOF
}

