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:
Ryzerth
2021-07-31 21:00:47 +02:00
parent 85eb08e422
commit f16c296f38
12 changed files with 73 additions and 4 deletions

View File

@ -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);