Ejemplo n.º 1
0
//  TwEventSDL returns zero if msg has not been handled or the SDL version 
//  is not supported, and a non-zero value if it has been handled by the 
//  AntTweakBar library.
int TW_CALL TwEventSDL(const void *sdlEvent, unsigned char majorVersion, unsigned char minorVersion)
{
    if (majorVersion < 1 || (majorVersion == 1 && minorVersion < 2))
    {
        static const char *g_ErrBadSDLVersion = "Unsupported SDL version";
        TwSetLastError(g_ErrBadSDLVersion);
        return 0;
    }
    else if (majorVersion == 1 && minorVersion == 2)
        return TwEventSDL12(sdlEvent);
    else // if( majorVersion==1 && minorVersion==3 ) 
        return TwEventSDL13(sdlEvent); // will probably not work for version > 1.3, but give it a chance
}
Ejemplo n.º 2
0
//  TwEventSDL returns zero if msg has not been handled or the SDL version 
//  is not supported, and a non-zero value if it has been handled by the 
//  AntTweakBar library.
int TW_CALL TwEventSDL(const void *sdlEvent, unsigned char majorVersion, unsigned char minorVersion)
{
    if (majorVersion < 1 || (majorVersion == 1 && minorVersion < 2))
    {
        static const char *g_ErrBadSDLVersion = "Unsupported SDL version";
        TwSetLastError(g_ErrBadSDLVersion);
        return 0;
    }
    else if (majorVersion == 1 && minorVersion == 2)
        return TwEventSDL12(sdlEvent);
    else if( majorVersion==1 && minorVersion==3 ) 
        return TwEventSDL13(sdlEvent);
    else 
        return TwEventSDL20(sdlEvent);
}