| 2236 | } |
| 2237 | |
| 2238 | void MainWindow::autotesterUpdatePresets(int comboBoxIndex) { |
| 2239 | // The order matters, here! (See the combobox in the GUI) |
| 2240 | static const std::pair<unsigned int, unsigned int> mapIdConsts[] = { |
| 2241 | std::make_pair(autotester::hash_consts.at("vram_start"), autotester::hash_consts.at("vram_16_size")), |
| 2242 | std::make_pair(autotester::hash_consts.at("vram_start"), autotester::hash_consts.at("vram_8_size")), |
| 2243 | std::make_pair(autotester::hash_consts.at("vram2_start"), autotester::hash_consts.at("vram_8_size")), |
| 2244 | std::make_pair(autotester::hash_consts.at("textShadow"), autotester::hash_consts.at("textShadow_size")), |
| 2245 | std::make_pair(autotester::hash_consts.at("cmdShadow"), autotester::hash_consts.at("cmdShadow_size")), |
| 2246 | std::make_pair(autotester::hash_consts.at("pixelShadow"), autotester::hash_consts.at("pixelShadow_size")), |
| 2247 | std::make_pair(autotester::hash_consts.at("pixelShadow2"), autotester::hash_consts.at("pixelShadow2_size")), |
| 2248 | std::make_pair(autotester::hash_consts.at("cmdPixelShadow"), autotester::hash_consts.at("cmdPixelShadow_size")), |
| 2249 | std::make_pair(autotester::hash_consts.at("plotSScreen"), autotester::hash_consts.at("plotSScreen_size")), |
| 2250 | std::make_pair(autotester::hash_consts.at("saveSScreen"), autotester::hash_consts.at("saveSScreen_size")), |
| 2251 | std::make_pair(autotester::hash_consts.at("lcdPalette"), autotester::hash_consts.at("lcdPalette_size")), |
| 2252 | std::make_pair(autotester::hash_consts.at("cursorImage"), autotester::hash_consts.at("cursorImage_size")), |
| 2253 | std::make_pair(autotester::hash_consts.at("ram_start"), autotester::hash_consts.at("ram_size")) |
| 2254 | }; |
| 2255 | if (comboBoxIndex >= 1 && comboBoxIndex <= static_cast<int>((sizeof(mapIdConsts)/sizeof(mapIdConsts[0])))) { |
| 2256 | char buf[10] = {0}; |
| 2257 | snprintf(buf, sizeof(buf), "0x%X", mapIdConsts[comboBoxIndex-1].first); |
| 2258 | ui->startCRC->setText(buf); |
| 2259 | snprintf(buf, sizeof(buf), "0x%X", mapIdConsts[comboBoxIndex-1].second); |
| 2260 | ui->sizeCRC->setText(buf); |
| 2261 | autotesterRefreshCRC(); |
| 2262 | } |
| 2263 | } |
| 2264 | |
| 2265 | void MainWindow::autotesterRefreshCRC() { |
| 2266 | QLineEdit *startCRC = ui->startCRC; |
nothing calls this directly
no outgoing calls
no test coverage detected