rodecomp/Source/Render/DX7/RenderAdapterDX7.cpp
ragnarok-clanker 1006b49b22 Decompile 2 functions in Source/UI/GameSettings/GameSettingsUI.cpp, Source/Render/RenderAdapter.h, ...
Batch #9037 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review.

- fn_15905 RenderAdapter::RenderAdapter: logic confirmed by peer review
- fn_02326 EnumerateAdaptersDX7: logic confirmed by peer review

Peer-reviewed-by: Lumen, Montyla, dori
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-01 00:03:54 +00:00

31 lines
879 B
C++

#include "Render/DX7/DirectDrawEnumeration.h"
#include "Render/RenderAdapter.h"
// OFFSET: 0x0056B8C0
// FUNCTION: fn_02326
std::vector<RenderAdapter> EnumerateAdaptersDX7() {
std::vector<RenderAdapter> result;
if (DirectDrawEnumeration::DevicesSeen() == 0 && FAILED(DirectDrawEnumeration::Enumerate(nullptr))) {
return result;
}
const DirectDrawDeviceRecord* devices = DirectDrawEnumeration::Devices();
const unsigned count = DirectDrawEnumeration::DeviceCount();
for (unsigned index = 0; index < count; ++index) {
const auto& device = devices[index];
if (device.hardware) {
result.push_back({1, index, device.description, device.drawIdentity, device.renderIdentity});
}
}
return result;
}
// OFFSET: 0x00DD9420
// FUNCTION: fn_23334
HRESULT __cdecl AcceptAnyDirectDrawDevice(const DDCAPS*, const D3DDEVICEDESC7*) {
return S_OK;
}