Example #1
0
int GameSettings::save()
{
    if (globalOptions)
        globalOptions->save();

    createProfileFolders();

    checkProfile();

    return 1;
}
Example #2
0
const d3d_format_t* VideoDecoderD3DPrivate::getFormat(const AVCodecContext *avctx, const QVector<GUID> &guids, GUID* selected) const
{
    foreach (const GUID& g, guids) {
        const dxva2_mode_t *mode = Dxva2FindMode(&g);
        if (mode) {
            qDebug("- '%s' is supported by hardware", mode->name);
        } else {
            qDebug("- Unknown GUID = %08X-%04x-%04x-%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x",
                     (unsigned)g.Data1, g.Data2, g.Data3
                   , g.Data4[0], g.Data4[1]
                   , g.Data4[2], g.Data4[3], g.Data4[4], g.Data4[5], g.Data4[6], g.Data4[7]);
        }
    }
    /* Try all supported mode by our priority */
    const dxva2_mode_t *mode = dxva2_modes;
    for (; mode->name; ++mode) {
        if (!mode->codec || mode->codec != avctx->codec_id) {
            qDebug("codec does not match to %s: %s", avcodec_get_name(avctx->codec_id), avcodec_get_name((AVCodecID)mode->codec));
            continue;
        }
        qDebug("D3D found codec: %s. Check runtime support for the codec.", mode->name);
        bool is_supported = false;
        //TODO: find_if
        foreach (const GUID& g, guids) {
            if (IsEqualGUID(*mode->guid, g)) {
                is_supported = true;
                break;
            }
        }
        if (is_supported) {
            qDebug("Check profile support: %s", AVDecoderPrivate::getProfileName(avctx));
            is_supported = checkProfile(mode, avctx->profile);
        }
        if (!is_supported)
            continue;
        int dxfmt = fourccFor(mode->guid);
        if (!dxfmt)
            continue;
        if (selected)
            *selected = *mode->guid;
        return D3dFindFormat(dxfmt);
    }
    return NULL;
}
Example #3
0
void ControlPanel::on_actionStart_Reflow_triggered()
{
	_reflowStartTime.start();
	ui->reflowGraph->clearGraph();
	ui->actionStart_Reflow->setEnabled(false);
	ui->actionStop_Reflow->setEnabled(true);
	_ovenManager->setFilamentsEnabled(true);


	connect(_ovenManager, &OvenManager::readingsRead, this, &ControlPanel::logReadings);

	_nextTarget = _profile.getProfile().constBegin();
	checkProfile();

	_ovenManager->setTargetTemperature(_nextTarget.value());
	ui->statusBar->showMessage(QString("Target temperature: %1C").arg(_nextTarget.value()));

	_reflowTimer->start();
}
Example #4
0
//------------------------------------------------------------------
// set current ac/dc throttle and activate that
//------------------------------------------------------------------
BOOL setState( BOOL ac, BYTE policy )
{
  checkProfile( 1 );

  if( ac )
  {
    acThrottle = policy;
    mach.ProcessorPolicyAc.DynamicThrottle = policy;
  }
  else
  {
    dcThrottle = policy;
    mach.ProcessorPolicyDc.DynamicThrottle = policy;
  }

  if( !WriteProcessorPwrScheme(internalProfile,&mach) )
    return FALSE;

  if( !SetActivePwrScheme(internalProfile,NULL,NULL) )
    return FALSE;  

  return TRUE;
}
Example #5
0
void GameSettings::reloadProfile()
{
    SAFE_DELETE(profileOptions);
    checkProfile();
}