HOOKFUNC BOOL WINAPI MySwapBuffers(HDC hdc) { depth_SwapBuffers++; //if(!usingSDLOrDD) if (!redrawingScreen) { // int localFramecount = framecount; // if(localFramecount == framecount) if (!PresentOGLD3D()) { SwapBuffers(hdc); // TODO: FrameBoundaryHDCtoAVI here? FrameBoundary(); } } //else { // maybe this branch is just broken? // rescue: the beagles crashes with no clear callstack if we get here. // disabled for now. //SwapBuffers(hdc); } depth_SwapBuffers--; return TRUE; }
HOOKFUNC void SDLCALL MySDL_GL_SwapBuffers() { debuglog(LCF_SDL|LCF_OGL|LCF_FRAME, __FUNCTION__ " called.\n"); usingSDLOrDD = true; bool alreadyDidBoundary = false; //if(!ShouldSkipDrawing(true, false)) { //SDL_GL_SwapBuffers(); // FIXME: replace with directx equivalent since opengl is lethal when combined with savestates if(PresentOGLD3D()) alreadyDidBoundary = true; } if(!used_sdl_flip && !alreadyDidBoundary) FrameBoundary(); }