mirror of
https://github.com/glfw/glfw.git
synced 2025-06-15 20:22:15 +00:00
Merge da9df32c59
into 124bc392ab
This commit is contained in:
commit
f3b04f67d8
@ -243,7 +243,7 @@ void _glfwTerminateContextAPI(void)
|
|||||||
{ \
|
{ \
|
||||||
attribs[index++] = attribName; \
|
attribs[index++] = attribName; \
|
||||||
attribs[index++] = attribValue; \
|
attribs[index++] = attribValue; \
|
||||||
assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \
|
assert(index < sizeof(attribs) / sizeof(attribs[0])); \
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare for creation of the OpenGL context
|
// Prepare for creation of the OpenGL context
|
||||||
@ -339,7 +339,8 @@ int _glfwCreateContext(_GLFWwindow* window,
|
|||||||
|
|
||||||
if (_glfw.egl.KHR_create_context)
|
if (_glfw.egl.KHR_create_context)
|
||||||
{
|
{
|
||||||
int index = 0, mask = 0, flags = 0, strategy = 0;
|
int mask = 0, flags = 0, strategy = 0;
|
||||||
|
size_t index = 0;
|
||||||
|
|
||||||
if (wndconfig->clientAPI == GLFW_OPENGL_API)
|
if (wndconfig->clientAPI == GLFW_OPENGL_API)
|
||||||
{
|
{
|
||||||
@ -384,7 +385,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int index = 0;
|
size_t index = 0;
|
||||||
|
|
||||||
if (wndconfig->clientAPI == GLFW_OPENGL_ES_API)
|
if (wndconfig->clientAPI == GLFW_OPENGL_ES_API)
|
||||||
setEGLattrib(EGL_CONTEXT_CLIENT_VERSION, wndconfig->glMajor);
|
setEGLattrib(EGL_CONTEXT_CLIENT_VERSION, wndconfig->glMajor);
|
||||||
|
@ -172,6 +172,8 @@ static GLXContext createLegacyContext(_GLFWwindow* window,
|
|||||||
GLXFBConfig fbconfig,
|
GLXFBConfig fbconfig,
|
||||||
GLXContext share)
|
GLXContext share)
|
||||||
{
|
{
|
||||||
|
(void) window;
|
||||||
|
|
||||||
if (_glfw.glx.SGIX_fbconfig)
|
if (_glfw.glx.SGIX_fbconfig)
|
||||||
{
|
{
|
||||||
return _glfw.glx.CreateContextWithConfigSGIX(_glfw.x11.display,
|
return _glfw.glx.CreateContextWithConfigSGIX(_glfw.x11.display,
|
||||||
@ -341,7 +343,7 @@ void _glfwTerminateContextAPI(void)
|
|||||||
{ \
|
{ \
|
||||||
attribs[index++] = attribName; \
|
attribs[index++] = attribName; \
|
||||||
attribs[index++] = attribValue; \
|
attribs[index++] = attribValue; \
|
||||||
assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \
|
assert(index < sizeof(attribs) / sizeof(attribs[0])); \
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare for creation of the OpenGL context
|
// Prepare for creation of the OpenGL context
|
||||||
@ -420,7 +422,8 @@ int _glfwCreateContext(_GLFWwindow* window,
|
|||||||
|
|
||||||
if (_glfw.glx.ARB_create_context)
|
if (_glfw.glx.ARB_create_context)
|
||||||
{
|
{
|
||||||
int index = 0, mask = 0, flags = 0, strategy = 0;
|
int mask = 0, flags = 0, strategy = 0;
|
||||||
|
size_t index = 0;
|
||||||
|
|
||||||
if (wndconfig->clientAPI == GLFW_OPENGL_API)
|
if (wndconfig->clientAPI == GLFW_OPENGL_API)
|
||||||
{
|
{
|
||||||
|
@ -329,7 +329,7 @@ void _glfwTerminateContextAPI(void)
|
|||||||
{ \
|
{ \
|
||||||
attribs[index++] = attribName; \
|
attribs[index++] = attribName; \
|
||||||
attribs[index++] = attribValue; \
|
attribs[index++] = attribValue; \
|
||||||
assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \
|
assert(index < sizeof(attribs) / sizeof(attribs[0])); \
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare for creation of the OpenGL context
|
// Prepare for creation of the OpenGL context
|
||||||
@ -378,7 +378,8 @@ int _glfwCreateContext(_GLFWwindow* window,
|
|||||||
|
|
||||||
if (window->wgl.ARB_create_context)
|
if (window->wgl.ARB_create_context)
|
||||||
{
|
{
|
||||||
int index = 0, mask = 0, flags = 0, strategy = 0;
|
int mask = 0, flags = 0, strategy = 0;
|
||||||
|
size_t index = 0;
|
||||||
|
|
||||||
if (wndconfig->clientAPI == GLFW_OPENGL_API)
|
if (wndconfig->clientAPI == GLFW_OPENGL_API)
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
//
|
//
|
||||||
static Bool isSelectionMessage(Display* display, XEvent* event, XPointer pointer)
|
static Bool isSelectionMessage(Display* display, XEvent* event, XPointer pointer)
|
||||||
{
|
{
|
||||||
|
(void)display;
|
||||||
|
(void)pointer;
|
||||||
|
|
||||||
return event->type == SelectionRequest ||
|
return event->type == SelectionRequest ||
|
||||||
event->type == SelectionNotify ||
|
event->type == SelectionNotify ||
|
||||||
event->type == SelectionClear;
|
event->type == SelectionClear;
|
||||||
@ -181,6 +184,8 @@ static Atom writeTargetToProperty(const XSelectionRequestEvent* request)
|
|||||||
|
|
||||||
void _glfwHandleSelectionClear(XEvent* event)
|
void _glfwHandleSelectionClear(XEvent* event)
|
||||||
{
|
{
|
||||||
|
(void) event;
|
||||||
|
|
||||||
free(_glfw.x11.selection.string);
|
free(_glfw.x11.selection.string);
|
||||||
_glfw.x11.selection.string = NULL;
|
_glfw.x11.selection.string = NULL;
|
||||||
}
|
}
|
||||||
|
@ -591,6 +591,8 @@ static void terminateDisplay(void)
|
|||||||
//
|
//
|
||||||
static int errorHandler(Display *display, XErrorEvent* event)
|
static int errorHandler(Display *display, XErrorEvent* event)
|
||||||
{
|
{
|
||||||
|
(void)display;
|
||||||
|
|
||||||
_glfw.x11.errorCode = event->error_code;
|
_glfw.x11.errorCode = event->error_code;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user