Ejemplo n.º 1
0
DWORD WINAPI RSP_ThreadProc( LPVOID lpParameter )
{
    RSP_Init();

    SetEvent( RSP.threadFinished );
#ifndef _DEBUG
    __try
    {
#endif
        while (TRUE)
        {
            switch (WaitForMultipleObjects( 6, RSP.threadMsg, FALSE, INFINITE ))
            {
            case (WAIT_OBJECT_0 + RSPMSG_PROCESSDLIST):
                RSP_ProcessDList();
                break;
            case (WAIT_OBJECT_0 + RSPMSG_UPDATESCREEN):
                VI_UpdateScreen();
                break;
            case (WAIT_OBJECT_0 + RSPMSG_CLOSE):
                OGL_Stop();
                SetEvent( RSP.threadFinished );
                return 1;
            case (WAIT_OBJECT_0 + RSPMSG_DESTROYTEXTURES):
                Combiner_Destroy();
                FrameBuffer_Destroy();
                TextureCache_Destroy();
                break;
            case (WAIT_OBJECT_0 + RSPMSG_INITTEXTURES):
                FrameBuffer_Init();
                TextureCache_Init();
                Combiner_Init();
                gSP.changed = gDP.changed = 0xFFFFFFFF;
                break;
            case (WAIT_OBJECT_0 + RSPMSG_CAPTURESCREEN):
                OGL_SaveScreenshot();
                break;
            }
            SetEvent( RSP.threadFinished );
        }
#ifndef _DEBUG
    }
    __except(EXCEPTION_EXECUTE_HANDLER)
    {
        char exception[256];
        sprintf( exception, "Win32 exception 0x%08X occured in glN64", GetExceptionCode() );
        MessageBox( NULL, exception, pluginName, MB_OK | MB_ICONERROR );

        GBI_Destroy();
        DepthBuffer_Destroy();
        OGL_Stop();
    }
#endif
    RSP.thread = NULL;
    return 0;
}
Ejemplo n.º 2
0
void gles2n64_reset(void)
{
   // HACK: Check for leaks!
   OGL_Stop();
   OGL_Start();
   RSP_Init();
}
Ejemplo n.º 3
0
int RSP_ThreadProc(void *param)
{
    RSP_Init();
    while(true)
    {
        int num = 0;

        RSP.threadIdle = RSP.threadEvents.empty();

        //process all events
        while(!RSP.threadEvents.empty())
        {
            switch (RSP.threadEvents.front())
            {
                case (RSPMSG_PROCESSDLIST):
                    RSP_ProcessDList();
                    break;
                case (RSPMSG_UPDATESCREEN):
                    VI_UpdateScreen();
                    break;
                case (RSPMSG_CLOSE):
                    OGL_Stop();
                    return 0;
                    break;
                case (RSPMSG_DESTROYTEXTURES):
                    Combiner_Destroy();
                    TextureCache_Destroy();
                    break;
                case (RSPMSG_INITTEXTURES):
                    TextureCache_Init();
                    Combiner_Init();
                    gSP.changed = gDP.changed = 0xFFFFFFFF;
                    break;
                case (RSPMSG_CAPTURESCREEN):
                    OGL_SaveScreenshot();
                    break;
            }
            RSP.threadEvents.pop();
            num++;
        }
    }

    return 0;
}
Ejemplo n.º 4
0
EXPORT m64p_error CALL PluginShutdown(void)
{
   OGL_Stop();  // paulscode, OGL_Stop missing from Yongzh's code
   return M64ERR_SUCCESS; // __LIBRETRO__: Fix warning
}
Ejemplo n.º 5
0
EXPORT void CALL StopGL(void)
{
   OGL_Stop();
}
Ejemplo n.º 6
0
EXPORT m64p_error CALL PluginShutdown(void)
{
    OGL_Stop();  // paulscode, OGL_Stop missing from Yongzh's code
}
EXPORT m64p_error CALL PluginShutdown(void)
{
    OGL_Stop();  // paulscode, OGL_Stop missing from Yongzh's code
    if (CoreVideo_Quit) CoreVideo_Quit();
	return M64ERR_SUCCESS;
}