// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
#pragma once
#if PLATFORM_UWP || USE_EDITOR
#include "Engine/Core/Config/PlatformSettingsBase.h"
///
/// Universal Windows Platform settings.
///
///
class UWPPlatformSettings : public Settings
{
public:
///
/// The preferred launch windowing mode.
///
enum class WindowMode
{
///
/// The full screen mode
///
FullScreen = 0,
///
/// The view size.
///
ViewSize = 1,
};
///
/// The display orientation modes. Can be combined as flags.
///
enum class DisplayOrientations
{
///
/// The none.
///
None = 0,
///
/// The landscape.
///
Landscape = 1,
///
/// The landscape flipped.
///
LandscapeFlipped = 2,
///
/// The portrait.
///
Portrait = 4,
///
/// The portrait flipped.
///
PortraitFlipped = 8,
///
/// The all modes.
///
All = Landscape | LandscapeFlipped | Portrait | PortraitFlipped
};
public:
///
/// The preferred launch windowing mode. Always fullscreen on Xbox.
///
WindowMode PreferredLaunchWindowingMode = WindowMode::FullScreen;
///
/// The display orientation modes. Can be combined as flags.
///
DisplayOrientations AutoRotationPreferences = DisplayOrientations::All;
///
/// The location of the package certificate (relative to the project).
///
String CertificateLocation;
///
/// 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;
public:
// [Settings]
void RestoreDefault() final override
{
PreferredLaunchWindowingMode = WindowMode::FullScreen;
AutoRotationPreferences = DisplayOrientations::All;
CertificateLocation.Clear();
SupportDX11 = true;
SupportDX10 = false;
}
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) final override
{
DESERIALIZE(PreferredLaunchWindowingMode);
DESERIALIZE(AutoRotationPreferences);
DESERIALIZE(CertificateLocation);
DESERIALIZE(SupportDX11);
DESERIALIZE(SupportDX10);
}
};
#if PLATFORM_UWP
typedef UWPPlatformSettings PlatformSettings;
#endif
#endif