mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
d87cc4d250
commit
66e9e8c085
|
@ -76,7 +76,11 @@ void Pcsx2App::PostMenuAction( MenuIdentifiers menu_id ) const
|
||||||
|
|
||||||
void Pcsx2App::PostPadKey( wxKeyEvent& evt )
|
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 );
|
evt.SetId( pxID_PadHandler_Keydown );
|
||||||
wxGetApp().AddPendingEvent( evt );
|
wxGetApp().AddPendingEvent( evt );
|
||||||
|
|
|
@ -65,6 +65,12 @@ void GSFrame::OnCloseWindow(wxCloseEvent& evt)
|
||||||
|
|
||||||
void GSFrame::OnKeyDown( wxKeyEvent& 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;
|
const GlobalCommandDescriptor* cmd = NULL;
|
||||||
m_Accels.TryGetValue( KeyAcceleratorCode( evt ).val32, cmd );
|
m_Accels.TryGetValue( KeyAcceleratorCode( evt ).val32, cmd );
|
||||||
if( cmd == NULL )
|
if( cmd == NULL )
|
||||||
|
|
Loading…
Reference in New Issue