diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2010-08-31 22:09:08 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2010-08-31 22:09:31 +0400 |
commit | 1ac9afacabbb8ea2f82b4dafa1d77949b5466fb1 (patch) | |
tree | 26a2fe005dfeb26dd8abc9fd92ec50e775c249c4 /overlay_gl | |
parent | dd3d537e702b15e1e6e6211457f500e4716dbc78 (diff) |
Unix/MacOSX overlay library: Tell OverlayClient when we've mapped SharedMemory so it can safely be released.
Diffstat (limited to 'overlay_gl')
-rw-r--r-- | overlay_gl/overlay.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/overlay_gl/overlay.c b/overlay_gl/overlay.c index 711b7ecbe..e522c3e34 100644 --- a/overlay_gl/overlay.c +++ b/overlay_gl/overlay.c @@ -319,6 +319,14 @@ static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) { ctx->uiMappedLength = buf.st_size; ctx->a_ucTexture = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0); if (ctx->a_ucTexture != (unsigned char *) -1) { + struct OverlayMsg om; + om.omh.uiMagic = OVERLAY_MAGIC_NUMBER; + om.omh.uiType = OVERLAY_MSGTYPE_SHMEM; + om.omh.iLength = 0; + + if (! sendMessage(ctx, &om)) + return; + regenTexture(ctx); continue; } |