diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-12 22:53:17 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-12 22:53:17 +0100 |
| commit | dc2eacb1e0fdbae03dd3fedd0146026ef333a7b2 (patch) | |
| tree | a34fc875512ae17709c72b1965f7ce895ed5f32c /src/lib | |
| parent | 8abfa9923e29ab1f3554d4e0784d8d420032a436 (diff) | |
More Windows hacks.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/compose.hpp | 2 | ||||
| -rw-r--r-- | src/lib/dcpomatic_time.cc | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/compose.hpp b/src/lib/compose.hpp index 8ccd12b50..eb0291e42 100644 --- a/src/lib/compose.hpp +++ b/src/lib/compose.hpp @@ -203,7 +203,7 @@ namespace StringPrivate } template <> - inline void write(std::string& s, wchar_t const & obj) + inline void write(std::string& s, wchar_t[] const & obj) { std::wstring ws (&obj); std::string w (ws.begin(), ws.end()); 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; } |
