Question

Hi I'm doing an assignment in C in Unix and the task is to make a simple pong game. I've got the game working now except there is one annoying part, there is a blinking cursor directly behind the paddle constantly. How do I turn this off?

Here is a screenshot.

enter image description here

Was it helpful?

Solution

If your terminal supports making the cursor invisible, you can do so with the curs_set function:

curs_set(0);

If your terminal doesn't support making it invisible, curs_set will return ERR, and your only option will be to try to move the cursor to the least distracting location possible (In this case, just keeping the cursor on top of the ball should be suitable).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top