mirror of https://github.com/PCSX2/pcsx2.git
SSSPSXpad: Fix crash when binding keys (Issue 550).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2525 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e2581e5c72
commit
eba108114c
|
@ -761,15 +761,11 @@ u32 CALLBACK PSEgetLibVersion (void)
|
||||||
|
|
||||||
s32 CALLBACK PADinit (u32 flags)
|
s32 CALLBACK PADinit (u32 flags)
|
||||||
{
|
{
|
||||||
InitializeCriticalSection( &update_lock );
|
|
||||||
InitializeCriticalSection( &init_lock );
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CALLBACK PADshutdown (void)
|
void CALLBACK PADshutdown (void)
|
||||||
{
|
{
|
||||||
DeleteCriticalSection( &update_lock );
|
|
||||||
DeleteCriticalSection( &init_lock );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int n_open = 0;
|
static int n_open = 0;
|
||||||
|
@ -1163,12 +1159,23 @@ s32 CALLBACK PADfreeze (int mode, freezeData *data)
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hInst, DWORD dwReason, LPVOID lpReserved)
|
BOOL APIENTRY DllMain(HMODULE hInst, DWORD dwReason, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
hInstance = hInst;
|
|
||||||
|
if( dwReason == DLL_PROCESS_ATTACH )
|
||||||
|
{
|
||||||
|
hInstance = hInst;
|
||||||
|
InitializeCriticalSection( &update_lock );
|
||||||
|
InitializeCriticalSection( &init_lock );
|
||||||
|
}
|
||||||
|
else if( dwReason == DLL_PROCESS_DETACH )
|
||||||
|
{
|
||||||
|
DeleteCriticalSection( &update_lock );
|
||||||
|
DeleteCriticalSection( &init_lock );
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL APIENTRY EntryPoint (HMODULE hInst, DWORD dwReason, LPVOID lpReserved)
|
BOOL APIENTRY EntryPoint (HMODULE hInst, DWORD dwReason, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
hInstance = hInst;
|
return DllMain( hInst, dwReason, lpReserved );
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue