mirror of
https://github.com/SFML/SFML.git
synced 2025-02-19 06:39:59 +08:00
Fix eglCheck macro usage for assignments
This commit is contained in:
parent
618c96339b
commit
5098b6c22b
@ -168,7 +168,7 @@ namespace
|
|||||||
|
|
||||||
if (display == EGL_NO_DISPLAY)
|
if (display == EGL_NO_DISPLAY)
|
||||||
{
|
{
|
||||||
display = eglCheck(eglGetDisplay(reinterpret_cast<EGLNativeDisplayType>(gbmDevice)));
|
eglCheck(display = eglGetDisplay(reinterpret_cast<EGLNativeDisplayType>(gbmDevice)));
|
||||||
|
|
||||||
EGLint major, minor;
|
EGLint major, minor;
|
||||||
eglCheck(eglInitialize(display, &major, &minor));
|
eglCheck(eglInitialize(display, &major, &minor));
|
||||||
@ -295,7 +295,8 @@ m_scanOut (false)
|
|||||||
DRMContext::~DRMContext()
|
DRMContext::~DRMContext()
|
||||||
{
|
{
|
||||||
// Deactivate the current context
|
// Deactivate the current context
|
||||||
EGLContext currentContext = eglCheck(eglGetCurrentContext());
|
EGLContext currentContext;
|
||||||
|
eglCheck(currentContext = eglGetCurrentContext());
|
||||||
|
|
||||||
if (currentContext == m_context)
|
if (currentContext == m_context)
|
||||||
{
|
{
|
||||||
@ -427,7 +428,7 @@ void DRMContext::createContext(DRMContext* shared)
|
|||||||
eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||||
|
|
||||||
// Create EGL context
|
// Create EGL context
|
||||||
m_context = eglCheck(eglCreateContext(m_display, m_config, toShared, contextVersion));
|
eglCheck(m_context = eglCreateContext(m_display, m_config, toShared, contextVersion));
|
||||||
if (m_context == EGL_NO_CONTEXT)
|
if (m_context == EGL_NO_CONTEXT)
|
||||||
err() << "Failed to create EGL context" << std::endl;
|
err() << "Failed to create EGL context" << std::endl;
|
||||||
}
|
}
|
||||||
@ -458,7 +459,7 @@ void DRMContext::createSurface(unsigned int width, unsigned int height, unsigned
|
|||||||
m_width = width;
|
m_width = width;
|
||||||
m_height = height;
|
m_height = height;
|
||||||
|
|
||||||
m_surface = eglCheck(eglCreateWindowSurface(m_display, m_config, reinterpret_cast<EGLNativeWindowType>(m_gbmSurface), NULL));
|
eglCheck(m_surface = eglCreateWindowSurface(m_display, m_config, reinterpret_cast<EGLNativeWindowType>(m_gbmSurface), NULL));
|
||||||
|
|
||||||
if (m_surface == EGL_NO_SURFACE)
|
if (m_surface == EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user