| 1128 | } |
| 1129 | |
| 1130 | void DEV9CheckChanges(const Pcsx2Config& old_config) |
| 1131 | { |
| 1132 | if (!isRunning) |
| 1133 | return; |
| 1134 | |
| 1135 | //Eth |
| 1136 | ReconfigureLiveNet(old_config); |
| 1137 | |
| 1138 | //Hdd |
| 1139 | //Hdd Validate Path |
| 1140 | std::string hddPath(GetHDDPath()); |
| 1141 | |
| 1142 | //Hdd Compare with old config |
| 1143 | if (EmuConfig.DEV9.HddEnable) |
| 1144 | { |
| 1145 | if (old_config.DEV9.HddEnable) |
| 1146 | { |
| 1147 | //ATA::Open/Close dosn't set any regs |
| 1148 | //So we can close/open to apply settings |
| 1149 | if (EmuConfig.DEV9.HddFile != old_config.DEV9.HddFile) |
| 1150 | { |
| 1151 | dev9.ata->Close(); |
| 1152 | if (dev9.ata->Open(hddPath) != 0) |
| 1153 | EmuConfig.DEV9.HddEnable = false; |
| 1154 | } |
| 1155 | } |
| 1156 | else if (dev9.ata->Open(hddPath) != 0) |
| 1157 | EmuConfig.DEV9.HddEnable = false; |
| 1158 | } |
| 1159 | else if (old_config.DEV9.HddEnable) |
| 1160 | dev9.ata->Close(); |
| 1161 | } |
no test coverage detected