mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-01 16:02:39 +00:00
Fix a nasty dualcore hang in EFB read (see r3658 comment...)
Also fix an issue reported by baby.lueshi (issue 1074) in nJoy related to half press button being always pressed when unset. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3661 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
06b65ea425
commit
936225eee4
4 changed files with 34 additions and 32 deletions
|
@ -76,24 +76,24 @@
|
|||
// Use PAD rumble
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
|
||||
void Pad_Use_Rumble(u8 _numPAD)//, SPADStatus* _pPADStatus)
|
||||
void Pad_Use_Rumble(u8 _numPAD)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
if (PadMapping[_numPAD].rumble) {
|
||||
if (!g_Rumble) {
|
||||
#ifdef _WIN32
|
||||
if (PadMapping[_numPAD].rumble)
|
||||
{
|
||||
if (!g_Rumble)
|
||||
{
|
||||
// GetForegroundWindow() always sends the good HWND
|
||||
if (FAILED(InitRumble(GetForegroundWindow())))
|
||||
PanicAlert("Could not initialize Rumble!");
|
||||
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
// Acquire gamepad
|
||||
if (pRumble[_numPAD].g_pDevice != NULL)
|
||||
pRumble[_numPAD].g_pDevice->Acquire();
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(__linux__)
|
||||
#elif defined(__linux__)
|
||||
if (!fd)
|
||||
{
|
||||
sprintf(device_file_name, "/dev/input/event%d", PadMapping[_numPAD].eventnum); //TODO: Make dynamic //
|
||||
|
@ -125,7 +125,7 @@ void Pad_Use_Rumble(u8 _numPAD)//, SPADStatus* _pPADStatus)
|
|||
CanRumble = false; //We have effects but it doesn't support the rumble we are using. This is basic rumble, should work for most
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -138,7 +138,7 @@ void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength)
|
|||
Pad_Use_Rumble(_numPAD);
|
||||
|
||||
// SDL can't rumble the gamepad so we need to use platform specific code
|
||||
#ifdef _WIN32
|
||||
#ifdef _WIN32
|
||||
int a = 0;
|
||||
|
||||
if (_uType == 1)
|
||||
|
@ -158,7 +158,7 @@ void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength)
|
|||
SetDeviceForcesXY(_numPAD, a);
|
||||
}
|
||||
|
||||
#elif defined(__linux__)
|
||||
#elif defined(__linux__)
|
||||
struct input_event event;
|
||||
if (CanRumble)
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue