Esempio n. 1
0
void VirtualTerminal::init()
{
    auto logind = LogindIntegration::self();
    if (logind->vt() != -1) {
        setup(logind->vt());
    }
    connect(logind, &LogindIntegration::virtualTerminalChanged, this, &VirtualTerminal::setup);
    if (logind->isConnected()) {
        logind->takeControl();
    } else {
        connect(logind, &LogindIntegration::connectedChanged, logind, &LogindIntegration::takeControl);
    }
}
Esempio n. 2
0
void Fly::posUpdate(float axisX, float axisY){
    takeControl((axisX != 0 || axisY != 0));

    dX = axisX;
    dY = axisY;



    if(dY >= 0)
        angle =   PI/2. - atan(dX/dY);
    if(dY < 0)
        angle = -PI/2. - atan(dX/dY) ;


}