First post, by gulikoza
When running inside DOSBox, Carmageddon only shows black screen when the movies are supposed to be shown. It works fine with dgVoodoo.
I figured out, Carmageddon issues a LFB lock but never bothers to unlock the buffer (as that would actually trigger buffer update in openglide, instead the buffer remains empty). Glide reference specifically states that an application can only call grLfbLock and grLfbUnlock when it holds a lock to a buffer and cannot use other commands.
The following patch issues a buffer unlock when grSwapBuffers is called and re-locks the buffer after the SwapBuffers. It's against what reference manual says (even if SwapBuffers implicitly unlocked the buffer on real hardware, the application could not expect the LFB pointer to remain valid after the buffer swap), but it makes the game work 😀