gdk: Add workaround for Visual Studio

apparently casting something to itself makes it not constant.
This commit is contained in:
Benjamin Otte 2023-04-25 23:18:36 +02:00
parent 9f82d537b0
commit 4333d754b8

View File

@ -49,8 +49,7 @@ struct _GdkGLVersion
int minor;
};
#define GDK_GL_VERSION_INIT(maj,min) (GdkGLVersion) { maj, min }
#define GDK_GL_VERSION_STRING(str) GDK_GL_VERSION_INIT(str[0] - '0', str[2] - '0')
#define GDK_GL_VERSION_INIT(maj,min) { maj, min }
static const GdkGLVersion supported_gl_versions[] = {
GDK_GL_VERSION_INIT (4, 6),
@ -77,6 +76,10 @@ static const GdkGLVersion supported_gles_versions[] = {
GDK_GL_VERSION_INIT (0, 0)
};
#undef GDK_GL_VERSION_INIT
#define GDK_GL_VERSION_INIT(maj,min) (GdkGLVersion) { maj, min }
#define GDK_GL_VERSION_STRING(str) GDK_GL_VERSION_INIT(str[0] - '0', str[2] - '0')
static inline const GdkGLVersion *
gdk_gl_versions_get_for_api (GdkGLAPI api)
{