mirror of https://github.com/PCSX2/pcsx2.git
PAD: windows merge relatively complete, linker issues left
This commit is contained in:
parent
ce7fbe6398
commit
2b4e73e885
|
@ -782,25 +782,23 @@ struct QueryInfo
|
||||||
u8 response[42];
|
u8 response[42];
|
||||||
} query = {0, 0, 0, 0, 0, 0xFF, {0xF3}};
|
} query = {0, 0, 0, 0, 0, 0xFF, {0xF3}};
|
||||||
|
|
||||||
s32 PADinit(u32 flags)
|
s32 PADinit()
|
||||||
{
|
{
|
||||||
|
const u32 flags = 3;
|
||||||
// Note: Won't load settings if already loaded.
|
// Note: Won't load settings if already loaded.
|
||||||
if (LoadSettings() < 0) {
|
if (LoadSettings() < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
int port = (flags & 3);
|
int port = (flags & 3);
|
||||||
if (port == 3) {
|
|
||||||
if (PADinit(1) == -1)
|
|
||||||
return -1;
|
|
||||||
return PADinit(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(PCSX2_DEBUG) && defined(_MSC_VER)
|
#if defined(PCSX2_DEBUG) && defined(_MSC_VER)
|
||||||
int tmpFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
int tmpFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
||||||
tmpFlag |= _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF;
|
tmpFlag |= _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF;
|
||||||
_CrtSetDbgFlag(tmpFlag);
|
_CrtSetDbgFlag(tmpFlag);
|
||||||
#endif
|
#endif
|
||||||
|
for (int i = 2; i > 0; i--)
|
||||||
|
{
|
||||||
|
port = i;
|
||||||
port--;
|
port--;
|
||||||
|
|
||||||
for (int slot = 0; slot < 4; slot++)
|
for (int slot = 0; slot < 4; slot++)
|
||||||
|
@ -816,8 +814,8 @@ s32 PADinit(u32 flags)
|
||||||
#endif
|
#endif
|
||||||
// Just in case, when resuming emulation.
|
// Just in case, when resuming emulation.
|
||||||
ReleaseModifierKeys();
|
ReleaseModifierKeys();
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_TEXT_OUT("LilyPad initialized\n\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "PS2Edefs.h"
|
#include "PS2Edefs.h"
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include <windowsx.h>
|
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -50,7 +47,7 @@ typedef struct
|
||||||
|
|
||||||
void PADupdate(int pad);
|
void PADupdate(int pad);
|
||||||
void PADshutdown();
|
void PADshutdown();
|
||||||
s32 PADinit(u32 flags);
|
s32 PADinit();
|
||||||
s32 PADopen(void* pDsp);
|
s32 PADopen(void* pDsp);
|
||||||
void PADclose();
|
void PADclose();
|
||||||
u8 PADstartPoll(int pad);
|
u8 PADstartPoll(int pad);
|
||||||
|
|
|
@ -304,7 +304,7 @@ wchar_t *GetCommandStringW(u8 command, int port, int slot)
|
||||||
|
|
||||||
static wchar_t iniFile[MAX_PATH * 2] = L"inis/LilyPad.ini";
|
static wchar_t iniFile[MAX_PATH * 2] = L"inis/LilyPad.ini";
|
||||||
|
|
||||||
void CALLBACK PADsetSettingsDir(const char *dir)
|
void PADsetSettingsDir(const char *dir)
|
||||||
{
|
{
|
||||||
//swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis" : dir );
|
//swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis" : dir );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue