mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-04-05 02:58:44 -04:00
Mousewheel fix for non-OSX, AM reset tweak
This commit is contained in:
parent
93e88a9208
commit
aa13aa2e16
@ -113,9 +113,9 @@ void DemodulatorThread::threadMain() {
|
||||
audioResampler = inp->audioResampler;
|
||||
stereoResampler = inp->stereoResampler;
|
||||
|
||||
ampmodem_reset(demodAM_USB);
|
||||
ampmodem_reset(demodAM_LSB);
|
||||
ampmodem_reset(demodAM_DSB_CSP);
|
||||
if (demodAM) {
|
||||
ampmodem_reset(demodAM);
|
||||
}
|
||||
freqdem_reset(demodFM);
|
||||
}
|
||||
|
||||
@ -352,18 +352,23 @@ void DemodulatorThread::threadMain() {
|
||||
if (newDemodType != DEMOD_TYPE_NULL) {
|
||||
switch (newDemodType) {
|
||||
case DEMOD_TYPE_FM:
|
||||
freqdem_reset(demodFM);
|
||||
break;
|
||||
case DEMOD_TYPE_LSB:
|
||||
demodAM = demodAM_USB;
|
||||
ampmodem_reset(demodAM);
|
||||
break;
|
||||
case DEMOD_TYPE_USB:
|
||||
demodAM = demodAM_LSB;
|
||||
ampmodem_reset(demodAM);
|
||||
break;
|
||||
case DEMOD_TYPE_DSB:
|
||||
demodAM = demodAM_DSB;
|
||||
ampmodem_reset(demodAM);
|
||||
break;
|
||||
case DEMOD_TYPE_AM:
|
||||
demodAM = demodAM_DSB_CSP;
|
||||
ampmodem_reset(demodAM);
|
||||
break;
|
||||
}
|
||||
demodulatorType = newDemodType;
|
||||
|
@ -95,7 +95,6 @@ void TuningCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||
|
||||
void TuningCanvas::OnMouseDown(wxMouseEvent& event) {
|
||||
InteractiveCanvas::OnMouseDown(event);
|
||||
mouseTracker.setHorizDragLock(true);
|
||||
mouseTracker.setVertDragLock(true);
|
||||
|
||||
uxDown = 2.0 * (mouseTracker.getMouseX() - 0.5);
|
||||
@ -110,7 +109,6 @@ void TuningCanvas::OnMouseWheelMoved(wxMouseEvent& event) {
|
||||
|
||||
void TuningCanvas::OnMouseReleased(wxMouseEvent& event) {
|
||||
InteractiveCanvas::OnMouseReleased(event);
|
||||
mouseTracker.setHorizDragLock(false);
|
||||
mouseTracker.setVertDragLock(false);
|
||||
SetCursor (wxCURSOR_SIZEWE);
|
||||
}
|
||||
|
@ -680,7 +680,11 @@ void WaterfallCanvas::OnMouseWheelMoved(wxMouseEvent& event) {
|
||||
InteractiveCanvas::OnMouseWheelMoved(event);
|
||||
float movement = (float)event.GetWheelRotation() / (float)event.GetLinesPerAction();
|
||||
|
||||
#ifdef __APPLE__
|
||||
mouseZoom = 1.0f - movement/100.0f;
|
||||
#else
|
||||
mouseZoom = 1.0f - movement/1000.0f;
|
||||
#endif
|
||||
}
|
||||
|
||||
void WaterfallCanvas::OnMouseReleased(wxMouseEvent& event) {
|
||||
|
Loading…
Reference in New Issue
Block a user