diff --git a/Source/Engine/Engine/CommandLine.cpp b/Source/Engine/Engine/CommandLine.cpp index efcd73524..9d45edf52 100644 --- a/Source/Engine/Engine/CommandLine.cpp +++ b/Source/Engine/Engine/CommandLine.cpp @@ -145,6 +145,12 @@ bool CommandLine::Parse(const Char* cmdLine) PARSE_BOOL_SWITCH("-monolog ", MonoLog); PARSE_BOOL_SWITCH("-mute ", Mute); PARSE_BOOL_SWITCH("-lowdpi ", LowDPI); + +#if PLATFORM_LINUX && PLATFORM_SDL + PARSE_BOOL_SWITCH("-wayland ", Wayland); + PARSE_BOOL_SWITCH("-x11 ", X11); +#endif + #if USE_EDITOR PARSE_BOOL_SWITCH("-clearcache ", ClearCache); PARSE_BOOL_SWITCH("-clearcooker ", ClearCookerCache); diff --git a/Source/Engine/Engine/CommandLine.h b/Source/Engine/Engine/CommandLine.h index 4a3bab4c0..4b7704e31 100644 --- a/Source/Engine/Engine/CommandLine.h +++ b/Source/Engine/Engine/CommandLine.h @@ -127,6 +127,20 @@ public: /// Nullable LowDPI; +#if PLATFORM_LINUX && PLATFORM_SDL + + /// + /// -wayland (prefer Wayland over X11 as display server) + /// + Nullable Wayland; + + /// + /// -x11 (prefer X11 over Wayland as display server) + /// + Nullable X11; + +#endif + #if USE_EDITOR /// /// -project !path! (Startup project path) diff --git a/Source/Engine/Platform/SDL/SDLPlatform.cpp b/Source/Engine/Platform/SDL/SDLPlatform.cpp index 89aa246a1..30d82962a 100644 --- a/Source/Engine/Platform/SDL/SDLPlatform.cpp +++ b/Source/Engine/Platform/SDL/SDLPlatform.cpp @@ -102,6 +102,8 @@ void SDLPlatform::LogInfo() LOG(Info, "Using SDL version {}.{}.{} ({}), runtime: {}.{}.{} ({})", SDL_VERSIONNUM_MAJOR(SDL_VERSION), SDL_VERSIONNUM_MINOR(SDL_VERSION), SDL_VERSIONNUM_MICRO(SDL_VERSION), String(SDL_REVISION), SDL_VERSIONNUM_MAJOR(runtimeVersion), SDL_VERSIONNUM_MINOR(runtimeVersion), SDL_VERSIONNUM_MICRO(runtimeVersion), String(SDL_GetRevision())); + + LOG(Info, "SDL video driver: {}", String(SDL_GetCurrentVideoDriver())); } bool SDLPlatform::CheckWindowDragging(Window* window, WindowHitCodes hit)