X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fsystem_information_dialog.cc;fp=src%2Fwx%2Fsystem_information_dialog.cc;h=2d9044f6b27a950d96ad8f716379b117efaea675;hb=ac0ef8099975b62045522fe183558fc4ce83fd58;hp=592e7c0ef6578f7aba113511fa44921efeade761;hpb=9e5d71ceede8bcafc1e401814b38e2fc8b17e9c7;p=dcpomatic.git diff --git a/src/wx/system_information_dialog.cc b/src/wx/system_information_dialog.cc index 592e7c0ef..2d9044f6b 100644 --- a/src/wx/system_information_dialog.cc +++ b/src/wx/system_information_dialog.cc @@ -38,27 +38,22 @@ using boost::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 const * gl = dynamic_cast(viewer->video_view()); - 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 ();