Duckstation/src/common/window_info.h

42 lines
708 B
C
Raw Normal View History

#pragma once
2020-06-18 14:18:14 +00:00
#include "types.h"
// Contains the information required to create a graphics context in a window.
struct WindowInfo
{
enum class Type
{
Surfaceless,
Win32,
X11,
Wayland,
MacOS,
Android,
Display,
};
enum class SurfaceFormat
{
None,
Auto,
RGB8,
RGBA8,
RGB565,
Count
};
Type type = Type::Surfaceless;
void* display_connection = nullptr;
void* window_handle = nullptr;
u32 surface_width = 0;
u32 surface_height = 0;
2021-02-13 11:24:58 +00:00
float surface_refresh_rate = 0.0f;
2020-06-30 14:35:19 +00:00
float surface_scale = 1.0f;
SurfaceFormat surface_format = SurfaceFormat::RGB8;
// Needed for macOS.
#ifdef __APPLE__
void* surface_handle = nullptr;
#endif
};