diff options
Diffstat (limited to 'backends/platform/wii')
-rw-r--r-- | backends/platform/wii/options.cpp | 2 | ||||
-rw-r--r-- | backends/platform/wii/osystem.h | 1 | ||||
-rw-r--r-- | backends/platform/wii/osystem_events.cpp | 3 | ||||
-rw-r--r-- | backends/platform/wii/osystem_gfx.cpp | 16 | ||||
-rw-r--r-- | backends/platform/wii/osystem_sfx.cpp | 8 | ||||
-rw-r--r-- | backends/platform/wii/wii.mk | 5 |
6 files changed, 29 insertions, 6 deletions
diff --git a/backends/platform/wii/options.cpp b/backends/platform/wii/options.cpp index 0a21b45561..2a47958e3b 100644 --- a/backends/platform/wii/options.cpp +++ b/backends/platform/wii/options.cpp @@ -183,7 +183,7 @@ void WiiOptionsDialog::handleTickle() { break; default: - label = String::printf(_("Network not initialsed (%d)"), status); + label = String::printf(_("Network not initialised (%d)"), status); break; } diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index eaaf616538..ed33b43a81 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -117,6 +117,7 @@ private: void deinitGfx(); void updateScreenResolution(); void switchVideoMode(int mode); + bool needsScreenUpdate(); void initSfx(); void deinitSfx(); diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp index 488834fc20..5d0bca453f 100644 --- a/backends/platform/wii/osystem_events.cpp +++ b/backends/platform/wii/osystem_events.cpp @@ -300,6 +300,9 @@ bool OSystem_Wii::pollEvent(Common::Event &event) { return true; } + if (needsScreenUpdate()) + updateScreen(); + u32 bd = 0, bh = 0, bu = 0; if (PAD_ScanPads() & 1) { diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 3ce6343800..09575bb83d 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -441,6 +441,22 @@ void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y, _gameDirty = true; } +bool OSystem_Wii::needsScreenUpdate() { + if (getMillis() - _lastScreenUpdate < 1000 / MAX_FPS) + return false; + + if (_gameRunning && _gameDirty) + return true; + + if (_overlayVisible && _overlayDirty) + return true; + + if (_mouseVisible && _texMouse.palette && _cursorPaletteDirty) + return true; + + return false; +} + void OSystem_Wii::updateScreen() { static f32 ar; static gfx_screen_coords_t cc; diff --git a/backends/platform/wii/osystem_sfx.cpp b/backends/platform/wii/osystem_sfx.cpp index 6efb47ff33..33397f0a93 100644 --- a/backends/platform/wii/osystem_sfx.cpp +++ b/backends/platform/wii/osystem_sfx.cpp @@ -25,7 +25,7 @@ #define SFX_THREAD_STACKSIZE (1024 * 128) #define SFX_THREAD_PRIO 80 -#define SFX_THREAD_FRAG_SIZE 2048 +#define SFX_THREAD_FRAG_SIZE (1024 * 8) #define SFX_BUFFERS 3 static lwpq_t sfx_queue; @@ -56,9 +56,9 @@ static void * sfx_thread_func(void *arg) { // the hardware uses two buffers: a front and a back buffer // we use 3 buffers here: two are beeing pushed to the DSP, // and the free one is where our mixer writes to - // thus the latency of our steam is: - // 2048 [frag size] / 48000 / 2 [16bit] / 2 [stereo] * 2 [hw buffers] - // -> 21.3ms + // thus the latency of our stream is: + // 8192 [frag size] / 48000 / 2 [16bit] / 2 [stereo] * 2 [hw buffers] + // -> 85.3ms sb_sw = (sb_hw + 1) % SFX_BUFFERS; mixer->mixCallback(sound_buffer[sb_sw], SFX_THREAD_FRAG_SIZE); DCFlushRange(sound_buffer[sb_sw], SFX_THREAD_FRAG_SIZE); diff --git a/backends/platform/wii/wii.mk b/backends/platform/wii/wii.mk index c92b9017b6..c1512551d7 100644 --- a/backends/platform/wii/wii.mk +++ b/backends/platform/wii/wii.mk @@ -40,6 +40,9 @@ ifneq ($(DIST_FILES_ENGINEDATA),) endif $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip wiidist/scummvm/ +wiiloaddist: wiidist + cd wiidist && zip -9r scummvm.zip scummvm/ + $(DEVKITPPC)/bin/wiiload wiidist/scummvm.zip -.PHONY: wiiclean wiiload geckoupload wiigdb wiidebug wiidist +.PHONY: wiiclean wiiload geckoupload wiigdb wiidebug wiidist wiiloaddist |