Font preloader, new demod no-move drag fix

This commit is contained in:
Charles J. Cliffe 2014-12-16 21:03:45 -05:00
parent 02cf2099a9
commit 912ef930a2
3 changed files with 9 additions and 6 deletions

View File

@ -1,7 +1,7 @@
#pragma once
#define BUF_SIZE (16384*3)
#define SRATE 1500000
#define BUF_SIZE (16384*4)
#define SRATE 2500000
#define FFT_SIZE 2048
#define DEFAULT_FREQ 98900000

View File

@ -54,7 +54,10 @@ void PrimaryGLContext::CheckGLError() {
PrimaryGLContext::PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext) :
wxGLContext(canvas, sharedContext) {
SetCurrent(*canvas);
// Pre-load fonts
for (int i = 0; i < GLFONT_MAX; i++) {
getFont((GLFontSize)i);
}
CheckGLError();
}

View File

@ -444,7 +444,7 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
demod->run();
wxGetApp().bindDemodulator(demod);
wxGetApp().getDemodMgr().setActiveDemodulator(demod);
wxGetApp().getDemodMgr().setActiveDemodulator(demod,false);
}
if (demod == NULL) {
@ -474,7 +474,7 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
int freq = center_freq - (int) (0.5 * (float) SRATE) + (int) ((float) pos * (float) SRATE);
wxGetApp().getDemodMgr().setActiveDemodulator(wxGetApp().getDemodMgr().getActiveDemodulator(), false);
nextDragState = WF_DRAG_NONE;
nextDragState = WF_DRAG_FREQUENCY;
}
} else if (dragState == WF_DRAG_RANGE) {
float width = mTracker.getOriginDeltaMouseX();
@ -503,7 +503,7 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
demod->run();
wxGetApp().bindDemodulator(demod);
wxGetApp().getDemodMgr().setActiveDemodulator(demod);
wxGetApp().getDemodMgr().setActiveDemodulator(demod,false);
}
if (demod == NULL) {