MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / ExitInstance

Method ExitInstance

Source/FamiTracker.cpp:324–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324int CFamiTrackerApp::ExitInstance()
325{
326 // Close program
327 // The document is already closed at this point (and detached from sound player)
328
329 TRACE(L"App: Begin ExitInstance\n");
330
331 UnregisterSingleInstance();
332
333 ShutDownSynth();
334
335 if (m_pMIDI) {
336 m_pMIDI->Shutdown();
337 m_pMIDI.reset();
338 }
339
340 if (m_pAccel) {
341 m_pAccel->SaveShortcuts(GetSettings());
342 m_pAccel->Shutdown();
343 m_pAccel.reset();
344 }
345
346 if (m_pSettingsService) {
347 m_pSettingsService->SaveSettings();
348 m_pSettingsService.reset();
349 }
350
351#ifdef SUPPORT_TRANSLATIONS
352 if (m_hInstResDLL) {
353 // Revert back to internal resources
354 AfxSetResourceHandle(m_hInstance);
355 // Unload DLL
356 ::FreeLibrary(m_hInstResDLL);
357 m_hInstResDLL = NULL;
358 }
359#endif
360
361 m_pVersionChecker.reset(); // // //
362
363 TRACE(L"App: End ExitInstance\n");
364
365 return CWinApp::ExitInstance();
366}
367
368BOOL CFamiTrackerApp::PreTranslateMessage(MSG* pMsg)
369{

Callers

nothing calls this directly

Calls 4

SaveShortcutsMethod · 0.80
SaveSettingsMethod · 0.80
ShutdownMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected