aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc/display.cpp
diff options
context:
space:
mode:
authorMarcus Comstedt2009-07-05 14:57:03 +0000
committerMarcus Comstedt2009-07-05 14:57:03 +0000
commit415d0c5b036a9b012c61972e7220e0f4df72db56 (patch)
tree54985bf86e39aaa4dc86fc9e38b7d91b6f4bf1c8 /backends/platform/dc/display.cpp
parentc353e8de1fb1afae67fdc69f06db4d399caa2ed5 (diff)
downloadscummvm-rg350-415d0c5b036a9b012c61972e7220e0f4df72db56.tar.gz
scummvm-rg350-415d0c5b036a9b012c61972e7220e0f4df72db56.tar.bz2
scummvm-rg350-415d0c5b036a9b012c61972e7220e0f4df72db56.zip
Refresh the screen if pollEvent() is called without updateScreen() being called for a long time.
svn-id: r42139
Diffstat (limited to 'backends/platform/dc/display.cpp')
-rw-r--r--backends/platform/dc/display.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index ba8e1ba04f..d1e95c6a91 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -285,11 +285,8 @@ void OSystem_Dreamcast::setShakePos(int shake_pos)
_current_shake_pos = shake_pos;
}
-void OSystem_Dreamcast::updateScreen(void)
+void OSystem_Dreamcast::updateScreenTextures(void)
{
- struct polygon_list mypoly;
- struct packed_colour_vertex_list myvertex;
-
if (_screen_dirty) {
_screen_buffer++;
@@ -328,6 +325,12 @@ void OSystem_Dreamcast::updateScreen(void)
_overlay_dirty = false;
}
+}
+
+void OSystem_Dreamcast::updateScreenPolygons(void)
+{
+ struct polygon_list mypoly;
+ struct packed_colour_vertex_list myvertex;
// *((volatile unsigned int *)(void*)0xa05f8040) = 0x00ff00;
@@ -448,6 +451,21 @@ void OSystem_Dreamcast::updateScreen(void)
ta_commit_frame();
// *((volatile unsigned int *)(void*)0xa05f8040) = 0x0;
+
+ _last_screen_refresh = Timer();
+}
+
+void OSystem_Dreamcast::updateScreen(void)
+{
+ updateScreenTextures();
+ updateScreenPolygons();
+}
+
+void OSystem_Dreamcast::maybeRefreshScreen(void)
+{
+ unsigned int t = Timer();
+ if((int)(t-_last_screen_refresh) > USEC_TO_TIMER(30000))
+ updateScreenPolygons();
}
void OSystem_Dreamcast::drawMouse(int xdraw, int ydraw, int w, int h,