add 25 FPS to 'common FPS' list, clean up window initialization for it

master
jp9000 2013-12-22 23:45:47 -07:00
parent 399b0c8d10
commit 5f6cf61449
4 changed files with 14 additions and 23 deletions

View File

@ -556,15 +556,16 @@ OBSBasicSettingsBase::OBSBasicSettingsBase( wxWindow* parent, wxWindowID id, con
wxBoxSizer* bSizer45;
bSizer45 = new wxBoxSizer( wxHORIZONTAL );
fpsCommonList = new wxComboBox( m_panel13, ID_FPS_COMMON, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
fpsCommonList = new wxComboBox( m_panel13, ID_FPS_COMMON, _("30"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
fpsCommonList->Append( _("10") );
fpsCommonList->Append( _("20") );
fpsCommonList->Append( _("25") );
fpsCommonList->Append( _("29.97") );
fpsCommonList->Append( _("30") );
fpsCommonList->Append( _("48") );
fpsCommonList->Append( _("59.94") );
fpsCommonList->Append( _("60") );
fpsCommonList->SetSelection( 3 );
fpsCommonList->SetSelection( 4 );
bSizer45->Add( fpsCommonList, 0, wxTOP|wxBOTTOM|wxRIGHT, 2 );

View File

@ -4929,7 +4929,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;10&quot; &quot;20&quot; &quot;29.97&quot; &quot;30&quot; &quot;48&quot; &quot;59.94&quot; &quot;60&quot;</property>
<property name="choices">&quot;10&quot; &quot;20&quot; &quot;25&quot; &quot;29.97&quot; &quot;30&quot; &quot;48&quot; &quot;59.94&quot; &quot;60&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -4959,7 +4959,7 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">3</property>
<property name="selection">4</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxCB_READONLY</property>
@ -4970,7 +4970,7 @@
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="value">30</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>

View File

@ -227,6 +227,9 @@ void OBSApp::GetFPSCommon(uint32_t &num, uint32_t &den) const
} else if (strcmp(val, "20") == 0) {
num = 20;
den = 1;
} else if (strcmp(val, "25") == 0) {
num = 25;
den = 1;
} else if (strcmp(val, "29.97") == 0) {
num = 30000;
den = 1001;

View File

@ -196,26 +196,13 @@ void BasicVideoData::LoadFPSData()
void BasicVideoData::LoadFPSCommon()
{
const char *str = config_get_string(GetGlobalConfig(), "Video",
const char *val = config_get_string(GetGlobalConfig(), "Video",
"FPSCommon");
int val = 3;
if (strcmp(str, "10") == 0)
val = 0;
else if (strcmp(str, "20") == 0)
val = 1;
else if (strcmp(str, "29.97") == 0)
val = 2;
else if (strcmp(str, "30") == 0)
val = 3;
else if (strcmp(str, "48") == 0)
val = 4;
else if (strcmp(str, "59.94") == 0)
val = 5;
else if (strcmp(str, "60") == 0)
val = 6;
window->fpsCommonList->SetSelection(val);
int sel = window->fpsCommonList->FindString(val);
if (sel == wxNOT_FOUND)
sel = window->fpsCommonList->FindString("30");
window->fpsCommonList->SetSelection(sel);
}
void BasicVideoData::LoadFPSInteger()