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

Function curses_preference_update

win/curses/cursmain.c:1235–1253  ·  view source on GitHub ↗

preference_update(preference) -- The player has just changed one of the wincap preference settings, and the NetHack core is notifying your window port of that change. If your window-port is capable of dynamically adjusting to the change then it should do so. Your window-port will only be notified of a part

Source from the content-addressed store, hash-verified

1233 corresponding bit in the wincap mask.
1234*/
1235void
1236curses_preference_update(const char *pref)
1237{
1238 boolean redo_main = FALSE, redo_status = FALSE;
1239
1240 if (!strcmp(pref, "align_status")
1241 || !strcmp(pref, "statuslines")
1242 || !strcmp(pref, "windowborders"))
1243 redo_main = redo_status = TRUE;
1244 else if (!strcmp(pref, "hilite_status"))
1245 redo_status = TRUE;
1246 else if (!strcmp(pref, "align_message"))
1247 redo_main = TRUE;
1248 else if (!strcmp(pref, "mouse_support"))
1249 curses_mouse_support(iflags.wc_mouse_support);
1250
1251 if (redo_main || redo_status)
1252 curs_reset_windows(redo_main, redo_status);
1253}
1254
1255void
1256curs_reset_windows(boolean redo_main, boolean redo_status)

Callers

nothing calls this directly

Calls 2

curses_mouse_supportFunction · 0.85
curs_reset_windowsFunction · 0.85

Tested by

no test coverage detected