X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=main.cpp;h=41f85897893069165afc325d5db4d65a414ab36e;hb=51e77110d4316fd0106f8306f5e1f0523c5bf7d7;hp=bb95f9ba4ef8e0e0ad9467ba6e8b0829b847e901;hpb=664fca5cd49e79b2906e1c91fa60764b164acd90;p=pulseview.git diff --git a/main.cpp b/main.cpp index bb95f9b..41f8589 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the PulseView project. * * Copyright (C) 2012 Joel Holdsworth * @@ -26,7 +26,7 @@ extern "C" { #include #include -#include "mainwindow.h" +#include "pv/mainwindow.h" int main(int argc, char *argv[]) { @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) /* Set some application metadata. */ QApplication::setApplicationVersion(APP_VERSION); - QApplication::setApplicationName("sigrok-qt"); + QApplication::setApplicationName("PulseView"); QApplication::setOrganizationDomain("http://www.sigrok.org"); /* Initialise libsigrok */ @@ -52,8 +52,18 @@ int main(int argc, char *argv[]) /* Load the protocol decoders */ srd_decoder_load_all(); + /* Initialize all libsigrok drivers. */ + sr_dev_driver **const drivers = sr_driver_list(); + for (sr_dev_driver **driver = drivers; *driver; driver++) { + if (sr_driver_init(*driver) != SR_OK) { + qDebug("Failed to initialize driver %s", + (*driver)->name); + return 1; + } + } + /* Initialise the main window */ - MainWindow w; + pv::MainWindow w; w.show(); /* Run the application */