X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fsystem_information_dialog.cc;h=968cd57404dd729957d97f842a7dd82482771807;hb=8eaf36467713e7ba9a1a2272a44aa1581e31c1b0;hp=0e19162027570b3222e64af29c12662c34b9c840;hpb=d1e19450e051d70531a6c1f0973bfd6cfd64319b;p=dcpomatic.git diff --git a/src/wx/system_information_dialog.cc b/src/wx/system_information_dialog.cc index 0e1916202..968cd5740 100644 --- a/src/wx/system_information_dialog.cc +++ b/src/wx/system_information_dialog.cc @@ -32,33 +32,28 @@ #endif using std::string; -using boost::weak_ptr; -using boost::shared_ptr; +using std::weak_ptr; +using std::shared_ptr; SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr weak_viewer) : TableDialog (parent, _("System information"), 2, 1, false) { - add (_("OpenGL version"), true); - char const * v = (char const *) glGetString (GL_VERSION); - if (v) { - add (std_to_wx(v), false); - } else { - add (_("unknown (OpenGL not enabled in DCP-o-matic)"), false); - } - - - add (_("vsync"), true); shared_ptr viewer = weak_viewer.lock (); + GLVideoView const * gl = viewer ? dynamic_cast(viewer->video_view()) : 0; - if (!viewer) { - add (_("unknown"), false); + if (!gl) { + add (_("OpenGL version"), true); + add (_("unknown (OpenGL not enabled in DCP-o-matic)"), false); } else { - GLVideoView* gl = dynamic_cast(viewer->panel()); - if (!gl) { - add (_("unknown"), false); + add (_("OpenGL version"), true); + char const * v = (char const *) glGetString (GL_VERSION); + if (v) { + add (std_to_wx(v), false); } else { - add (gl->vsync_enabled() ? _("enabled") : _("not enabled"), false); + add (_("unknown"), false); } + add (_("vsync"), true); + add (gl->vsync_enabled() ? _("enabled") : _("not enabled"), false); } layout ();