Cleaned up some stuff
Removed seperate cpp files etc for 32bit and 64bit for Mame & Button Rumble
This commit is contained in:
parent
a71698aa82
commit
d8a3920af9
@ -66,7 +66,6 @@ Gear4=99
|
||||
GearUp=99
|
||||
GearDown=99
|
||||
HideCursor=0
|
||||
;Gear buttons pre-set for Logitech G25 Shifter
|
||||
|
||||
[Demul]
|
||||
GameId=26
|
||||
@ -87,6 +86,7 @@ DefaultCentering=15
|
||||
|
||||
[AfterburnerClimax]
|
||||
GameId=15
|
||||
EnableRumble=1
|
||||
Rumble1Strength=50
|
||||
Rumble2Strength=100
|
||||
Rumble1Length=200
|
||||
@ -94,6 +94,7 @@ Rumble2Length=200
|
||||
|
||||
[LGI]
|
||||
GameId=31
|
||||
EnableRumble=1
|
||||
Device2GUID=
|
||||
Knock1pStrength=50
|
||||
Motor1pStrength=60
|
||||
@ -107,6 +108,7 @@ HowtoRumbleHealthEffect=0
|
||||
|
||||
[LGI3D]
|
||||
GameId=30
|
||||
EnableRumble=1
|
||||
Device2GUID=
|
||||
Knock1pStrength=50
|
||||
Motor1pStrength=60
|
||||
@ -176,6 +178,7 @@ MaxForce=100
|
||||
|
||||
[Machstorm]
|
||||
GameId=14
|
||||
EnableRumble=1
|
||||
Power1RumbleStrength=10
|
||||
Power2RumbleStrength=20
|
||||
Power3RumbleStrength=30
|
||||
@ -199,6 +202,7 @@ Power10RumbleLength=100
|
||||
|
||||
[PokkenTournament]
|
||||
GameId=19
|
||||
EnableRumble=1
|
||||
RumbleStrength=100
|
||||
RumbleLength=500
|
||||
HowtoRumble=0
|
||||
@ -264,7 +268,7 @@ HighSpeedVibrationsStrength=100
|
||||
LimitBetweenHighSpeedVibrationsAndTiresSlip=75
|
||||
|
||||
[Mame 0199 32bit]
|
||||
GameId=4
|
||||
GameId=34
|
||||
MinForce=0
|
||||
MaxForce=75
|
||||
DefaultCentering=0
|
||||
@ -280,7 +284,7 @@ FeedbackLength=500
|
||||
FFBMode=0
|
||||
|
||||
[Mame 0206 32bit]
|
||||
GameId=32
|
||||
GameId=33
|
||||
MinForce=0
|
||||
MaxForce=75
|
||||
DefaultCentering=0
|
||||
@ -389,7 +393,7 @@ Button9Device2Rumble=99
|
||||
Button10Device2Rumble=99
|
||||
|
||||
[Button Rumble 64bit]
|
||||
GameId=36
|
||||
GameId=28
|
||||
ShowButtonNumbersForSetup=0
|
||||
BothRumbleMotor=1
|
||||
LeftRumbleMotor=0
|
||||
|
@ -20,16 +20,13 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Game Files\FordRacingOther.h" />
|
||||
<ClInclude Include="Game Files\ButtonRumble64bit.h" />
|
||||
<ClInclude Include="Game Files\KODrive.h" />
|
||||
<ClInclude Include="Game Files\OutRun2Real.h" />
|
||||
<ClInclude Include="Game Files\Mame019964bit.h" />
|
||||
<ClInclude Include="Game Files\Mame020664bit.h" />
|
||||
<ClInclude Include="Game Files\ButtonRumble32bit.h" />
|
||||
<ClInclude Include="Game Files\ButtonRumble.h" />
|
||||
<ClInclude Include="Game Files\Demul.h" />
|
||||
<ClInclude Include="dinput8.def">
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Mame020632bit.h" />
|
||||
<ClInclude Include="Game Files\Mame0206.h" />
|
||||
<ClInclude Include="Game Files\MarioKartGPDX1.10.h" />
|
||||
<ClInclude Include="Game Files\InitialD5.h" />
|
||||
<ClInclude Include="Game Files\InitialD4Japan.h" />
|
||||
@ -45,12 +42,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Game Files\FordRacingOther.cpp" />
|
||||
<ClCompile Include="Game Files\ButtonRumble64bit.cpp" />
|
||||
<ClCompile Include="Game Files\KODrive.cpp" />
|
||||
<ClCompile Include="Game Files\OutRun2Real.cpp" />
|
||||
<ClCompile Include="Game Files\Mame019964bit.cpp" />
|
||||
<ClCompile Include="Game Files\Mame020664bit.cpp" />
|
||||
<ClCompile Include="Game Files\ButtonRumble32bit.cpp" />
|
||||
<ClCompile Include="Game Files\ButtonRumble.cpp" />
|
||||
<ClCompile Include="Common Files\TeknoParrotGame.cpp" />
|
||||
<ClCompile Include="Game Files\Demul.cpp" />
|
||||
<ClCompile Include="Game Files\AfterburnerClimax.cpp" />
|
||||
@ -64,7 +58,7 @@
|
||||
<ClCompile Include="Game Files\InitialD7.cpp" />
|
||||
<ClCompile Include="Game Files\InitialD8.cpp" />
|
||||
<ClCompile Include="Game Files\Machstorm.cpp" />
|
||||
<ClCompile Include="Game Files\Mame020632bit.cpp" />
|
||||
<ClCompile Include="Game Files\Mame0206.cpp" />
|
||||
<ClCompile Include="Game Files\OutRun2Fake.cpp" />
|
||||
<ClCompile Include="Game Files\PokkenTournament.cpp" />
|
||||
<ClCompile Include="Game Files\SegaRally3.cpp" />
|
||||
@ -73,7 +67,7 @@
|
||||
<ClCompile Include="Game Files\MarioKartGPDX.cpp" />
|
||||
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp" />
|
||||
<ClCompile Include="Game Files\TestGame.cpp" />
|
||||
<ClCompile Include="Game Files\Mame019932bit.cpp" />
|
||||
<ClCompile Include="Game Files\Mame0199.cpp" />
|
||||
<ClCompile Include="Game Files\WackyRaces.cpp" />
|
||||
<ClCompile Include="Game Files\WMMT5.cpp" />
|
||||
<ClCompile Include="Game Files\InitialD4Japan.cpp" />
|
||||
@ -106,7 +100,7 @@
|
||||
<ClInclude Include="Game Files\MarioKartGPDX.h" />
|
||||
<ClInclude Include="Game Files\SonicSegaAllStarsRacing.h" />
|
||||
<ClInclude Include="Game Files\TestGame.h" />
|
||||
<ClInclude Include="Game Files\Mame019932bit.h" />
|
||||
<ClInclude Include="Game Files\Mame0199.h" />
|
||||
<ClInclude Include="Game Files\WackyRaces.h" />
|
||||
<ClInclude Include="Game Files\WMMT5.h" />
|
||||
<ClInclude Include="Game Files\GTIClub3.h" />
|
||||
|
@ -101,22 +101,19 @@
|
||||
<ClCompile Include="Game Files\LGI3D.cpp">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game Files\Mame020632bit.cpp" />
|
||||
<ClCompile Include="Game Files\Mame020664bit.cpp" />
|
||||
<ClCompile Include="Game Files\Mame019932bit.cpp">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game Files\Mame019964bit.cpp" />
|
||||
<ClCompile Include="Game Files\OutRun2Real.cpp" />
|
||||
<ClCompile Include="Game Files\OutRun2Fake.cpp">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game Files\ButtonRumble32bit.cpp">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game Files\ButtonRumble64bit.cpp" />
|
||||
<ClCompile Include="Game Files\FordRacingOther.cpp" />
|
||||
<ClCompile Include="Game Files\KODrive.cpp" />
|
||||
<ClCompile Include="Game Files\ButtonRumble.cpp">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game Files\Mame0199.cpp">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game Files\Mame0206.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Game Files\Daytona3.h">
|
||||
@ -210,36 +207,27 @@
|
||||
<ClInclude Include="Game Files\LGI3D.h">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Mame020632bit.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Mame020664bit.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Mame019932bit.h">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Mame019964bit.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\OutRun2Fake.h">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\OutRun2Real.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\ButtonRumble32bit.h">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\ButtonRumble64bit.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\FordRacingOther.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\KODrive.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\ButtonRumble.h">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Mame0199.h">
|
||||
<Filter>Game Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Mame0206.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MASM Include="DLLWrapper.asm" />
|
||||
|
39
DllMain.cpp
39
DllMain.cpp
@ -43,8 +43,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#include "Game Files/OutRun2Real.h"
|
||||
#include "Game Files/SegaRacingClassic.h"
|
||||
#include "Game Files/SegaRally3.h"
|
||||
#include "Game Files/Mame019932bit.h"
|
||||
#include "Game Files/Mame019964bit.h"
|
||||
#include "Game Files/Mame0199.h"
|
||||
#include "Game Files/WackyRaces.h"
|
||||
#include "Game Files/WMMT5.h"
|
||||
#include "Game Files/BG4JP.h"
|
||||
@ -56,13 +55,11 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#include "Game Files/M2Emulator.h"
|
||||
#include "Game Files/GTIClub3.h"
|
||||
#include "Game Files/Demul.h"
|
||||
#include "Game Files/ButtonRumble32bit.h"
|
||||
#include "Game Files/ButtonRumble64bit.h"
|
||||
#include "Game Files/ButtonRumble.h"
|
||||
#include "Game Files/RoadFighters3D.h"
|
||||
#include "Game Files/LGI3D.h"
|
||||
#include "Game Files/LGI.h"
|
||||
#include "Game Files/Mame020632bit.h"
|
||||
#include "Game Files/Mame020664bit.h"
|
||||
#include "Game Files/Mame0206.h"
|
||||
#include "Game Files/KODrive.h"
|
||||
|
||||
// typedefs
|
||||
@ -880,7 +877,6 @@ const int TEST_GAME_RUMBLE = -7;
|
||||
const int DAYTONA_3 = 1;
|
||||
const int WACKY_RACES = 2;
|
||||
const int CHASE_HQ_2 = 3;
|
||||
const int MAME_019932bit = 4;
|
||||
const int SEGA_RACING_CLASSIC = 5;
|
||||
const int SEGA_RALLY_3 = 6;
|
||||
const int FORD_RACING = 7;
|
||||
@ -902,15 +898,13 @@ const int INITIAL_D_4_Japan = 24;
|
||||
const int M2_Emulator = 25;
|
||||
const int Demul_Emulator = 26;
|
||||
const int GTI_Club_3 = 27;
|
||||
const int Button_Rumble32bit = 28;
|
||||
const int Button_Rumble = 28;
|
||||
const int Road_Fighters_3D = 29;
|
||||
const int LGI_3D = 30;
|
||||
const int LGI_ = 31;
|
||||
const int MAME_020632bit = 32;
|
||||
const int MAME_020664bit = 33;
|
||||
const int MAME_019964bit = 34;
|
||||
const int MAME_0206 = 33;
|
||||
const int MAME_0199 = 34;
|
||||
const int OUTRUN_2Real = 35;
|
||||
const int Button_Rumble64bit = 36;
|
||||
const int FORD_RACING_OTHER = 38;
|
||||
const int KO_Drive = 39;
|
||||
|
||||
@ -1721,12 +1715,6 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
||||
case SEGA_RALLY_3:
|
||||
game = new SegaRally3;
|
||||
break;
|
||||
case MAME_019932bit:
|
||||
game = new Mame019932bit;
|
||||
break;
|
||||
case MAME_019964bit:
|
||||
game = new Mame019964bit;
|
||||
break;
|
||||
case WACKY_RACES:
|
||||
game = new WackyRaces;
|
||||
break;
|
||||
@ -1766,11 +1754,8 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
||||
case GTI_Club_3:
|
||||
game = new GTIClub3;
|
||||
break;
|
||||
case Button_Rumble32bit:
|
||||
game = new ButtonRumble32bit;
|
||||
break;
|
||||
case Button_Rumble64bit:
|
||||
game = new ButtonRumble64bit;
|
||||
case Button_Rumble:
|
||||
game = new ButtonRumble;
|
||||
break;
|
||||
case Road_Fighters_3D:
|
||||
game = new RoadFighters3D;
|
||||
@ -1781,11 +1766,11 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
||||
case LGI_:
|
||||
game = new LGI;
|
||||
break;
|
||||
case MAME_020632bit:
|
||||
game = new Mame020632bit;
|
||||
case MAME_0199:
|
||||
game = new Mame0199;
|
||||
break;
|
||||
case MAME_020664bit:
|
||||
game = new Mame020664bit;
|
||||
case MAME_0206:
|
||||
game = new Mame0206;
|
||||
break;
|
||||
case KO_Drive:
|
||||
game = new KODrive;
|
||||
|
@ -12,7 +12,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include "ButtonRumble32bit.h"
|
||||
#include "ButtonRumble.h"
|
||||
#include "SDL.h"
|
||||
#include <Windows.h>
|
||||
extern int joystick_index1;
|
||||
@ -50,7 +50,7 @@ static int Button8Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("B
|
||||
static int Button9Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button9Device2Rumble"), 0, settingsFilename);
|
||||
static int Button10Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button10Device2Rumble"), 0, settingsFilename);
|
||||
|
||||
void ButtonRumble32bit::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||
void ButtonRumble::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||
|
||||
while (SDL_WaitEvent(&e) != 0)
|
||||
{
|
@ -13,8 +13,8 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class Mame019964bit : public Game {
|
||||
class ButtonRumble : public Game {
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
};
|
||||
};
|
@ -1,20 +0,0 @@
|
||||
/*This file is part of FFB Arcade Plugin.
|
||||
FFB Arcade Plugin is free software : you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FFB Arcade Plugin is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class ButtonRumble32bit : public Game {
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
};
|
@ -1,217 +0,0 @@
|
||||
/*This file is part of FFB Arcade Plugin.
|
||||
FFB Arcade Plugin is free software : you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FFB Arcade Plugin is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include "ButtonRumble64bit.h"
|
||||
#include "SDL.h"
|
||||
#include <Windows.h>
|
||||
extern int joystick_index1;
|
||||
extern int joystick_index2;
|
||||
extern SDL_Joystick* GameController2;
|
||||
extern SDL_Haptic* ControllerHaptic2;
|
||||
extern SDL_Haptic* haptic2;
|
||||
static SDL_Event e;
|
||||
|
||||
static wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||
static int ShowButtonNumbersForSetup = GetPrivateProfileInt(TEXT("Settings"), TEXT("ShowButtonNumbersForSetup"), 0, settingsFilename);
|
||||
static int BothRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("BothRumbleMotor"), 0, settingsFilename);
|
||||
static int LeftRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("LeftRumbleMotor"), 0, settingsFilename);
|
||||
static int RightRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("RightRumbleMotor"), 0, settingsFilename);
|
||||
static int RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleStrength"), 0, settingsFilename);
|
||||
static int RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleLength"), 0, settingsFilename);
|
||||
static int Button1Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button1Rumble"), 0, settingsFilename);
|
||||
static int Button2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button2Rumble"), 0, settingsFilename);
|
||||
static int Button3Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button3Rumble"), 0, settingsFilename);
|
||||
static int Button4Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button4Rumble"), 0, settingsFilename);
|
||||
static int Button5Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button5Rumble"), 0, settingsFilename);
|
||||
static int Button6Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button6Rumble"), 0, settingsFilename);
|
||||
static int Button7Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button7Rumble"), 0, settingsFilename);
|
||||
static int Button8Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button8Rumble"), 0, settingsFilename);
|
||||
static int Button9Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button9Rumble"), 0, settingsFilename);
|
||||
static int Button10Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button10Rumble"), 0, settingsFilename);
|
||||
static int Button1Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button1Device2Rumble"), 0, settingsFilename);
|
||||
static int Button2Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button2Device2Rumble"), 0, settingsFilename);
|
||||
static int Button3Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button3Device2Rumble"), 0, settingsFilename);
|
||||
static int Button4Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button4Device2Rumble"), 0, settingsFilename);
|
||||
static int Button5Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button5Device2Rumble"), 0, settingsFilename);
|
||||
static int Button6Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button6Device2Rumble"), 0, settingsFilename);
|
||||
static int Button7Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button7Device2Rumble"), 0, settingsFilename);
|
||||
static int Button8Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button8Device2Rumble"), 0, settingsFilename);
|
||||
static int Button9Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button9Device2Rumble"), 0, settingsFilename);
|
||||
static int Button10Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button10Device2Rumble"), 0, settingsFilename);
|
||||
|
||||
void ButtonRumble64bit::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||
|
||||
while (SDL_WaitEvent(&e) != 0)
|
||||
{
|
||||
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||
{
|
||||
wchar_t * deviceGUIDString2 = new wchar_t[256];
|
||||
int Device2GUID = GetPrivateProfileString(TEXT("Settings"), TEXT("Device2GUID"), NULL, deviceGUIDString2, 256, settingsFilename);
|
||||
char joystick_guid[256];
|
||||
sprintf(joystick_guid, "%S", deviceGUIDString2);
|
||||
SDL_JoystickGUID guid, dev_guid;
|
||||
int numJoysticks = SDL_NumJoysticks();
|
||||
std::string njs = std::to_string(numJoysticks);
|
||||
((char)njs.c_str());
|
||||
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||
{
|
||||
extern int joystick1Index;
|
||||
if (i == joystick1Index)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
SDL_Joystick* js2 = SDL_JoystickOpen(i);
|
||||
joystick_index2 = SDL_JoystickInstanceID(js2);
|
||||
SDL_JoystickGUID guid = SDL_JoystickGetGUID(js2);
|
||||
char guid_str[1024];
|
||||
SDL_JoystickGetGUIDString(guid, guid_str, sizeof(guid_str));
|
||||
const char* name = SDL_JoystickName(js2);
|
||||
char text[256];
|
||||
sprintf(text, "Joystick: %d / Name: %s / GUID: %s\n", i, name, guid_str);
|
||||
guid = SDL_JoystickGetGUIDFromString(joystick_guid);
|
||||
dev_guid = SDL_JoystickGetGUID(js2);
|
||||
if (!memcmp(&guid, &dev_guid, sizeof(SDL_JoystickGUID)))
|
||||
{
|
||||
GameController2 = SDL_JoystickOpen(i);
|
||||
ControllerHaptic2 = SDL_HapticOpenFromJoystick(GameController2);
|
||||
break;
|
||||
}
|
||||
SDL_JoystickClose(js2);
|
||||
}
|
||||
haptic2 = ControllerHaptic2;
|
||||
if ((SDL_HapticRumbleSupported(haptic2) == SDL_TRUE))
|
||||
{
|
||||
SDL_HapticRumbleInit;
|
||||
SDL_HapticRumbleInit(ControllerHaptic2);
|
||||
}
|
||||
}
|
||||
|
||||
if (ShowButtonNumbersForSetup == 1)
|
||||
{
|
||||
if (e.type == SDL_JOYBUTTONDOWN)
|
||||
{
|
||||
if (e.jaxis.which == joystick_index1 || e.jaxis.which == joystick_index2)
|
||||
{
|
||||
if (e.jbutton.button >= 0)
|
||||
{
|
||||
char buff[100];
|
||||
sprintf_s(buff, "Button %d Pressed", e.jbutton.button);
|
||||
MessageBoxA(NULL, buff, "", NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (e.type == SDL_JOYBUTTONDOWN)
|
||||
{
|
||||
if (e.jaxis.which == joystick_index1)
|
||||
{
|
||||
if ((BothRumbleMotor == 1) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 0))
|
||||
{
|
||||
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 1) & (RightRumbleMotor == 0))
|
||||
{
|
||||
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRight(0, percentForce, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 1))
|
||||
{
|
||||
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRight(percentForce, 0, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.jaxis.which == joystick_index2)
|
||||
{
|
||||
if ((BothRumbleMotor == 1) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 0))
|
||||
{
|
||||
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 1) & (RightRumbleMotor == 0))
|
||||
{
|
||||
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 1))
|
||||
{
|
||||
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.type == SDL_JOYBUTTONUP)
|
||||
{
|
||||
if (e.jaxis.which == joystick_index1)
|
||||
{
|
||||
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRight(0, 0, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.jaxis.which == joystick_index2)
|
||||
{
|
||||
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||
{
|
||||
{
|
||||
double percentForce = ((RumbleStrength) / 100.0);
|
||||
double percentLength = (RumbleLength);
|
||||
triggers->LeftRightDevice2(0, 0, percentLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
/*This file is part of FFB Arcade Plugin.
|
||||
FFB Arcade Plugin is free software : you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FFB Arcade Plugin is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class ButtonRumble64bit : public Game {
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
};
|
@ -13,7 +13,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
|
||||
#include <string>
|
||||
#include <tchar.h>
|
||||
#include "Mame019932bit.h"
|
||||
#include "Mame0199.h"
|
||||
#include "math.h"
|
||||
|
||||
static int sanfran(int ffsan) {
|
||||
@ -1649,7 +1649,7 @@ static int raveracer(int ffRaw) {
|
||||
}
|
||||
}
|
||||
|
||||
void Mame019932bit::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||
void Mame0199::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||
HWND hWnds = FindWindow(NULL, _T("MAME: San Francisco Rush 2049 [sf2049]"));
|
@ -13,7 +13,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class Mame019932bit : public Game {
|
||||
class Mame0199 : public Game {
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
|
||||
#include <string>
|
||||
#include <tchar.h>
|
||||
#include "Mame020632bit.h"
|
||||
#include "Mame0206.h"
|
||||
#include "math.h"
|
||||
|
||||
static int sanfran(int ffsan) {
|
||||
@ -1649,7 +1649,7 @@ static int raveracer(int ffRaw) {
|
||||
}
|
||||
}
|
||||
|
||||
void Mame020632bit::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||
void Mame0206::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||
HWND hWnds = FindWindow(NULL, _T("MAME: San Francisco Rush 2049 [sf2049]"));
|
@ -13,7 +13,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class Mame020632bit : public Game {
|
||||
class Mame0206 : public Game {
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
File diff suppressed because it is too large
Load Diff
@ -1,20 +0,0 @@
|
||||
/*This file is part of FFB Arcade Plugin.
|
||||
FFB Arcade Plugin is free software : you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
FFB Arcade Plugin is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class Mame020664bit : public Game {
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
};
|
Loading…
Reference in New Issue
Block a user