void gpu_free(SceUID uid) { void *mem = NULL; if (sceKernelGetMemBlockBase(uid, &mem) < 0) return; sceGxmUnmapMemory(mem); sceKernelFreeMemBlock(uid); }
int GraphicsDestroy() { if (--_GraphicsRefCount == 0) { #if defined(_WIN32) SelectObject(backDc, NULL); DeleteObject(hBitmap); ReleaseDC(curHwnd, curDc); ReleaseDC(curHwnd, backDc); free(curSurface.data); #elif defined(PLATFORM_PSP2) sceGxmUnmapMemory(fb[0].base); sceGxmUnmapMemory(fb[1].base); sceGxmTerminate(); #endif } return _GraphicsRefCount; }