mirror of https://github.com/PCSX2/pcsx2.git
PAD: continuing merge, debugging lexer bugs
This commit is contained in:
parent
a691abc630
commit
913bb359a0
|
@ -23,6 +23,7 @@
|
||||||
#include "Gif_Unit.h"
|
#include "Gif_Unit.h"
|
||||||
#include "MTVU.h"
|
#include "MTVU.h"
|
||||||
#include "Elfheader.h"
|
#include "Elfheader.h"
|
||||||
|
#include "PAD/Linux/PAD.h"
|
||||||
|
|
||||||
|
|
||||||
// Uncomment this to enable profiling of the GS RingBufferCopy function.
|
// Uncomment this to enable profiling of the GS RingBufferCopy function.
|
||||||
|
@ -450,7 +451,7 @@ void SysMtgsThread::ExecuteTaskInThread()
|
||||||
|
|
||||||
// if we're not using GSOpen2, then the GS window is on this thread (MTGS thread),
|
// if we're not using GSOpen2, then the GS window is on this thread (MTGS thread),
|
||||||
// so we need to call PADupdate from here.
|
// so we need to call PADupdate from here.
|
||||||
if ((GSopen2 == NULL) && (PADupdate != NULL))
|
if (GSopen2 == NULL)
|
||||||
PADupdate(0);
|
PADupdate(0);
|
||||||
|
|
||||||
m_QueuedFrameCount.fetch_sub(1);
|
m_QueuedFrameCount.fetch_sub(1);
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
#define PADdefs
|
#define PADdefs
|
||||||
#include "PS2Edefs.h"
|
|
||||||
|
|
||||||
enum PadOptions {
|
enum PadOptions {
|
||||||
PADOPTION_FORCEFEEDBACK = 0x1,
|
PADOPTION_FORCEFEEDBACK = 0x1,
|
||||||
|
@ -110,7 +109,7 @@ enum gamePadValues {
|
||||||
extern FILE *padLog;
|
extern FILE *padLog;
|
||||||
extern void initLogging();
|
extern void initLogging();
|
||||||
|
|
||||||
#define PAD_LOG __Log
|
//#define PAD_LOG __Log
|
||||||
//#define PAD_LOG __LogToConsole
|
//#define PAD_LOG __LogToConsole
|
||||||
|
|
||||||
extern keyEvent event;
|
extern keyEvent event;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "ConsoleLogger.h"
|
#include "ConsoleLogger.h"
|
||||||
#include "Sio.h"
|
#include "Sio.h"
|
||||||
#include "sio_internal.h"
|
#include "sio_internal.h"
|
||||||
|
#include "PAD/Linux/PAD.h"
|
||||||
|
|
||||||
#ifndef DISABLE_RECORDING
|
#ifndef DISABLE_RECORDING
|
||||||
# include "Recording/InputRecording.h"
|
# include "Recording/InputRecording.h"
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "AppSaveStates.h"
|
#include "AppSaveStates.h"
|
||||||
#include "AppGameDatabase.h"
|
#include "AppGameDatabase.h"
|
||||||
#include "AppAccelerators.h"
|
#include "AppAccelerators.h"
|
||||||
|
#include "PAD/Linux/PAD.h"
|
||||||
|
|
||||||
#include "Plugins.h"
|
#include "Plugins.h"
|
||||||
#include "ps2/BiosTools.h"
|
#include "ps2/BiosTools.h"
|
||||||
|
@ -567,7 +568,7 @@ void Pcsx2App::LogicalVsync()
|
||||||
|
|
||||||
// Only call PADupdate here if we're using GSopen2. Legacy GSopen plugins have the
|
// Only call PADupdate here if we're using GSopen2. Legacy GSopen plugins have the
|
||||||
// GS window belonging to the MTGS thread.
|
// GS window belonging to the MTGS thread.
|
||||||
if( (PADupdate != NULL) && (GSopen2 != NULL) && (wxGetApp().GetGsFramePtr() != NULL) )
|
if( (GSopen2 != NULL) && (wxGetApp().GetGsFramePtr() != NULL) )
|
||||||
PADupdate(0);
|
PADupdate(0);
|
||||||
|
|
||||||
while( const keyEvent* ev = PADkeyEvent() )
|
while( const keyEvent* ev = PADkeyEvent() )
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
#include "MainFrame.h"
|
#include "MainFrame.h"
|
||||||
#include "MSWstuff.h"
|
#include "MSWstuff.h"
|
||||||
|
#include "PAD/Linux/PAD.h"
|
||||||
|
|
||||||
#include "ConsoleLogger.h"
|
#include "ConsoleLogger.h"
|
||||||
|
|
||||||
|
@ -314,7 +315,7 @@ void GSPanel::OnMouseEvent( wxMouseEvent& evt )
|
||||||
#if defined(__unix__)
|
#if defined(__unix__)
|
||||||
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
||||||
// the event before the pad see it. So you send key event directly to the pad.
|
// the event before the pad see it. So you send key event directly to the pad.
|
||||||
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
|
if( (GSopen2 != NULL) ) {
|
||||||
keyEvent event;
|
keyEvent event;
|
||||||
// FIXME how to handle double click ???
|
// FIXME how to handle double click ???
|
||||||
if (evt.ButtonDown()) {
|
if (evt.ButtonDown()) {
|
||||||
|
@ -377,7 +378,7 @@ void GSPanel::OnKeyDownOrUp( wxKeyEvent& evt )
|
||||||
#if defined(__unix__)
|
#if defined(__unix__)
|
||||||
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
||||||
// the event before the pad see it. So you send key event directly to the pad.
|
// the event before the pad see it. So you send key event directly to the pad.
|
||||||
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
|
if( (GSopen2 != NULL) ) {
|
||||||
keyEvent event;
|
keyEvent event;
|
||||||
event.key = evt.GetRawKeyCode();
|
event.key = evt.GetRawKeyCode();
|
||||||
if (evt.GetEventType() == wxEVT_KEY_UP)
|
if (evt.GetEventType() == wxEVT_KEY_UP)
|
||||||
|
@ -410,7 +411,7 @@ void GSPanel::OnKeyDownOrUp( wxKeyEvent& evt )
|
||||||
evt.m_keyCode += (int)'a' - 'A';
|
evt.m_keyCode += (int)'a' - 'A';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((PADopen != NULL) && CoreThread.IsOpen())
|
if (CoreThread.IsOpen())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -442,8 +443,7 @@ void GSPanel::DirectKeyCommand( wxKeyEvent& evt )
|
||||||
|
|
||||||
void GSPanel::UpdateScreensaver()
|
void GSPanel::UpdateScreensaver()
|
||||||
{
|
{
|
||||||
bool prevent = g_Conf->GSWindow.DisableScreenSaver
|
bool prevent = g_Conf->GSWindow.DisableScreenSaver && m_HasFocus && m_coreRunning;
|
||||||
&& m_HasFocus && m_coreRunning;
|
|
||||||
ScreensaverAllow(!prevent);
|
ScreensaverAllow(!prevent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ void GSPanel::OnFocus( wxFocusEvent& evt )
|
||||||
#if defined(__unix__)
|
#if defined(__unix__)
|
||||||
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
||||||
// the event before the pad see it. So you send key event directly to the pad.
|
// the event before the pad see it. So you send key event directly to the pad.
|
||||||
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
|
if((GSopen2 != NULL) ) {
|
||||||
keyEvent event = {0, 9}; // X equivalent of FocusIn;
|
keyEvent event = {0, 9}; // X equivalent of FocusIn;
|
||||||
PADWriteEvent(event);
|
PADWriteEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -481,7 +481,7 @@ void GSPanel::OnFocusLost( wxFocusEvent& evt )
|
||||||
#if defined(__unix__)
|
#if defined(__unix__)
|
||||||
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
|
||||||
// the event before the pad see it. So you send key event directly to the pad.
|
// the event before the pad see it. So you send key event directly to the pad.
|
||||||
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
|
if((GSopen2 != NULL) ) {
|
||||||
keyEvent event = {0, 10}; // X equivalent of FocusOut
|
keyEvent event = {0, 10}; // X equivalent of FocusOut
|
||||||
PADWriteEvent(event);
|
PADWriteEvent(event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue