1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00

win32/displayconfig: remove custom struct redefinition

Those structs in MinGW-w64 are correct. I compared to Windows SDK and
actually our version have not correct alignment.
This commit is contained in:
Kacper Michajłow 2023-08-25 18:29:57 +02:00 committed by sfan5
parent 998c3a163c
commit 1bf6325e21

View File

@ -24,66 +24,6 @@
#include "mpv_talloc.h"
// Some DisplayConfig definitions are broken in mingw-w64 (as of 2015-3-13.) To
// get the correct struct alignment, it's necessary to define them properly.
#include <pshpack1.h>
typedef enum {
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER = -1,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = 0,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO = 1,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO = 2,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO = 3,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI = 4,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = 5,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = 6,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN = 8,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI = 9,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = 10,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = 11,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = 12,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = 13,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE = 14,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_MIRACAST = 15,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = -2147483647 - 1,
MP_DISPLAYCONFIG_OUTPUT_TECHNOLOGY_FORCE_UINT32 = 0x7FFFFFFF
} MP_DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY;
typedef struct MP_DISPLAYCONFIG_PATH_TARGET_INFO {
LUID adapterId;
UINT32 id;
UINT32 modeInfoIdx;
MP_DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology;
DISPLAYCONFIG_ROTATION rotation;
DISPLAYCONFIG_SCALING scaling;
DISPLAYCONFIG_RATIONAL refreshRate;
DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering;
WINBOOL targetAvailable;
UINT32 statusFlags;
} MP_DISPLAYCONFIG_PATH_TARGET_INFO;
#define DISPLAYCONFIG_PATH_TARGET_INFO MP_DISPLAYCONFIG_PATH_TARGET_INFO
typedef struct MP_DISPLAYCONFIG_PATH_INFO {
DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo;
MP_DISPLAYCONFIG_PATH_TARGET_INFO targetInfo;
UINT32 flags;
} MP_DISPLAYCONFIG_PATH_INFO;
#define DISPLAYCONFIG_PATH_INFO MP_DISPLAYCONFIG_PATH_INFO
typedef struct MP_DISPLAYCONFIG_TARGET_DEVICE_NAME {
DISPLAYCONFIG_DEVICE_INFO_HEADER header;
DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS flags;
MP_DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology;
UINT16 edidManufactureId;
UINT16 edidProductCodeId;
UINT32 connectorInstance;
WCHAR monitorFriendlyDeviceName[64];
WCHAR monitorDevicePath[128];
} MP_DISPLAYCONFIG_TARGET_DEVICE_NAME;
#define DISPLAYCONFIG_TARGET_DEVICE_NAME MP_DISPLAYCONFIG_TARGET_DEVICE_NAME
#include <poppack.h>
static pthread_once_t displayconfig_load_ran = PTHREAD_ONCE_INIT;
static bool displayconfig_loaded = false;