Advertisement
Guest User

JA2 Video.cc patch

a guest
Sep 20th, 2011
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. --- commandergenius/project/jni/application/src/sgp/Video.cc 2011-09-20 14:55:30.717810586 +0400
  2. +++ commandergenius/project/jni/application/src/sgp/Video.cc 2011-09-20 15:00:11.444791671 +0400
  3. @@ -532,8 +532,8 @@
  4. void RefreshScreen(void)
  5. {
  6. // ANDROID DEBUG DEBUG: always force full redraw
  7. - gfForceFullScreenRefresh = TRUE;
  8. -
  9. + //gfForceFullScreenRefresh = FALSE;
  10. +
  11. if (guiVideoManagerState != VIDEO_ON) return;
  12.  
  13. SDL_BlitSurface(FrameBuffer, &MouseBackground, ScreenBuffer, &MouseBackground);
  14. @@ -611,31 +611,31 @@
  15. dst.x = MousePos.iX - gsMouseCursorXOffset;
  16. dst.y = MousePos.iY - gsMouseCursorYOffset;
  17. SDL_BlitSurface(MouseCursor, &src, ScreenBuffer, &dst);
  18. - SDL_UpdateRects(ScreenBuffer, 1, &dst);
  19. +// SDL_UpdateRects(ScreenBuffer, 1, &dst);
  20. SDL_UpdateRects(ScreenBuffer, 1, &MouseBackground);
  21. MouseBackground = dst;
  22.  
  23. - if (gfForceFullScreenRefresh)
  24. - {
  25. - SDL_UpdateRect(ScreenBuffer, 0, 0, 0, 0);
  26. - }
  27. - else
  28. - {
  29. - SDL_UpdateRects(ScreenBuffer, guiDirtyRegionCount, DirtyRegions);
  30. -
  31. - for (UINT32 i = 0; i < guiDirtyRegionExCount; i++)
  32. - {
  33. - SDL_Rect* r = &DirtyRegionsEx[i];
  34. - if (scrolling)
  35. - {
  36. - if (r->y <= gsVIEWPORT_WINDOW_END_Y && r->y + r->h <= gsVIEWPORT_WINDOW_END_Y)
  37. - {
  38. - continue;
  39. - }
  40. - }
  41. - SDL_UpdateRects(ScreenBuffer, 1, r);
  42. - }
  43. - }
  44. +// if (gfForceFullScreenRefresh)
  45. +// {
  46. +// SDL_UpdateRect(ScreenBuffer, 0, 0, 0, 0);
  47. +// }
  48. +// else
  49. +// {
  50. +// SDL_UpdateRects(ScreenBuffer, guiDirtyRegionCount, DirtyRegions);
  51. +//
  52. +// for (UINT32 i = 0; i < guiDirtyRegionExCount; i++)
  53. +// {
  54. +// SDL_Rect* r = &DirtyRegionsEx[i];
  55. +// if (scrolling)
  56. +// {
  57. +// if (r->y <= gsVIEWPORT_WINDOW_END_Y && r->y + r->h <= gsVIEWPORT_WINDOW_END_Y)
  58. +// {
  59. +// continue;
  60. +// }
  61. +// }
  62. +// SDL_UpdateRects(ScreenBuffer, 1, r);
  63. +// }
  64. +// }
  65.  
  66. gfForceFullScreenRefresh = FALSE;
  67. guiDirtyRegionCount = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement