rodecomp/Source/Render/DisplayMode.h
ragnarok-clanker f172c31fe5 Decompile fn_02272 (DisplayMode::Matches)
Batch #4327 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_02272 DisplayMode::Matches: logic confirmed by peer review

Peer-reviewed-by: ntrl, alisonrag, KWDev
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 02:32:40 +00:00

31 lines
875 B
C++

#ifndef RAGNAROK_SOURCE_RENDER_DISPLAYMODE_H
#define RAGNAROK_SOURCE_RENDER_DISPLAYMODE_H
#include <cstddef>
#include <string>
#include <vector>
#include <windows.h>
struct DisplayMode {
/* 0000 */ unsigned width;
/* 0004 */ unsigned height;
/* 0008 */ unsigned bitsPerPixel;
/* 000C */ std::string description;
bool Matches(const DisplayMode& other) const;
};
std::vector<DisplayMode> EnumerateDisplayModes(int backend, unsigned deviceIndex);
std::vector<DisplayMode> EnumerateDisplayModesDX7(unsigned deviceIndex);
std::vector<DisplayMode> EnumerateDisplayModesDX9(UINT adapter);
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(DisplayMode) == 36);
static_assert(offsetof(DisplayMode, height) == 0x0004);
static_assert(offsetof(DisplayMode, bitsPerPixel) == 0x0008);
static_assert(offsetof(DisplayMode, description) == 0x000C);
#endif
#endif