MCPcopy Create free account
hub / github.com/TASEmulators/fceux / closeApp

Method closeApp

src/drivers/Qt/ConsoleWindow.cpp:2282–2315  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2280}
2281//---------------------------------------------------------------------------
2282void consoleWin_t::closeApp(void)
2283{
2284 nes_shm->runEmulator = 0;
2285
2286 gameTimer->stop();
2287
2288 closeGamePadConfWindow();
2289
2290 emulatorThread->quit();
2291 emulatorThread->wait( 1000 );
2292
2293 aviDiskThread->requestInterruption();
2294 aviDiskThread->quit();
2295 aviDiskThread->wait( 10000 );
2296
2297 if ( tasWin != NULL )
2298 {
2299 tasWin->requestWindowClose();
2300 }
2301
2302 FCEU_WRAPPER_LOCK();
2303 fceuWrapperClose();
2304 FCEU_WRAPPER_UNLOCK();
2305
2306 // LoadGame() checks for an IP and if it finds one begins a network session
2307 // clear the NetworkIP field so this doesn't happen unintentionally
2308 g_config->setOption ("SDL.NetworkIP", "");
2309 g_config->save ();
2310
2311 QApplication::closeAllWindows();
2312
2313 // Delay Application Quit to allow event processing to complete
2314 QTimer::singleShot( 250, qApp, SLOT(quit(void)) );
2315}
2316//---------------------------------------------------------------------------
2317void consoleWin_t::videoBgColorChanged( QColor &c )
2318{

Callers

nothing calls this directly

Calls 5

closeGamePadConfWindowFunction · 0.85
fceuWrapperCloseFunction · 0.85
requestWindowCloseMethod · 0.80
setOptionMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected