Original Post
This question is pretty vague, but I have no clue how to fix it. After I press ESC to quit my program, the stupid thing freezes up for quite a while before finally returning to windows. I usually end up pressing CTRL+ALT+DEL to end the task. Obviously, this is a major pain.
Also, for some reason the all game input (mouse and keyboard) is delayed a few seconds unless I insert the following two lines somewhere in my main loop:
lpddsback->Lock(NULL,&ddsd, DDLOCK_SURFACEMEMORYPTR / DDLOCK_WAIT,NULL);
lpddsback->Unlock(bitmap_buffer);
When I add these lines, the input is not delayed, but the game still takes forever to shut down. Does anybody have any ideas?