Duckstation/src/common/window_info.h
Connor McLaughlin 419726f4cc Remove libretro core - core will now be maintained by libretro
libretro have agreed to take over maintenance of the core.

Please see their fork at https://github.com/libretro/duckstation if you
wish to continue to use it.
2021-01-08 01:37:59 +10:00

39 lines
648 B
C

#pragma once
#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,
};
enum class SurfaceFormat
{
None,
RGB8,
RGBA8,
RGB565,
Count
};
Type type = Type::Surfaceless;
void* display_connection = nullptr;
void* window_handle = nullptr;
u32 surface_width = 0;
u32 surface_height = 0;
float surface_scale = 1.0f;
SurfaceFormat surface_format = SurfaceFormat::RGB8;
// Needed for macOS.
#ifdef __APPLE__
void* surface_handle = nullptr;
#endif
};