diff --git a/.vs/Dinput8Wrapper/v15/.suo b/.vs/Dinput8Wrapper/v15/.suo deleted file mode 100644 index 2a0225e..0000000 Binary files a/.vs/Dinput8Wrapper/v15/.suo and /dev/null differ diff --git a/Dinput8Wrapper.vcxproj b/Dinput8Wrapper.vcxproj index 151d91c..0ecab5a 100644 --- a/Dinput8Wrapper.vcxproj +++ b/Dinput8Wrapper.vcxproj @@ -21,7 +21,6 @@ - @@ -47,7 +46,6 @@ - @@ -72,7 +70,6 @@ - @@ -106,7 +103,6 @@ - diff --git a/Dinput8Wrapper.vcxproj.filters b/Dinput8Wrapper.vcxproj.filters index 4ca6799..f8b06b8 100644 --- a/Dinput8Wrapper.vcxproj.filters +++ b/Dinput8Wrapper.vcxproj.filters @@ -50,9 +50,6 @@ Game Files - - Game Files - Game Files @@ -118,7 +115,6 @@ Game Files - @@ -162,9 +158,6 @@ Game Files - - Game Files - Game Files @@ -241,9 +234,6 @@ Common Header Files - - Common Header Files - Common Header Files diff --git a/DllMain.cpp b/DllMain.cpp index 490afa7..49d1896 100644 --- a/DllMain.cpp +++ b/DllMain.cpp @@ -32,8 +32,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>. #include "Game Files/Daytona3.h" #include "Game Files/FordRacing.h" #include "Game Files/FordRacingOther.h" -#include "Game Files/FNF.h" -#include "Game Files/GRID.h" #include "Game Files/InitialD4.h" #include "Game Files/InitialD4Japan.h" #include "Game Files/InitialD5.h" @@ -795,19 +793,10 @@ HRESULT WINAPI DirectInputDirectInputCreateEx(HINSTANCE hinst, DWORD dwVersion, // DINPUT8 WRAPPER HRESULT WINAPI DirectInputDirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID* ppvOut, LPUNKNOWN punkOuter) { - /*wchar_t *settingsFilenameA = TEXT(".\\FFBPlugin.ini"); - int configGameIdA = GetPrivateProfileInt(TEXT("Settings"), TEXT("GameId"), 1, settingsFilenameA); - if (configGameIdA == 29) - { - return DIERR_OUTOFMEMORY; - } - else - {*/ LPVOID val; HRESULT res = originalDirectInputDirectInput8Create(hinst, dwVersion, riidltf, &val, punkOuter); *ppvOut = new DirectInputDeviceWrapper(val, (IID_IDirectInput8W == riidltf)); - return res; -// } + return res; } HRESULT WINAPI DirectInputDllRegisterServer(void) @@ -835,12 +824,6 @@ LPCDIDATAFORMAT WINAPI DirectInputGetdfDIJoystick() return originalGetdfDIJoystick(); } -__declspec(dllexport) void TPValues(float *values, int num); - -void TPValues(float *values, int num) -{ -} - // global variables SDL_Haptic* haptic; SDL_Haptic* haptic2 = NULL; @@ -903,7 +886,6 @@ const int SEGA_RALLY_3 = 6; const int FORD_RACING = 7; const int INITIAL_D_6 = 8; const int WMMT_5 = 9; -const int FNF_GAME = 10; const int MARIO_KART_GPDX = 11; const int OUTRUN_2Fake = 12; const int BG4_JP = 13; @@ -929,7 +911,6 @@ const int MAME_020664bit = 33; const int MAME_019964bit = 34; const int OUTRUN_2Real = 35; const int Button_Rumble64bit = 36; -const int GRID_ = 37; const int FORD_RACING_OTHER = 38; const int KO_Drive = 39; @@ -1683,7 +1664,7 @@ void TriggerSpringEffect(double strength) DWORD WINAPI FFBLoop(LPVOID lpParam) { hlp.log("In FFBLoop"); - Sleep(2500); + //Sleep(2500); NOT SURE IF THIS IS NECESSARY, IF CAUSES ISSUES THEN UNDO SDL_HapticStopAll(haptic); Initialize(0); hlp.log("Initialize() complete"); @@ -1716,12 +1697,6 @@ DWORD WINAPI FFBLoop(LPVOID lpParam) case DAYTONA_3: game = new Daytona3; break; - case FNF_GAME: - game = new FNF; - break; - case GRID_: - game = new GRID; - break; case FORD_RACING: game = new FordRacing; break; @@ -2671,6 +2646,7 @@ if (currentLibrary == lib::winmm) // this doesn't seem to really work...hmm...if i ALT+F4, then the program quits and haptic is still set. // try setting GameId to HEAVY (-5 or -6..can't remember) and then force quit. Wheel will stay heavy :/. if (haptic) { + SDL_HapticStopEffect(haptic, effects.effect_id); SDL_HapticStopEffect(haptic, effects.effect_left_id); SDL_HapticStopEffect(haptic, effects.effect_right_id); SDL_HapticStopEffect(haptic, effects.effect_friction_id); diff --git a/Game Files/FNF.cpp b/Game Files/FNF.cpp deleted file mode 100644 index 14ec72c..0000000 --- a/Game Files/FNF.cpp +++ /dev/null @@ -1,19 +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 -#include "FNF.h" - -void FNF::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) -{ -} \ No newline at end of file diff --git a/Game Files/FNF.h b/Game Files/FNF.h deleted file mode 100644 index 6611e87..0000000 --- a/Game Files/FNF.h +++ /dev/null @@ -1,21 +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 FNF : public Game { - int lastWasStop = 0; - - public: - void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers); -}; \ No newline at end of file diff --git a/Game Files/GRID.cpp b/Game Files/GRID.cpp deleted file mode 100644 index 63b5164..0000000 --- a/Game Files/GRID.cpp +++ /dev/null @@ -1,69 +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 "GRID.h" -#include -#include - -static bool __stdcall Out32(int a2, DWORD BytesReturned) -{ - static char test[256]; - memset(test, 0, 256); - sprintf(test, "hex print: %08X", BytesReturned); - OutputDebugStringA(test); - return 0; -} - -static bool Hook(void * toHook, void * ourFunct, int len) { - if (len < 5) { - return false; - } - - DWORD curProtection; - VirtualProtect(toHook, len, PAGE_EXECUTE_READWRITE, &curProtection); - - memset(toHook, 0x90, len); - - DWORD relativeAddress = ((DWORD)ourFunct - (DWORD)toHook) - 5; - - *(BYTE*)toHook = 0xE9; - *(DWORD*)((DWORD)toHook + 1) = relativeAddress; - - DWORD temp; - VirtualProtect(toHook, len, curProtection, &temp); - - return true; -} - -static DWORD jmpBackAddy; - -void GRID::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) -{ - bool init = false; - HMODULE hMod = GetModuleHandleA("inpout32.dll"); - if (hMod) - { - if (!init) - { - int hookLength = 6; - DWORD hookAddress = (DWORD)GetProcAddress(GetModuleHandle(L"inpout32.dll"), "Out32"); - if (hookAddress) - { - jmpBackAddy = hookAddress + hookLength; - Hook((void*)hookAddress, Out32, hookLength); - init = true; - } - - } - } -} \ No newline at end of file diff --git a/Game Files/GRID.h b/Game Files/GRID.h deleted file mode 100644 index aae01f8..0000000 --- a/Game Files/GRID.h +++ /dev/null @@ -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 GRID : public Game { -public: - void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers); -}; diff --git a/dinput8.def b/dinput8.def index dabe8b0..9e400c3 100644 --- a/dinput8.def +++ b/dinput8.def @@ -653,6 +653,4 @@ EXPORTS sndPlaySoundA = _sndPlaySoundA sndPlaySoundW = _sndPlaySoundW WOWAppExit = _WOWAppExit - mmsystemGetVersion = _mmsystemGetVersion - - TPValues = TPValues \ No newline at end of file + mmsystemGetVersion = _mmsystemGetVersion \ No newline at end of file