dominus

Untitled

Dec 10th, 2019
202
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: src/debug/debug_gui.cpp
  2. ===================================================================
  3. --- src/debug/debug_gui.cpp (revision 4296)
  4. +++ src/debug/debug_gui.cpp (working copy)
  5. @@ -67,7 +67,7 @@
  6. if(buf[len - 1] != '\n' && len + 1 < sizeof(buf) ) strcat(buf,"\n");
  7.  
  8. if(debuglog) fprintf(debuglog,"%s",buf);
  9. -
  10. + if(debuglog) fflush(debuglog);
  11. if (logBuffPos != logBuff.end()) {
  12. logBuffPos=logBuff.end();
  13. DEBUG_RefreshPage(0);
  14. Index: src/gui/sdlmain.cpp
  15. ===================================================================
  16. --- src/gui/sdlmain.cpp (revision 4296)
  17. +++ src/gui/sdlmain.cpp (working copy)
  18. @@ -691,6 +691,18 @@
  19. SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 0 );
  20. #endif
  21. GFX_SetupSurfaceScaled(SDL_OPENGL,0);
  22. + int a =-1;
  23. + SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER,&a);
  24. + LOG_MSG("double buffer opengl %d",a);
  25. + a = -1;
  26. + SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE,&a);
  27. + LOG_MSG("depth %d",a);
  28. + a = -1;
  29. + SDL_GL_GetAttribute(SDL_GL_BUFFER_SIZE,&a);
  30. + LOG_MSG("buffersize %d",a);
  31. + SDL_GL_GetAttribute(SDL_GL_STENCIL_SIZE,&a);
  32. + LOG_MSG("stencilsize %d",a);
  33. + LOG_MSG("bits pp %d",sdl.surface->format->BitsPerPixel);
  34. if (!sdl.surface || sdl.surface->format->BitsPerPixel<15) {
  35. LOG_MSG("SDL:OPENGL: Can't open drawing surface, are you running in 16bpp (or higher) mode?");
  36. goto dosurface;
  37. @@ -834,6 +846,7 @@
  38. #endif
  39.  
  40. void GFX_SwitchFullScreen(void) {
  41. + LOG_MSG("switching mode");
  42. sdl.desktop.fullscreen=!sdl.desktop.fullscreen;
  43. if (sdl.desktop.fullscreen) {
  44. if (!sdl.mouse.locked) GFX_CaptureMouse();
  45. @@ -867,6 +880,7 @@
  46. }
  47.  
  48. void GFX_SwitchFullscreenNoReset(void) {
  49. + LOG_MSG("switching mode");
  50. sdl.desktop.fullscreen=!sdl.desktop.fullscreen;
  51. }
  52.  
  53. @@ -926,7 +940,10 @@
  54. } else
  55. pixels=(Bit8u *)sdl.opengl.framebuf;
  56. pitch=sdl.opengl.pitch;
  57. + LOG_MSG("pitch %d and pixels %d", pitch, pixels);
  58. + if(pixels == NULL) return false;
  59. sdl.updating=true;
  60. + //LOG_MSG("1pitch %d and 1pixels %d", pitch, pixels);
  61. return true;
  62. #endif
  63. default:
  64. @@ -943,6 +960,7 @@
  65. if (!sdl.updating)
  66. return;
  67. sdl.updating=false;
  68. + //return;
  69. switch (sdl.desktop.type) {
  70. case SCREEN_SURFACE:
  71. if (SDL_MUSTLOCK(sdl.surface)) {
  72. @@ -1009,7 +1027,8 @@
  73. glClearColor (0.0f, 0.0f, 0.0f, 1.0f);
  74. glClear(GL_COLOR_BUFFER_BIT);
  75. if (sdl.opengl.pixel_buffer_object) {
  76. - glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT);
  77. + GLboolean a = glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT);
  78. + if (a == GL_FALSE) LOG_MSG("HELP");
  79. glBindTexture(GL_TEXTURE_2D, sdl.opengl.texture);
  80. glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0,
  81. sdl.draw.width, sdl.draw.height, GL_BGRA_EXT,
  82. @@ -1016,6 +1035,7 @@
  83. GL_UNSIGNED_INT_8_8_8_8_REV, 0);
  84. glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
  85. glCallList(sdl.opengl.displaylist);
  86. + glFinish();
  87. SDL_GL_SwapBuffers();
  88. } else if (changedLines) {
  89. Bitu y = 0, index = 0;
RAW Paste Data