mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-20 12:26:07 +01:00
slave delta: move sign next to the digit
git-svn-id: svn://localhost/ardour2/branches/3.0@13457 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
bdad852b71
commit
2c1b2256b6
4 changed files with 8 additions and 7 deletions
|
|
@ -38,8 +38,9 @@
|
|||
#include <ltc.h>
|
||||
#endif
|
||||
|
||||
// used for approximate_current_delta():
|
||||
/* used for approximate_current_delta(): */
|
||||
#define PLUSMINUS(A) ( ((A)<0) ? "-" : (((A)>0) ? "+" : "\u00B1") )
|
||||
#define LEADINGZERO(A) ( (A)<10 ? " " : (A)<100 ? " " : (A)<1000 ? " " : (A)<10000 ? " " : "" )
|
||||
|
||||
namespace MIDI {
|
||||
class Port;
|
||||
|
|
|
|||
|
|
@ -546,8 +546,8 @@ LTC_Slave::approximate_current_delta() const
|
|||
} else if ((monotonic_cnt - last_timestamp) > 2 * frames_per_ltc_frame) {
|
||||
snprintf(delta, sizeof(delta), _("flywheel"));
|
||||
} else {
|
||||
snprintf(delta, sizeof(delta), "\u0394<span foreground=\"green\" face=\"monospace\" >%s%5" PRIi64 "</span> sm",
|
||||
PLUSMINUS(-current_delta), abs(current_delta));
|
||||
snprintf(delta, sizeof(delta), "\u0394<span foreground=\"green\" face=\"monospace\" >%s%s%" PRIi64 "</span> sm",
|
||||
LEADINGZERO(abs(current_delta)), PLUSMINUS(-current_delta), abs(current_delta));
|
||||
}
|
||||
return std::string(delta);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,8 +363,8 @@ MIDIClock_Slave::approximate_current_delta() const
|
|||
if (last_timestamp == 0 || _starting) {
|
||||
snprintf(delta, sizeof(delta), "\u2012\u2012\u2012\u2012");
|
||||
} else {
|
||||
snprintf(delta, sizeof(delta), "\u0394<span foreground=\"green\" face=\"monospace\" >%s%5" PRIi64 "</span> sm",
|
||||
PLUSMINUS(-current_delta), abs(current_delta));
|
||||
snprintf(delta, sizeof(delta), "\u0394<span foreground=\"green\" face=\"monospace\" >%s%s%" PRIi64 "</span> sm",
|
||||
LEADINGZERO(abs(current_delta)), PLUSMINUS(-current_delta), abs(current_delta));
|
||||
}
|
||||
return std::string(delta);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -679,8 +679,8 @@ MTC_Slave::approximate_current_delta() const
|
|||
if (last.timestamp == 0 || reset_pending) {
|
||||
snprintf(delta, sizeof(delta), "\u2012\u2012\u2012\u2012");
|
||||
} else {
|
||||
snprintf(delta, sizeof(delta), "\u0394<span foreground=\"green\" face=\"monospace\">%s%5" PRIi64 "</span> sm",
|
||||
PLUSMINUS(-current_delta), abs(current_delta));
|
||||
snprintf(delta, sizeof(delta), "\u0394<span foreground=\"green\" face=\"monospace\" >%s%s%" PRIi64 "</span> sm",
|
||||
LEADINGZERO(abs(current_delta)), PLUSMINUS(-current_delta), abs(current_delta));
|
||||
}
|
||||
return std::string(delta);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue