提交 5f6cf614 编写于 作者: J jp9000

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

上级 399b0c8d
......@@ -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 );
......
......@@ -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>
......
......@@ -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;
......
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册