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:
Jake.Stine 2010-01-26 16:39:16 +00:00
parent e2581e5c72
commit eba108114c
1 changed files with 14 additions and 7 deletions

View File

@ -761,15 +761,11 @@ u32 CALLBACK PSEgetLibVersion (void)
s32 CALLBACK PADinit (u32 flags)
{
InitializeCriticalSection( &update_lock );
InitializeCriticalSection( &init_lock );
return 0;
}
void CALLBACK PADshutdown (void)
{
DeleteCriticalSection( &update_lock );
DeleteCriticalSection( &init_lock );
}
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)
{
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;
}
BOOL APIENTRY EntryPoint (HMODULE hInst, DWORD dwReason, LPVOID lpReserved)
{
hInstance = hInst;
return TRUE;
return DllMain( hInst, dwReason, lpReserved );
}