mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
Ensures that execution doesn't proceed if ROMs are missing.
This commit is contained in:
parent
0d1b63a8c5
commit
e10d369e53
@ -179,7 +179,7 @@ int main(int argc, char *argv[]) {
|
|||||||
//
|
//
|
||||||
// /usr/local/share/CLK/[system]; or
|
// /usr/local/share/CLK/[system]; or
|
||||||
// /usr/share/CLK/[system]
|
// /usr/share/CLK/[system]
|
||||||
machine->crt_machine()->set_rom_fetcher( [] (const std::string &machine, const std::vector<std::string> &names) -> std::vector<std::unique_ptr<std::vector<uint8_t>>> {
|
bool roms_loaded = machine->crt_machine()->set_rom_fetcher( [] (const std::string &machine, const std::vector<std::string> &names) -> std::vector<std::unique_ptr<std::vector<uint8_t>>> {
|
||||||
std::vector<std::unique_ptr<std::vector<uint8_t>>> results;
|
std::vector<std::unique_ptr<std::vector<uint8_t>>> results;
|
||||||
for(auto &name: names) {
|
for(auto &name: names) {
|
||||||
std::string local_path = "/usr/local/share/CLK/" + machine + "/" + name;
|
std::string local_path = "/usr/local/share/CLK/" + machine + "/" + name;
|
||||||
@ -208,6 +208,11 @@ int main(int argc, char *argv[]) {
|
|||||||
return results;
|
return results;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(!roms_loaded) {
|
||||||
|
std::cerr << "Could not find system ROMs; please install to /usr/local/share/CLK/ or /usr/share/CLK/" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
machine->configuration_target()->configure_as_target(targets.front());
|
machine->configuration_target()->configure_as_target(targets.front());
|
||||||
|
|
||||||
// Setup output, assuming a CRT machine for now, and prepare a best-effort updater.
|
// Setup output, assuming a CRT machine for now, and prepare a best-effort updater.
|
||||||
|
Loading…
Reference in New Issue
Block a user