mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-27 22:30:49 +00:00
Merge pull request #238 from TomHarte/C1540
Minor tweaks to re-enable proper file selection in the Vic-20.
This commit is contained in:
commit
d538ff5039
@ -66,8 +66,8 @@ enum JoystickInput {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Machine:
|
class Machine:
|
||||||
public ConfigurationTarget::Machine,
|
|
||||||
public CRTMachine::Machine,
|
public CRTMachine::Machine,
|
||||||
|
public ConfigurationTarget::Machine,
|
||||||
public KeyboardMachine::Machine {
|
public KeyboardMachine::Machine {
|
||||||
public:
|
public:
|
||||||
virtual ~Machine();
|
virtual ~Machine();
|
||||||
|
@ -53,7 +53,7 @@ void StaticAnalyser::Commodore::AddTargets(const Media &media, std::list<Target>
|
|||||||
// check disks
|
// check disks
|
||||||
for(auto &disk : media.disks) {
|
for(auto &disk : media.disks) {
|
||||||
std::list<File> disk_files = GetFiles(disk);
|
std::list<File> disk_files = GetFiles(disk);
|
||||||
if(disk_files.size()) {
|
if(!disk_files.empty()) {
|
||||||
is_disk = true;
|
is_disk = true;
|
||||||
files.splice(files.end(), disk_files);
|
files.splice(files.end(), disk_files);
|
||||||
target.media.disks.push_back(disk);
|
target.media.disks.push_back(disk);
|
||||||
@ -65,14 +65,14 @@ void StaticAnalyser::Commodore::AddTargets(const Media &media, std::list<Target>
|
|||||||
for(auto &tape : media.tapes) {
|
for(auto &tape : media.tapes) {
|
||||||
std::list<File> tape_files = GetFiles(tape);
|
std::list<File> tape_files = GetFiles(tape);
|
||||||
tape->reset();
|
tape->reset();
|
||||||
if(tape_files.size()) {
|
if(!tape_files.empty()) {
|
||||||
files.splice(files.end(), tape_files);
|
files.splice(files.end(), tape_files);
|
||||||
target.media.tapes.push_back(tape);
|
target.media.tapes.push_back(tape);
|
||||||
if(!device) device = 1;
|
if(!device) device = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(files.size()) {
|
if(!files.empty()) {
|
||||||
target.vic20.memory_model = Vic20MemoryModel::Unexpanded;
|
target.vic20.memory_model = Vic20MemoryModel::Unexpanded;
|
||||||
std::ostringstream string_stream;
|
std::ostringstream string_stream;
|
||||||
string_stream << "LOAD\"" << (is_disk ? "*" : "") << "\"," << device << ",";
|
string_stream << "LOAD\"" << (is_disk ? "*" : "") << "\"," << device << ",";
|
||||||
@ -136,6 +136,6 @@ void StaticAnalyser::Commodore::AddTargets(const Media &media, std::list<Target>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(target.media.tapes.size() || target.media.cartridges.size() || target.media.disks.size())
|
if(!target.media.tapes.empty() || !target.media.cartridges.empty() || !target.media.disks.empty())
|
||||||
destination.push_back(target);
|
destination.push_back(target);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user