I am doveloping a game brain champ. This is its version 3. In this version I want to use mouse in addition with keyboard for input. I have successfully tested its standalone keyboard version as well as mouse version. I have used int86() function for mouse with 0x33 interrupt number. Also I have used getch() function for keyboard input. But my main problem is I m not able to use mouse and keyboard simultaneously. As when I do so getch() holds the program and thus I can't get mouse input simultaneously. Please help me out. I am working on turbo c++ 3.0. I am an experienced programmer. Please give me sample code so that I can use it accordingly. Thanks in advance.
Jump to Post
Before calling getch() find out if anything is in the keyboard buffer kbhit() from conio.h will tell you that. If nothing there then you can check for mouse input.
All 8 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.