deltacasttv / video-viewer

Cross platform Library that handles display of a video stream
Apache License 2.0
6 stars 0 forks source link

GLFW_CHECK and GL_CHECK macro usage #15

Closed rolandha closed 7 months ago

rolandha commented 9 months ago

You can not use these macros in combination with a conditional statement because they do not return a value.

Line 174 in videoviewer_internal.cpp e.g. make no sense:

if (!GLFW_CHECK(glfwInit()))

as the macro is a while loop:

define GLFW_CHECK(stmt) do {

stmt; PrintGLFWError(#stmt, FILE, LINE); } while (0)

julienalofs commented 7 months ago

Thank you for the report @rolandha. Indeed, you are right. Do not hesitate to create pull request because I'm not sure to be available quickly to fix this.