mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-22 11:29:20 +00:00
Merge pull request #897 from TomHarte/LoadingImprovements
Corrects Spectrum TAP `is_at_end`.
This commit is contained in:
commit
48f794dc2d
@ -38,7 +38,7 @@ ZXSpectrumTAP::ZXSpectrumTAP(const std::string &file_name) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ZXSpectrumTAP::is_at_end() {
|
bool ZXSpectrumTAP::is_at_end() {
|
||||||
return file_.tell() == file_.stats().st_size;
|
return file_.tell() == file_.stats().st_size && phase_ == Phase::Gap;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZXSpectrumTAP::virtual_reset() {
|
void ZXSpectrumTAP::virtual_reset() {
|
||||||
@ -111,7 +111,7 @@ Tape::Pulse ZXSpectrumTAP::virtual_get_next_pulse() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ZXSpectrumTAP::read_next_block() {
|
void ZXSpectrumTAP::read_next_block() {
|
||||||
if(is_at_end()) {
|
if(file_.tell() == file_.stats().st_size) {
|
||||||
phase_ = Phase::Gap;
|
phase_ = Phase::Gap;
|
||||||
} else {
|
} else {
|
||||||
block_length_ = file_.get16le();
|
block_length_ = file_.get16le();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user