1
0
mirror of synced 2025-01-20 16:08:45 +01:00

Add Enable Outputs to ID0 v1.31 & 2.11

This commit is contained in:
Aaron M 2021-04-27 19:36:19 +12:00
parent 6156e45d98
commit c7fb16b6f8
2 changed files with 24 additions and 0 deletions

View File

@ -18,6 +18,8 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
extern int EnableDamper;
extern int DamperStrength;
static bool outputinit = false;
static UINT8 ff;
static UINT8 oldff;
static UINT8 newff;
@ -30,9 +32,19 @@ static int EnableForceSpringEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT
static int ForceSpringStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrength"), 0, settingsFilename);
static int EscapeKeyExitViaPlugin = GetPrivateProfileInt(TEXT("Settings"), TEXT("EscapeKeyExitViaPlugin"), 0, settingsFilename);
static int IDZMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("IDZMode"), 0, settingsFilename);
static int EnableOutputs = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableOutputs"), 0, settingsFilename);
void InitialD0::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
if (!outputinit)
{
if (EnableOutputs == 1)
{
outputinit = true;
LoadLibraryA("OutputBlaster.dll");
}
}
if (GetAsyncKeyState((VK_ESCAPE)) && (EscapeKeyExitViaPlugin == 1))
{
ExitProcess(0);

View File

@ -25,14 +25,26 @@ static UINT8 ff3;
extern int EnableDamper;
extern int DamperStrength;
static bool outputinit = false;
static wchar_t* settingsFilename = TEXT(".\\FFBPlugin.ini");
static int EnableForceSpringEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffect"), 0, settingsFilename);
static int ForceSpringStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrength"), 0, settingsFilename);
static int EscapeKeyExitViaPlugin = GetPrivateProfileInt(TEXT("Settings"), TEXT("EscapeKeyExitViaPlugin"), 0, settingsFilename);
static int IDZMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("IDZMode"), 0, settingsFilename);
static int EnableOutputs = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableOutputs"), 0, settingsFilename);
void InitialD0v211::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
if (!outputinit)
{
if (EnableOutputs == 1)
{
outputinit = true;
LoadLibraryA("OutputBlaster.dll");
}
}
if (GetAsyncKeyState((VK_ESCAPE)) && (EscapeKeyExitViaPlugin == 1))
{
ExitProcess(0);