Browse files

egl: fix build on X11 systems.

Declare displays with EGLNativeDisplayType and ensure that windows
use integral values for initialization. This is still valid for cases
where the window type is a pointer because `0' is also a valid value
for them.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
  • Loading branch information...
1 parent d6b55f1 commit abdf416619c03fbc7bc4340df2d313b7ce14db64 @gbeauchesne committed Aug 10, 2012
View
4 xbmc/windowing/X11/WinSystemX11GLES.cpp
@@ -83,8 +83,8 @@ CWinSystemX11GLES::CWinSystemX11GLES() : CWinSystemBase()
m_eglDisplay = NULL;
m_eglContext = NULL;
m_eglSurface = NULL;
- m_eglWindow = NULL;
- m_wmWindow = NULL;
+ m_eglWindow = 0;
+ m_wmWindow = 0;
m_dpy = NULL;
m_iVSyncErrors = 0;
View
4 xbmc/windowing/egl/WinEGLPlatformAndroid.cpp
@@ -19,6 +19,9 @@
*
*/
+#include "system.h"
+
+#ifdef TARGET_ANDROID
#include <unistd.h>
#include <string.h>
#include <stdio.h>
@@ -69,3 +72,4 @@ EGLNativeWindowType CWinEGLPlatformAndroid::getNativeWindow()
{
return (EGLNativeWindowType)CXBMCApp::GetNativeWindow();
}
+#endif
View
4 xbmc/windowing/egl/WinSystemGLES.cpp
@@ -33,7 +33,7 @@
////////////////////////////////////////////////////////////////////////////////////////////
CWinSystemGLES::CWinSystemGLES() : CWinSystemBase()
{
- m_window = NULL;
+ m_window = 0;
m_eglplatform = new CWinEGLPlatform();
m_eWindowSystem = WINDOW_SYSTEM_EGL;
}
@@ -70,7 +70,7 @@ bool CWinSystemGLES::InitWindowSystem()
bool CWinSystemGLES::DestroyWindowSystem()
{
m_eglplatform->DestroyWindowSystem(m_window);
- m_window = NULL;
+ m_window = 0;
return true;
}
View
2 xbmc/windowing/egl/WinSystemGLES.h
@@ -60,7 +60,7 @@ class CWinSystemGLES : public CWinSystemBase, public CRenderSystemGLES
protected:
virtual bool PresentRenderImpl(const CDirtyRegionList &dirty);
virtual void SetVSyncImpl(bool enable);
- void *m_display;
+ EGLNativeDisplayType m_display;
EGLNativeWindowType m_window;
CWinEGLPlatform *m_eglplatform;
};

1 comment on commit abdf416

@theuni

I'm surprised that's all it took after the Android merge.

Thanks!

Please sign in to comment.