MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / InitNet

Function InitNet

pcsx2/DEV9/net.cpp:93–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void InitNet()
94{
95 NetAdapter* na = GetNetAdapter();
96
97 if (!na)
98 {
99 Console.Error("DEV9: Failed to GetNetAdapter()");
100 EmuConfig.DEV9.EthEnable = false;
101 return;
102 }
103
104 nif = na;
105 RxRunning = true;
106
107 rx_thread = std::thread(NetRxThread);
108
109#ifdef _WIN32
110 SetThreadPriority(rx_thread.native_handle(), THREAD_PRIORITY_HIGHEST);
111#elif defined(__POSIX__)
112 int policy = 0;
113 sched_param param;
114
115 pthread_getschedparam(rx_thread.native_handle(), &policy, &param);
116 param.sched_priority = sched_get_priority_max(policy);
117
118 pthread_setschedparam(rx_thread.native_handle(), policy, &param);
119#endif
120}
121
122void ReconfigureLiveNet(const Pcsx2Config& old_config)
123{

Callers 2

DEV9openFunction · 0.85
ReconfigureLiveNetFunction · 0.85

Calls 2

GetNetAdapterFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected