Skip to content

refresh

Thomas Foster edited this page Mar 22, 2021 · 4 revisions

Function   Refresh screen.

Syntaxvoid refresh(void);

Prototype in   dos.h

Return value   None.

Remarks

Call refresh to display any visual changes, such as text printed with cprintf', and to update the keyboard and mouse input buffers. Typically, refreshshould be called once in your program loop.refresh` limits the speed of your program to 60 FPS.

Example

int main()
{
    while (1)
    {
        clrscr();

        int mx = mousex();
        if ( mx < 50 )
            cprintf("mouse x: %d", mx);

        refresh();
    }
}

Header Files

Clone this wiki locally