diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 7950fc0..a3bf93a 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -34,7 +34,7 @@ #include #include -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) #include "CubicSDR.xpm" #endif @@ -79,7 +79,7 @@ std::vector str_explode(const std::string &seperator, const std::st AppFrame::AppFrame() : wxFrame(NULL, wxID_ANY, CUBICSDR_TITLE), activeDemodulator(nullptr) { -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) SetIcon(wxICON(cubicsdr)); #endif diff --git a/src/CubicSDRDefs.h b/src/CubicSDRDefs.h index 3beb96b..315ba8d 100644 --- a/src/CubicSDRDefs.h +++ b/src/CubicSDRDefs.h @@ -3,6 +3,10 @@ #pragma once +#if defined(__linux__) || defined(__FreeBSD__) +#include +#endif + #define CUBICSDR_TITLE "" CUBICSDR_BUILD_TITLE #ifndef __BYTE_ORDER @@ -16,7 +20,11 @@ #ifdef __APPLE__ #include #else - #include + #ifdef __FreeBSD__ + #include + #else + #include + #endif #endif #endif #endif @@ -62,4 +70,4 @@ const char filePathSeparator = //The maximum number of listed sample rates for a device, to be able to handle //devices returning an insane amount because they have quasi-continuous ranges (UHD...) -#define DEVICE_SAMPLE_RATES_MAX_NB 25 \ No newline at end of file +#define DEVICE_SAMPLE_RATES_MAX_NB 25 diff --git a/src/DemodLabelDialog.cpp b/src/DemodLabelDialog.cpp index 139793f..c6140e1 100644 --- a/src/DemodLabelDialog.cpp +++ b/src/DemodLabelDialog.cpp @@ -83,7 +83,7 @@ void DemodLabelDialog::OnChar(wxKeyEvent& event) { } else { -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) dialogText->OnChar(event); event.Skip(); #else diff --git a/src/FrequencyDialog.cpp b/src/FrequencyDialog.cpp index a272d4c..fe55cfa 100644 --- a/src/FrequencyDialog.cpp +++ b/src/FrequencyDialog.cpp @@ -218,7 +218,7 @@ void FrequencyDialog::OnChar(wxKeyEvent& event) { if (allowed.find_first_of(c) != std::string::npos || c == WXK_DELETE || c == WXK_BACK || c == WXK_NUMPAD_DECIMAL || (c >= WXK_NUMPAD0 && c <= WXK_NUMPAD9)) { -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) dialogText->OnChar(event); event.Skip(); #else diff --git a/src/util/GLExt.cpp b/src/util/GLExt.cpp index 6349121..6103248 100644 --- a/src/util/GLExt.cpp +++ b/src/util/GLExt.cpp @@ -9,7 +9,7 @@ #include #endif -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) #include #endif @@ -60,7 +60,7 @@ void initGLExtensions() { CGLSetParameter (CGLGetCurrentContext(), kCGLCPSwapInterval, &interval); #endif -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) dlopen("libglx.so",RTLD_LAZY); void (*glxSwapIntervalEXTFunc) (Display *dpy, GLXDrawable drawable, int interval) = 0; diff --git a/src/util/MouseTracker.cpp b/src/util/MouseTracker.cpp index b0572f5..1fbb9e0 100644 --- a/src/util/MouseTracker.cpp +++ b/src/util/MouseTracker.cpp @@ -30,7 +30,7 @@ void MouseTracker::OnMouseMoved(wxMouseEvent& event) { if (isMouseDown || isMouseRightDown) { #ifndef __APPLE__ -#ifndef __linux__ +#if !defined(__linux__) && !defined(__FreeBSD__) if (horizDragLock && vertDragLock) { target->WarpPointer(originMouseX * ClientSize.x, (1.0 - originMouseY) * ClientSize.y); mouseX = originMouseX;