commit d9177f7d238405adc2a17594769ac9bdf208e600
parent f719354bb57b6d4481976950681cb8a42f4cefab
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Tue, 14 Aug 2012 10:40:26 -0700
Fix compilation under MXE
Diffstat:
3 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/src/spek-audio.c b/src/spek-audio.c
@@ -18,6 +18,8 @@
#include <string.h>
+#include <libavformat/avformat.h>
+#include <libavcodec/avcodec.h>
#include <libavutil/mathematics.h>
#include "spek-platform.hh"
diff --git a/src/spek-audio.h b/src/spek-audio.h
@@ -26,8 +26,11 @@ extern "C" {
#include <stdbool.h>
#include <stdint.h>
-#include <libavformat/avformat.h>
-#include <libavcodec/avcodec.h>
+struct AVFormatContext;
+struct AVCodecContext;
+struct AVStream;
+struct AVCodec;
+struct AVPacket;
struct spek_audio_context
{
diff --git a/src/spek-spectrogram.cc b/src/spek-spectrogram.cc
@@ -83,22 +83,22 @@ void SpekSpectrogram::render(wxDC& dc)
dc.SetPen(*wxWHITE_PEN);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.SetTextForeground(wxColour(255, 255, 255));
- wxFont normal = wxFont(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
- wxFont large = wxFont(normal);
- large.SetPointSize(10);
- large.SetWeight(wxFONTWEIGHT_BOLD);
- wxFont small = wxFont(normal);
- small.SetPointSize(8);
- dc.SetFont(normal);
+ wxFont normal_font = wxFont(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
+ wxFont large_font = wxFont(normal_font);
+ large_font.SetPointSize(10);
+ large_font.SetWeight(wxFONTWEIGHT_BOLD);
+ wxFont small_font = wxFont(normal_font);
+ small_font.SetPointSize(8);
+ dc.SetFont(normal_font);
int normal_height = dc.GetTextExtent(wxT("dummy")).GetHeight();
- dc.SetFont(large);
+ dc.SetFont(large_font);
int large_height = dc.GetTextExtent(wxT("dummy")).GetHeight();
// Clean the background.
dc.Clear();
// Spek version
- dc.SetFont(large);
+ dc.SetFont(large_font);
wxString package_name(wxT(PACKAGE_NAME));
dc.DrawText(
package_name,
@@ -106,7 +106,7 @@ void SpekSpectrogram::render(wxDC& dc)
TPAD - 2 * GAP - normal_height - large_height
);
int package_name_width = dc.GetTextExtent(package_name + wxT(" ")).GetWidth();
- dc.SetFont(normal);
+ dc.SetFont(normal_font);
dc.DrawText(
wxT(PACKAGE_VERSION),
w - RPAD + GAP + package_name_width,