summaryrefslogtreecommitdiff
path: root/Source/Core/Common/GL/GLInterface/WGL.cpp
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2017-06-07 04:42:41 -0700
committerShawn Hoffman <godisgovernment@gmail.com>2017-06-07 20:09:44 -0700
commit9357cee2ef96fbe345a82ac2f6af7c715d1e6027 (patch)
treebadd7f8703424f269d1242b3964561ef0485c005 /Source/Core/Common/GL/GLInterface/WGL.cpp
parent50f34f8b05ea64c42f465d6bd384208e886ba88f (diff)
do not assign in conditional statements
Diffstat (limited to 'Source/Core/Common/GL/GLInterface/WGL.cpp')
-rw-r--r--Source/Core/Common/GL/GLInterface/WGL.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/Common/GL/GLInterface/WGL.cpp b/Source/Core/Common/GL/GLInterface/WGL.cpp
index 57c46cb42b..3e500f5866 100644
--- a/Source/Core/Common/GL/GLInterface/WGL.cpp
+++ b/Source/Core/Common/GL/GLInterface/WGL.cpp
@@ -248,8 +248,8 @@ bool cInterfaceWGL::Create(void* window_handle, bool core)
return false;
}
- int pixel_format;
- if (!(pixel_format = ChoosePixelFormat(m_dc, &pfd)))
+ int pixel_format = ChoosePixelFormat(m_dc, &pfd);
+ if (!pixel_format)
{
PanicAlert("(2) Can't find a suitable PixelFormat.");
return false;
@@ -261,7 +261,8 @@ bool cInterfaceWGL::Create(void* window_handle, bool core)
return false;
}
- if (!(m_rc = wglCreateContext(m_dc)))
+ m_rc = wglCreateContext(m_dc);
+ if (!m_rc)
{
PanicAlert("(4) Can't create an OpenGL rendering context.");
return false;