summaryrefslogtreecommitdiff
path: root/multimedia/aegisub/files/patch-src__subs_preview.cpp
blob: 26e3f5f4c49acea39eda1f275a75c152c8922590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- src/subs_preview.cpp.orig
+++ src/subs_preview.cpp
@@ -48,6 +48,13 @@
 #include <wx/dcclient.h>
 #include <wx/msgdlg.h>
 
+#ifdef _LIBCPP_VERSION
+#define TO_STRING(x) std::to_string(x)
+#else
+#include <boost/lexical_cast.hpp>
+#define TO_STRING(x) boost::lexical_cast<std::string>(x)
+#endif
+
 SubtitlesPreview::SubtitlesPreview(wxWindow *parent, wxSize size, int winStyle, agi::Color col)
 : wxWindow(parent, -1, wxDefaultPosition, size, winStyle)
 , style(new AssStyle)
@@ -141,8 +148,8 @@
 			"No subtitles provider", wxOK | wxICON_ERROR | wxCENTER);
 	}
 
-	sub_file->SetScriptInfo("PlayResX", std::to_string(w));
-	sub_file->SetScriptInfo("PlayResY", std::to_string(h));
+	sub_file->SetScriptInfo("PlayResX", TO_STRING(w));
+	sub_file->SetScriptInfo("PlayResY", TO_STRING(h));
 
 	UpdateBitmap();
 }