[vlmc-devel] Project: Actually change the backend fps if the setting value "fps" is changed
Yikai Lu
git at videolan.org
Tue Jun 20 17:55:52 CEST 2017
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Jun 20 23:28:57 2017 +0900| [702f23c0e7d3cec72657b0d8d5e81cf4c525e845] | committer: Yikai Lu
Project: Actually change the backend fps if the setting value "fps" is changed
> https://code.videolan.org/videolan/vlmc/commit/702f23c0e7d3cec72657b0d8d5e81cf4c525e845
---
src/Project/Project.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/Project/Project.cpp b/src/Project/Project.cpp
index 8ca3bba3..886b9ccb 100644
--- a/src/Project/Project.cpp
+++ b/src/Project/Project.cpp
@@ -220,7 +220,12 @@ Project::initSettings()
QT_TRANSLATE_NOOP( "PreferenceWidget", "The project name" ),
SettingValue::NotEmpty );
connect( pName, &SettingValue::changed, this, [this]( const QVariant& var ){ emit projectNameChanged( var.toString() ); } );
- connect( fps, &SettingValue::changed, this, [this]( const QVariant& var ){ emit fpsChanged( var.toDouble() ); } );
+ connect( fps, &SettingValue::changed, this, [this]( const QVariant& var )
+ {
+ const auto fpsV = var.toDouble();
+ emit fpsChanged( fpsV );
+ Backend::instance()->profile().setFrameRate( static_cast<int>( fpsV * 1000 ), 1000 );
+ } );
}
void
More information about the Vlmc-devel
mailing list