mirror of https://github.com/PCSX2/pcsx2.git
PAD: fix ini saving
This commit is contained in:
parent
8f7b9f609f
commit
a90d588167
|
@ -39,7 +39,6 @@ PADconf g_conf;
|
|||
keyEvent event;
|
||||
|
||||
static keyEvent s_event;
|
||||
std::string s_padstrIniPath("inis/");
|
||||
std::string s_padstrLogPath("logs/");
|
||||
|
||||
FILE* padLog = NULL;
|
||||
|
@ -124,12 +123,6 @@ s32 PADopen(void* pDsp)
|
|||
return _PADopen(pDsp);
|
||||
}
|
||||
|
||||
void PADsetSettingsDir(const char* dir)
|
||||
{
|
||||
// Get the path to the ini directory.
|
||||
s_padstrIniPath = (dir == NULL) ? "inis/" : dir;
|
||||
}
|
||||
|
||||
void PADsetLogDir(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
|
|
|
@ -127,7 +127,6 @@ void SysMessage(char* fmt, ...);
|
|||
s32 PADinit();
|
||||
void PADshutdown();
|
||||
s32 PADopen(void* pDsp);
|
||||
void PADsetSettingsDir(const char* dir);
|
||||
void PADsetLogDir(const char* dir);
|
||||
void PADclose();
|
||||
u32 PADquery();
|
||||
|
|
|
@ -17,10 +17,9 @@
|
|||
|
||||
#include "GamePad.h"
|
||||
#include "keyboard.h"
|
||||
#include "AppConfig.h"
|
||||
#include "PAD.h"
|
||||
|
||||
extern std::string s_padstrIniPath;
|
||||
|
||||
void DefaultKeyboardValues()
|
||||
{
|
||||
set_keyboard_key(0, XK_a, PAD_L2);
|
||||
|
@ -43,7 +42,8 @@ void PADSaveConfig()
|
|||
{
|
||||
FILE* f;
|
||||
|
||||
const std::string iniFile(s_padstrIniPath + "PAD.ini");
|
||||
wxString iniName(L"PAD.ini");
|
||||
const std::string iniFile = std::string(GetSettingsFolder().Combine(iniName).GetFullPath()); // default path, just in case
|
||||
f = fopen(iniFile.c_str(), "w");
|
||||
if (f == NULL)
|
||||
{
|
||||
|
@ -76,7 +76,9 @@ void PADLoadConfig()
|
|||
|
||||
g_conf.init();
|
||||
|
||||
const std::string iniFile(s_padstrIniPath + "PAD.ini");
|
||||
|
||||
wxString iniName(L"PAD.ini");
|
||||
const std::string iniFile = std::string(GetSettingsFolder().Combine(iniName).GetFullPath()); // default path, just in case
|
||||
f = fopen(iniFile.c_str(), "r");
|
||||
if (f == NULL)
|
||||
{
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
|
||||
#include "PAD.h"
|
||||
|
||||
#if defined(__unix__) || defined(__APPLE__)
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
#if defined(__unix__) || defined(__APPLE__)
|
||||
// x11 is dumb like that
|
||||
#undef DisableScreenSaver
|
||||
|
||||
extern void AnalyzeKeyEvent(keyEvent& evt);
|
||||
extern void UpdateKeyboardInput();
|
||||
|
|
Loading…
Reference in New Issue