flips the buffers in a surface. really only useful for video screens */
| 208 | /* flips the buffers in a surface. really only useful for video screens |
| 209 | */ |
| 210 | bool ddgr_surf_FlipVideo(ddgr_surface *sf) { |
| 211 | bool success; |
| 212 | |
| 213 | // don't report error if there's no backbuffer. |
| 214 | if (!(sf->flags & SURFFLAG_BACKBUFFER)) |
| 215 | return true; |
| 216 | |
| 217 | switch (LIB_DATA(subsystem)) { |
| 218 | case DDGR_GDIX_SUBSYSTEM: |
| 219 | case DDGR_GDI_SUBSYSTEM: |
| 220 | success = ddgr_gdi_surf_FlipVideo(sf); |
| 221 | break; |
| 222 | case DDGR_DX_SUBSYSTEM: |
| 223 | success = ddgr_dx_surf_FlipVideo(sf); |
| 224 | break; |
| 225 | default: |
| 226 | Int3(); |
| 227 | } |
| 228 | |
| 229 | if (!success) { |
| 230 | ddgr_FatalError("Failed to flip surface <%s>", sf->name); |
| 231 | } |
| 232 | |
| 233 | return success; |
| 234 | } |
| 235 | |
| 236 | /* graphic primatives |
| 237 | */ |
no test coverage detected