Update rcore_desktop_glfw.c
This commit is contained in:
parent
3ba186f2c1
commit
dedc05a7a6
|
|
@ -101,7 +101,7 @@
|
||||||
#endif
|
#endif
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <unistd.h> // Required for: usleep()
|
#include <unistd.h> // Required for: usleep()
|
||||||
|
#include "_cocoalayer.h"
|
||||||
//#define GLFW_EXPOSE_NATIVE_COCOA // WARNING: Fails due to type redefinition
|
//#define GLFW_EXPOSE_NATIVE_COCOA // WARNING: Fails due to type redefinition
|
||||||
void *glfwGetCocoaWindow(GLFWwindow* handle);
|
void *glfwGetCocoaWindow(GLFWwindow* handle);
|
||||||
#include "GLFW/glfw3native.h" // Required for: glfwGetCocoaWindow()
|
#include "GLFW/glfw3native.h" // Required for: glfwGetCocoaWindow()
|
||||||
|
|
@ -562,6 +562,9 @@ void ClearWindowState(unsigned int flags)
|
||||||
// NOTE 2: Image is scaled by the OS for all required sizes
|
// NOTE 2: Image is scaled by the OS for all required sizes
|
||||||
void SetWindowIcon(Image image)
|
void SetWindowIcon(Image image)
|
||||||
{
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
CocoaSetWindowIcon(image.data, image.width, image.height);
|
||||||
|
#else
|
||||||
if (image.data == NULL)
|
if (image.data == NULL)
|
||||||
{
|
{
|
||||||
// Revert to the default window icon, pass in an empty image array
|
// Revert to the default window icon, pass in an empty image array
|
||||||
|
|
@ -583,6 +586,7 @@ void SetWindowIcon(Image image)
|
||||||
}
|
}
|
||||||
else TRACELOG(LOG_WARNING, "GLFW: Window icon image must be in R8G8B8A8 pixel format");
|
else TRACELOG(LOG_WARNING, "GLFW: Window icon image must be in R8G8B8A8 pixel format");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set icon for window, multiple images
|
// Set icon for window, multiple images
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user