GCI2012: Check for Non-Standard Recorder Framerate
authorO. Michael Hartman
Sun, 02 Dec 2012 15:23:59 +0100
changeset 8185 1c3739ba4352
parent 8184 e0c8fad98022
child 8186 4ff8690df1b0
GCI2012: Check for Non-Standard Recorder Framerate
QTfrontend/gameuiconfig.cpp
QTfrontend/ui/page/pagevideos.cpp
QTfrontend/ui/page/pagevideos.h
--- a/QTfrontend/gameuiconfig.cpp	Sun Dec 02 14:51:54 2012 +0100
+++ b/QTfrontend/gameuiconfig.cpp	Sun Dec 02 15:23:59 2012 +0100
@@ -141,7 +141,8 @@
 
 void GameUIConfig::reloadVideosValues(void)
 {
-    Form->ui.pageVideos->framerateBox->setValue(value("videorec/fps",25).toUInt());
+    Form->ui.pageVideos->framerateBox->setCurrentIndex(1); //set to 25 fps
+
     Form->ui.pageVideos->bitrateBox->setValue(value("videorec/bitrate",400).toUInt());
     bool useGameRes = value("videorec/usegameres",true).toBool();
     if (useGameRes)
@@ -529,7 +530,7 @@
 
 int GameUIConfig::rec_Framerate()
 {
-    return Form->ui.pageVideos->framerateBox->value();
+    return Form->ui.pageVideos->framerateBox->itemData(Form->ui.pageVideos->framerateBox->currentIndex()).toUInt();
 }
 
 int GameUIConfig::rec_Bitrate()
--- a/QTfrontend/ui/page/pagevideos.cpp	Sun Dec 02 14:51:54 2012 +0100
+++ b/QTfrontend/ui/page/pagevideos.cpp	Sun Dec 02 15:23:59 2012 +0100
@@ -198,9 +198,12 @@
         pOptLayout->addWidget(labelFramerate, 6, 0);
 
         // framerate
-        framerateBox = new QSpinBox(pOptionsGroup);
-        framerateBox->setRange(1, 200);
-        framerateBox->setSingleStep(1);
+        framerateBox = new QComboBox(pOptionsGroup);
+        framerateBox->addItem("24 fps", 24);
+        framerateBox->addItem("25 fps", 25);
+        framerateBox->addItem("30 fps", 30);
+        framerateBox->addItem("50 fps", 50);
+        framerateBox->addItem("60 fps", 60);
         pOptLayout->addWidget(framerateBox, 6, 1);
 
         // label for Bitrate
@@ -448,7 +451,7 @@
 
 void PageVideos::setDefaultOptions()
 {
-    framerateBox->setValue(30);
+    framerateBox->setCurrentIndex(2); //set to 30fps
     bitrateBox->setValue(1000);
     checkRecordAudio->setChecked(true);
     checkUseGameRes->setChecked(true);
--- a/QTfrontend/ui/page/pagevideos.h	Sun Dec 02 14:51:54 2012 +0100
+++ b/QTfrontend/ui/page/pagevideos.h	Sun Dec 02 15:23:59 2012 +0100
@@ -36,7 +36,7 @@
     public:
         PageVideos(QWidget* parent = 0);
 
-        QSpinBox  *framerateBox;
+        QComboBox  *framerateBox;
         QSpinBox  *bitrateBox;
         QLineEdit *widthEdit;
         QLineEdit *heightEdit;