Weekly Qbasic and Qb64 Lesson Topics

General Category => General QB64 Forum => Topic started by: Mal-2 on July 31, 2017, 12:03:04 pm



Title: How do I ignore inadvertent mouse dragging?
Post by: Mal-2 on July 31, 2017, 12:03:04 pm
I am having a problem with mouse input. Clicks go through and get processed correctly, but if the mouse is moved even one pixel while the button is down, then it registers as a second click. If the motion goes even further than one pixel, it fires off a new click for every pixel moved! How can I make QB64 ignore mouse drags and treat them as merely a click at the initial position? [Answer: run a loop that polls mouse info until the button is released. Place it after whatever loop was waiting for the original click. Very hacky, but apparently necessary.]

Also, is there a way to make sound files play in stereo? They get downmixed to mono now. [Confirmed to be a qb64 bug introduced when the underlying codebase was moved from SDL to GL. Version 0.954 does not have the problem – but sticking with an old, unsupported build is not a viable option.]