mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Fix update being called on nil context
This commit is contained in:
+4
-2
@@ -160,7 +160,8 @@ static int translateKey(unsigned int key)
|
|||||||
|
|
||||||
- (void)windowDidResize:(NSNotification *)notification
|
- (void)windowDidResize:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
[window->nsgl.context update];
|
if (window->context.api != GLFW_NO_API)
|
||||||
|
[window->nsgl.context update];
|
||||||
|
|
||||||
if (_glfw.cursorWindow == window &&
|
if (_glfw.cursorWindow == window &&
|
||||||
window->cursorMode == GLFW_CURSOR_DISABLED)
|
window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||||
@@ -177,7 +178,8 @@ static int translateKey(unsigned int key)
|
|||||||
|
|
||||||
- (void)windowDidMove:(NSNotification *)notification
|
- (void)windowDidMove:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
[window->nsgl.context update];
|
if (window->context.api != GLFW_NO_API)
|
||||||
|
[window->nsgl.context update];
|
||||||
|
|
||||||
if (_glfw.cursorWindow == window &&
|
if (_glfw.cursorWindow == window &&
|
||||||
window->cursorMode == GLFW_CURSOR_DISABLED)
|
window->cursorMode == GLFW_CURSOR_DISABLED)
|
||||||
|
|||||||
Reference in New Issue
Block a user