2025-10-21 21:39:09 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
2022-04-23 04:59:50 -04:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2016-05-03 00:07:17 -06:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-08-30 00:07:38 +02:00
|
|
|
#include "common/common_types.h"
|
2016-05-03 00:07:17 -06:00
|
|
|
#include "common/math_util.h"
|
2017-05-27 18:06:59 -07:00
|
|
|
|
2025-10-21 21:39:09 +02:00
|
|
|
namespace Settings {
|
|
|
|
|
enum class AspectRatio : u32;
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-03 00:07:17 -06:00
|
|
|
namespace Layout {
|
2017-05-27 18:06:59 -07:00
|
|
|
|
2020-05-15 16:22:27 -04:00
|
|
|
namespace MinimumSize {
|
|
|
|
|
constexpr u32 Width = 640;
|
|
|
|
|
constexpr u32 Height = 360;
|
|
|
|
|
} // namespace MinimumSize
|
|
|
|
|
|
2020-03-11 14:02:30 -03:00
|
|
|
namespace ScreenUndocked {
|
|
|
|
|
constexpr u32 Width = 1280;
|
|
|
|
|
constexpr u32 Height = 720;
|
|
|
|
|
} // namespace ScreenUndocked
|
|
|
|
|
|
|
|
|
|
namespace ScreenDocked {
|
|
|
|
|
constexpr u32 Width = 1920;
|
|
|
|
|
constexpr u32 Height = 1080;
|
|
|
|
|
} // namespace ScreenDocked
|
2018-01-09 22:36:07 -05:00
|
|
|
|
2025-10-21 21:39:09 +02:00
|
|
|
/// @brief Describes the layout of the window framebuffer
|
2016-05-03 00:07:17 -06:00
|
|
|
struct FramebufferLayout {
|
2019-05-29 02:14:24 -04:00
|
|
|
u32 width{ScreenUndocked::Width};
|
|
|
|
|
u32 height{ScreenUndocked::Height};
|
|
|
|
|
Common::Rectangle<u32> screen;
|
2021-11-20 17:48:22 -05:00
|
|
|
bool is_srgb{};
|
2016-05-03 00:07:17 -06:00
|
|
|
};
|
|
|
|
|
|
2025-10-21 21:39:09 +02:00
|
|
|
FramebufferLayout DefaultFrameLayout(u32 width, u32 height) noexcept;
|
|
|
|
|
float EmulationAspectRatio(Settings::AspectRatio aspect, float window_aspect_ratio) noexcept;
|
2020-02-14 00:06:26 -05:00
|
|
|
|
2017-05-27 18:06:59 -07:00
|
|
|
} // namespace Layout
|