MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddgr_surf_Unlock

Function ddgr_surf_Unlock

dd_grwin32/ddgrWin32API.cpp:121–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121bool 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
144void ddgr_surf_AttachHandle(ddgr_surface *sf, unsigned handle) {

Callers 1

unlockMethod · 0.85

Calls 3

ddgr_gdi_surf_UnlockFunction · 0.85
ddgr_dx_surf_UnlockFunction · 0.85
ddgr_FatalErrorFunction · 0.85

Tested by

no test coverage detected