summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_time.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-12 22:53:17 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-12 22:53:17 +0100
commitdc2eacb1e0fdbae03dd3fedd0146026ef333a7b2 (patch)
treea34fc875512ae17709c72b1965f7ce895ed5f32c /src/lib/dcpomatic_time.cc
parent8abfa9923e29ab1f3554d4e0784d8d420032a436 (diff)
More Windows hacks.
Diffstat (limited to 'src/lib/dcpomatic_time.cc')
-rw-r--r--src/lib/dcpomatic_time.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/dcpomatic_time.cc b/src/lib/dcpomatic_time.cc
index 6563c6e5f..4f6c9b664 100644
--- a/src/lib/dcpomatic_time.cc
+++ b/src/lib/dcpomatic_time.cc
@@ -81,7 +81,11 @@ string
to_string (ContentTime t)
{
char buffer[64];
+#ifdef DCPOMATIC_WINDOWS
+ __mingw_snprintf (buffer, sizeof(buffer), "[CONT %" PRId64 " %fs]", t.get(), t.seconds());
+#else
snprintf (buffer, sizeof(buffer), "[CONT %" PRId64 " %fs]", t.get(), t.seconds());
+#endif
return buffer;
}
@@ -89,7 +93,11 @@ string
to_string (DCPTime t)
{
char buffer[64];
+#ifdef DCPOMATIC_WINDOWS
+ __mingw_snprintf (buffer, sizeof(buffer), "[DCP %" PRId64 " %fs]", t.get(), t.seconds());
+#else
snprintf (buffer, sizeof(buffer), "[DCP %" PRId64 " %fs]", t.get(), t.seconds());
+#endif
return buffer;
}
@@ -97,6 +105,10 @@ string
to_string (DCPTimePeriod p)
{
char buffer[64];
+#ifdef DCPOMATIC_WINDOWS
+ __mingw_snprintf (buffer, sizeof(buffer), "[DCP %" PRId64 " %fs -> %" PRId64 " %fs]", p.from.get(), p.from.seconds(), p.to.get(), p.to.seconds());
+#else
snprintf (buffer, sizeof(buffer), "[DCP %" PRId64 " %fs -> %" PRId64 " %fs]", p.from.get(), p.from.seconds(), p.to.get(), p.to.seconds());
+#endif
return buffer;
}