| 119 | } |
| 120 | |
| 121 | bool ddgr_surf_Unlock(ddgr_surface *sf, void *ptr) { |
| 122 | bool success; |
| 123 | |
| 124 | switch (LIB_DATA(subsystem)) { |
| 125 | case DDGR_GDIX_SUBSYSTEM: |
| 126 | case DDGR_GDI_SUBSYSTEM: |
| 127 | success = ddgr_gdi_surf_Unlock(sf, ptr); |
| 128 | break; |
| 129 | case DDGR_DX_SUBSYSTEM: |
| 130 | success = ddgr_dx_surf_Unlock(sf, ptr); |
| 131 | break; |
| 132 | default: |
| 133 | Int3(); |
| 134 | } |
| 135 | |
| 136 | if (!success) { |
| 137 | ddgr_FatalError("Failed to unlock surface <%s>", sf->name); |
| 138 | } |
| 139 | |
| 140 | return success; |
| 141 | } |
| 142 | |
| 143 | // attaches an OS handle to a surface |
| 144 | void ddgr_surf_AttachHandle(ddgr_surface *sf, unsigned handle) { |
no test coverage detected