summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAhmad Fatoum <[email protected]>2018-10-27 11:11:54 +0200
committerAhmad Fatoum <[email protected]>2019-01-08 09:03:22 +0100
commit8bc4050377221e85e0e270b01fc14ba669d90cb7 (patch)
tree56afded9703440c2083cf7fec1943b33df622c43 /src
parentc3d2b1b18451d66e247450fe06d2d95e6a9a8674 (diff)
downloadraylib-8bc4050377221e85e0e270b01fc14ba669d90cb7.tar.gz
raylib-8bc4050377221e85e0e270b01fc14ba669d90cb7.zip
Revert "core: workaround window not being rendered till moved on macOS Mojave"
This reverts commit 1fe6d9fc06156257d5210cfa71ecb839fb190722. Because upstream GLFW now contains a fix.
Diffstat (limited to 'src')
-rw-r--r--src/core.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/core.c b/src/core.c
index a7ea150b..1c703e5b 100644
--- a/src/core.c
+++ b/src/core.c
@@ -175,11 +175,9 @@
#include <GLFW/glfw3native.h> // Required for: glfwGetX11Window()
#elif defined(__APPLE__)
#include <unistd.h> // Required for: usleep()
- #include <objc/message.h> // Required for: objc_msgsend(), sel_registerName()
//#define GLFW_EXPOSE_NATIVE_COCOA // WARNING: Fails due to type redefinition
- #define GLFW_EXPOSE_NATIVE_NSGL
- #include <GLFW/glfw3native.h> // Required for: glfwGetCocoaWindow(), glfwGetNSGLContext()
+ #include <GLFW/glfw3native.h> // Required for: glfwGetCocoaWindow()
#endif
#endif
@@ -277,10 +275,6 @@ static bool windowReady = false; // Check if window has been init
static bool windowMinimized = false; // Check if window has been minimized
static const char *windowTitle = NULL; // Window text title...
-#if defined(__APPLE__)
-static int windowNeedsUpdating = 2; // Times the Cocoa window needs to be updated initially
-#endif
-
static unsigned int displayWidth, displayHeight;// Display width and height (monitor, device-screen, LCD, ...)
static int screenWidth, screenHeight; // Screen width and height (used render area)
static int renderWidth, renderHeight; // Framebuffer width and height (render area, including black bars if required)
@@ -3135,16 +3129,6 @@ static void SwapBuffers(void)
{
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
glfwSwapBuffers(window);
-#if __APPLE__
- // Workaround for missing/erroneous initial rendering on macOS
- if (windowNeedsUpdating)
- {
- // Desugared version of Objective C: [glfwGetNSGLContext(window) update]
- ((id (*)(id, SEL))objc_msgSend)(glfwGetNSGLContext(window), sel_registerName("update"));
-
- windowNeedsUpdating--;
- }
-#endif
#endif
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(PLATFORM_UWP)