示例#1
0
文件: gfx.c 项目: Slashmolder/ctrulib
void gfxExit()
{
	// Exit event handler
	gspExitEventHandler();

	// Free framebuffers
	linearFree(gfxTopRightFramebuffers[1]);
	linearFree(gfxTopRightFramebuffers[0]);
	linearFree(gfxBottomFramebuffers[1]);
	linearFree(gfxBottomFramebuffers[0]);
	linearFree(gfxTopLeftFramebuffers[1]);
	linearFree(gfxTopLeftFramebuffers[0]);

	//unmap GSP shared mem
	svcUnmapMemoryBlock(gspSharedMemHandle, 0x10002000);

	GSPGPU_UnregisterInterruptRelayQueue(NULL);

	svcCloseHandle(gspSharedMemHandle);
	svcCloseHandle(gspEvent);

	GSPGPU_ReleaseRight(NULL);

	gspExit();
}
示例#2
0
文件: gfx.c 项目: Voka/lpp-3ds
void gfxExit(void)
{
	if (screenFree == NULL) return;

	// Exit event handler
	gspExitEventHandler();

	// Free framebuffers
	screenFree(gfxTopRightFramebuffers[1]);
	screenFree(gfxTopRightFramebuffers[0]);
	screenFree(gfxBottomFramebuffers[1]);
	screenFree(gfxBottomFramebuffers[0]);
	screenFree(gfxTopLeftFramebuffers[1]);
	screenFree(gfxTopLeftFramebuffers[0]);

	//unmap GSP shared mem
	svcUnmapMemoryBlock(gspSharedMemHandle, (u32)gfxSharedMemory);

	GSPGPU_UnregisterInterruptRelayQueue();

	svcCloseHandle(gspSharedMemHandle);
	if(gfxSharedMemory != NULL)
	{
		mappableFree(gfxSharedMemory);
		gfxSharedMemory = NULL;
	}

	svcCloseHandle(gspEvent);

	GSPGPU_ReleaseRight();

	gspExit();

	screenFree = NULL;
}
示例#3
0
文件: main.c 项目: Tybus/3Dfrogr
void gspGpuExit()
{
	GSPGPU_UnregisterInterruptRelayQueue(NULL);

	//unmap GSP shared mem
	svc_unmapMemoryBlock(gspSharedMemHandle, 0x10002000);
	svc_closeHandle(gspSharedMemHandle);
	svc_closeHandle(gspEvent);

	gspExit();

	//free GSP heap
	svc_controlMemory((u32*)&gspHeap, (u32)gspHeap, 0x0, 0x2000000, MEMOP_FREE, 0x0);
}
示例#4
0
D3DSDevice::~D3DSDevice()
{
    if (nullptr==dealloc)
        return; // should not happen!

    gspExitEventHandler();

    dealloc( m_FBBottom[0] );
    dealloc( m_FBBottom[1] );
    dealloc( m_FBTop[0] );
    dealloc( m_FBTop[1] );
    if (m_b3DEnabled)
    {
        dealloc( m_FBTop[2] );
        dealloc( m_FBTop[3] );
    }

    svcUnmapMemoryBlock( m_hGSPSharedMemory, 
                         (u32)m_pSharedMemory );

    GSPGPU_UnregisterInterruptRelayQueue();

    svcCloseHandle( m_hGSPSharedMemory );
    if (nullptr!=m_pSharedMemory)
    {
        mappableFree( m_pSharedMemory );
        m_pSharedMemory = nullptr;
    }

    svcCloseHandle( m_hGSPEvent );

    GSPGPU_ReleaseRight();

    gspExit();

    dealloc = nullptr;
}