mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -05:00
Add __FreeBSD__ where needed to properly compile on FreeBSD + fix for Windows
This commit is contained in:
parent
9e43beec1a
commit
f449a65457
@ -34,7 +34,7 @@
|
||||
#include <wx/numformatter.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#include "CubicSDR.xpm"
|
||||
#endif
|
||||
|
||||
@ -79,7 +79,7 @@ std::vector<std::string> 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
|
||||
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#define CUBICSDR_TITLE "" CUBICSDR_BUILD_TITLE
|
||||
|
||||
#ifndef __BYTE_ORDER
|
||||
@ -16,7 +20,11 @@
|
||||
#ifdef __APPLE__
|
||||
#include <machine/endian.h>
|
||||
#else
|
||||
#include <endian.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/endian.h>
|
||||
#else
|
||||
#include <endian.h>
|
||||
#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
|
||||
#define DEVICE_SAMPLE_RATES_MAX_NB 25
|
||||
|
@ -83,7 +83,7 @@ void DemodLabelDialog::OnChar(wxKeyEvent& event) {
|
||||
|
||||
}
|
||||
else {
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
dialogText->OnChar(event);
|
||||
event.Skip();
|
||||
#else
|
||||
|
@ -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
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#include <dlfcn.h>
|
||||
#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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user