void CPlugin::RomClose() { if (!m_RomOpen) return; WriteTrace(PluginTraceType(), TraceDebug, "Before Rom Close"); RomClosed(); m_RomOpen = false; WriteTrace(PluginTraceType(), TraceDebug, "After Rom Close"); }
void CPlugin::RomClose() { if (!m_RomOpen) return; WriteTraceF(PluginTraceType(),__FUNCTION__ "(%s): Before Rom Close",PluginType()); RomClosed(); m_RomOpen = false; WriteTraceF(PluginTraceType(),__FUNCTION__ "(%s): After Rom Close",PluginType()); }
/****************************************************************** Function: CloseDLL Purpose: This function is called when the emulator is closing down allowing the dll to de-initialise. input: none output: none *******************************************************************/ EXPORT void CALL CloseDLL (void) { // HACK: THIS IS BROKEN IN PJ64 1.6 (it calls CloseDLL too often) DebugWriteA("CALLED: CloseDLL\n"); if( g_bRunning ) RomClosed(); for( int i = 0; i < 4; i++ ) { freePakData( &g_pcControllers[i] ); freeModifiers( &g_pcControllers[i] ); } // ZeroMemory( g_pcControllers, sizeof(g_pcControllers) ); // why zero the memory if we're just going to close down? FreeDirectInput(); return; }
BOOL CALLBACK DeleteItemProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_ACTIVATE: CheckDlgButton(hwndDlg, IDC_SYNC, SyncSpeed); CheckDlgButton(hwndDlg, IDC_REVERSE_STEREO, ReverseStereo); break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: // if (!GetDlgItemText(hwndDlg, ID_ITEMNAME, // szItemName, 80)) // *szItemName=0; // Fall through. case IDCANCEL: EndDialog(hwndDlg, wParam); DestroyWindow(hWndConfig); hWndConfig = NULL; return TRUE; case IDC_ABOUT: DllAbout(AudioInfo.hwnd); break; } break; case WM_NOTIFY: switch(LOWORD(wParam)) { case IDC_SYNC: if( SyncSpeed != ( SendDlgItemMessage( hwndDlg, IDC_SYNC, BM_GETCHECK, 0, 0) == BST_CHECKED)) { int TempgUcode = gUcode; InitializeCriticalSection(&CriticalSection); SyncSpeed = ( SendDlgItemMessage( hwndDlg, IDC_SYNC, BM_GETCHECK, 0, 0) == BST_CHECKED); EnterCriticalSection(&CriticalSection); RomClosed(); gUcode = TempgUcode; LeaveCriticalSection(&CriticalSection); DeleteCriticalSection(&CriticalSection); // REGISTRY_WriteDWORD( "AutoFullScreen", emuoptions.auto_full_screen); } break; case IDC_REVERSE_STEREO: if( ReverseStereo != ( SendDlgItemMessage( hwndDlg, IDC_REVERSE_STEREO, BM_GETCHECK, 0, 0) == BST_CHECKED)) { HANDLE hMutex = CreateMutex(NULL,FALSE,NULL); WaitForSingleObject (hMutex, INFINITE); ReverseStereo = ( SendDlgItemMessage( hwndDlg, IDC_REVERSE_STEREO, BM_GETCHECK, 0, 0) == BST_CHECKED); ReleaseMutex(hMutex); // REGISTRY_WriteDWORD( "AutoFullScreen", emuoptions.auto_full_screen); } break; } break; } return FALSE; }