1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 18:55:48 +00:00

Merge pull request #1379 from TomHarte/UnambiguousRejection

Don't move cursor near disk to folder if not about to load something.
This commit is contained in:
Thomas Harte 2024-05-27 15:05:04 -04:00 committed by GitHub
commit 71361638bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -243,7 +243,6 @@ class ConcreteMachine:
executor_.bus.read(address + 16, y2, false); executor_.bus.read(address + 16, y2, false);
switch(autoload_phase_) { switch(autoload_phase_) {
default: break; default: break;
case AutoloadPhase::WaitingForDiskContents: { case AutoloadPhase::WaitingForDiskContents: {
@ -261,17 +260,17 @@ class ConcreteMachine:
// Wait a further second, mouse down to (32, 240), left click. // Wait a further second, mouse down to (32, 240), left click.
// That'll trigger disk access. Then move up to the top left, // That'll trigger disk access. Then move up to the top left,
// in anticipation of the appearance of a window. // in anticipation of the appearance of a window.
CursorActionBuilder(cursor_actions_) auto &builder = CursorActionBuilder(cursor_actions_)
// .wait(5 * 24'000'000)
.move_to(IconBarDriveX, IconBarY) .move_to(IconBarDriveX, IconBarY)
.click(0) .click(0);
.set_phase(
target_program_.empty() ? AutoloadPhase::Ended : AutoloadPhase::WaitingForDiskContents
)
.move_to(IconBarDriveX, 36); // Just a guess of 'close' to where the program to launch
// will probably be, to have the cursor already nearby.
autoload_phase_ = AutoloadPhase::OpeningDisk; if(target_program_.empty()) {
autoload_phase_ = AutoloadPhase::Ended;
} else {
autoload_phase_ = AutoloadPhase::WaitingForDiskContents;
builder.move_to(IconBarDriveX, 80); // Just a guess of 'close' to where the program to launch
// will probably be, to have the cursor broadly nearby.
}
} }
break; break;
} }
@ -620,7 +619,6 @@ class ConcreteMachine:
enum class AutoloadPhase { enum class AutoloadPhase {
WaitingForStartup, WaitingForStartup,
OpeningDisk,
WaitingForDiskContents, WaitingForDiskContents,
WaitingForTargetIcon, WaitingForTargetIcon,
OpeningProgram, OpeningProgram,