Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

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

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

grorp
Copy link
Member

@grorp grorp commented Oct 4, 2023

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".

Fixes that Windows+SDL builds use the Windows Irrlicht device instead of the SDL Irrlicht device.
@numberZero
Copy link
Contributor

numberZero commented Oct 4, 2023

if(WIN32)
set(IRRDRVROBJ ${IRRDRVROBJ}
CIrrDeviceWin32.cpp
)
if(ENABLE_OPENGL)
set(IRRDRVROBJ ${IRRDRVROBJ}
CWGLManager.cpp
)
endif()
endif()

Wouldn’t just replacing WIN32 with DEVICE STREQUAL "WINDOWS" be enough?
Edit: okay, that would likely result in link-time errors due to:
#ifdef _IRR_WINDOWS_API_
if (params.DeviceType == EIDT_WIN32 || (!dev && params.DeviceType == EIDT_BEST))
dev = new CIrrDeviceWin32(params);
#endif

@sfan5 sfan5 merged commit 5b2f192 into minetest:master Oct 4, 2023
10 of 14 checks passed
@grorp grorp deleted the revert-225 branch December 18, 2023 16:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows+SDL broken by #225
3 participants