diff --git a/.gitignore b/.gitignore index 3a153d9161..87d682400f 100644 --- a/.gitignore +++ b/.gitignore @@ -97,7 +97,6 @@ oprofile_data/ !/pcsx2/gui/Resources/EmbeddedImage.h /plugins/GSdx/Template /plugins/USBqemu/Win32/bin -/plugins/xpad/Template /plugins/zerospu2/Windows/dsound51.cpp /tools/bin /tools/GSDumpGUI/bin diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index 24aa467279..288a355db4 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -305,8 +305,4 @@ if(GTKn_FOUND) set(USBnull TRUE) endif() #--------------------------------------- - -# [TODO] Write CMakeLists.txt for these plugins. (or not ;) ) -set(SSSPSXPAD FALSE) -set(xpad FALSE) #------------------------------------------------------------------------------- diff --git a/debian-packager/create_built_tarball.sh b/debian-packager/create_built_tarball.sh index 8cb5cc0f93..4a7ff61f3d 100644 --- a/debian-packager/create_built_tarball.sh +++ b/debian-packager/create_built_tarball.sh @@ -91,7 +91,7 @@ remove_not_yet_free_plugin() { echo "Remove non free plugins" # remove also deprecated plugins - for plugin in CDVDiso SSSPSXPAD USBqemu xpad zerogs zerospu2 + for plugin in USBqemu zerogs zerospu2 do rm -fr $LOCAL_REPO/plugins/$plugin done diff --git a/linux_various/check_format.sh b/linux_various/check_format.sh index 9a9f4b288e..a395e0c294 100755 --- a/linux_various/check_format.sh +++ b/linux_various/check_format.sh @@ -49,9 +49,7 @@ files=`git diff --name-only --diff-filter=ACMRT $diff_range -- $PWD | \ grep -v "${1}plugins/dev9ghzdrk/" | \ grep -v "${1}plugins/GSdx/" | \ grep -v "${1}plugins/GSdx_legacy/" | \ - grep -v "${1}plugins/SSSPSXPAD/" | \ grep -v "${1}plugins/USBqemu/" | \ - grep -v "${1}plugins/xpad/" | \ grep -v "${1}plugins/zerogs/" | \ grep -v "${1}plugins/zerospu2/" | \ grep -v "${1}plugins/zzogl-pg/" | \ diff --git a/old_plugins.sln b/old_plugins.sln index 2ea185c2d7..98b6714f4a 100644 --- a/old_plugins.sln +++ b/old_plugins.sln @@ -42,12 +42,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utilities", "common\build\U EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "3rdparty\libjpeg\libjpeg.vcxproj", "{BC236261-77E8-4567-8D09-45CD02965EB6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PadSSSPSX", "plugins\SSSPSXPAD\PadSSSPSX.vcxproj", "{6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZZOgl", "plugins\zzogl-pg\opengl\Win32\zerogsogl.vcxproj", "{2D4E85B2-F47F-4D65-B091-701E5C031DAC}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xpad", "plugins\xpad\xpad.vcxproj", "{6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBqemu", "plugins\USBqemu\Win32\USBqemu.vcxproj", "{E613DA9F-41B4-4613-9911-E418EF5533BC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_base", "3rdparty\wxwidgets3.0\build\msw\wx30_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}" @@ -127,15 +123,6 @@ Global {BC236261-77E8-4567-8D09-45CD02965EB6}.Release|Win32.ActiveCfg = Release|Win32 {BC236261-77E8-4567-8D09-45CD02965EB6}.Release|Win32.Build.0 = Release|Win32 {BC236261-77E8-4567-8D09-45CD02965EB6}.Release|x64.ActiveCfg = Release|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Debug|Win32.ActiveCfg = Debug|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Debug|Win32.Build.0 = Debug|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Debug|x64.ActiveCfg = Debug|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Devel|Win32.ActiveCfg = Release|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Devel|Win32.Build.0 = Release|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Devel|x64.ActiveCfg = Release|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Release|Win32.ActiveCfg = Release|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Release|Win32.Build.0 = Release|Win32 - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9}.Release|x64.ActiveCfg = Release|Win32 {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Debug|Win32.ActiveCfg = Debug|Win32 {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Debug|Win32.Build.0 = Debug|Win32 {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Debug|x64.ActiveCfg = Debug|Win32 @@ -214,18 +201,6 @@ Global {E613DA9F-41B4-4613-9911-E418EF5533BC}.Release|Win32.Build.0 = Release|Win32 {E613DA9F-41B4-4613-9911-E418EF5533BC}.Release|x64.ActiveCfg = Release|x64 {E613DA9F-41B4-4613-9911-E418EF5533BC}.Release|x64.Build.0 = Release|x64 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Debug|Win32.ActiveCfg = Debug|Win32 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Debug|Win32.Build.0 = Debug|Win32 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Debug|x64.ActiveCfg = Debug|x64 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Debug|x64.Build.0 = Debug|x64 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Devel|Win32.ActiveCfg = Release|Win32 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Devel|Win32.Build.0 = Release|Win32 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Devel|x64.ActiveCfg = Release|x64 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Devel|x64.Build.0 = Release|x64 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Release|Win32.ActiveCfg = Release|Win32 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Release|Win32.Build.0 = Release|Win32 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Release|x64.ActiveCfg = Release|x64 - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -239,7 +214,6 @@ Global {7F059854-568D-4E08-9D00-1E78E203E4DC} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF} {4639972E-424E-4E13-8B07-CA403C481346} = {88F517F9-CE1C-4005-9BDF-4481FEB55053} {BC236261-77E8-4567-8D09-45CD02965EB6} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF} {2D4E85B2-F47F-4D65-B091-701E5C031DAC} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF} {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} @@ -247,6 +221,5 @@ Global {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {0FAE817D-9A32-4830-857E-81DA57246E16} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {E613DA9F-41B4-4613-9911-E418EF5533BC} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF} - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF} EndGlobalSection EndGlobal diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index e6b72faff7..9b297ed649 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -62,18 +62,10 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/spu2-x" AND spu2-x) add_subdirectory(spu2-x/src) endif() -#if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/SSSPSXPAD" AND SSSPSXPAD) -# add_subdirectory(SSSPSXPAD) -#endif() - if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/USBnull" AND USBnull) add_subdirectory(USBnull) endif() -#if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/xpad" AND xpad) -# add_subdirectory(xpad) -#endif() - #if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerogs" AND zerogs) # add_subdirectory(zerogs) #endif() @@ -82,10 +74,6 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg" AND zzogl) add_subdirectory(zzogl-pg/opengl) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zeropad" AND zeropad) - add_subdirectory(zeropad) -endif() - if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2" AND zerospu2) add_subdirectory(zerospu2) endif() diff --git a/plugins/SSSPSXPAD/PadSSSPSX.cpp b/plugins/SSSPSXPAD/PadSSSPSX.cpp deleted file mode 100644 index c5c1f07cf2..0000000000 --- a/plugins/SSSPSXPAD/PadSSSPSX.cpp +++ /dev/null @@ -1,1185 +0,0 @@ -#define WINVER 0x0500 -#define _WIN32_WINNT WINVER -#define DIRECTINPUT_VERSION 0x0800 - -#include -#include -#include -#include -#include - -#include "PadSSSPSX.h" - -#ifdef _MSC_VER -# include "svnrev.h" -#endif - -static const unsigned char version = 0x0002; -static const unsigned char revision = 1; -static const unsigned char build = 7; -static const unsigned char buildfix = 1; - -HMODULE hInstance; -HWND hTargetWnd; - -static std::string s_strIniPath( "inis" ); - -static CRITICAL_SECTION update_lock; -static CRITICAL_SECTION init_lock; - -struct EnterScopedSection -{ - CRITICAL_SECTION& m_cs; - - EnterScopedSection( CRITICAL_SECTION& cs ) : m_cs( cs ) { - EnterCriticalSection( &m_cs ); - } - - ~EnterScopedSection() { - LeaveCriticalSection( &m_cs ); - } -}; - - -static struct -{ - keyEvent ev; - u8 state[2][256]; -} save; - -static struct -{ - Config config; - int devcnt; - LPDIRECTINPUT8 pDInput; - LPDIRECTINPUTDEVICE8 pDKeyboard; - LPDIRECTINPUTDEVICE8 pDDevice[4]; - LPDIRECTINPUTEFFECT pDEffect[4][2]; /* for Small & Big Motor */ - DIJOYSTATE JoyState[4]; - u16 padStat[2]; - int padID[2]; - int padMode1[2]; - int padMode2[2]; - int padModeE[2]; - int padModeC[2]; - int padModeF[2]; - int padVib0[2]; - int padVib1[2]; - int padVibF[2][4]; - int padVibC[2]; - DWORD padPress[2][16]; - int curPad; - int curByte; - int curCmd; - int cmdLen; -} global; - -static BOOL CALLBACK EnumAxesCallback (LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) -{ - LPDIRECTINPUTDEVICE8 pDDevice = (LPDIRECTINPUTDEVICE8)pvRef; - DIPROPRANGE diprg; - diprg.diph.dwSize = sizeof (diprg); - diprg.diph.dwHeaderSize = sizeof (diprg.diph); - diprg.diph.dwObj = lpddoi->dwType; - diprg.diph.dwHow = DIPH_BYID; - diprg.lMin = -128; - diprg.lMax = 127; - pDDevice->SetProperty (DIPROP_RANGE, &diprg.diph); - return DIENUM_CONTINUE; -} - -static BOOL CALLBACK EnumJoysticksCallback (const DIDEVICEINSTANCE* instance, VOID* pContext) -{ - const int devno = global.devcnt; - if (devno >= 4) - return DIENUM_STOP; - HRESULT result = global.pDInput->CreateDevice (instance->guidInstance, &global.pDDevice[devno], NULL); - if (FAILED (result)) - return DIENUM_CONTINUE; - global.devcnt++; - return DIENUM_CONTINUE; -} - -static bool ReleaseDirectInput (void) -{ - int index = 4; - while (index--) - { - int index2 = 2; - while (index2--) - { - if (global.pDEffect[index][index2]) - { - global.pDEffect[index][index2]->Unload(); - global.pDEffect[index][index2]->Release(); - global.pDEffect[index][index2] = NULL; - } - } - if (global.pDDevice[index]) - { - global.pDDevice[index]->Unacquire(); - global.pDDevice[index]->Release(); - global.pDDevice[index] = NULL; - } - } - if (global.pDKeyboard) - { - global.pDKeyboard->Unacquire(); - global.pDKeyboard->Release(); - global.pDKeyboard = NULL; - } - if (global.pDInput) - { - global.pDInput->Release(); - global.pDInput = NULL; - } - global.devcnt = 0; - return FALSE; -} - -static bool InitDirectInput (void) -{ - EnterScopedSection initlock( init_lock ); - - if (global.pDInput) - return TRUE; - HRESULT result = DirectInput8Create (hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&global.pDInput, NULL); - if (FAILED (result)) - return ReleaseDirectInput(); - result = global.pDInput->CreateDevice (GUID_SysKeyboard, &global.pDKeyboard, NULL); - if (FAILED (result)) - return ReleaseDirectInput(); - result = global.pDInput->EnumDevices (DI8DEVCLASS_GAMECTRL, EnumJoysticksCallback, NULL, DIEDFL_ATTACHEDONLY); - if (FAILED (result)) - return ReleaseDirectInput(); - result = global.pDKeyboard->SetDataFormat (&c_dfDIKeyboard); - if (FAILED (result)) - return ReleaseDirectInput(); - if (hTargetWnd) - { - global.pDKeyboard->Unacquire(); - result = global.pDKeyboard->SetCooperativeLevel (hTargetWnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE); - if (FAILED (result)) - return ReleaseDirectInput(); - } - int index = global.devcnt; - while (index--) - { - const LPDIRECTINPUTDEVICE8 pDDevice = global.pDDevice[index]; - result = pDDevice->SetDataFormat (&c_dfDIJoystick); - if (FAILED (result)) - return ReleaseDirectInput(); - if (hTargetWnd) - { - pDDevice->Unacquire(); - result = pDDevice->SetCooperativeLevel (hTargetWnd, DISCL_FOREGROUND | DISCL_EXCLUSIVE); - if (FAILED (result)) - return ReleaseDirectInput(); - } - struct - { - DIPROPDWORD dipdw; - DWORD rgdwAxes[2]; - LONG rglDirection[2]; - DIPERIODIC per; - DICONSTANTFORCE cf; - DIEFFECT eff; - } local; - memset (&local, 0, sizeof (local)); - local.dipdw.diph.dwSize = sizeof (DIPROPDWORD); - local.dipdw.diph.dwHeaderSize = sizeof (DIPROPHEADER); - local.dipdw.diph.dwHow = DIPH_DEVICE; - local.dipdw.dwData = DIPROPAUTOCENTER_OFF; - pDDevice->SetProperty (DIPROP_AUTOCENTER, &local.dipdw.diph); - result = pDDevice->EnumObjects (EnumAxesCallback, pDDevice, DIDFT_AXIS); - if (FAILED (result)) - return ReleaseDirectInput(); - - local.rgdwAxes[0] = DIJOFS_X; - local.rgdwAxes[1] = DIJOFS_Y; - local.eff.dwSize = sizeof (DIEFFECT); - local.eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; - local.eff.dwDuration = INFINITE; - local.eff.dwGain = DI_FFNOMINALMAX; - local.eff.dwTriggerButton = DIEB_NOTRIGGER; - local.eff.cAxes = 2; - local.eff.rgdwAxes = local.rgdwAxes; - local.eff.rglDirection = local.rglDirection; - - /* Small Motor */ - local.eff.cbTypeSpecificParams = sizeof (DIPERIODIC); - local.eff.lpvTypeSpecificParams = &local.per; - result = pDDevice->CreateEffect (GUID_Square , &local.eff, &global.pDEffect[index][0], NULL); - if (FAILED (result)) - global.pDEffect[index][0] = NULL; - - /* Big Motor */ - local.eff.cbTypeSpecificParams = sizeof (DICONSTANTFORCE); - local.eff.lpvTypeSpecificParams = &local.cf; - result = pDDevice->CreateEffect (GUID_ConstantForce , &local.eff, &global.pDEffect[index][1], NULL); - if (FAILED (result)) - global.pDEffect[index][1] = NULL; - } - return TRUE; -} - -static bool AcquireDevice (LPDIRECTINPUTDEVICE8 lpDirectInputDevice) -{ - if (FAILED (lpDirectInputDevice->Acquire())) - { - HRESULT result = lpDirectInputDevice->Acquire(); - if (result == DIERR_OTHERAPPHASPRIO) - return FALSE; - if (FAILED (result)) - return ReleaseDirectInput(); - } - return TRUE; -} - -/* Small Motor */ -static bool SetDeviceForceS (int pad, DWORD force) -{ - InitDirectInput(); - if (global.pDEffect[pad][0]) - { - LONG rglDirection[2] = { 0, 0 }; - DIPERIODIC per; - rglDirection[0] = 0; - rglDirection[1] = 1; - per.dwMagnitude = force; - per.dwPeriod = (DWORD) (0.01 * DI_SECONDS); - per.lOffset = 0; - per.dwPhase = 0; - DIEFFECT eff; - eff.dwSize = sizeof (DIEFFECT); - eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; - eff.cAxes = 2; - eff.rglDirection = rglDirection; - eff.lpEnvelope = 0; - eff.cbTypeSpecificParams = sizeof (DIPERIODIC); - eff.lpvTypeSpecificParams = &per; - if (FAILED (global.pDEffect[pad][0]->SetParameters (&eff, DIEP_DIRECTION | DIEP_TYPESPECIFICPARAMS | DIEP_START))) - return ReleaseDirectInput(); - if (FAILED (global.pDEffect[pad][0]->Stop())) - { - AcquireDevice (global.pDDevice[pad]); - if (FAILED (global.pDEffect[pad][0]->Stop())) - return ReleaseDirectInput(); - } - if (force == 0) - return TRUE; - if (FAILED (global.pDEffect[pad][0]->Start (1, 0))) - { - AcquireDevice (global.pDDevice[pad]); - if (FAILED (global.pDEffect[pad][0]->Start (1, 0))) - return ReleaseDirectInput(); - } - } - return TRUE; -} - -/* Big Motor */ -static bool SetDeviceForceB (int pad, DWORD force) -{ - InitDirectInput(); - if (global.pDEffect[pad][1]) - { - LONG rglDirection[2] = { 0, 0 }; - DICONSTANTFORCE cf; - rglDirection[0] = 1; - rglDirection[1] = 0; - cf.lMagnitude = force; - DIEFFECT eff; - eff.dwSize = sizeof (DIEFFECT); - eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; - eff.cAxes = 2; - eff.rglDirection = rglDirection; - eff.lpEnvelope = 0; - eff.cbTypeSpecificParams = sizeof (DICONSTANTFORCE); - eff.lpvTypeSpecificParams = &cf; - if (FAILED (global.pDEffect[pad][1]->SetParameters (&eff, DIEP_DIRECTION | DIEP_TYPESPECIFICPARAMS | DIEP_START))) - return ReleaseDirectInput(); - if (FAILED (global.pDEffect[pad][1]->Stop())) - { - AcquireDevice (global.pDDevice[pad]); - if (FAILED (global.pDEffect[pad][1]->Stop())) - return ReleaseDirectInput(); - } - if (force == 0) - return TRUE; - if (FAILED (global.pDEffect[pad][1]->Start (1, 0))) - { - AcquireDevice (global.pDDevice[pad]); - if (FAILED (global.pDEffect[pad][1]->Start (1, 0))) - return ReleaseDirectInput(); - } - } - return TRUE; -} - -static bool GetJoyState (const int devno) -{ - InitDirectInput(); - if (global.pDDevice[devno] == NULL) - return FALSE; - global.pDDevice[devno]->Poll(); - if (FAILED (global.pDDevice[devno]->GetDeviceState (sizeof (DIJOYSTATE), &global.JoyState[devno]))) - { - AcquireDevice (global.pDDevice[devno]); - return FALSE; - } - return TRUE; -} - -static bool GetKeyState (u8* keyboard) -{ - InitDirectInput(); - if (global.pDKeyboard == NULL) - return FALSE; - global.pDKeyboard->Poll(); - if (FAILED (global.pDKeyboard->GetDeviceState (256, keyboard))) - { - AcquireDevice (global.pDKeyboard); - return FALSE; - } - return TRUE; -} - -static std::string MakeConfigFileName() -{ - //GetModuleFileName (hInstance, fname, 256); - //strcpy (fname + strlen (fname) - 3, "cfg"); - - return s_strIniPath + "/PadSSSPSX.cfg"; -} - -static void SaveConfig (void) -{ - const std::string fname( MakeConfigFileName() ); - CreateDirectory( s_strIniPath.c_str(), NULL ); - - HANDLE hFile = CreateFile (fname.c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_SEQUENTIAL_SCAN, NULL); - if (hFile != INVALID_HANDLE_VALUE) - { - DWORD number_of_bytes; - WriteFile (hFile, &global.config, sizeof (global.config), &number_of_bytes, NULL); - CloseHandle (hFile); - } -} - -static void LoadConfig (void) -{ - const std::string fname( MakeConfigFileName() ); - HANDLE hFile = CreateFile (fname.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL); - if (hFile != INVALID_HANDLE_VALUE) - { - DWORD number_of_bytes; - ReadFile (hFile, &global.config, sizeof (global.config), &number_of_bytes, NULL); - CloseHandle (hFile); - } - global.padVibC[0] = global.padVibC[1] = -1; - for (int cnt = 21; cnt--; ) - { - const int key0 = global.config.keys[0][cnt]; - if (key0 >= 0x1000) - global.padVibC[0] = (key0 & 0xfff) / 0x100; - const int key1 = global.config.keys[1][cnt]; - if (key1 >= 0x1000) - global.padVibC[1] = (key1 & 0xfff) / 0x100; - } -} - -static void PADsetMode (const int pad, const int mode) -{ - static const u8 padID[] = { 0x41, 0x73, 0x41, 0x79 }; - global.padMode1[pad] = mode; - global.padVib0[pad] = 0; - global.padVib1[pad] = 0; - global.padVibF[pad][0] = 0; - global.padVibF[pad][1] = 0; - global.padID[pad] = padID[global.padMode2[pad] * 2 + mode]; -} - -static void KeyPress (const int pad, const int index, const bool press) -{ - if (index < 16) - { - if (press) - { - global.padStat[pad] &= ~(1 << index); - if (global.padPress[pad][index] == 0) - global.padPress[pad][index] = GetTickCount(); - } - else - { - global.padStat[pad] |= 1 << index; - global.padPress[pad][index] = 0; - } - } - else - { - static bool prev[2] = { FALSE, FALSE }; - if ((prev[pad] != press) && (global.padModeF[pad] == 0)) - { - prev[pad] = press; - if (press) PADsetMode (pad, !global.padMode1[pad]); - } - } -} - -static void UpdateState (const int pad) -{ - static int flag_keyboard; - static int flag_joypad[4]; - if (pad == 0) - { - flag_keyboard = 0; - flag_joypad[0] = 0; - flag_joypad[1] = 0; - flag_joypad[2] = 0; - flag_joypad[3] = 0; - } - static u8 keystate[256]; - for (int index = 17; index--; ) - { - const int key = global.config.keys[pad][index]; - if (key == 0) - continue; - else if (key < 0x100) - { - if (flag_keyboard == FALSE) - { - flag_keyboard = TRUE; - if (GetKeyState (keystate) == FALSE) - return; - } - KeyPress (pad, index, !!(keystate[key] & 0x80)); - } - else - { - const int joypad = ((key & 0xfff) / 0x100); - if (flag_joypad[joypad] == FALSE) - { - flag_joypad[joypad] = TRUE; - if (GetJoyState (joypad) == FALSE) - return; - } - if (key < 0x2000) - { - KeyPress (pad, index, !!(global.JoyState[joypad].rgbButtons[key & 0xff])); - } - else if (key < 0x3000) - { - const int state = ((int*)&global.JoyState[joypad].lX)[(key & 0xff) /2]; - switch (key & 1) - { - case 0: KeyPress (pad, index, state < -64); break; - case 1: KeyPress (pad, index, state >= 64); break; - } - } - else - { - const u32 state = global.JoyState[joypad].rgdwPOV[(key & 0xff) /4]; - switch (key & 3) - { - case 0: KeyPress (pad, index, (state >= 0 && state <= 4500) || (state >= 31500 && state <= 36000)); break; - case 1: KeyPress (pad, index, state >= 4500 && state <= 13500); break; - case 2: KeyPress (pad, index, state >= 13500 && state <= 22500); break; - case 3: KeyPress (pad, index, state >= 22500 && state <= 31500); break; - } - } - } - } - - /* Small Motor */ - const int vib0 = global.padVibF[pad][0] ? 2000 : 0; - if ((global.padVibF[pad][2] != vib0) && (global.padVibC[pad] >= 0)) - { - global.padVibF[pad][2] = vib0; - SetDeviceForceS (global.padVibC[pad], vib0); - } - /* Big Motor */ - const int vib1 = global.padVibF[pad][1] ? 500 + 37*global.padVibF[pad][1] : 0; - if ((global.padVibF[pad][3] != vib1) && (global.padVibC[pad] >= 0)) - { - global.padVibF[pad][3] = vib1; - SetDeviceForceB (global.padVibC[pad], vib1); - } -} - -static void set_label (const HWND hWnd, const int pad, const int index) -{ - const int key = global.config.keys[pad][index]; - char buff[64]; - if (key < 0x100) - { - if (key == 0) - strcpy (buff, "NONE"); - else if (GetKeyNameText (key << 16, buff, sizeof (buff)) == 0) - wsprintf (buff, "Keyboard 0x%02X", key); - } - else if (key >= 0x1000 && key < 0x2000) - { - wsprintf (buff, "J%d_%d", (key & 0xfff) / 0x100, (key & 0xff) + 1); - } - else if (key >= 0x2000 && key < 0x3000) - { - static const char name[][4] = { "MIN", "MAX" }; - const int axis = (key & 0xff); - wsprintf (buff, "J%d_AXIS%d_%s", (key & 0xfff) / 0x100, axis / 2, name[axis % 2]); - if (index >= 17 && index <= 20) - buff[strlen (buff) -4] = '\0'; - } - else if (key >= 0x3000 && key < 0x4000) - { - static const char name[][7] = { "FOWARD", "RIGHT", "BACK", "LEFT" }; - const int pov = (key & 0xff); - wsprintf (buff, "J%d_POV%d_%s", (key & 0xfff) / 0x100, pov /4, name[pov % 4]); - } - Button_SetText (GetDlgItem (hWnd, IDC_ESELECT + index), buff); -} - -static BOOL CALLBACK ConfigureDlgProc (const HWND hWnd, const UINT msg, const WPARAM wParam, const LPARAM lParam) -{ - static BYTE keymaps[2][256]; - static DWORD countdown; - static int disabled; - static HWND hTabWnd; - static int pad; - int cnt1; - int cnt2; - int key; - switch (msg) - { - case WM_INITDIALOG: - hTargetWnd = hWnd; - pad = disabled = 0; - LoadConfig(); - for (cnt1 = 21; cnt1--; ) - set_label (hWnd, pad, cnt1); - hTabWnd = GetDlgItem (hWnd, IDC_TABC); - TCITEM tcI; - tcI.mask = TCIF_TEXT; - tcI.pszText = "PAD1"; - TabCtrl_InsertItem (hTabWnd, 0, &tcI); - tcI.mask = TCIF_TEXT; - tcI.pszText = "PAD2"; - TabCtrl_InsertItem (hTabWnd, 1, &tcI); - SetTimer (hWnd, 0x80, 50, NULL); - return TRUE; - case WM_DESTROY: - break; - case WM_NOTIFY: - if (wParam == IDC_TABC) - { - if (disabled) - EnableWindow (GetDlgItem (hWnd, disabled), TRUE); - disabled = 0; - pad = TabCtrl_GetCurSel (hTabWnd); - for (cnt1 = 21; cnt1--; ) - set_label (hWnd, pad, cnt1); - } - break; - case WM_COMMAND: - for (cnt1 = 21; cnt1--; ) - { - if (LOWORD (wParam) == IDC_BSELECT + cnt1) - { - if (disabled) - EnableWindow (GetDlgItem (hWnd, disabled), TRUE); - EnableWindow (GetDlgItem (hWnd, disabled = wParam), FALSE); - countdown = GetTickCount(); - GetKeyState (keymaps[0]); - return TRUE; - } - } - if (LOWORD (wParam) == IDOK) - EndDialog (hWnd, IDOK); - else if (LOWORD (wParam) == IDCANCEL) - EndDialog (hWnd, IDCANCEL); - break; - case WM_TIMER: - if (disabled) - { - const int index = disabled - IDC_BSELECT; - int analog = FALSE; - if ((GetTickCount() - countdown) / 1000 != 10) - { - char buff[64]; - wsprintf (buff, "Timeout: %d", 10 - (GetTickCount() - countdown) / 1000); - SetWindowText (GetDlgItem (hWnd, IDC_ESELECT + index), buff); - } - else - { - global.config.keys[pad][index] = 0; - set_label (hWnd, pad, index); - EnableWindow (GetDlgItem (hWnd, disabled), TRUE); - disabled = 0; - break; - } - if (GetKeyState (keymaps[1]) == FALSE) - break; - for (key = 0x100; key--; ) - { - if (~keymaps[0][key] & keymaps[1][key] & 0x80) - break; - } - for (cnt1 = global.devcnt; cnt1--;) - { - if (GetJoyState (cnt1) == FALSE) - break; - - for (cnt2 = 32; cnt2--; ) - { - if (global.JoyState[cnt1].rgbButtons[cnt2]) - key = 0x1000 + 0x100 * cnt1 + cnt2; - } - for (cnt2 = 8; cnt2--; ) - { - const int now = ((u32*)&global.JoyState[cnt1].lX)[cnt2]; - if (now < -64) - { - key = 0x2000 + 0x100 * cnt1 + cnt2 * 2 +0; - analog = TRUE; - } - else if (now >= 64) - { - key = 0x2000 + 0x100 * cnt1 + cnt2 * 2 +1; - analog = TRUE; - } - } - for (cnt2 = 4; cnt2--; ) - { - const u32 now = global.JoyState[cnt1].rgdwPOV[cnt2]; - if ((now >= 0 && now < 4500) || (now >= 31500 && now < 36000)) - key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +0; - if (now >= 4500 && now < 13500) - key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +1; - if (now >= 13500 && now < 22500) - key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +2; - if (now >= 22500 && now < 31500) - key = 0x3000 + 0x100 * cnt1 + cnt2 * 4 +3; - } - } - if (index >= 17 && index <= 20 && analog == 0) - key = 0; - else if (key > 0) - { - if (key != 1) - global.config.keys[pad][index] = key; - set_label (hWnd, pad, index); - EnableWindow (GetDlgItem (hWnd, disabled), TRUE); - disabled = 0; - } - } - } - return FALSE; -} - -static char LibraryName[256]; -#define SSSPSX_NAME "SSSPSX PAD Pressure Mod" - -static void InitLibraryName() -{ -#ifndef PCSX2_DEVBUILD - - // Public Release! - // Output a simplified string that's just our name: - - strcpy_s( LibraryName, SSSPSX_NAME ); - -#else - #ifdef SVN_REV_UNKNOWN - - // Unknown revision. - // Output a name that includes devbuild status but not - // subversion revision tags: - - strcpy_s( LibraryName, SSSPSX_NAME - #ifdef PCSX2_DEBUG - "-Debug" - #elif defined( PCSX2_DEVBUILD ) - "-Dev" - #else - "" - #endif - ); - - #else - - // Use TortoiseSVN's SubWCRev utility's output - // to label the specific revision: - - sprintf_s( LibraryName, SSSPSX_NAME " %lld%s" - #ifdef PCSX2_DEBUG - "-Debug" - #elif defined( PCSX2_DEVBUILD ) - "-Dev" - #else - "" - #endif - ,SVN_REV,SVN_MODS ? "m" : "" - ); - #endif -#endif - -} - - -u32 CALLBACK PS2EgetLibType (void) -{ - return 0x02; -} - -const char* CALLBACK PS2EgetLibName (void) -{ - InitLibraryName(); - return LibraryName; -} - -u32 CALLBACK PS2EgetLibVersion2 (u32 type) -{ - return (version << 16) | (revision << 8) | build | (buildfix<<24); -} - -u32 CALLBACK PSEgetLibType (void) -{ - return 8; -} - -const char* CALLBACK PSEgetLibName (void) -{ - InitLibraryName(); - return LibraryName; -} - -u32 CALLBACK PSEgetLibVersion (void) -{ - return (version << 16) | (revision << 8) | build; -} - -s32 CALLBACK PADinit (u32 flags) -{ - return 0; -} - -void CALLBACK PADshutdown (void) -{ -} - -static int n_open = 0; -s32 CALLBACK PADopen (HWND hWnd) -{ - if (!IsWindow (hWnd) && !IsBadReadPtr ((u32*)hWnd, 4)) - hWnd = *(HWND*)hWnd; - if (!IsWindow (hWnd)) - hWnd = NULL; - else - { - while (GetWindowLong (hWnd, GWL_STYLE) & WS_CHILD) - hWnd = GetParent (hWnd); - } - hTargetWnd = hWnd; - if (n_open++ == FALSE) - { - memset (&global, 0, sizeof (global)); - global.padStat[0] = 0xffff; - global.padStat[1] = 0xffff; - LoadConfig(); - PADsetMode (0, 0); - PADsetMode (1, 0); - } - return 0; -} - -void CALLBACK PADclose (void) -{ - if (--n_open == 0) - ReleaseDirectInput(); -} - -u32 CALLBACK PADquery (void) -{ - return 3; -} - -u8 CALLBACK PADstartPoll (int pad) -{ - global.curPad = pad -1; - global.curByte = 0; - return 0xff; -} - -static const u8 cmd40[8] = -{ - 0xff, 0x5a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x5a -}; -static const u8 cmd41[8] = -{ - 0xff, 0x5a, 0xff, 0xff, 0x03, 0x00, 0x00, 0x5a, -}; -static const u8 cmd44[8] = -{ - 0xff, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -static const u8 cmd45[8] = -{ - 0xff, 0x5a, 0x03, 0x02, 0x01, 0x02, 0x01, 0x00, -}; -static const u8 cmd46[8] = -{ - 0xff, 0x5a, 0x00, 0x00, 0x01, 0x02, 0x00, 0x0a, -}; -static const u8 cmd47[8] = -{ - 0xff, 0x5a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, -}; -static const u8 cmd4c[8] = -{ - 0xff, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -static const u8 cmd4d[8] = -{ - 0xff, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -}; -static const u8 cmd4f[8] = -{ - 0xff, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, -}; - -static u8 get_analog (const int key) -{ - const int pad = ((key & 0xf00) / 0x100); - const int pos = ((key & 0x0ff) /2); - int value = (((int*)&global.JoyState[pad].lX)[pos] + 0x7F); - if (value >= 0xC0) value++; - if (value < 0) value = 0; - // Don't think this happens, but just in case... - if (value > 0xFF) value = 0xFF; - return (u8)value; -} - -static u8 get_pressure (const DWORD now, const DWORD press) -{ - if (press == 0) - return 0; - return (u8)((now - press > 2550) ? 255 : (now - press) / 10); -} - -void CALLBACK PADupdate (int pad) -{ - // PADupdate should be called by the emulator from the thread that owns our hwnd, but - // older versions of PCSX2 don't always follow that rule. I suspect this call was - // added to the PAD api because supposedly DInput is happiest called from the thread - // that owns the hwnd (although it doesn't seem to care in practice). - - // [TODO] SSSPSX really should do all it's DInput pooling/updating here, instead of - // in PADpoll, just for the sake of obeying thread affinity suggested guidelines. - // I'm not quite sure how to do that and still have it work though. --air -} - -// Called from the context of the EE thread. -u8 CALLBACK PADpoll (const u8 value) -{ - const int pad = global.curPad; - const int cur = global.curByte; - static u8 buf[20]; - if (cur == 0) - { - global.curByte++; - global.curCmd = value; - switch (value) - { - case 0x40: - global.cmdLen = sizeof (cmd40); - memcpy (buf, cmd40, sizeof (cmd40)); - return 0xf3; - case 0x41: - global.cmdLen = sizeof (cmd41); - memcpy (buf, cmd41, sizeof (cmd41)); - return 0xf3; - case 0x42: - case 0x43: - { - //EnterScopedSection scoped_lock( update_lock ); - if (value == 0x42) UpdateState (pad); - global.cmdLen = 2 + 2 * (global.padID[pad] & 0x0f); - buf[1] = global.padModeC[pad] ? 0x00 : 0x5a; - (u16&)buf[2] = global.padStat[pad]; - if (value == 0x43 && global.padModeE[pad]) - { - buf[4] = 0; - buf[5] = 0; - buf[6] = 0; - buf[7] = 0; - return 0xf3; - } - else - { - buf[ 4] = get_analog (global.config.keys[pad][19]); - buf[ 5] = get_analog (global.config.keys[pad][20]); - buf[ 6] = get_analog (global.config.keys[pad][17]); - buf[ 7] = get_analog (global.config.keys[pad][18]); - if (global.padID[pad] == 0x79) - { - const DWORD now = GetTickCount(); - buf[ 8] = get_pressure (now, global.padPress[pad][2]); - buf[ 9] = get_pressure (now, global.padPress[pad][0]); - buf[10] = get_pressure (now, global.padPress[pad][3]); - buf[11] = get_pressure (now, global.padPress[pad][1]); - buf[12] = get_pressure (now, global.padPress[pad][11]); - buf[13] = get_pressure (now, global.padPress[pad][10]); - buf[14] = get_pressure (now, global.padPress[pad][9]); - buf[15] = get_pressure (now, global.padPress[pad][8]); - buf[16] = get_pressure (now, global.padPress[pad][13]); - buf[17] = get_pressure (now, global.padPress[pad][12]); - buf[18] = get_pressure (now, global.padPress[pad][15]); - buf[19] = get_pressure (now, global.padPress[pad][14]); - } - return (u8)global.padID[pad]; - } - break; - } - case 0x44: - global.cmdLen = sizeof (cmd44); - memcpy (buf, cmd44, sizeof (cmd44)); - return 0xf3; - case 0x45: - global.cmdLen = sizeof (cmd45); - memcpy (buf, cmd45, sizeof (cmd45)); - buf[4] = (u8)global.padMode1[pad]; - return 0xf3; - case 0x46: - global.cmdLen = sizeof (cmd46); - memcpy (buf, cmd46, sizeof (cmd46)); - return 0xf3; - case 0x47: - global.cmdLen = sizeof (cmd47); - memcpy (buf, cmd47, sizeof (cmd47)); - return 0xf3; - case 0x4c: - global.cmdLen = sizeof (cmd4c); - memcpy (buf, cmd4c, sizeof (cmd4c)); - return 0xf3; - case 0x4d: - global.cmdLen = sizeof (cmd4d); - memcpy (buf, cmd4d, sizeof (cmd4d)); - return 0xf3; - case 0x4f: - { - //EnterScopedSection scoped_lock( update_lock ); - global.padID[pad] = 0x79; - global.padMode2[pad] = 1; - global.cmdLen = sizeof (cmd4f); - memcpy (buf, cmd4f, sizeof (cmd4f)); - return 0xf3; - } - } - } - - //EnterScopedSection scoped_lock( update_lock ); - - switch (global.curCmd) - { - case 0x42: - if (cur == global.padVib0[pad]) - global.padVibF[pad][0] = value; - if (cur == global.padVib1[pad]) - global.padVibF[pad][1] = value; - break; - case 0x43: - if (cur == 2) - { - global.padModeE[pad] = value; - global.padModeC[pad] = 0; - } - break; - case 0x44: - if (cur == 2) - PADsetMode (pad, value); - if (cur == 3) - global.padModeF[pad] = (value == 3); - break; - case 0x46: - if (cur == 2) - { - switch(value) - { - case 0: - buf[5] = 0x02; - buf[6] = 0x00; - buf[7] = 0x0A; - break; - case 1: - buf[5] = 0x01; - buf[6] = 0x01; - buf[7] = 0x14; - break; - } - } - break; - case 0x4c: - if (cur == 2) - { - static const u8 buf5[] = { 0x04, 0x07, 0x02, 0x05 }; - buf[5] = buf5[value & 3]; - } - break; - case 0x4d: - if (cur >= 2) - { - if (cur == global.padVib0[pad]) - buf[cur] = 0x00; - if (cur == global.padVib1[pad]) - buf[cur] = 0x01; - if (value == 0x00) - { - global.padVib0[pad] = cur; - if ((global.padID[pad] & 0x0f) < (cur - 1) / 2) - global.padID[pad] = (global.padID[pad] & 0xf0) + (cur - 1) / 2; - } - else if (value == 0x01) - { - global.padVib1[pad] = cur; - if ((global.padID[pad] & 0x0f) < (cur - 1) / 2) - global.padID[pad] = (global.padID[pad] & 0xf0) + (cur - 1) / 2; - } - } - break; - } - if (cur >= global.cmdLen) - return 0; - return buf[global.curByte++]; -} - -typedef struct -{ - unsigned char controllerType; - unsigned short buttonStatus; - unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY; - unsigned char moveX, moveY; - unsigned char reserved[91]; -} PadDataS; - -long CALLBACK PADreadPort1 (PadDataS* pads) -{ - memset (pads, 0, sizeof (PadDataS)); - if ((global.padID[0] & 0xf0) == 0x40) - pads->controllerType = 4; - else - pads->controllerType = 7; - pads->buttonStatus = global.padStat[0]; - pads->leftJoyX = get_analog (global.config.keys[0][17]); - pads->leftJoyY = get_analog (global.config.keys[0][18]); - pads->rightJoyX = get_analog (global.config.keys[0][19]); - pads->rightJoyY = get_analog (global.config.keys[0][20]); - pads->moveX = 0; - pads->moveY = 0; - return 0; -} - -long CALLBACK PADreadPort2 (PadDataS* pads) -{ - memset (pads, 0, sizeof (PadDataS)); - if ((global.padID[1] & 0xf0) == 0x40) - pads->controllerType = 4; - else - pads->controllerType = 7; - pads->buttonStatus = global.padStat[1]; - pads->leftJoyX = get_analog (global.config.keys[1][17]); - pads->leftJoyY = get_analog (global.config.keys[1][18]); - pads->rightJoyX = get_analog (global.config.keys[1][19]); - pads->rightJoyY = get_analog (global.config.keys[1][20]); - pads->moveX = 0; - pads->moveY = 0; - return 0; -} - -keyEvent* CALLBACK PADkeyEvent (void) -{ - if (n_open) - { - memcpy (save.state[0], save.state[1], sizeof (save.state[0])); - GetKeyState (save.state[1]); - for (int cnt = 0; cnt < 256; cnt++) - { - if ((~save.state[0][cnt] & save.state[1][cnt] & 0x80) || - (save.state[0][cnt] & ~save.state[1][cnt] & 0x80)) - { - save.ev.evt = (save.state[1][cnt] & 0x80) ? 1 : 2; - save.ev.key = MapVirtualKey (cnt, 1); - return &save.ev; - } - } - } - return NULL; -} - -void CALLBACK PADconfigure (void) -{ - if (n_open == 0) - { - memset (&global, 0, sizeof (global)); - if (DialogBox (hInstance, MAKEINTRESOURCE (IDD_DIALOG1), GetActiveWindow(), (DLGPROC)ConfigureDlgProc) == IDOK) - SaveConfig(); - ReleaseDirectInput(); - } -} - -void CALLBACK PADabout (void) -{ - MessageBox (GetActiveWindow(), "Copyright (C) 2004-2006 Nagisa\nVersion 1.7.1\n\nModified by Jake Stine for PCSX2 0.9.7 compatibility.", - "SSSPSX PAD plugin", MB_OK | MB_SETFOREGROUND); -} - -s32 CALLBACK PADtest (void) -{ - return 0; -} - -void CALLBACK PADsetSettingsDir(const char* dir) -{ - s_strIniPath = (dir==NULL) ? "inis" : dir; -} - -// Returns 0 on success, -1 on error. -s32 CALLBACK PADfreeze (int mode, freezeData *data) -{ - switch (mode) - { - case FREEZE_SIZE: - data->size = 0; - break; - - case FREEZE_LOAD: - break; - - case FREEZE_SAVE: - break; - } - - return 0; -} - -BOOL APIENTRY DllMain(HMODULE hInst, DWORD dwReason, LPVOID lpReserved) -{ - - if( dwReason == DLL_PROCESS_ATTACH ) - { - hInstance = hInst; - InitializeCriticalSection( &update_lock ); - InitializeCriticalSection( &init_lock ); - } - else if( dwReason == DLL_PROCESS_DETACH ) - { - DeleteCriticalSection( &update_lock ); - DeleteCriticalSection( &init_lock ); - } - - return TRUE; -} - -BOOL APIENTRY EntryPoint (HMODULE hInst, DWORD dwReason, LPVOID lpReserved) -{ - return DllMain( hInst, dwReason, lpReserved ); -} diff --git a/plugins/SSSPSXPAD/PadSSSPSX.def b/plugins/SSSPSXPAD/PadSSSPSX.def deleted file mode 100644 index 95ee36a522..0000000000 --- a/plugins/SSSPSXPAD/PadSSSPSX.def +++ /dev/null @@ -1,24 +0,0 @@ -;LIBRARY "PadSSSPSX" - -EXPORTS - PSEgetLibType @1 - PSEgetLibName @2 - PSEgetLibVersion @3 - PS2EgetLibType @4 - PS2EgetLibName @5 - PS2EgetLibVersion2 @6 - PADinit @7 - PADshutdown @8 - PADopen @9 - PADclose @10 - PADkeyEvent @11 - PADstartPoll @12 - PADpoll @13 - PADreadPort1 @14 - PADreadPort2 @15 - PADquery @16 - PADconfigure @17 - PADtest @18 - PADabout @19 - ;PADfreeze @20 - PADsetSettingsDir @21 diff --git a/plugins/SSSPSXPAD/PadSSSPSX.h b/plugins/SSSPSXPAD/PadSSSPSX.h deleted file mode 100644 index eba8673c22..0000000000 --- a/plugins/SSSPSXPAD/PadSSSPSX.h +++ /dev/null @@ -1,41 +0,0 @@ -/* PADwin - * Copyright (C) 2002-2004 PADwin Team - * - * This program 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 2 of the License, or - * (at your option) any later version. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __PAD_H__ -#define __PAD_H__ - -#include "PadSSSPSXres.h" -#include "PS2Edefs.h" - -typedef __int8 s8; -typedef __int16 s16; -typedef __int32 s32; -typedef __int64 s64; - -typedef unsigned __int8 u8; -typedef unsigned __int16 u16; -typedef unsigned __int32 u32; -typedef unsigned __int64 u64; - -typedef struct -{ - u32 keys[2][21]; -} Config; - - -#endif diff --git a/plugins/SSSPSXPAD/PadSSSPSX.rc b/plugins/SSSPSXPAD/PadSSSPSX.rc deleted file mode 100644 index 8b0345fc30..0000000000 --- a/plugins/SSSPSXPAD/PadSSSPSX.rc +++ /dev/null @@ -1,155 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "PadSSSPSXres.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#undef APSTUDIO_HIDDEN_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// 日本語 resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN) -#ifdef _WIN32 -LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -#pragma code_page(932) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "PadSSSPSXres.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" - "#include ""windows.h""\r\n" - "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG1 DIALOGEX 0, 0, 442, 239 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION -CAPTION "PAD Settings" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - CONTROL "",IDC_TABC,"SysTabControl32",0x0,6,6,432,210 - PUSHBUTTON "L2",IDC_BL2,54,24,72,12,NOT WS_TABSTOP - EDITTEXT IDC_EL2,54,36,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "L1",IDC_BL1,54,48,72,12,NOT WS_TABSTOP - EDITTEXT IDC_EL1,54,60,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "Up",IDC_BUP,54,78,72,12,NOT WS_TABSTOP - EDITTEXT IDC_EUP,54,90,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "Left",IDC_BLEFT,12,102,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ELEFT,12,114,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "Right",IDC_BRIGHT,96,102,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ERIGHT,96,114,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "Down",IDC_BDOWN,54,126,72,12,NOT WS_TABSTOP - EDITTEXT IDC_EDOWN,54,138,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "Select",IDC_BSELECT,144,36,72,12,NOT WS_TABSTOP, - WS_EX_TRANSPARENT - EDITTEXT IDC_ESELECT,144,48,72,12,ES_READONLY | NOT WS_TABSTOP, - WS_EX_TRANSPARENT - PUSHBUTTON "Start",IDC_BSTART,228,36,72,12,NOT WS_TABSTOP, - WS_EX_TRANSPARENT - EDITTEXT IDC_ESTART,228,48,72,12,ES_READONLY | NOT WS_TABSTOP, - WS_EX_TRANSPARENT - PUSHBUTTON "Analog",IDC_BMODE,186,66,72,12,NOT WS_TABSTOP, - WS_EX_TRANSPARENT - EDITTEXT IDC_EMODE,186,78,72,12,ES_READONLY | NOT WS_TABSTOP, - WS_EX_TRANSPARENT - PUSHBUTTON "R2",IDC_BR2,318,24,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ER2,318,36,72,12,ES_AUTOHSCROLL | ES_READONLY | NOT - WS_TABSTOP - PUSHBUTTON "R1",IDC_BR1,318,48,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ER1,318,60,72,12,ES_AUTOHSCROLL | ES_READONLY | NOT - WS_TABSTOP - PUSHBUTTON "Triangle",IDC_BTRIANGLE,318,78,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ETRIANGLE,318,90,72,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_TABSTOP - PUSHBUTTON "Square",IDC_BSQUARE,276,102,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ESQUARE,276,114,72,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_TABSTOP - PUSHBUTTON "Circle",IDC_BCIRCLE,360,102,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ECIRCLE,360,114,72,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_TABSTOP - PUSHBUTTON "Cross",IDC_BCROSS,318,126,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ECROSS,318,138,72,12,ES_AUTOHSCROLL | ES_READONLY | - NOT WS_TABSTOP - PUSHBUTTON "L3",IDC_BL3,144,132,72,12,NOT WS_TABSTOP - EDITTEXT IDC_EL3,144,144,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "LX",IDC_BLAX,144,162,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ELAX,144,174,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "LY",IDC_BLAY,144,186,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ELAY,144,198,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "R3",IDC_BR3,228,132,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ER3,228,144,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "RX",IDC_BRAX,228,162,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ERAX,228,174,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "RY",IDC_BRAY,228,186,72,12,NOT WS_TABSTOP - EDITTEXT IDC_ERAY,228,198,72,12,ES_READONLY | NOT WS_TABSTOP - PUSHBUTTON "OK",IDOK,330,222,48,12,NOT WS_TABSTOP - PUSHBUTTON "Cancel",IDCANCEL,390,222,48,12,NOT WS_TABSTOP - CTEXT "",IDC_STATIC,318,174,108,30,0,WS_EX_STATICEDGE - LTEXT "DUALSHOCK2 INSIDE",IDC_STATIC,331,186,84,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_DIALOG1, DIALOG - BEGIN - RIGHTMARGIN, 432 - BOTTOMMARGIN, 233 - END -END -#endif // APSTUDIO_INVOKED - -#endif // 日本語 resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/plugins/SSSPSXPAD/PadSSSPSX.vcxproj b/plugins/SSSPSXPAD/PadSSSPSX.vcxproj deleted file mode 100644 index 69b0118857..0000000000 --- a/plugins/SSSPSXPAD/PadSSSPSX.vcxproj +++ /dev/null @@ -1,106 +0,0 @@ -サソ - - - - Debug - Win32 - - - Release - Win32 - - - - PadSSSPSX - {6C8D28E4-447E-4856-BD9E-6B8F5E7C58C9} - PadSSSPSX - Win32Proj - - - - DynamicLibrary - MultiByte - true - $(DefaultPlatformToolset) - - - DynamicLibrary - MultiByte - $(DefaultPlatformToolset) - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - EnableFastChecks - MultiThreadedDebug - - - - - user32.lib;kernel32.lib;dxguid.lib;dinput8.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - PadSSSPSX.def - false - MachineX86 - $(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories) - - - - - MaxSpeed - AnySuitable - true - MultiThreaded - - - - - dxguid.lib;dinput8.lib;%(AdditionalDependencies) - PadSSSPSX.def - false - MachineX86 - $(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/SSSPSXPAD/PadSSSPSX.vcxproj.filters b/plugins/SSSPSXPAD/PadSSSPSX.vcxproj.filters deleted file mode 100644 index e365de733f..0000000000 --- a/plugins/SSSPSXPAD/PadSSSPSX.vcxproj.filters +++ /dev/null @@ -1,40 +0,0 @@ -サソ - - - - {ce637888-9001-4763-a6af-296bbee81a3f} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {72abb2dd-cb01-4a07-88f7-2b9e453ce969} - h;hpp;hxx;hm;inl;inc - - - {47ea9bc9-9ac0-4637-9586-e20852ea0960} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - - - Header Files - - - Header Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/SSSPSXPAD/PadSSSPSXres.h b/plugins/SSSPSXPAD/PadSSSPSXres.h deleted file mode 100644 index 0345c8e76b..0000000000 --- a/plugins/SSSPSXPAD/PadSSSPSXres.h +++ /dev/null @@ -1,64 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by PadSSSPSX.rc -// - -#ifndef IDC_STATIC -#define IDC_STATIC -1 -#endif - -#define IDD_DIALOG1 100 -#define IDC_BSELECT 1000 -#define IDC_BL3 1001 -#define IDC_BR3 1002 -#define IDC_BSTART 1003 -#define IDC_BUP 1004 -#define IDC_BRIGHT 1005 -#define IDC_BDOWN 1006 -#define IDC_BLEFT 1007 -#define IDC_BL2 1008 -#define IDC_BR2 1009 -#define IDC_BL1 1010 -#define IDC_BR1 1011 -#define IDC_BTRIANGLE 1012 -#define IDC_BCIRCLE 1013 -#define IDC_BCROSS 1014 -#define IDC_BSQUARE 1015 -#define IDC_BMODE 1016 -#define IDC_BLAX 1017 -#define IDC_BLAY 1018 -#define IDC_BRAX 1019 -#define IDC_BRAY 1020 -#define IDC_ESELECT 1030 -#define IDC_EL3 1031 -#define IDC_ER3 1032 -#define IDC_ESTART 1033 -#define IDC_EUP 1034 -#define IDC_ERIGHT 1035 -#define IDC_EDOWN 1036 -#define IDC_ELEFT 1037 -#define IDC_EL2 1038 -#define IDC_ER2 1039 -#define IDC_EL1 1040 -#define IDC_ER1 1041 -#define IDC_ETRIANGLE 1042 -#define IDC_ECIRCLE 1043 -#define IDC_ECROSS 1044 -#define IDC_ESQUARE 1045 -#define IDC_EMODE 1046 -#define IDC_ELAX 1047 -#define IDC_ELAY 1048 -#define IDC_ERAX 1049 -#define IDC_ERAY 1050 -#define IDC_TABC 1060 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1061 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/plugins/SSSPSXPAD/ProjectRootDir.props b/plugins/SSSPSXPAD/ProjectRootDir.props deleted file mode 100644 index 15a8eaf1cd..0000000000 --- a/plugins/SSSPSXPAD/ProjectRootDir.props +++ /dev/null @@ -1,16 +0,0 @@ -サソ - - - $(ProjectDir). - $(ProjectRootDir)\..\.. - $(SvnRootDir)\common - - - <_ProjectFileVersion>10.0.30128.1 - - - - $(SvnRootDir) - - - \ No newline at end of file diff --git a/plugins/SSSPSXPAD/licence.txt b/plugins/SSSPSXPAD/licence.txt deleted file mode 100644 index 24f3b8b11b..0000000000 --- a/plugins/SSSPSXPAD/licence.txt +++ /dev/null @@ -1 +0,0 @@ -see http://www.gnu.org/copyleft/gpl.html diff --git a/plugins/SSSPSXPAD/readmewip.txt b/plugins/SSSPSXPAD/readmewip.txt deleted file mode 100644 index 8a489adf22..0000000000 --- a/plugins/SSSPSXPAD/readmewip.txt +++ /dev/null @@ -1,53 +0,0 @@ -SSSPSX Pad - An Open Source Pad plugin for PSX and PS2 emulators -Author: Nagisa -Homepage: (defunct) - -Overview: --Small executable program --Source code under 1000 step,20kb binary --Open Source,under the GPL Licence - - -Features: - -For PS1 emulators -- Force feedback support (PCSX only) - Delete the following PCSX sorce code. - File: sio.c Line: 138 - --------------------- - if (buf[parp] == 0x41) { -  switch (value) { -   case 0x43: -    buf[1] = 0x43; -    break; -   case 0x45: -    buf[1] = 0xf3; -    break; -  } - } - --------------------- - -For PCSX2 --Force feedback support (maybe) --PADKeyEvent API support --Using DirectInput 9 (game controller and keyboard) - -Thanks to: -http://www.hm5.aitai.ne.jp/~takuya/index.html#ds2_analisys for the valuable info -PCSX2 team for the PadWinKeyb source code -bositman for some report - -Version History: -v1.0: -Initial Release -v1.1: -Changed to DirectInput 9 -v1.2: -PADKeyEvent API support added -v1.3: -DirectInput collision problem fixed -v1.4: -Added timeout on settings dialog.If the countdown ends, the key will be set to "NONE". - -Changed "ESC" key action on settings dialog.If you press the "ESC" key, the setting will keep the previous one. - -Fixed silly bug. (dont ask me about it). -v1.5: -Fixed 0x4D packet. -v1.6: -I don't remember. -v1.7: -Changed to DirectInput9. - -Fixed PADreadPort1/PADreadPort2 API. - -Fixed the confusion about PAD1/PAD2 settings. - -Added x64 DLL. diff --git a/plugins/xpad/res/xpad.rc2 b/plugins/xpad/res/xpad.rc2 deleted file mode 100644 index c6b3aee757..0000000000 --- a/plugins/xpad/res/xpad.rc2 +++ /dev/null @@ -1,14 +0,0 @@ -// -// xpad.RC2 - resources Microsoft Visual C++ does not edit directly -// - -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - - -///////////////////////////////////////////////////////////////////////////// diff --git a/plugins/xpad/resource.h b/plugins/xpad/resource.h deleted file mode 100644 index 36f359501c..0000000000 --- a/plugins/xpad/resource.h +++ /dev/null @@ -1,19 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by xpad.rc -// - -#ifndef IDC_STATIC -#define IDC_STATIC -1 -#endif - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 10000 -#define _APS_NEXT_COMMAND_VALUE 32768 -#define _APS_NEXT_CONTROL_VALUE 2000 -#define _APS_NEXT_SYMED_VALUE 5000 -#endif -#endif diff --git a/plugins/xpad/stdafx.cpp b/plugins/xpad/stdafx.cpp deleted file mode 100644 index e48c42db5b..0000000000 --- a/plugins/xpad/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// xpad.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/plugins/xpad/stdafx.h b/plugins/xpad/stdafx.h deleted file mode 100644 index 522adab22c..0000000000 --- a/plugins/xpad/stdafx.h +++ /dev/null @@ -1,52 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently - -#pragma once - -#define WIN32_LEAN_AND_MEAN - -#define _WIN32_WINNT 0x0600 - -#include -#include -#include -#include - -#include -#include - -#include -#include - -using namespace std; - -// syntactic sugar - -// put these into vc9/common7/ide/usertype.dat to have them highlighted - -typedef unsigned char uint8; -typedef signed char int8; -typedef unsigned short uint16; -typedef signed short int16; -typedef unsigned int uint32; -typedef signed int int32; -typedef unsigned long long uint64; -typedef signed long long int64; - -#define countof(a) (sizeof(a) / sizeof(a[0])) - -#define EXPORT_C extern "C" void __stdcall -#define EXPORT_C_(type) extern "C" type __stdcall - -#define ALIGN_STACK(n) __declspec(align(n)) int __dummy; - -#ifndef RESTRICT - #ifdef __INTEL_COMPILER - #define RESTRICT restrict - #elif _MSC_VER >= 1400 // TODO: gcc - #define RESTRICT __restrict - #else - #define RESTRICT - #endif -#endif diff --git a/plugins/xpad/vsprops/ProjectRootDir.props b/plugins/xpad/vsprops/ProjectRootDir.props deleted file mode 100644 index b78b467682..0000000000 --- a/plugins/xpad/vsprops/ProjectRootDir.props +++ /dev/null @@ -1,26 +0,0 @@ -サソ - - - $(ProjectDir). - $(ProjectRootDir)\..\.. - $(SvnRootDir)\common - plugins - - - <_ProjectFileVersion>10.0.30128.1 - - - - $(ProjectRootDir) - - - $(SvnRootDir) - - - $(SvnCommonDir) - - - $(PcsxSubsection) - - - \ No newline at end of file diff --git a/plugins/xpad/vsprops/common.props b/plugins/xpad/vsprops/common.props deleted file mode 100644 index 613c944fc5..0000000000 --- a/plugins/xpad/vsprops/common.props +++ /dev/null @@ -1,23 +0,0 @@ -サソ - - - <_ProjectFileVersion>10.0.30128.1 - $(PlatformName)\$(Configuration)\ - $(PlatformName)\$(Configuration)\ - - - - true - false - Level4 - ProgramDatabase - 4995;4324;%(DisableSpecificWarnings) - - - ..\..\bin\plugins\$(ProjectName).dll - true - Windows - false - - - \ No newline at end of file diff --git a/plugins/xpad/vsprops/debug.props b/plugins/xpad/vsprops/debug.props deleted file mode 100644 index f3bc693c29..0000000000 --- a/plugins/xpad/vsprops/debug.props +++ /dev/null @@ -1,16 +0,0 @@ -サソ - - - <_ProjectFileVersion>10.0.30128.1 - true - - - - Disabled - _DEBUG;%(PreprocessorDefinitions) - true - StackFrameRuntimeCheck - MultiThreadedDebugDLL - - - \ No newline at end of file diff --git a/plugins/xpad/vsprops/release.props b/plugins/xpad/vsprops/release.props deleted file mode 100644 index b1f648cd51..0000000000 --- a/plugins/xpad/vsprops/release.props +++ /dev/null @@ -1,25 +0,0 @@ -サソ - - - <_ProjectFileVersion>10.0.30128.1 - false - - - - MaxSpeed - AnySuitable - true - Speed - true - true - NDEBUG;_SECURE_SCL=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - - - true - true - - - \ No newline at end of file diff --git a/plugins/xpad/xpad.cpp b/plugins/xpad/xpad.cpp deleted file mode 100644 index f60cc2edeb..0000000000 --- a/plugins/xpad/xpad.cpp +++ /dev/null @@ -1,773 +0,0 @@ -/* - * Copyright (C) 2007 Gabest - * http://www.gabest.org - * - * This Program 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 2, or (at your option) - * any later version. - * - * This Program 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 GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "stdafx.h" -#include "xpad.h" -#include - -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0602 // Required for XInputEnable definition -#include - -static HMODULE s_hModule; -static HMODULE s_xInputDll; -static decltype(&XInputEnable) pXInputEnable; -static decltype(&XInputGetState) pXInputGetState; -static decltype(&XInputSetState) pXInputSetState; - -BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) -{ - switch(ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - s_hModule = hModule; - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - break; - } - - return TRUE; -} - -// - -static struct -{ - static const UINT32 revision = 0; - static const UINT32 build = 2; - static const UINT32 minor = 0; -} s_ver; - -static bool s_ps2 = false; - -EXPORT_C_(UINT32) PSEgetLibType() -{ - return PSE_LT_PAD; -} - -EXPORT_C_(char*) PSEgetLibName() -{ - return "XPad"; -} - -EXPORT_C_(UINT32) PSEgetLibVersion() -{ - return (s_ver.minor << 16) | (s_ver.revision << 8) | s_ver.build; -} - -EXPORT_C_(UINT32) PS2EgetLibType() -{ - return PS2E_LT_PAD; -} - -EXPORT_C_(char*) PS2EgetLibName() -{ - return "XPad"; -} - -EXPORT_C_(UINT32) PS2EgetLibVersion2(UINT32 type) -{ - s_ps2 = true; - - return (s_ver.build << 0) | (s_ver.revision << 8) | (PS2E_PAD_VERSION << 16) | (s_ver.minor << 24); -} - -// - -struct XPadButton -{ - enum - { - Select = 0x0001, - L3 = 0x0002, - R3 = 0x0004, - Start = 0x0008, - Up = 0x0010, - Right = 0x0020, - Down = 0x0040, - Left = 0x0080, - L2 = 0x0100, - R2 = 0x0200, - L1 = 0x0400, - R1 = 0x0800, - Triangle = 0x1000, - Circle = 0x2000, - Cross = 0x4000, - Square = 0x8000, - }; -}; - -class XInput -{ - int m_pad; - bool m_connected; - XINPUT_STATE m_state; - XINPUT_VIBRATION m_vibration; - clock_t m_lastpoll; - -public: - XInput(int pad) - : m_pad(pad) - , m_connected(false) - , m_lastpoll(0) - { - memset(&m_vibration, 0, sizeof(m_vibration)); - } - - bool GetState(XINPUT_STATE& state) - { - clock_t now = clock(); - clock_t delay = m_connected ? 16 : 1000; // poll once per frame (16 ms is about 60 fps) - - if(now > m_lastpoll + delay) - { - memset(&m_state, 0, sizeof(m_state)); - - m_connected = pXInputGetState(m_pad, &m_state) == S_OK; // ERROR_DEVICE_NOT_CONNECTED is not an error, SUCCEEDED(...) won't work here - - m_lastpoll = now; - } - - memcpy(&state, &m_state, sizeof(state)); - - return m_connected; - } - - void SetState(XINPUT_VIBRATION& vibration) - { - if(m_vibration.wLeftMotorSpeed != vibration.wLeftMotorSpeed || m_vibration.wRightMotorSpeed != vibration.wRightMotorSpeed) - { - pXInputSetState(m_pad, &vibration); - - m_vibration = vibration; - } - } - - bool IsConnected() - { - return m_connected; - } -}; - -class XPad -{ -public: - int m_pad; - XInput m_xinput; - bool m_connected; - bool m_ds2native; - bool m_analog; - bool m_locked; - bool m_vibration; - BYTE m_small; - BYTE m_large; - WORD m_buttons; - struct {BYTE x, y;} m_left; - struct {BYTE x, y;} m_right; - - void SetButton(WORD buttons, WORD mask, int flag) - { - if(buttons & mask) - { - m_buttons &= ~flag; - } - else - { - m_buttons |= flag; - } - } - - void SetAnalog(short src, BYTE& dst, short deadzone) - { - if(abs(src) < deadzone) src = 0; - - dst = (src >> 8) + 128; - } - -public: - XPad(int pad) - : m_xinput(pad) - , m_ds2native(false) - , m_analog(!s_ps2) // defaults to analog off for ps2 - , m_locked(false) - , m_vibration(true) - , m_small(0) - , m_large(0) - , m_buttons(0xffff) - { - } - - virtual ~XPad() - { - } - - BYTE GetId() - { - return m_analog ? (m_ds2native ? 0x79 : 0x73) : 0x41; - } - - BYTE ReadData(int index) - { - if(index == 0) - { - XINPUT_STATE state; - - if(m_xinput.GetState(state)) - { - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_BACK, XPadButton::Select); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_LEFT_THUMB, XPadButton::L3); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_RIGHT_THUMB, XPadButton::R3); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_START, XPadButton::Start); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_UP, XPadButton::Up); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_RIGHT, XPadButton::Right); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_DOWN, XPadButton::Down); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_LEFT, XPadButton::Left); - SetButton(state.Gamepad.bLeftTrigger, 0xe0, XPadButton::L2); - SetButton(state.Gamepad.bRightTrigger, 0xe0, XPadButton::R2); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_LEFT_SHOULDER, XPadButton::L1); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_RIGHT_SHOULDER, XPadButton::R1); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_Y, XPadButton::Triangle); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_B, XPadButton::Circle); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_A, XPadButton::Cross); - SetButton(state.Gamepad.wButtons, XINPUT_GAMEPAD_X, XPadButton::Square); - - SetAnalog(state.Gamepad.sThumbLX, m_left.x, XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE); - SetAnalog(~state.Gamepad.sThumbLY, m_left.y, XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE); - SetAnalog(state.Gamepad.sThumbRX, m_right.x, XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE); - SetAnalog(~state.Gamepad.sThumbRY, m_right.y, XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE); - } - else - { - m_buttons = 0xffff; - m_left.x = 128; - m_left.y = 128; - m_right.x = 128; - m_right.y = 128; - } - } - - if(index == 1) - { - if(m_xinput.IsConnected()) - { - XINPUT_VIBRATION vibraton; - - memset(&vibraton, 0, sizeof(vibraton)); - - if(m_vibration && (m_small || m_large)) - { - vibraton.wLeftMotorSpeed = m_large << 8; - vibraton.wRightMotorSpeed = m_small << 8; - } - - m_xinput.SetState(vibraton); - } - } - - switch(index) - { - case 0: - return (BYTE)(m_buttons & 0xff); - case 1: - return (BYTE)(m_buttons >> 8); - case 2: - return m_right.x; - case 3: - return m_right.y; - case 4: - return m_left.x; - case 5: - return m_left.y; - } - - return 0xff; - } -}; - -static class XPadPlugin -{ - vector m_pads; - XPad* m_pad; - int m_index; - bool m_cfgreaddata; - BYTE m_unknown1; - BYTE m_unknown3; - - typedef BYTE (XPadPlugin::*CommandHandler)(int, BYTE); - - CommandHandler m_handlers[256]; - CommandHandler m_handler; - - BYTE DS2Enabler(int index, BYTE value) - { - switch(index) - { - case 2: - return 0x02; - case 5: - return 'Z'; - } - - return 0; - } - - BYTE QueryDS2AnalogMode(int index, BYTE value) - { - if(m_pad->m_ds2native) - { - switch(index) - { - case 0: - return 0xff; - case 1: - return 0xff; - case 2: - return 3; - case 3: - return 0; - case 4: - return 0; - case 5: - return 'Z'; - } - } - - return 0; - } - - BYTE ReadDataAndVibrate(int index, BYTE value) - { - switch(index) - { - case 0: - m_pad->m_small = (value&1) * 128; - break; - case 1: - m_pad->m_large = value; - break; - } - - return m_pad->ReadData(index); - } - - BYTE ConfigMode(int index, BYTE value) - { - switch(index) - { - case 0: - switch(value) - { - case 0: - m_cfgreaddata = false; - break; - case 1: - m_cfgreaddata = true; - break; - } - break; - } - - if(m_cfgreaddata) - { - return m_pad->ReadData(index); - } - - return 0; - } - - BYTE SetModeAndLock(int index, BYTE value) - { - switch(index) - { - case 0: - // if(!m_pad->m_locked) ? - m_pad->m_analog = value == 1; - break; - case 1: - m_pad->m_locked = value == 3; - break; - } - - return 0; - } - - BYTE QueryModelAndMode(int index, BYTE value) - { - switch(index) - { - case 0: - return 3; - case 1: - return 2; - case 2: - return m_pad->m_analog ? 1 : 0; - case 3: - return m_pad->m_ds2native ? 1 : 2; - case 4: - return 1; - } - - return 0; - } - - BYTE QueryUnknown1(int index, BYTE value) - { - switch(index) - { - case 0: - m_unknown1 = value; - return 0; - case 1: - return 0; - case 2: - return 1; - case 3: - return m_unknown1 ? 0x01 : 0x02; - case 4: - return m_unknown1 ? 0x01 : 0x00; - case 5: - return m_unknown1 ? 0x14 : 0x0a; - } - - return 0; - } - - BYTE QueryUnknown2(int index, BYTE value) - { - switch(index) - { - case 2: - return 2; - case 4: - return 1; - } - - return 0; - } - - BYTE QueryUnknown3(int index, BYTE value) - { - switch(index) - { - case 0: - m_unknown3 = value; - return 0; - case 3: - return m_unknown3 ? 0x07 : 0x04; - } - - return 0; - } - - BYTE ConfigVibration(int index, BYTE value) - { - switch(index) - { - case 0: - return value; - case 1: - m_pad->m_vibration = value == 1; - return value; - } - - return 0xff; - } - - BYTE SetDS2NativeMode(int index, BYTE value) - { - switch(index) - { - case 5: - m_pad->m_ds2native = true; - return 'Z'; - } - - return 0; - } - - BYTE m_cmd; - - BYTE UnknownCommand(int index, BYTE value) - { - // printf("Unknown command %02x (%d, %02x)\n", m_cmd, index, value); - - return 0; - } - -public: - - XPadPlugin() - : m_pad(NULL) - , m_index(-1) - , m_cfgreaddata(false) - , m_handler(NULL) - { - m_pads.push_back(new XPad(0)); - m_pads.push_back(new XPad(1)); - - for(int i = 0; i < countof(m_handlers); i++) - { - m_handlers[i] = &XPadPlugin::UnknownCommand; - } - - m_handlers['@'] = &XPadPlugin::DS2Enabler; - m_handlers['A'] = &XPadPlugin::QueryDS2AnalogMode; - m_handlers['B'] = &XPadPlugin::ReadDataAndVibrate; - m_handlers['C'] = &XPadPlugin::ConfigMode; - m_handlers['D'] = &XPadPlugin::SetModeAndLock; - m_handlers['E'] = &XPadPlugin::QueryModelAndMode; - m_handlers['F'] = &XPadPlugin::QueryUnknown1; - m_handlers['G'] = &XPadPlugin::QueryUnknown2; - m_handlers['L'] = &XPadPlugin::QueryUnknown3; - m_handlers['M'] = &XPadPlugin::ConfigVibration; - m_handlers['O'] = &XPadPlugin::SetDS2NativeMode; - } - - virtual ~XPadPlugin() - { - for(vector::iterator i = m_pads.begin(); i != m_pads.end(); i++) - { - delete *i; - } - - m_pads.clear(); - } - - void StartPoll(int pad) - { - m_pad = m_pads[pad & 1]; - m_index = 0; - } - - BYTE Poll(BYTE value) - { - BYTE ret = 0; - - switch(++m_index) - { - case 1: - m_cmd = value; - m_handler = m_handlers[value]; - ret = (value == 'B' || value == 'C') ? m_pad->GetId() : 0xf3; - break; - case 2: - assert(value == 0); - ret = 'Z'; - break; - default: - ret = (this->*m_handler)(m_index - 3, value); - break; - } - - return ret; - } - -} s_padplugin; - -// - -static int s_nRefs = 0; -static HWND s_hWnd = NULL; -static WNDPROC s_GSWndProc = NULL; - -static class CKeyEventList : protected list, protected CCritSec -{ -public: - void Push(UINT32 event, UINT32 key) - { - CAutoLock cAutoLock(this); - - KeyEvent e; - - e.event = event; - e.key = key; - - push_back(e); - } - - bool Pop(KeyEvent& e) - { - CAutoLock cAutoLock(this); - - if(empty()) return false; - - e = front(); - - pop_front(); - - return true; - } - -} s_event; - -LRESULT WINAPI PADwndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_KEYDOWN: - if(lParam & 0x40000000) return TRUE; - s_event.Push(KEYPRESS, wParam); - return TRUE; - case WM_KEYUP: - s_event.Push(KEYRELEASE, wParam); - return TRUE; - case WM_DESTROY: - case WM_QUIT: - s_event.Push(KEYPRESS, VK_ESCAPE); - break; - } - - return CallWindowProc(s_GSWndProc, hWnd, msg, wParam, lParam); -} - -// - -EXPORT_C_(UINT32) PADinit(UINT32 flags) -{ - // Use LoadLibrary and not LoadLibraryEx for XInput 1.3, since some - // Windows 7 systems have issues with it. - // TODO: Only load XInput 1.4 for Windows 8+? Or implement the SCP extension? - s_xInputDll = LoadLibrary(L"xinput1_3.dll"); - if (s_xInputDll == nullptr && IsWindows8OrGreater()) - { - s_xInputDll = LoadLibraryEx(L"XInput1_4.dll", nullptr, LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32); - } - if (s_xInputDll == nullptr) - { - return 1; - } - - if (!(pXInputEnable = reinterpret_cast(GetProcAddress(s_xInputDll, "XInputEnable"))) - || !(pXInputSetState = reinterpret_cast(GetProcAddress(s_xInputDll, "XInputSetState"))) - || !(pXInputGetState = reinterpret_cast(GetProcAddress(s_xInputDll, "XInputGetState")))) - { - FreeLibrary(s_xInputDll); - s_xInputDll = nullptr; - return 1; - } - return 0; -} - -EXPORT_C PADshutdown() -{ - if (s_xInputDll) - { - FreeLibrary(s_xInputDll); - s_xInputDll = nullptr; - } -} - -EXPORT_C_(UINT32) PADopen(void* pDsp) -{ - pXInputEnable(TRUE); - - if(s_nRefs == 0) - { - if(s_ps2) - { - s_hWnd = *(HWND*)pDsp; - s_GSWndProc = (WNDPROC)SetWindowLongPtr(s_hWnd, GWLP_WNDPROC, (LPARAM)PADwndProc); - } - } - - s_nRefs++; - - return 0; -} - -EXPORT_C PADclose() -{ - s_nRefs--; - - if(s_nRefs == 0) - { - if(s_ps2) - { - SetWindowLongPtr(s_hWnd, GWLP_WNDPROC, (LPARAM)s_GSWndProc); - } - } - - pXInputEnable(FALSE); -} - -EXPORT_C_(UINT32) CALLBACK PADquery() -{ - return 3; -} - -EXPORT_C_(BYTE) PADstartPoll(int pad) -{ - s_padplugin.StartPoll(pad - 1); - - return 0xff; -} - -EXPORT_C_(BYTE) PADpoll(BYTE value) -{ - return s_padplugin.Poll(value); -} - -EXPORT_C_(UINT32) PADreadPort(int port, PadDataS* data) -{ - PADstartPoll(port + 1); - - data->type = PADpoll('B') >> 4; - PADpoll(0); - data->status = PADpoll(0) | (PADpoll(0) << 8); - data->rightJoyX = data->moveX = PADpoll(0); - data->rightJoyY = data->moveY = PADpoll(0); - data->leftJoyX = PADpoll(0); - data->leftJoyY = PADpoll(0); - - return 0; -} - -EXPORT_C_(UINT32) PADreadPort1(PadDataS* ppds) -{ - return PADreadPort(0, ppds); -} - -EXPORT_C_(UINT32) PADreadPort2(PadDataS* ppds) -{ - return PADreadPort(1, ppds); -} - -EXPORT_C_(KeyEvent*) PADkeyEvent() -{ - static KeyEvent e; - - return s_event.Pop(e) ? &e : NULL; -} - -EXPORT_C PADconfigure() -{ -} - -EXPORT_C PADabout() -{ -} - -EXPORT_C_(UINT32) PADtest() -{ - return 0; -} - diff --git a/plugins/xpad/xpad.def b/plugins/xpad/xpad.def deleted file mode 100644 index f617189147..0000000000 --- a/plugins/xpad/xpad.def +++ /dev/null @@ -1,26 +0,0 @@ -; xpad.def : Declares the module parameters for the DLL. - -LIBRARY "xpad" - -EXPORTS - ; Explicit exports can go here - PSEgetLibType - PSEgetLibName - PSEgetLibVersion - PS2EgetLibType - PS2EgetLibName - PS2EgetLibVersion2 - PADinit - PADshutdown - PADopen - PADclose - PADkeyEvent - PADstartPoll - PADpoll - PADquery - PADconfigure - PADtest - PADabout - PADreadPort - PADreadPort1 - PADreadPort2 diff --git a/plugins/xpad/xpad.h b/plugins/xpad/xpad.h deleted file mode 100644 index 12cfc04a45..0000000000 --- a/plugins/xpad/xpad.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2007 Gabest - * http://www.gabest.org - * - * This Program 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 2, or (at your option) - * any later version. - * - * This Program 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 GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#pragma once - -// ps1 - -#define PSE_LT_PAD 8 - -// MOUSE SCPH-1030 -#define PSE_PAD_TYPE_MOUSE 1 -// NEGCON - 16 button analog controller SLPH-00001 -#define PSE_PAD_TYPE_NEGCON 2 -// GUN CONTROLLER - gun controller SLPH-00014 from Konami -#define PSE_PAD_TYPE_GUN 3 -// STANDARD PAD SCPH-1080, SCPH-1150 -#define PSE_PAD_TYPE_STANDARD 4 -// ANALOG JOYSTICK SCPH-1110 -#define PSE_PAD_TYPE_ANALOGJOY 5 -// GUNCON - gun controller SLPH-00034 from Namco -#define PSE_PAD_TYPE_GUNCON 6 -// ANALOG CONTROLLER SCPH-1150 -#define PSE_PAD_TYPE_ANALOGPAD 7 - -struct PadDataS -{ - // controler type - fill it withe predefined values above - BYTE type; - - // status of buttons - every controller fills this field - WORD status; - - // for analog pad fill those next 4 bytes - // values are analog in range 0-255 where 128 is center position - BYTE rightJoyX, rightJoyY, leftJoyX, leftJoyY; - - // for mouse fill those next 2 bytes - // values are in range -128 - 127 - BYTE moveX, moveY; - - BYTE reserved[91]; -} ; - -// ps2 - -#define PS2E_LT_PAD 0x02 -#define PS2E_PAD_VERSION 0x0002 - -struct KeyEvent -{ - UINT32 key; - UINT32 event; -}; - -#define KEYPRESS 1 -#define KEYRELEASE 2 - -// - -class CCritSec -{ - CCritSec(const CCritSec &refCritSec); - CCritSec &operator=(const CCritSec &refCritSec) = delete; - - CRITICAL_SECTION m_CritSec; - -public: - CCritSec() {InitializeCriticalSection(&m_CritSec);}; - ~CCritSec() {DeleteCriticalSection(&m_CritSec);}; - - void Lock() {EnterCriticalSection(&m_CritSec);}; - void Unlock() {LeaveCriticalSection(&m_CritSec);}; -}; - -class CAutoLock -{ - CAutoLock(const CAutoLock &refAutoLock); - CAutoLock &operator=(const CAutoLock &refAutoLock) = delete; - -protected: - CCritSec * m_pLock; - -public: - CAutoLock(CCritSec * plock) {m_pLock = plock; m_pLock->Lock();}; - ~CAutoLock() {m_pLock->Unlock();}; -}; - diff --git a/plugins/xpad/xpad.props b/plugins/xpad/xpad.props deleted file mode 100644 index 12c5aca34f..0000000000 --- a/plugins/xpad/xpad.props +++ /dev/null @@ -1,16 +0,0 @@ -サソ - - - - <_PropertySheetDisplayName>xpad - - - - xinput.lib;%(AdditionalDependencies) - - - "$(SolutionDir)common\vsprops\preBuild.cmd" "$(ProjectDir)." - - - - \ No newline at end of file diff --git a/plugins/xpad/xpad.rc b/plugins/xpad/xpad.rc deleted file mode 100644 index b1187f5c1e..0000000000 --- a/plugins/xpad/xpad.rc +++ /dev/null @@ -1,151 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#undef APSTUDIO_HIDDEN_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Hungarian resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HUN) -#ifdef _WIN32 -LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -#pragma code_page(1250) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" - "#include ""windows.h""\r\n" - "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#include ""res\\xpad.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#endif\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Hungarian resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,0 - PRODUCTVERSION 1,0,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "Comments", "http://guliverkli.sf.net/" - VALUE "CompanyName", "Gabest" - VALUE "FileDescription", "XInput PAD plugin for ps2 emulators" - VALUE "FileVersion", "1, 0, 0, 0" - VALUE "InternalName", "xpad.dll" - VALUE "LegalCopyright", "Copyright (c) 2007-2008 Gabest. All rights reserved." - VALUE "OriginalFilename", "xpad.dll" - VALUE "ProductName", "xpad" - VALUE "ProductVersion", "1, 0, 0, 0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE 9, 1 -#pragma code_page(1252) -#include "res\xpad.rc2" // non-Microsoft Visual C++ edited resources -#endif - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/plugins/xpad/xpad.vcxproj b/plugins/xpad/xpad.vcxproj deleted file mode 100644 index 576a4c9e3b..0000000000 --- a/plugins/xpad/xpad.vcxproj +++ /dev/null @@ -1,77 +0,0 @@ -サソ - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6F3C4136-5801-4EBC-AC6E-37DF6FAB150A} - - - - DynamicLibrary - $(DefaultPlatformToolset) - Unicode - true - true - false - - - - - - - - - - - - - AllRules.ruleset - - - - Use - - - .\xpad.def - MachineX86 - MachineX64 - - - - - Create - - - - - - - - - - - - - - - - - - - diff --git a/plugins/xpad/xpad.vcxproj.filters b/plugins/xpad/xpad.vcxproj.filters deleted file mode 100644 index 4495487c02..0000000000 --- a/plugins/xpad/xpad.vcxproj.filters +++ /dev/null @@ -1,52 +0,0 @@ -サソ - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Source Files - - - - - Source Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file