// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. #pragma once #if PLATFORM_LINUX || USE_EDITOR #include "Engine/Core/Config/PlatformSettingsBase.h" /// /// Linux platform settings. /// /// class LinuxPlatformSettings : public Settings { public: /// /// The default game window mode. /// GameWindowMode WindowMode = GameWindowMode::Windowed; /// /// The default game window width (in pixels). /// int32 ScreenWidth = 1280; /// /// The default game window height (in pixels). /// int32 ScreenHeight = 720; /// /// Enables game running when application window loses focus. /// bool RunInBackground = false; /// /// Enables resizing the game window by the user. /// bool ResizableWindow = false; /// /// Limits maximum amount of concurrent game instances running to one, otherwise user may launch application more than once. /// bool ForceSingleInstance = false; /// /// Custom icon texture (asset id) to use for the application (overrides the default one). /// Guid OverrideIcon = Guid::Empty; /// /// Enables support for Vulkan. Disabling it reduces compiled shaders count. /// bool SupportVulkan = true; public: // [Settings] void RestoreDefault() final override { WindowMode = GameWindowMode::Windowed; ScreenWidth = 1280; ScreenHeight = 720; RunInBackground = false; ResizableWindow = false; ForceSingleInstance = false; OverrideIcon = Guid::Empty; SupportVulkan = true; } void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) final override { DESERIALIZE(WindowMode); DESERIALIZE(ScreenWidth); DESERIALIZE(ScreenHeight); DESERIALIZE(RunInBackground); DESERIALIZE(ResizableWindow); DESERIALIZE(ForceSingleInstance); DESERIALIZE(OverrideIcon); DESERIALIZE(SupportVulkan); } }; #if PLATFORM_LINUX typedef LinuxPlatformSettings PlatformSettings; #endif #endif