-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double clicks not recognized when accelerated #2
Comments
Code at $85FC MAIN is used to detect double-clicks. It is called by DeskTop after an icon click (window or desktop), and it stashes the coords and starts a counter, then enters an input loop. If the counter hits zero, the cursor moves beyond a pixel threshold, or a non move/click event occurs it exits. If the event is a click it signals a double click. The counter is initialized with machine-specific values (IIe = $12C, IIc = $1F4, IIgs = $1FA). These could be inflated although the counter decrement logic only handles values in the range $0 ... $1FF. (There's enough room to replace the counter initialization with larger but fixed values, e.g. $3FF, and generalize the counter decrement logic.) If the counter is set to infinity (e.g. NOP out the checks) then basic click actions don't work until the mouse moves beyond the pixel threshold, so that's not an acceptable fix for arbitrary acceleration (e.g. an emulator running flat out) - there really does need to be a time limit. |
Interestingly, there is a second, possibly unused implementation of the double-click detection code.
Related, there is insertion point blinking. There are again two implementations:
Under Virtual ][ at normal speed, both have a cycle of about 1s, which is... weird. The |
The speed setting could also be used to slow down the open/close window animation on fast machines. |
Crazy idea for emulators: since emulators slow down when sound is produced, toggle the speaker when initiating a double-click detection loop, and infrequently during the loop. There may be a sweet spot where it isn't audible, but slows the emulator enough. |
The SPKR trick works in Virtual ][, although it induces a bit of UI jank on any click in a window |
Correction to previous:
|
Double clicks are not recognized as such when the machine (real or virtual) is faster than about 2MHz.
Observed on both Virtual ][ (emulation) and Laser 128EX (at 3.6MHz)
The text was updated successfully, but these errors were encountered: