mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-27 01:54:44 +01:00
add lower limit to network source samplerate
This commit is contained in:
parent
a728403a3f
commit
7f002f6276
@ -250,7 +250,10 @@ private:
|
||||
// Samplerate selector
|
||||
SmGui::LeftLabel("Samplerate");
|
||||
SmGui::FillWidth();
|
||||
SmGui::InputInt(("##network_source_sr_" + _this->name).c_str(), &_this->tempSamplerate);
|
||||
if (SmGui::InputInt(("##network_source_sr_" + _this->name).c_str(), &_this->tempSamplerate)) {
|
||||
// Prevent silly values from silly users
|
||||
_this->tempSamplerate = std::max<int>(_this->tempSamplerate, 1000);
|
||||
}
|
||||
bool applyEn = (!_this->running && _this->tempSamplerate != _this->samplerate);
|
||||
if (!applyEn) { SmGui::BeginDisabled(); }
|
||||
SmGui::FillWidth();
|
||||
|
Loading…
x
Reference in New Issue
Block a user