diff options
Diffstat (limited to 'src/wx/system_information_dialog.cc')
| -rw-r--r-- | src/wx/system_information_dialog.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/wx/system_information_dialog.cc b/src/wx/system_information_dialog.cc index addb89da4..79a7f735a 100644 --- a/src/wx/system_information_dialog.cc +++ b/src/wx/system_information_dialog.cc @@ -41,20 +41,15 @@ using std::shared_ptr; #if wxCHECK_VERSION(3, 1, 0) -SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<FilmViewer> weak_viewer) +SystemInformationDialog::SystemInformationDialog(wxWindow* parent, FilmViewer const& viewer) : TableDialog (parent, _("System information"), 2, 1, false) { - auto viewer = weak_viewer.lock (); - shared_ptr<const GLVideoView> gl; - if (viewer) { - gl = std::dynamic_pointer_cast<const GLVideoView>(viewer->video_view()); - } + auto gl = std::dynamic_pointer_cast<const GLVideoView>(viewer.video_view()); if (!gl) { add (_("OpenGL version"), true); add (_("unknown (OpenGL not enabled in DCP-o-matic)"), false); } else { - auto information = gl->information(); auto add_string = [this, &information](GLenum name, wxString label) { add (label, true); @@ -80,7 +75,7 @@ SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<Fil #else -SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<FilmViewer>) +SystemInformationDialog::SystemInformationDialog(wxWindow* parent, FilmViewer&) : TableDialog (parent, _("System information"), 2, 1, false) { add (_("OpenGL version"), true); |
