diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-29 21:38:08 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-29 21:38:08 +0000 |
| commit | bdbb254c18b100f8fa66a3707f6b515309d05685 (patch) | |
| tree | 44606dda0a79df54f758c278c70df06733b28378 /src/tools/dcpomatic.cc | |
| parent | 95f29bc89f860342c100d7609ce5e2e4a138aa8a (diff) | |
| parent | 747fc9e02cb66fb965e23a4cc0464cf7e8bd743d (diff) | |
Merge master.
Diffstat (limited to 'src/tools/dcpomatic.cc')
| -rw-r--r-- | src/tools/dcpomatic.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a4239bd21..b4ec1d77d 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -62,7 +62,6 @@ using std::map; using std::make_pair; using std::list; using std::exception; -using std::ofstream; using boost::shared_ptr; using boost::dynamic_pointer_cast; @@ -248,6 +247,22 @@ public: , _servers_list_dialog (0) , _hints_dialog (0) { +#ifdef DCPOMATIC_WINDOWS_CONSOLE + AllocConsole(); + + HANDLE handle_out = GetStdHandle(STD_OUTPUT_HANDLE); + int hCrt = _open_osfhandle((intptr_t) handle_out, _O_TEXT); + FILE* hf_out = _fdopen(hCrt, "w"); + setvbuf(hf_out, NULL, _IONBF, 1); + *stdout = *hf_out; + + HANDLE handle_in = GetStdHandle(STD_INPUT_HANDLE); + hCrt = _open_osfhandle((intptr_t) handle_in, _O_TEXT); + FILE* hf_in = _fdopen(hCrt, "r"); + setvbuf(hf_in, NULL, _IONBF, 128); + *stdin = *hf_in; +#endif + wxMenuBar* bar = new wxMenuBar; setup_menu (bar); SetMenuBar (bar); @@ -333,7 +348,7 @@ private: std_to_wx ( String::compose (wx_to_std (_("The directory %1 already exists and is not empty. " "Are you sure you want to use it?")), - d->get_path().c_str()) + d->get_path().string().c_str()) ) )) { return; |
