View Single Post
  #5  
Old 15th August 2019, 12:20 PM
pcca-matrix pcca-matrix is offline
Junior Member
 
Join Date: Aug 2019
Location: Belgium
Posts: 7
Default

here is the list of changes

NRagePluginV2.cpp

let MEMpack work with RAW

Code:
case PAK_MEM:
    Controls[i].Plugin = PLUGIN_MEMPAK;
    //Controls[i].RawData = false;
    break;
when you switch from mempak to rumble , rumble pack is never initialized so change at line 1054

Code:
		case SC_RUMBPAK:
			if (PAK_NONE == g_pcControllers[iControl].PakType)
			{
				EnterCriticalSection( &g_critical );
				g_pcControllers[iControl].PakType = PAK_RUMBLE;
				g_pcControllers[iControl].fPakInitialized = true; // from false to true
No shortcut working when you have 4 xinput controller plugged, comment continue on line 410.

Code:
		
if( g_pcControllers[i].fPlugged )
		{
			if (g_pcControllers[i].fXInput)
			{
				InitiateXInputController(&g_pcControllers[i].xiController, i);
				//continue;
			}
There is a performance hit when you check for a controller that wasn't attached last time you called it.

ex: GT64 Championship is unplayable on a slow PC if a xinput controller is plugged in PJ64 but not available.

This fix minimizes a performance issue with XInput on Windows when checking for a disconnected controller.

If you get ERROR_DEVICE_NOT_CONNECTED from XInputGetState, you shouldn't call that slot for a little while.

line 156 add

Code:
unsigned XcheckTime;		// checks for newly connected gamepads timer
XinputController.cpp

line 178 -> 192

Code:
	if ( !gController->bConfigured )
		return;

	ULONGLONG time = GetTickCount() / 1000;
	if (g_pcControllers[indexController].XcheckTime != NULL && ( time - g_pcControllers[indexController].XcheckTime ) < 3)
		return;

	DWORD result;
	XINPUT_STATE state;
	result = fnXInputGetState(gController->nControl, &state);
	if (result == ERROR_DEVICE_NOT_CONNECTED) {
		g_pcControllers[indexController].XcheckTime = time;
	}else{
		g_pcControllers[indexController].XcheckTime = NULL;
	}
Reply With Quote