mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-05-13 13:11:22 +00:00
aurora: Fix device selection logic
This commit is contained in:
parent
3abaf6b734
commit
e1d2ff7f2d
@ -268,10 +268,7 @@ bool initialize(SDL_Window* window, wgpu::BackendType backendType, uint32_t msaa
|
||||
};
|
||||
const auto typeItA = std::find(PreferredTypeOrder.begin(), PreferredTypeOrder.end(), propertiesA.adapterType);
|
||||
const auto typeItB = std::find(PreferredTypeOrder.begin(), PreferredTypeOrder.end(), propertiesB.adapterType);
|
||||
if (typeItA == PreferredTypeOrder.end() && typeItB != PreferredTypeOrder.end()) {
|
||||
return -1;
|
||||
}
|
||||
return static_cast<int>(typeItA - typeItB);
|
||||
return typeItA < typeItB;
|
||||
});
|
||||
const auto adapterIt = std::find_if(adapters.begin(), adapters.end(), [=](const auto& adapter) -> bool {
|
||||
wgpu::AdapterProperties properties;
|
||||
|
Loading…
x
Reference in New Issue
Block a user