diff --git a/CMakeLists.txt b/CMakeLists.txt index 59863d5..ca20af0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,7 +237,6 @@ include_directories ( ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/external/rtaudio ${PROJECT_SOURCE_DIR}/external/lodepng - ${PROJECT_SOURCE_DIR}/external/fastlz ${PROJECT_SOURCE_DIR}/external/tinyxml ) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index c27f6cd..8858ac2 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -559,4 +559,6 @@ bool AppFrame::loadSession(std::string fileName) { GetStatusBar()->SetStatusText(wxString::Format(wxT("Loaded session file: %s"), currentSessionFile.c_str())); SetTitle(wxString::Format(wxT("%s: %s"), CUBICSDR_TITLE, filePart.c_str())); + + return true; } diff --git a/src/CubicSDR.cpp b/src/CubicSDR.cpp index e84bcda..cbd6cc6 100644 --- a/src/CubicSDR.cpp +++ b/src/CubicSDR.cpp @@ -122,8 +122,6 @@ PrimaryGLContext& CubicSDR::GetContext(wxGLCanvas *canvas) { } glContext = m_glContext; - glContext->SetCurrent(*canvas); - return *glContext; } diff --git a/src/CubicSDR.h b/src/CubicSDR.h index f2a24b8..ec57720 100644 --- a/src/CubicSDR.h +++ b/src/CubicSDR.h @@ -20,7 +20,7 @@ class CubicSDR: public wxApp { public: CubicSDR() : - m_glContext(NULL), frequency(DEFAULT_FREQ), sdrThread(NULL), sdrPostThread(NULL), threadCmdQueueSDR(NULL), iqVisualQueue(NULL), iqPostDataQueue(NULL), audioVisualQueue(NULL), t_SDR(NULL), t_PostSDR(NULL), sampleRate(DEFAULT_SAMPLE_RATE) { + m_glContext(NULL), frequency(DEFAULT_FREQ), sdrThread(NULL), sdrPostThread(NULL), threadCmdQueueSDR(NULL), iqVisualQueue(NULL), iqPostDataQueue(NULL), audioVisualQueue(NULL), t_SDR(NULL), t_PostSDR(NULL), sampleRate(DEFAULT_SAMPLE_RATE), offset(0) { } diff --git a/src/demod/DemodulatorInstance.cpp b/src/demod/DemodulatorInstance.cpp index fbad2c1..896b10c 100644 --- a/src/demod/DemodulatorInstance.cpp +++ b/src/demod/DemodulatorInstance.cpp @@ -292,7 +292,6 @@ void DemodulatorInstance::setFrequency(long long freq) { command.llong_value = freq; threadQueueCommand->push(command); } - demodulatorPreThread->getParams().bandwidth; } long long DemodulatorInstance::getFrequency() { diff --git a/src/demod/DemodulatorPreThread.cpp b/src/demod/DemodulatorPreThread.cpp index b412e0d..f45f78a 100644 --- a/src/demod/DemodulatorPreThread.cpp +++ b/src/demod/DemodulatorPreThread.cpp @@ -100,6 +100,8 @@ void DemodulatorPreThread::threadMain() { case DemodulatorThreadCommand::DEMOD_THREAD_CMD_SET_FREQUENCY: params.frequency = command.llong_value; break; + default: + break; } } } @@ -227,6 +229,8 @@ void DemodulatorPreThread::threadMain() { params.bandwidth = result.bandwidth; params.sampleRate = result.sampleRate; + break; + default: break; } } @@ -243,6 +247,10 @@ void DemodulatorPreThread::threadMain() { tCmd.context = this; threadQueueNotify->push(tCmd); std::cout << "Demodulator preprocessor thread done." << std::endl; + +#ifdef __APPLE__ + return this; +#endif } void DemodulatorPreThread::terminate() { diff --git a/src/demod/DemodulatorThread.cpp b/src/demod/DemodulatorThread.cpp index 8ed1b20..7194109 100644 --- a/src/demod/DemodulatorThread.cpp +++ b/src/demod/DemodulatorThread.cpp @@ -410,6 +410,10 @@ void DemodulatorThread::threadMain() { tCmd.context = this; threadQueueNotify->push(tCmd); std::cout << "Demodulator thread done." << std::endl; + +#ifdef __APPLE__ + return this; +#endif } void DemodulatorThread::setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue) { diff --git a/src/demod/DemodulatorWorkerThread.cpp b/src/demod/DemodulatorWorkerThread.cpp index 302fb14..58bc1de 100644 --- a/src/demod/DemodulatorWorkerThread.cpp +++ b/src/demod/DemodulatorWorkerThread.cpp @@ -27,6 +27,8 @@ void DemodulatorWorkerThread::threadMain() { filterChanged = true; filterCommand = command; break; + default: + break; } done = commandQueue->empty(); } diff --git a/src/visual/MeterCanvas.cpp b/src/visual/MeterCanvas.cpp index 7e1d42c..0dd0770 100644 --- a/src/visual/MeterCanvas.cpp +++ b/src/visual/MeterCanvas.cpp @@ -45,7 +45,7 @@ void MeterCanvas::setMax(float max_in) { level_max = max_in; } -bool MeterCanvas::setInputValue(float slider_in) { +void MeterCanvas::setInputValue(float slider_in) { userInputValue = inputValue = slider_in; } diff --git a/src/visual/MeterCanvas.h b/src/visual/MeterCanvas.h index e64ef5c..a6968b1 100644 --- a/src/visual/MeterCanvas.h +++ b/src/visual/MeterCanvas.h @@ -23,7 +23,7 @@ public: void setMax(float max_in); - bool setInputValue(float slider_in); + void setInputValue(float slider_in); bool inputChanged(); float getInputValue(); diff --git a/src/visual/MeterContext.cpp b/src/visual/MeterContext.cpp index ec89d92..e1351bf 100644 --- a/src/visual/MeterContext.cpp +++ b/src/visual/MeterContext.cpp @@ -4,14 +4,12 @@ MeterContext::MeterContext(MeterCanvas *canvas, wxGLContext *sharedContext) : PrimaryGLContext(canvas, sharedContext) { - glDisable(GL_CULL_FACE); - glDisable(GL_DEPTH_TEST); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); } void MeterContext::DrawBegin() { + glDisable(GL_CULL_FACE); + glDisable(GL_DEPTH_TEST); + glClearColor(ThemeMgr::mgr.currentTheme->generalBackground.r, ThemeMgr::mgr.currentTheme->generalBackground.g, ThemeMgr::mgr.currentTheme->generalBackground.b, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); diff --git a/src/visual/PrimaryGLContext.cpp b/src/visual/PrimaryGLContext.cpp index 9b2d06e..654b8e7 100644 --- a/src/visual/PrimaryGLContext.cpp +++ b/src/visual/PrimaryGLContext.cpp @@ -53,14 +53,14 @@ void PrimaryGLContext::CheckGLError() { PrimaryGLContext::PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext) : wxGLContext(canvas, sharedContext) { - SetCurrent(*canvas); -#ifndef __linux__ - // Pre-load fonts - for (int i = 0; i < GLFONT_MAX; i++) { - getFont((GLFontSize) i); - } - CheckGLError(); -#endif +//#ifndef __linux__ +// SetCurrent(*canvas); +// // Pre-load fonts +// for (int i = 0; i < GLFONT_MAX; i++) { +// getFont((GLFontSize) i); +// } +// CheckGLError(); +//#endif } GLFont &PrimaryGLContext::getFont(GLFontSize esize) { @@ -86,6 +86,9 @@ GLFont &PrimaryGLContext::getFont(GLFontSize esize) { case GLFONT_SIZE48: fontName = "vera_sans_mono48.fnt"; break; + default: + fontName = "vera_sans_mono12.fnt"; + break; } fonts[esize].loadFont(fontName);