MCPcopy Create free account
hub / github.com/NetHack/NetHack / mswin_main_loop

Function mswin_main_loop

win/win32/mswproc.c:2151–2177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2149}
2150
2151void
2152mswin_main_loop(void)
2153{
2154 while (!mswin_have_input()) {
2155 MSG msg;
2156
2157 mswin_map_update(mswin_hwnd_from_winid(WIN_MAP));
2158
2159 if (!iflags.debug_fuzzer || PeekMessage(&msg, NULL, 0, 0, FALSE)) {
2160 if(GetMessage(&msg, NULL, 0, 0) != 0) {
2161 if (GetNHApp()->regNetHackMode
2162 || !TranslateAccelerator(msg.hwnd, GetNHApp()->hAccelTable,
2163 &msg)) {
2164 TranslateMessage(&msg);
2165 DispatchMessage(&msg);
2166 }
2167 } else {
2168 /* WM_QUIT */
2169 break;
2170 }
2171 } else {
2172 nhassert(iflags.debug_fuzzer);
2173 PostMessage(GetNHApp()->hMainWnd, WM_MSNH_COMMAND,
2174 MSNH_MSG_RANDOM_INPUT, 0);
2175 }
2176 }
2177}
2178
2179/* clean up and quit */
2180void

Callers 2

mswin_nhgetchFunction · 0.70
mswin_nh_poskeyFunction · 0.70

Calls 4

mswin_map_updateFunction · 0.85
mswin_have_inputFunction · 0.70
mswin_hwnd_from_winidFunction · 0.70
GetNHAppFunction · 0.70

Tested by

no test coverage detected