Skip to content
Permalink
Browse files

Unify overlay code for Unix and OS X.

This commit removes macx/overlay and merges
the OS X overlay into the Unix overlay in
overlay_gl.

Most of the overlay logic is exactly the same,
with most of the differences being in the
initialization code and the addition of few new
messages for the interactive client-in-overlay
feature that the OS X overlay suports.

The initialization code is factored out into
init_unix.c for Unix-likes and init_mac.c
for OS X.

These init files are #included by overlay.c.
That is, they're not separate translation
units. Doing it this way cuts down on the
total LOC count and overall complexity of the
code.

The interactive overlay support is ported
directly from the OS X overlay. It's mostly
a matter of supporting a few new message types:
OVERLAY_MSGTYPE_PID and OVERLAY_MSGTYPE_INTERACTIVE.

The overlay_gl.pro file in this commit is mostly
just a combination of the .pro files of the two
overlays, with a minor difference in the CFLAGS
for the OS X overlay. In old OS X overlay, the
overlay had an ".m" file extension, signalling
that it is an Objective-C source file to the
C compiler. Since the combined overlay has a
".c" extension, "-x objective-c" is added to
CFLAGS on OS X to tell the compiler to compile
the overlay as Objective-C code.
  • Loading branch information...
mkrautz committed Feb 7, 2015
1 parent a565197 commit f0ff84f6c0293cebb45d28146837050f6217d7e6
@@ -1,6 +1,6 @@
TEMPLATE = subdirs

CONFIG += debug_and_release
SUBDIRS = overlay compat osax
SUBDIRS = compat osax

include(scripts/scripts.pro)

This file was deleted.

0 comments on commit f0ff84f

Please sign in to comment.
You can’t perform that action at this time.