mirror of https://github.com/PCSX2/pcsx2.git
LilyPad: Minor fix for redundant initialization of critical section.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2088 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
7e63cc820d
commit
b0b928d4f4
|
@ -267,6 +267,8 @@ void UpdateEnabledDevices(int updateList = 0) {
|
||||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, void* lpvReserved) {
|
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, void* lpvReserved) {
|
||||||
hInst = hInstance;
|
hInst = hInstance;
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH) {
|
if (fdwReason == DLL_PROCESS_ATTACH) {
|
||||||
|
InitializeCriticalSection( &updateLock );
|
||||||
|
|
||||||
DisableThreadLibraryCalls(hInstance);
|
DisableThreadLibraryCalls(hInstance);
|
||||||
}
|
}
|
||||||
else if (fdwReason == DLL_PROCESS_DETACH) {
|
else if (fdwReason == DLL_PROCESS_DETACH) {
|
||||||
|
@ -275,6 +277,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, void* lpvReserved) {
|
||||||
PADshutdown();
|
PADshutdown();
|
||||||
UninitHid();
|
UninitHid();
|
||||||
UninitLibUsb();
|
UninitLibUsb();
|
||||||
|
DeleteCriticalSection( &updateLock );
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -671,8 +674,6 @@ void CALLBACK PADshutdown() {
|
||||||
pads[i&1][i>>1].initialized = 0;
|
pads[i&1][i>>1].initialized = 0;
|
||||||
portInitialized[0] = portInitialized[1] = 0;
|
portInitialized[0] = portInitialized[1] = 0;
|
||||||
UnloadConfigs();
|
UnloadConfigs();
|
||||||
|
|
||||||
DeleteCriticalSection( &updateLock );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void StopVibrate() {
|
inline void StopVibrate() {
|
||||||
|
@ -757,8 +758,6 @@ s32 CALLBACK PADinit(u32 flags) {
|
||||||
// Just in case, when resuming emulation.
|
// Just in case, when resuming emulation.
|
||||||
ReleaseModifierKeys();
|
ReleaseModifierKeys();
|
||||||
|
|
||||||
InitializeCriticalSection( &updateLock );
|
|
||||||
|
|
||||||
DEBUG_TEXT_OUT("LilyPad initialized\n\n");
|
DEBUG_TEXT_OUT("LilyPad initialized\n\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue