aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-03 14:45:09 -0400
committerDavid Robillard <d@drobilla.net>2021-05-03 18:30:39 -0400
commitee3278f0ac66e34b293912b83f8c9e044a0dc8b0 (patch)
tree62b8b08b84ed5f46feea83efb025a6f7660d1092
parentbd7dbdec48a48a70b8f380a928325291c53ecaf0 (diff)
downloadpugl-ee3278f0ac66e34b293912b83f8c9e044a0dc8b0.tar.gz
pugl-ee3278f0ac66e34b293912b83f8c9e044a0dc8b0.tar.bz2
pugl-ee3278f0ac66e34b293912b83f8c9e044a0dc8b0.zip
MacOS: Make puglGetNativeWorld() return the NSApplication
-rw-r--r--include/pugl/pugl.h2
-rw-r--r--src/mac.m4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h
index e537e8c..e15bb4a 100644
--- a/include/pugl/pugl.h
+++ b/include/pugl/pugl.h
@@ -670,7 +670,7 @@ puglGetWorldHandle(PuglWorld* world);
X11: Returns a pointer to the `Display`.
- MacOS: Returns null.
+ MacOS: Returns a pointer to the `NSApplication`.
Windows: Returns the `HMODULE` of the calling process.
*/
diff --git a/src/mac.m b/src/mac.m
index e3af330..60ea6c8 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -871,9 +871,9 @@ puglFreeWorldInternals(PuglWorld* world)
}
void*
-puglGetNativeWorld(PuglWorld* PUGL_UNUSED(world))
+puglGetNativeWorld(PuglWorld* world)
{
- return NULL;
+ return world->impl->app;
}
PuglInternals*