* Restore current port/world after a save */
| 417 | * Restore current port/world after a save |
| 418 | */ |
| 419 | static void |
| 420 | use_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 |
no outgoing calls
no test coverage detected