Changeset 175 for smplayer/vendor/current/src/deviceinfo.cpp
- Timestamp:
- May 3, 2016, 2:14:41 PM (10 years ago)
- File:
-
- 1 edited
-
smplayer/vendor/current/src/deviceinfo.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/src/deviceinfo.cpp
r163 r175 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 4Ricardo Villalba <[email protected]>2 Copyright (C) 2006-201 Ricardo Villalba <[email protected]> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 18 18 19 19 #include "deviceinfo.h" 20 20 21 #include <QProcess> 21 22 #include <QFile> 23 22 24 23 25 #ifdef Q_OS_WIN … … 26 28 qDebug("DeviceInfo::retrieveDevices: %d", type); 27 29 28 DeviceList l; 30 QString inifile = Paths::configPath() + "/device_info.ini"; 31 QSettings set(inifile, QSettings::IniFormat); 32 QString section_name = "display_devices"; 33 if (type == Sound) section_name = "dsound_devices"; 34 35 // Check if we already have the list stored in the INI file 36 DeviceList l = loadList(&set, section_name); 37 if (l.count() > 0) return l; 38 29 39 QRegExp rx_device("^(\\d+): (.*)"); 30 40 … … 51 61 } 52 62 63 64 53 65 return l; 54 66 } … … 67 79 qDebug("DeviceInfo::alsaDevices"); 68 80 69 DeviceList l; 81 QString inifile = Paths::configPath() + "/device_info.ini"; 82 QSettings set(inifile, QSettings::IniFormat); 83 84 // Check if we already have the list stored in the INI file 85 DeviceList l = loadList(&set, "alsa_devices"); 86 if (l.count() > 0) return l; 87 70 88 QRegExp rx_device("^card\\s([0-9]+).*\\[(.*)\\],\\sdevice\\s([0-9]+):"); 71 89 … … 93 111 } 94 112 113 114 95 115 return l; 96 116 } … … 99 119 qDebug("DeviceInfo::xvAdaptors"); 100 120 101 DeviceList l; 121 QString inifile = Paths::configPath() + "/device_info.ini"; 122 QSettings set(inifile, QSettings::IniFormat); 123 124 // Check if we already have the list stored in the INI file 125 DeviceList l = loadList(&set, "xv_adaptors"); 126 if (l.count() > 0) return l; 127 102 128 QRegExp rx_device("^.*Adaptor #([0-9]+): \"(.*)\""); 103 129 … … 123 149 } 124 150 151 152 125 153 return l; 126 154 } 127 155 128 156 #endif 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
Note:
See TracChangeset
for help on using the changeset viewer.
