minetest / irrlicht

Minetest's fork of Irrlicht
Other
115 stars 87 forks source link

Revert #225 to make Windows+SDL builds use the SDL device again #247

Closed grorp closed 1 year ago

grorp commented 1 year ago

Fixes #246. (Doesn't have an effect on #239.)

This PR reverts #225 to make Windows+SDL builds use the SDL device again. Currently, they contain both the Windows device and the SDL device, but they always use the Windows device.

This PR is only intended as a temporary fix until #225 is redone correctly.

How to test

Compile Minetest with -DUSE_SDL2=TRUE on Windows. Verify that the "About" tab shows "Irrlicht device: SDL".

numberZero commented 1 year ago

https://github.com/minetest/irrlicht/blob/9954667c45cc6c184ead60b516e532111556e56a/source/Irrlicht/CMakeLists.txt#L375-L384 Wouldn’t just replacing WIN32 with DEVICE STREQUAL "WINDOWS" be enough? Edit: okay, that would likely result in link-time errors due to: https://github.com/minetest/irrlicht/blob/9954667c45cc6c184ead60b516e532111556e56a/source/Irrlicht/Irrlicht.cpp#L63-L66