SDL fixes

This commit is contained in:
Lynix 2020-05-27 20:37:20 +02:00
parent 81f03f04e5
commit 1734b8e5db
3 changed files with 10 additions and 2 deletions

View File

@ -16,3 +16,12 @@ MODULE.Files = {
"../src/Nazara/Platform/SDL2/**.hpp",
"../src/Nazara/Platform/SDL2/**.cpp"
}
MODULE.OsDefines.Windows = {
"SDL_VIDEO_DRIVER_WINDOWS=1"
}
MODULE.OsDefines.Posix = {
"SDL_VIDEO_DRIVER_X11=1",
"SDL_VIDEO_DRIVER_WAYLAND=1",
}

View File

@ -129,7 +129,7 @@ namespace Nz
bool WindowImpl::Create(void* handle)
{
m_handle = SDL_CreateWindowFrom(handle);
if (!m_handle || !SDL_GetWindowID(m_handle))
if (!m_handle)
{
NazaraError("Invalid handle");
return false;

View File

@ -214,7 +214,6 @@ typedef unsigned int uintptr_t;
/* Enable various video drivers */
#define SDL_VIDEO_DRIVER_DUMMY 1
#define SDL_VIDEO_DRIVER_WINDOWS 1
#ifndef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 1