- boost::filesystem::path p = resources_path() / "splash.png";
- if (bitmap.LoadFile (std_to_wx (p.string ()), wxBITMAP_TYPE_PNG)) {
+ if (bitmap.LoadFile(bitmap_path("splash"), wxBITMAP_TYPE_PNG)) {
+ {
+ /* This wxMemoryDC must be destroyed before bitmap can be used elsewhere */
+ wxMemoryDC dc(bitmap);
+ auto const version = wxString::Format("%s (%s)", dcpomatic_version, dcpomatic_git_commit);
+ auto screen_size = dc.GetSize();
+ auto text_size = dc.GetTextExtent(version);
+ dc.DrawText(version, (screen_size.GetWidth() - text_size.GetWidth()) / 2, 236);
+ }
+#ifdef DCPOMATIC_WINDOWS
+ /* Having wxSTAY_ON_TOP means error dialogues hide behind the splash screen on Windows, no matter what I try */
+ splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE | wxFRAME_NO_TASKBAR);
+#else