Quick fix for duplicate keystrokes coming in from LilyPad when using keyboard input Raw or DInput modes.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2013 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-10-16 12:39:40 +00:00
parent d87cc4d250
commit 66e9e8c085
2 changed files with 11 additions and 1 deletions

View File

@ -76,7 +76,11 @@ void Pcsx2App::PostMenuAction( MenuIdentifiers menu_id ) const
void Pcsx2App::PostPadKey( wxKeyEvent& evt )
{
if( m_gsFrame == NULL )
// HACK: Legacy PAD plugins expect PCSX2 to ignore keyboard messages on the
// GS window while the PAD plugin is open, so send messages to the APP handler
// only if *either* the GS or PAD plugins are in legacy mode.
if( m_gsFrame == NULL || (PADopen != NULL) )
{
evt.SetId( pxID_PadHandler_Keydown );
wxGetApp().AddPendingEvent( evt );

View File

@ -65,6 +65,12 @@ void GSFrame::OnCloseWindow(wxCloseEvent& evt)
void GSFrame::OnKeyDown( wxKeyEvent& evt )
{
// HACK: Legacy PAD plugins expect PCSX2 to ignore keyboard messages on the GS Window while
// the PAD plugin is open, so ignore here (PCSX2 will direct messages routed from PAD directly
// to the APP level message handler).
if( (PADopen != NULL) && CoreThread.IsOpen() ) return;
const GlobalCommandDescriptor* cmd = NULL;
m_Accels.TryGetValue( KeyAcceleratorCode( evt ).val32, cmd );
if( cmd == NULL )