Sunshine master
Self-hosted game stream host for Moonlight.
misc.h File Reference

Miscellaneous declarations for macOS platform. More...

#include <vector>
#include <CoreGraphics/CoreGraphics.h>
Include dependency graph for misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * dyn::handle (const std::vector< const char * > &libs)
 Return the native handle owned by the wrapper.
 
bool platf::is_screen_capture_allowed ()
 Check whether macOS has granted screen-capture permission.
 
int dyn::load (void *handle, const std::vector< std::tuple< apiproc *, const char * > > &funcs, bool strict)
 Load persisted state from its backing store.
 

Detailed Description

Miscellaneous declarations for macOS platform.

Function Documentation

◆ handle()

void * dyn::handle ( const std::vector< const char * > & libs)

Return the native handle owned by the wrapper.

Parameters
libsList of libraries to probe for the requested symbol.
Returns
Native dynamic-library handle, or nullptr when no library can be opened.

◆ is_screen_capture_allowed()

bool platf::is_screen_capture_allowed ( )

Check whether macOS has granted screen-capture permission.

Check whether screen capture allowed.

Returns
True when Sunshine can capture the screen.

◆ load()

int dyn::load ( void * handle,
const std::vector< std::tuple< apiproc *, const char * > > & funcs,
bool strict = true )

Load persisted state from its backing store.

Parameters
handleNative library or object handle used by the operation.
funcsFunction table populated from the loaded library.
strictWhether missing functions should be treated as an error.
Returns
0 when all required symbols are loaded; nonzero when loading fails.