Mariano Alvarez Fernandez schrieb:
void __gr_cleardevice(void) { _DO_INIT_CHECK; GrResetClipBox(); GrFilledBox( 0, 0+PY, getmaxx(), getmaxy()+PY, BLACK);
^^^^^
__gr_Reset_ClipBox(); ==>/* GrClearScreen(__gr_colorbg); */
^^^^^^^^
moveto( 0, 0); }
I don't know. Perhaps GrFilledBox do the work faster. Harmuth, are you there?
May be, but AFAIK BGI docs say the screen will be filled with background color, not unconditionally BLACK, as GRX does in this case. But that's a minor thing, anybody can change this easily to fit his requirements. I was just curious about it.
Much more interesting: How to _safely_ change GrSetDriver() and/or _GrCloseVideoDriver() so that the screen will NOT be cleared at exit() when we are already back in that text mode we were in, when GrSetMode() was invoked for the first time. ["atexit(_GrCloseVideoDriver);" in GrSetDriver() in src/setup/setdrvr.c]