Skip to content

Commit 5a2c304

Browse files
committed
Fix RHI driver selection
1 parent 351a364 commit 5a2c304

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

axmol/rhi/DriverContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ void DriverContext::makeCurrentDriver()
9999

100100
for (auto& f : factories)
101101
{
102-
auto driver = f->create();
103-
if (contextAttrs.driverPreference != DriverPreference::Auto && driver->type() != contextAttrs.driverPreference)
102+
if (contextAttrs.driverPreference != DriverPreference::Auto && f->type() != contextAttrs.driverPreference)
104103
continue;
104+
auto driver = f->create();
105105
if (driver->init())
106106
{
107107
_currentDriverType = driver->type();

0 commit comments

Comments
 (0)