Prof-Butts / Hook_XWACockpitLook

X-Wing Alliance mouse hook with support for VR head-tracking
6 stars 1 forks source link

Use class template and semaphore for shared memory #20

Closed morallo closed 2 years ago

morallo commented 2 years ago

Use a class template to define the SharedMem manager class. This allows to re-use the same code for sharing data between different hooks using specific struct definitions but the same SharedMem manager.

Instead of storing just a pointer to the heap in shared memory, put the whole shared structure in the memory mapped file for simplicity.

To signal the availability of data from the hook, use a binary semaphore.

This depends on similar changes to ddraw to work properly.