From 7e83986497465322ae0a049d9780c010789550fc Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Tue, 22 Jan 2008 20:36:07 +0000 Subject: [PATCH] Some random changes around. Originally committed to SVN as r1813. --- aegisub/audio_box.cpp | 2 +- aegisub/audio_display.cpp | 4 ++-- aegisub/audio_karaoke.cpp | 6 +++--- aegisub/stdwx.cpp | 1 - aegisub/stdwx.h | 2 ++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/aegisub/audio_box.cpp b/aegisub/audio_box.cpp index f8587bc04..32893eb82 100644 --- a/aegisub/audio_box.cpp +++ b/aegisub/audio_box.cpp @@ -108,9 +108,9 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE // VertVol sider wxSizer *VertVol = new wxBoxSizer(wxHORIZONTAL); - wxSizer *VertVolArea = new wxBoxSizer(wxVERTICAL); VertVol->Add(VerticalZoom,1,wxEXPAND,0); VertVol->Add(VolumeBar,1,wxEXPAND,0); + wxSizer *VertVolArea = new wxBoxSizer(wxVERTICAL); VertVolArea->Add(VertVol,1,wxEXPAND,0); VertVolArea->Add(VerticalLink,0,wxEXPAND,0); diff --git a/aegisub/audio_display.cpp b/aegisub/audio_display.cpp index 7fd7e73f9..f02abe4d1 100644 --- a/aegisub/audio_display.cpp +++ b/aegisub/audio_display.cpp @@ -594,13 +594,13 @@ void AudioDisplay::DrawSpectrum(wxDC &finaldc,bool weak) { } if (!weak) { - unsigned char *img = (unsigned char *)malloc(h*w*3); // wxImage requires using malloc - if (!spectrumRenderer) spectrumRenderer = new AudioSpectrum(provider); spectrumRenderer->SetScaling(scale); + unsigned char *img = (unsigned char *)malloc(h*w*3); // wxImage requires using malloc + // Use a slightly slower, but simple way // Always draw the spectrum for the entire width // Hack: without those divs by 2 the display is horizontally compressed diff --git a/aegisub/audio_karaoke.cpp b/aegisub/audio_karaoke.cpp index 886c90262..1f76c1393 100644 --- a/aegisub/audio_karaoke.cpp +++ b/aegisub/audio_karaoke.cpp @@ -363,12 +363,12 @@ void AudioKaraoke::OnPaint(wxPaintEvent &event) { if (syl.pending_splits.size() > 0) { wxArrayInt widths; if (dc.GetPartialTextExtents(temptext, widths)) { - for (unsigned int i = 0; i < syl.pending_splits.size(); i++) { + for (unsigned int j = 0; j < syl.pending_splits.size(); j++) { dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)); int splitxpos = dx + 4; // Handle splitters placed before first char in syllable; these are represented as -1 - if (syl.pending_splits[i] >= 0) { - splitxpos += widths[syl.pending_splits[i]]; + if (syl.pending_splits[j] >= 0) { + splitxpos += widths[syl.pending_splits[j]]; } else { splitxpos += 0; } diff --git a/aegisub/stdwx.cpp b/aegisub/stdwx.cpp index c404c8d9b..bca28ddcf 100644 --- a/aegisub/stdwx.cpp +++ b/aegisub/stdwx.cpp @@ -45,5 +45,4 @@ // MatroskaParser.c, as well as any possible future .c files. // - #include "stdwx.h" diff --git a/aegisub/stdwx.h b/aegisub/stdwx.h index 16b435d78..dfc83cb9c 100644 --- a/aegisub/stdwx.h +++ b/aegisub/stdwx.h @@ -60,6 +60,7 @@ ///////////////////// // wxWidgets headers +#pragma warning(disable: 6011) #include #include #include @@ -91,6 +92,7 @@ #include + /////////////// // STD headers #include