aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/midi/timidity.cpp2
-rw-r--r--backends/platform/dc/dc.h6
-rw-r--r--backends/platform/dc/display.cpp26
-rw-r--r--backends/platform/dc/input.cpp2
4 files changed, 30 insertions, 6 deletions
diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp
index c813441724..d533dab770 100644
--- a/backends/midi/timidity.cpp
+++ b/backends/midi/timidity.cpp
@@ -99,7 +99,7 @@ private:
int connect_to_server(const char* hostname, unsigned short tcp_port);
/* send command to the server; printf-like; returns reply string */
- char *timidity_ctl_command(const char *fmt, ...);
+ char *timidity_ctl_command(const char *fmt, ...) GCC_PRINTF(2, 3);
/* timidity data socket-related stuff */
void timidity_meta_seq(int p1, int p2, int p3);
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index f86a2c6065..b67bbb51a1 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -194,7 +194,7 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys
SoftKeyboard _softkbd;
int _ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_old_x, _ms_old_y;
- int _ms_hotspot_x, _ms_hotspot_y, _ms_visible, _devpoll;
+ int _ms_hotspot_x, _ms_hotspot_y, _ms_visible, _devpoll, _last_screen_refresh;
int _current_shake_pos, _screen_w, _screen_h;
int _overlay_x, _overlay_y;
unsigned char *_ms_buf;
@@ -220,11 +220,15 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys
uint initSound();
void checkSound();
+ void updateScreenTextures(void);
+ void updateScreenPolygons(void);
+ void maybeRefreshScreen(void);
void drawMouse(int xdraw, int ydraw, int w, int h,
unsigned char *buf, bool visible);
void setScaling();
+
Common::SaveFileManager *createSavefileManager();
};
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,
diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp
index 1b85f601a6..5d4ed7ce96 100644
--- a/backends/platform/dc/input.cpp
+++ b/backends/platform/dc/input.cpp
@@ -202,6 +202,8 @@ bool OSystem_Dreamcast::pollEvent(Common::Event &event)
if (((int)(t-_devpoll))>=0)
_devpoll = t + USEC_TO_TIMER(17000);
+ maybeRefreshScreen();
+
int mask = getimask();
setimask(15);
checkSound();