From 3fb70c1bf9b47ee82e9db67e95098b486c648382 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 15 Aug 2020 01:53:22 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20BPM=20display,=20windows=20does=20not=20s?= =?UTF-8?q?upport=20UTF8=20=E2=99=A9=E2=99=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gtk2_ardour/audio_clock.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 6d50575cd5..699d62d1ed 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -1269,14 +1269,18 @@ AudioClock::set_bbt (samplepos_t when, samplecnt_t offset, bool /*force*/) TempoMetric m (_session->tempo_map().metric_at (pos)); +#ifndef PLATFORM_WINDOWS + /* UTF8 1/4 note and 1/8 note ♩ (\u2669) and ♪ (\u266a) are n/a on Windows */ if (m.tempo().note_type() == 4) { snprintf (buf, sizeof(buf), "\u2669 = %.3f", _session->tempo_map().tempo_at_sample (pos).note_types_per_minute()); _left_btn.set_text (string_compose ("%1", buf), false); } else if (m.tempo().note_type() == 8) { snprintf (buf, sizeof(buf), "\u266a = %.3f", _session->tempo_map().tempo_at_sample (pos).note_types_per_minute()); _left_btn.set_text (string_compose ("%1", buf), false); - } else { - snprintf (buf, sizeof(buf), "%.1f = %.3f", m.tempo().note_type(), _session->tempo_map().tempo_at_sample (pos).note_types_per_minute()); + } else +#endif + { + snprintf (buf, sizeof(buf), "1/%.0f = %.3f", m.tempo().note_type(), _session->tempo_map().tempo_at_sample (pos).note_types_per_minute()); _left_btn.set_text (string_compose ("%1: %2", S_("Tempo|T"), buf), false); }