// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved. #pragma once #if PLATFORM_WINDOWS || USE_EDITOR #include "Engine/Core/Config/PlatformSettingsBase.h" /// /// Windows platform settings. /// /// class WindowsPlatformSettings : 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; /// /// Enables support for DirectX 12. Disabling it reduces compiled shaders count. /// bool SupportDX12 = false; /// /// Enables support for DirectX 11. Disabling it reduces compiled shaders count. /// bool SupportDX11 = true; /// /// Enables support for DirectX 10 and DirectX 10.1. Disabling it reduces compiled shaders count. /// bool SupportDX10 = false; /// /// Enables support for Vulkan. Disabling it reduces compiled shaders count. /// bool SupportVulkan = false; public: // [Settings] void RestoreDefault() final override { WindowMode = GameWindowMode::Windowed; ScreenWidth = 1280; ScreenHeight = 720; RunInBackground = false; ResizableWindow = false; ForceSingleInstance = false; OverrideIcon = Guid::Empty; SupportDX12 = false; SupportDX11 = true; SupportDX10 = false; SupportVulkan = false; } void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) final override { DESERIALIZE(WindowMode); DESERIALIZE(ScreenWidth); DESERIALIZE(ScreenHeight); DESERIALIZE(RunInBackground); DESERIALIZE(ResizableWindow); DESERIALIZE(ForceSingleInstance); DESERIALIZE(OverrideIcon); DESERIALIZE(SupportDX12); DESERIALIZE(SupportDX11); DESERIALIZE(SupportDX10); DESERIALIZE(SupportVulkan); } }; #if PLATFORM_WINDOWS typedef WindowsPlatformSettings PlatformSettings; #endif #endif