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

Function use_port

outdated/sys/mac/mactty.c:419–436  ·  view source on GitHub ↗

* Restore current port/world after a save */

Source from the content-addressed store, hash-verified

417 * Restore current port/world after a save
418 */
419static void
420use_port(tty_record *record, void *port)
421{
422 if (record->uses_gworld) {
423 PixMapHandle pix_map;
424
425 SetGWorld((GWorldPtr) port, (GDHandle) 0);
426 pix_map = GetGWorldPixMap(record->offscreen_world);
427 if (pix_map) {
428 if (port == record->offscreen_world)
429 LockPixels(pix_map);
430 else
431 UnlockPixels(pix_map);
432 }
433 } else {
434 SetPort((GrafPtr) port);
435 }
436}
437
438/*
439 * Use offscreen drawing - lock the pixels through use_port

Callers 3

select_offscreen_portFunction · 0.85
select_onscreen_windowFunction · 0.85
curs_posFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected