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

Function CloseShWindow

sys/amiga/amiwind.c:128–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126 */
127
128void
129CloseShWindow(struct Window *win)
130{
131 struct IntuiMessage *msg;
132
133 if (!HackPort)
134 panic("HackPort NULL in CloseShWindow");
135 if (!win)
136 return;
137
138 Forbid();
139 /* Flush all messages for all windows to avoid typeahead and other
140 * similar problems...
141 */
142 while (msg = (struct IntuiMessage *) GetMsg(win->UserPort))
143 ReplyMsg((struct Message *) msg);
144 KbdBuffered = 0;
145 win->UserPort = (struct MsgPort *) 0;
146 ModifyIDCMP(win, 0L);
147 Permit();
148 CloseWindow(win);
149}
150
151static int
152BufferGetchar(void)

Callers 3

dismiss_nhwindowFunction · 0.85
amii_player_selectionFunction · 0.85
RandomWindowFunction · 0.85

Calls 1

panicFunction · 0.70

Tested by

no test coverage detected