| 210 | set_reset(false, 0x100u, m_control); |
| 211 | |
| 212 | foreach (QString str, string) { |
| 213 | str = str.toLower(); |
| 214 | if (!str.compare(QLatin1String("grid"), Qt::CaseInsensitive)) { |
| 215 | m_grid = true; |
| 216 | } |
| 217 | if (!str.compare(QLatin1String("bepo"), Qt::CaseInsensitive)) { |
| 218 | set_reset(true, 0x400u, m_control); |
| 219 | } |
| 220 | if (!str.compare(QLatin1String("bebo"), Qt::CaseInsensitive)) { |
| 221 | set_reset(true, 0x200u, m_control); |
| 222 | } |
| 223 | if (!str.compare(QLatin1String("bgr"), Qt::CaseInsensitive)) { |
| 224 | set_reset(true, 0x100u, m_control); |
| 225 | } |
| 226 | if (str.contains('x')) { |
| 227 | QStringList wh = str.split('x'); |
| 228 | if (wh.size() == 2) { |
| 229 | m_width = wh.at(0).toInt(); |
| 230 | m_height = wh.at(1).toInt(); |
| 231 | } |
| 232 | } |
| 233 | if (str.endsWith('%')) { |
| 234 | str.remove('%'); |
| 235 | m_scale = str.toInt(); |
| 236 | if (m_scale > 5000) { |
| 237 | m_scale = 5000; |
| 238 | } |
| 239 | } |
| 240 | if (str.length() == 8 && str.at(0) == '0' && str.at(1) == 'x') { |
| 241 | str.remove(0, 2); |
| 242 | } |
| 243 | if (str.length() == 7 && str.at(0) == '$') { |
| 244 | str.remove(0, 1); |
| 245 | } |
| 246 | if (hex_reg.match(str).hasMatch()) { |
| 247 | m_base = str.toUInt(Q_NULLPTR, 16); |
| 248 | } |
| 249 | if (bpp_reg.match(str).hasMatch()) { |
| 250 | str.chop(3); |
| 251 | uint8_t bpp; |
| 252 | switch (str.toUInt()) { |
| 253 | case 1: bpp = 0; break; |
| 254 | case 2: bpp = 1; break; |
| 255 | case 4: bpp = 2; break; |
| 256 | case 8: bpp = 3; break; |
| 257 | case 161555: case 1555: bpp = 4; break; |
| 258 | case 24: case 888: bpp = 5; break; |
| 259 | case 16: case 565: bpp = 6; break; |
| 260 | case 12: case 444: bpp = 7; break; |
| 261 | default: bpp = 255; break; |
| 262 | } |
| 263 | if (bpp != 255) { |
| 264 | m_control &= ~14u; |
| 265 | m_control |= static_cast<unsigned int>(bpp << 1); |
| 266 | } |
| 267 | } |
| 268 | if (fps_reg.match(str).hasMatch()) { |
| 269 | str.chop(3); |
nothing calls this directly
no outgoing calls
no test coverage detected