rodecomp/Source/Render/DX7/RenderAdapterDX7.cpp
ragnarok-clanker b5b4ecd60f Decompile 12 functions in Source/Render/DX7/DirectDrawEnumeration.h, Source/Render/DX7/DirectDrawEnumeration.cpp, ...
Batch #1484 by ragnarok-clanker: 0 byte-identical, 12 confirmed by peer review.

- fn_09780 DirectDrawEnumeration::Devices: logic confirmed by peer review
- fn_09781 DirectDrawEnumeration::DeviceCount: logic confirmed by peer review
- fn_09782 DirectDrawEnumeration::DevicesSeen: logic confirmed by peer review
- fn_09777 DirectDrawEnumeration::Enumerate: logic confirmed by peer review
- fn_09778 DirectDrawEnumeration::Device: logic confirmed by peer review
- fn_09779 DirectDrawEnumeration::Adapter: logic confirmed by peer review
- fn_09783 DirectDrawEnumeration::Mode: logic confirmed by peer review
- fn_09785 DirectDrawEnumeration::ClearModes: logic confirmed by peer review
- fn_02331 EnumerateDisplayModesDX7: logic confirmed by peer review
- fn_02326 EnumerateAdaptersDX7: logic confirmed by peer review
- fn_02291 EnumerateDisplayModes: logic confirmed by peer review
- fn_02283 EnumerateRenderAdapters: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
2026-10-28 16:32:47 +00:00

25 lines
743 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;
}