QTfrontend/gameuiconfig.cpp
changeset 7633 d4251e519062
parent 7565 00568d3054d0
child 7672 686ba86ae0e3
equal deleted inserted replaced
7632:81e5e7092023 7633:d4251e519062
   121 }
   121 }
   122 
   122 
   123 void GameUIConfig::reloadVideosValues(void)
   123 void GameUIConfig::reloadVideosValues(void)
   124 {
   124 {
   125     Form->ui.pageVideos->framerateBox->setValue(value("videorec/fps",25).toUInt());
   125     Form->ui.pageVideos->framerateBox->setValue(value("videorec/fps",25).toUInt());
       
   126     Form->ui.pageVideos->bitrateBox->setValue(value("videorec/bitrate",400).toUInt());
   126     bool useGameRes = value("videorec/usegameres",true).toBool();
   127     bool useGameRes = value("videorec/usegameres",true).toBool();
   127     if (useGameRes)
   128     if (useGameRes)
   128     {
   129     {
   129         QRect res = vid_Resolution();
   130         QRect res = vid_Resolution();
   130         Form->ui.pageVideos->widthEdit->setText(QString::number(res.width()));
   131         Form->ui.pageVideos->widthEdit->setText(QString::number(res.width()));
   230     QRect res = rec_Resolution();
   231     QRect res = rec_Resolution();
   231     setValue("videorec/format", AVFormat());
   232     setValue("videorec/format", AVFormat());
   232     setValue("videorec/videocodec", videoCodec());
   233     setValue("videorec/videocodec", videoCodec());
   233     setValue("videorec/audiocodec", audioCodec());
   234     setValue("videorec/audiocodec", audioCodec());
   234     setValue("videorec/fps", rec_Framerate());
   235     setValue("videorec/fps", rec_Framerate());
       
   236     setValue("videorec/bitrate", rec_Bitrate());
   235     setValue("videorec/width", res.width());
   237     setValue("videorec/width", res.width());
   236     setValue("videorec/height", res.height());
   238     setValue("videorec/height", res.height());
   237     setValue("videorec/usegameres", Form->ui.pageVideos->checkUseGameRes->isChecked());
   239     setValue("videorec/usegameres", Form->ui.pageVideos->checkUseGameRes->isChecked());
   238     setValue("videorec/audio", recordAudio());
   240     setValue("videorec/audio", recordAudio());
   239 
   241 
   464 int GameUIConfig::rec_Framerate()
   466 int GameUIConfig::rec_Framerate()
   465 {
   467 {
   466     return Form->ui.pageVideos->framerateBox->value();
   468     return Form->ui.pageVideos->framerateBox->value();
   467 }
   469 }
   468 
   470 
       
   471 int GameUIConfig::rec_Bitrate()
       
   472 {
       
   473     return Form->ui.pageVideos->bitrateBox->value();
       
   474 }
       
   475 
   469 bool GameUIConfig::recordAudio()
   476 bool GameUIConfig::recordAudio()
   470 {
   477 {
   471     return Form->ui.pageVideos->checkRecordAudio->isChecked();
   478     return Form->ui.pageVideos->checkRecordAudio->isChecked();
   472 }
   479 }