Skip to content

Commit

Permalink
gsdx:ogl:windows: Fix calling convention mismatch
Browse files Browse the repository at this point in the history
OpenGL does not use the cdecl calling convention (which is the default
calling convention for GSdx on Windows). Since DebugOutputToFile is used
by OpenGL, it needs to use the same calling convention that OpenGL uses.

This fixes a debug build crash when the OpenGL renderers are used and
debug_opengl is nonzero in the ini.
  • Loading branch information
turtleli committed Sep 26, 2015
1 parent 953804c commit cbd2417
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/GSdx/GSDeviceOGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ class GSDeviceOGL : public GSDevice
virtual ~GSDeviceOGL();

static void CheckDebugLog();
static void DebugOutputToFile(GLenum gl_source, GLenum gl_type, GLuint id, GLenum gl_severity, GLsizei gl_length, const GLchar *gl_message, const void* userParam);
// Used by OpenGL, so the same calling convention is required.
static void APIENTRY DebugOutputToFile(GLenum gl_source, GLenum gl_type, GLuint id, GLenum gl_severity, GLsizei gl_length, const GLchar *gl_message, const void* userParam);

bool HasStencil() { return true; }
bool HasDepth32() { return true; }
Expand Down

1 comment on commit cbd2417

@gregory38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thanks you. 👍

Please sign in to comment.