mirror of https://github.com/PCSX2/pcsx2.git
PAD: add back config screen, pause core when opened
This commit is contained in:
parent
6df4fea079
commit
2e0be1f75a
|
@ -88,7 +88,7 @@ void CloseLogging()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PADinit(u32 flags)
|
s32 PADinit()
|
||||||
{
|
{
|
||||||
initLogging();
|
initLogging();
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ void PADSaveConfig();
|
||||||
|
|
||||||
void SysMessage(char *fmt, ...);
|
void SysMessage(char *fmt, ...);
|
||||||
|
|
||||||
s32 PADinit(u32 flags);
|
s32 PADinit();
|
||||||
void PADshutdown();
|
void PADshutdown();
|
||||||
s32 PADopen(void *pDsp);
|
s32 PADopen(void *pDsp);
|
||||||
void PADsetSettingsDir(const char *dir);
|
void PADsetSettingsDir(const char *dir);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "PAD.h"
|
#include "PAD.h"
|
||||||
|
|
||||||
extern std::string s_strIniPath;
|
extern std::string s_padstrIniPath;
|
||||||
|
|
||||||
void DefaultKeyboardValues()
|
void DefaultKeyboardValues()
|
||||||
{
|
{
|
||||||
|
@ -43,10 +43,10 @@ void PADSaveConfig()
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
const std::string iniFile(s_strIniPath + "OnePAD2.ini");
|
const std::string iniFile(s_padstrIniPath + "PAD.ini");
|
||||||
f = fopen(iniFile.c_str(), "w");
|
f = fopen(iniFile.c_str(), "w");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
printf("OnePAD: failed to save ini %s\n", iniFile.c_str());
|
printf("PAD: failed to save ini %s\n", iniFile.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ void PADLoadConfig()
|
||||||
|
|
||||||
g_conf.init();
|
g_conf.init();
|
||||||
|
|
||||||
const std::string iniFile(s_strIniPath + "OnePAD2.ini");
|
const std::string iniFile(s_padstrIniPath + "PAD.ini");
|
||||||
f = fopen(iniFile.c_str(), "r");
|
f = fopen(iniFile.c_str(), "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
printf("OnePAD: failed to load ini %s\n", iniFile.c_str());
|
printf("OnePAD: failed to load ini %s\n", iniFile.c_str());
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "AppCoreThread.h"
|
||||||
#include "GamePad.h"
|
#include "GamePad.h"
|
||||||
#include "PAD.h"
|
#include "PAD.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
|
@ -114,8 +115,10 @@ void PADupdate(int pad)
|
||||||
|
|
||||||
void PADconfigure()
|
void PADconfigure()
|
||||||
{
|
{
|
||||||
|
ScopedCoreThreadPause paused_core;
|
||||||
PADLoadConfig();
|
PADLoadConfig();
|
||||||
|
|
||||||
DisplayDialog();
|
DisplayDialog();
|
||||||
|
paused_core.AllowResume();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "SPU2/spu2.h"
|
#include "SPU2/spu2.h"
|
||||||
#include "DEV9/DEV9.h"
|
#include "DEV9/DEV9.h"
|
||||||
#include "USB/USB.h"
|
#include "USB/USB.h"
|
||||||
|
#include "PAD/Linux/PAD.h"
|
||||||
|
|
||||||
#include "../DebugTools/MIPSAnalyst.h"
|
#include "../DebugTools/MIPSAnalyst.h"
|
||||||
#include "../DebugTools/SymbolMap.h"
|
#include "../DebugTools/SymbolMap.h"
|
||||||
|
@ -327,7 +328,7 @@ void SysCoreThread::OnResumeInThread(bool isSuspended)
|
||||||
}
|
}
|
||||||
FWopen();
|
FWopen();
|
||||||
SPU2open((void*)pDsp);
|
SPU2open((void*)pDsp);
|
||||||
PADopen();
|
PADopen((void*)pDsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "Patch.h"
|
#include "Patch.h"
|
||||||
#include "R5900Exceptions.h"
|
#include "R5900Exceptions.h"
|
||||||
#include "Sio.h"
|
#include "Sio.h"
|
||||||
|
#include "PAD/Linux/PAD.h"
|
||||||
|
|
||||||
#ifndef DISABLE_RECORDING
|
#ifndef DISABLE_RECORDING
|
||||||
#include "Recording/InputRecordingControls.h"
|
#include "Recording/InputRecordingControls.h"
|
||||||
|
|
|
@ -250,6 +250,7 @@ void MainEmuFrame::ConnectMenus()
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_AudioSettings_Click, this, MenuId_Config_SPU2);
|
Bind(wxEVT_MENU, &MainEmuFrame::Menu_AudioSettings_Click, this, MenuId_Config_SPU2);
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_NetworkSettings_Click, this, MenuId_Config_DEV9);
|
Bind(wxEVT_MENU, &MainEmuFrame::Menu_NetworkSettings_Click, this, MenuId_Config_DEV9);
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_USBSettings_Click, this, MenuId_Config_USB);
|
Bind(wxEVT_MENU, &MainEmuFrame::Menu_USBSettings_Click, this, MenuId_Config_USB);
|
||||||
|
Bind(wxEVT_MENU, &MainEmuFrame::Menu_PADSettings_Click, this, MenuId_Config_PAD);
|
||||||
|
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_GSSettings_Click, this, MenuId_Video_CoreSettings);
|
Bind(wxEVT_MENU, &MainEmuFrame::Menu_GSSettings_Click, this, MenuId_Video_CoreSettings);
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_WindowSettings_Click, this, MenuId_Video_WindowSettings);
|
Bind(wxEVT_MENU, &MainEmuFrame::Menu_WindowSettings_Click, this, MenuId_Video_WindowSettings);
|
||||||
|
@ -443,6 +444,7 @@ void MainEmuFrame::CreateConfigMenu()
|
||||||
m_menuConfig.Append(MenuId_Config_SPU2, _("&Audio Settings..."));
|
m_menuConfig.Append(MenuId_Config_SPU2, _("&Audio Settings..."));
|
||||||
m_menuConfig.Append(MenuId_Config_DEV9, _("&Network and HDD Settings...") );
|
m_menuConfig.Append(MenuId_Config_DEV9, _("&Network and HDD Settings...") );
|
||||||
m_menuConfig.Append(MenuId_Config_USB, _("&USB Settings..."));
|
m_menuConfig.Append(MenuId_Config_USB, _("&USB Settings..."));
|
||||||
|
m_menuConfig.Append(MenuId_Config_PAD, _("&GamePad Settings..."));
|
||||||
|
|
||||||
m_menuConfig.AppendSeparator();
|
m_menuConfig.AppendSeparator();
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,7 @@ protected:
|
||||||
void Menu_NetworkSettings_Click(wxCommandEvent &event);
|
void Menu_NetworkSettings_Click(wxCommandEvent &event);
|
||||||
void Menu_AudioSettings_Click(wxCommandEvent& event);
|
void Menu_AudioSettings_Click(wxCommandEvent& event);
|
||||||
void Menu_USBSettings_Click(wxCommandEvent& event);
|
void Menu_USBSettings_Click(wxCommandEvent& event);
|
||||||
|
void Menu_PADSettings_Click(wxCommandEvent& event);
|
||||||
void Menu_McdSettings_Click(wxCommandEvent& event);
|
void Menu_McdSettings_Click(wxCommandEvent& event);
|
||||||
void Menu_WindowSettings_Click(wxCommandEvent& event);
|
void Menu_WindowSettings_Click(wxCommandEvent& event);
|
||||||
void Menu_GSSettings_Click(wxCommandEvent& event);
|
void Menu_GSSettings_Click(wxCommandEvent& event);
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "System/SysThreads.h"
|
#include "System/SysThreads.h"
|
||||||
#include "DEV9/DEV9.h"
|
#include "DEV9/DEV9.h"
|
||||||
#include "USB/USB.h"
|
#include "USB/USB.h"
|
||||||
|
#include "PAD/Linux/PAD.h"
|
||||||
|
|
||||||
#include "ConsoleLogger.h"
|
#include "ConsoleLogger.h"
|
||||||
#include "MainFrame.h"
|
#include "MainFrame.h"
|
||||||
|
@ -70,6 +71,11 @@ void MainEmuFrame::Menu_USBSettings_Click(wxCommandEvent& event)
|
||||||
USBconfigure();
|
USBconfigure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainEmuFrame::Menu_PADSettings_Click(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
PADconfigure();
|
||||||
|
}
|
||||||
|
|
||||||
void MainEmuFrame::Menu_WindowSettings_Click(wxCommandEvent &event)
|
void MainEmuFrame::Menu_WindowSettings_Click(wxCommandEvent &event)
|
||||||
{
|
{
|
||||||
wxCommandEvent evt(pxEvt_SetSettingsPage);
|
wxCommandEvent evt(pxEvt_SetSettingsPage);
|
||||||
|
|
Loading…
Reference in New Issue