Makes sure the frame buffer has been cleared prior to a write
| 112 | |
| 113 | // Makes sure the frame buffer has been cleared prior to a write |
| 114 | void clearFB(void) |
| 115 | { |
| 116 | #ifdef _WIN32 |
| 117 | |
| 118 | if(wh) |
| 119 | { |
| 120 | HDC hdc = 0; RECT rect; |
| 121 | TRY_W32(hdc = GetDC(wh)); |
| 122 | TRY_W32(GetClientRect(wh, &rect)); |
| 123 | TRY_W32(PatBlt(hdc, 0, 0, rect.right, rect.bottom, BLACKNESS)); |
| 124 | TRY_W32(ReleaseDC(wh, hdc)); |
| 125 | } |
| 126 | |
| 127 | #else |
| 128 | |
| 129 | if(wh.dpy && wh.d && !doPixmap) |
| 130 | { |
| 131 | XSetWindowBackground(wh.dpy, wh.d, |
| 132 | BlackPixel(wh.dpy, DefaultScreen(wh.dpy))); |
| 133 | XClearWindow(wh.dpy, wh.d); |
| 134 | XSync(wh.dpy, False); |
| 135 | } |
| 136 | |
| 137 | #endif |
| 138 | } |
| 139 | |
| 140 | |
| 141 | // Platform-specific write test |
no outgoing calls
no test coverage detected