diff options
author | Liam <byteslice@airmail.cc> | 2024-02-14 05:08:27 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-14 18:03:31 +0100 |
commit | db871677b04aa92dac9e6a15c08eae38e1dd48df (patch) | |
tree | 9b4d93bb1ea7d6374a39a35a83e5ea97736584ed /src/core/hle/service/vi/vi_types.h | |
parent | Merge pull request #12996 from german77/settings-ipc (diff) | |
download | yuzu-db871677b04aa92dac9e6a15c08eae38e1dd48df.tar yuzu-db871677b04aa92dac9e6a15c08eae38e1dd48df.tar.gz yuzu-db871677b04aa92dac9e6a15c08eae38e1dd48df.tar.bz2 yuzu-db871677b04aa92dac9e6a15c08eae38e1dd48df.tar.lz yuzu-db871677b04aa92dac9e6a15c08eae38e1dd48df.tar.xz yuzu-db871677b04aa92dac9e6a15c08eae38e1dd48df.tar.zst yuzu-db871677b04aa92dac9e6a15c08eae38e1dd48df.zip |
Diffstat (limited to 'src/core/hle/service/vi/vi_types.h')
-rw-r--r-- | src/core/hle/service/vi/vi_types.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/core/hle/service/vi/vi_types.h b/src/core/hle/service/vi/vi_types.h new file mode 100644 index 000000000..59976fc72 --- /dev/null +++ b/src/core/hle/service/vi/vi_types.h @@ -0,0 +1,66 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/common_funcs.h" + +namespace Service::VI { + +enum class DisplayResolution : u32 { + DockedWidth = 1920, + DockedHeight = 1080, + UndockedWidth = 1280, + UndockedHeight = 720, +}; + +/// Permission level for a particular VI service instance +enum class Permission { + User, + System, + Manager, +}; + +/// A policy type that may be requested via GetDisplayService and +/// GetDisplayServiceWithProxyNameExchange +enum class Policy { + User, + Compositor, +}; + +struct DisplayInfo { + /// The name of this particular display. + char display_name[0x40]{"Default"}; + + /// Whether or not the display has a limited number of layers. + u8 has_limited_layers{1}; + INSERT_PADDING_BYTES(7); + + /// Indicates the total amount of layers supported by the display. + /// @note This is only valid if has_limited_layers is set. + u64 max_layers{1}; + + /// Maximum width in pixels. + u64 width{1920}; + + /// Maximum height in pixels. + u64 height{1080}; +}; +static_assert(sizeof(DisplayInfo) == 0x60, "DisplayInfo has wrong size"); + +class NativeWindow final { +public: + constexpr explicit NativeWindow(u32 id_) : id{id_} {} + constexpr explicit NativeWindow(const NativeWindow& other) = default; + +private: + const u32 magic = 2; + const u32 process_id = 1; + const u64 id; + INSERT_PADDING_WORDS(2); + std::array<u8, 8> dispdrv = {'d', 'i', 's', 'p', 'd', 'r', 'v', '\0'}; + INSERT_PADDING_WORDS(2); +}; +static_assert(sizeof(NativeWindow) == 0x28, "NativeWindow has wrong size"); + +} // namespace Service::VI |