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

Method init

src/drivers/Qt/ConsoleWindow.cpp:4662–4696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4660
4661
4662void emulatorThread_t::init(void)
4663{
4664 int opt;
4665
4666 #if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
4667 if ( pthread_self() == (pthread_t)QThread::currentThreadId() )
4668 {
4669 pself = pthread_self();
4670 //printf("EMU is using PThread: %p\n", (void*)pself);
4671 }
4672 #endif
4673
4674 #if defined(__linux__)
4675 pid = gettid();
4676 #elif defined(__APPLE__) || defined(__unix__)
4677 pid = getpid();
4678 #endif
4679
4680 g_config->getOption( "SDL.SetSchedParam", &opt );
4681
4682 if ( opt )
4683 {
4684 #ifndef WIN32
4685 int policy, prio, nice;
4686
4687 g_config->getOption( "SDL.EmuSchedPolicy", &policy );
4688 g_config->getOption( "SDL.EmuSchedPrioRt", &prio );
4689 g_config->getOption( "SDL.EmuSchedNice" , &nice );
4690
4691 setNicePriority( nice );
4692
4693 setSchedParam( policy, prio );
4694 #endif
4695 }
4696}
4697
4698void emulatorThread_t::setPriority( QThread::Priority priority_req )
4699{

Callers 3

videoInitMethod · 0.45
initHotKeysMethod · 0.45
loadVideoDriverMethod · 0.45

Calls 1

getOptionMethod · 0.80

Tested by

no test coverage detected