コード例 #1
0
ファイル: rfdynhud4rf2.cpp プロジェクト: CSharles/rfDynHUD
/**
 * Thread A
 */
void RFDynHUD4rf2InternalsPlugin::Startup( long version )
{
    appRunning = true;
    
    initLogFilename( RFACTOR_PATH, PLUGIN_PATH );
    
    sane = false;
    
    if ( !doSanityCheck() )
        return;
    
    if ( !directInputInitialized )
    {
        logg( "Initializing DirectInput..." );
        if ( !initDirectInput( hWnd ) )
        {
            logg( "ERROR: DirectInput not initialized. Plugin won't work." );
            
            return;
        }
        
        logg( "Successfully initialized DirectInput." );
        directInputInitialized = true;
    }
    
    if ( !global.jvmConn.init( RFACTOR_PATH, PLUGIN_PATH, lastKnownScreenResolutionX, lastKnownScreenResolutionY ) )
        return;
    
    sane = true;
    
    logg( "Starting up rfDynHUD Plugin..." );
    
    global.jvmConn.telemFuncs.call_onStartup();
    
    logg( "Successfully started up rfDynHUD Plugin." );
}
コード例 #2
0
ファイル: DXGame.cpp プロジェクト: brettatoms/robopanic
bool DXGame::initDirectX(HINSTANCE hInstance){
	if(!initDirectDraw()) return FALSE;
	//if(!initDirectSound()) return FALSE;
	if(!initDirectInput(hInstance)) return FALSE;
	return TRUE;
}