xwayland: Do not list option "-eglstream" if not supported

As Xwayland is usually spawned by the Wayland server/compositor, its
command line options are not always adjustable.

Yet, if EGLStream is not supported in a given Xwayland build, the option
will do nothing (yet we must still accept it otherwise Xwayland would
refuse to run if the Wayland compositor uses it).

If Xwayland was built without support for EGLStream, there is not point
in showing the option in the help message though.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
This commit is contained in:
Olivier Fourdan 2020-11-10 10:02:39 +01:00
parent d163f938a0
commit d14cef853a

View File

@ -89,7 +89,9 @@ ddxUseMsg(void)
ErrorF("-initfd fd add given fd as a listen socket for initialization clients\n"); ErrorF("-initfd fd add given fd as a listen socket for initialization clients\n");
ErrorF("-listenfd fd add given fd as a listen socket\n"); ErrorF("-listenfd fd add given fd as a listen socket\n");
ErrorF("-listen fd deprecated, use \"-listenfd\" instead\n"); ErrorF("-listen fd deprecated, use \"-listenfd\" instead\n");
#ifdef XWL_HAS_EGLSTREAM
ErrorF("-eglstream use eglstream backend for nvidia GPUs\n"); ErrorF("-eglstream use eglstream backend for nvidia GPUs\n");
#endif
ErrorF("-shm use shared memory for passing buffers\n"); ErrorF("-shm use shared memory for passing buffers\n");
ErrorF("-version show the server version and exit\n"); ErrorF("-version show the server version and exit\n");
} }