예제 #1
0
파일: utils.c 프로젝트: xerpi/libvita2d
void gpu_free(SceUID uid)
{
	void *mem = NULL;
	if (sceKernelGetMemBlockBase(uid, &mem) < 0)
		return;
	sceGxmUnmapMemory(mem);
	sceKernelFreeMemBlock(uid);
}
예제 #2
0
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;
}