SIMPHYNITY Game Plugin
Example game plugin DLL for SIMPHYNITY
|
Functions | |
BOOL APIENTRY | DllMain (HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) |
DECLDIR void | GetDefaultSettings (const GAME_SETTINGS *settings) |
DECLDIR int | GetNumExeNames () |
DECLDIR void | GetExeName (int index, const TCHAR *exeName) |
DECLDIR int | GetNumParentDirs () |
DECLDIR void | GetParentDir (int index, const TCHAR *dir) |
DECLDIR void | GetSimphyintyRemoteSettings (const REMOTE_CONFIG *settings) |
DECLDIR void | OnGameDetected () |
DECLDIR void | OnGameLost () |
DECLDIR void | GetTelemetryData (const TELEMETRY_DATA *telem) |
Contains SIMPHYNITY plugin DLL exported functions.
DECLDIR void GetDefaultSettings | ( | const GAME_SETTINGS * | settings | ) |
Configures the default settings for this game (as configurable by the game settings panel in the Simphynity UI). It is mandatory this structure is correctly configured - for more information see the GAME_SETTINGS structure documentation.
settings | The game settings structure. |
DECLDIR void GetExeName | ( | int | index, |
const TCHAR * | exeName | ||
) |
Called by Simphynity to get executable name N for the game (specified by the supplied index). See also GetNumExeNames(...).
index | The index of the executable name requested |
exeName | The buffer to copy the (null-terminated) executable name string into. NB: THIS MUST NOT EXCEED 32 CHARACTERS. |
DECLDIR int GetNumExeNames | ( | ) |
Called by Simphynity to query the number of possible executable names that exist for this game. E.g. some titles might have separate dx9 and/or dx11 executables with different names. It is the executable name (combined with the parent dirs, see below) that Simphynity uses to determine if the game is running.
DECLDIR int GetNumParentDirs | ( | ) |
Called by Simphynity to query the number of possible parent sub-directories that exist for this game's executable (.exe) file. E.g. some titles may be installed via different methods (e.g. digital download or DVD), and installed to different paths depending on the method. This gives the possible most deeply-nested install subpaths (not fully qualified paths) for the executable file.
The purpose of this information is to allow Simphynity to better determine that it has detected the game we're actually interested in, and not another process with the same executable name. When Simphynity is idle, it periodically checks all running processes and gets their full installation paths. If the executable name (excluding its path) is matched with one of those returned from 'GetExeName(...)' above, it then proceeds to check the immediate parent directory (or path) of the executable to further determine this is definately the .exe we're interested in. A parent directory can be specified in as many depth levels (starting from the exe name and working upwards through the directory hierarchy) as desired, each depth level being separated via a '/' (or '\', NB '\' will not function as intended)
E.g. 'rFactor.exe' may have the parent directory "bin", or if we want Simphynity to be more scrutinous, "rFactor/bin".
If we don't wish to specify parent dirs (and detect purely by executable name alone), simply return '0' from GetNumParentDirs().
DECLDIR void GetParentDir | ( | int | index, |
const TCHAR * | dir | ||
) |
Called by Simphynity to get possible parent directory N for the game (specified by the supplied index). See GetNumParentDirs() for more information.
index | The index of the parent directory requested |
exeName | The buffer to copy the (null-terminated) parent directory string into. NB: THIS MUST NOT EXCEED 128 CHARACTERS. |
DECLDIR void GetSimphyintyRemoteSettings | ( | const REMOTE_CONFIG * | settings | ) |
Supplied with a REMOTE_CONFIG parameter (containing pre-configured default values) to allow Simphynity Remote to be enabled/disabled and/or configured according to our requirements. See the REMOTE_CONFIG structure documentation for more information regarding its members.
settings | The Simphynity Remote settings for this game. |
DECLDIR void GetTelemetryData | ( | const TELEMETRY_DATA * | telem | ) |
Called by Simphynity to request the most recent telemetry data available from the game. This is the data used to update any in-game output dials, device output previews and the devices themselves. See the TELEMETRY_DATA structure documentation for more information regarding what needs to be provided here.
telem | The structure to update with the latest telemetry data. |
DECLDIR void OnGameDetected | ( | ) |
Called by Simphynity when our game process has been detected. Perform any actions required upon game detection here.
DECLDIR void OnGameLost | ( | ) |
Called by Simphynity when our game process has been lost (i.e. the game has been terminated). Perform any actions required upon game undetection here.