mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-25 20:07:51 +02:00
Potential fix for windows 7 not detecting the home key and the radio not saving the bandwidth when set through the frequency manager
This commit is contained in:
@ -82,8 +82,9 @@ namespace displaymenu {
|
||||
|
||||
void draw(void* ctx) {
|
||||
float menuWidth = ImGui::GetContentRegionAvailWidth();
|
||||
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall) || ImGui::IsKeyPressed(GLFW_KEY_HOME, false)) {
|
||||
if (ImGui::IsKeyPressed(GLFW_KEY_HOME, false)) { showWaterfall = !showWaterfall; }
|
||||
bool homePressed = ImGui::IsKeyPressed(GLFW_KEY_HOME, false);
|
||||
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall) || homePressed) {
|
||||
if (homePressed) { showWaterfall = !showWaterfall; }
|
||||
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
|
||||
core::configManager.acquire();
|
||||
core::configManager.conf["showWaterfall"] = showWaterfall;
|
||||
|
@ -389,8 +389,9 @@ namespace ImGui {
|
||||
}
|
||||
|
||||
// If the left and right keys are pressed while hovering the freq scale, move it too
|
||||
if ((ImGui::IsKeyPressed(GLFW_KEY_LEFT) || ImGui::IsKeyPressed(GLFW_KEY_RIGHT)) && mouseInFreq) {
|
||||
viewOffset += ImGui::IsKeyPressed(GLFW_KEY_LEFT) ? (viewBandwidth / 20.0) : (-viewBandwidth / 20.0);
|
||||
bool leftKeyPressed = ImGui::IsKeyPressed(GLFW_KEY_LEFT);
|
||||
if ((leftKeyPressed || ImGui::IsKeyPressed(GLFW_KEY_RIGHT)) && mouseInFreq) {
|
||||
viewOffset += leftKeyPressed ? (viewBandwidth / 20.0) : (-viewBandwidth / 20.0);
|
||||
|
||||
if (viewOffset + (viewBandwidth / 2.0) > wholeBandwidth / 2.0) {
|
||||
double freqOffset = (viewOffset + (viewBandwidth / 2.0)) - (wholeBandwidth / 2.0);
|
||||
|
Reference in New Issue
Block a user