From f83670be3de673488504ed29a60d1027f3623207 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Fri, 11 May 2012 15:14:57 +0000 Subject: [PATCH] -fixed coverflow being too slow in PAL50 video mode -commented out a problematic line in code --- source/gui/coverflow.cpp | 14 +++++++++++--- source/gui/coverflow.hpp | 3 ++- source/gui/video.cpp | 7 ++++++- source/gui/video.hpp | 2 ++ source/menu/menu.cpp | 2 +- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/source/gui/coverflow.cpp b/source/gui/coverflow.cpp index 24ae7799..d0278bd7 100644 --- a/source/gui/coverflow.cpp +++ b/source/gui/coverflow.cpp @@ -216,13 +216,21 @@ CCoverFlow::CCoverFlow(void) LWP_MutexInit(&m_mutex, 0); } -bool CCoverFlow::init(const SmartBuf &font, u32 font_size) +bool CCoverFlow::init(const SmartBuf &font, u32 font_size, bool vid_50hz) { + m_50hz = vid_50hz; + // Load font m_font.fromBuffer(font, font_size, TITLEFONT); m_fontColor = CColor(0xFFFFFFFF); m_fanartFontColor = CColor(0xFFFFFFFF); - // + + if(m_50hz) + { + gprintf("WiiFlow is in 50hz mode\n"); + m_minDelay = 4; + } + if (CONF_GetAspectRatio() == CONF_ASPECT_16_9) guPerspective(m_projMtx, 45, 16.f / 9.f, .1f, 300.f); else @@ -2347,7 +2355,7 @@ void CCoverFlow::prevID(wchar_t *c) void CCoverFlow::_coverTick(int i) { - float speed = m_selected ? 0.07f : 0.1f; + float speed = m_selected ? (m_50hz ? 0.085f : 0.07f) : (m_50hz ? 0.12f : 0.1f); Vector3D posDist(m_covers[i].targetPos - m_covers[i].pos); if (posDist.sqNorm() < 0.5f) diff --git a/source/gui/coverflow.hpp b/source/gui/coverflow.hpp index 5a267564..5275130c 100644 --- a/source/gui/coverflow.hpp +++ b/source/gui/coverflow.hpp @@ -38,7 +38,7 @@ public: CCoverFlow(void); ~CCoverFlow(void); // - bool init(const SmartBuf &font, u32 font_size); + bool init(const SmartBuf &font, u32 font_size, bool vid_50hz); // Cover list management void clear(void); void reserve(u32 capacity); @@ -257,6 +257,7 @@ private: bool m_fanartPlaying; bool m_box; bool m_useHQcover; + bool m_50hz; u32 m_range; u32 m_rows; u32 m_columns; diff --git a/source/gui/video.cpp b/source/gui/video.cpp index 3f2a4f99..935e1995 100644 --- a/source/gui/video.cpp +++ b/source/gui/video.cpp @@ -112,6 +112,11 @@ void CVideo::init(void) m_rmode->viWidth = m_wide ? 700 : 672; + if(m_rmode == &TVPal576IntDfScale || m_rmode == &TVPal576ProgScale) + m_50hz = true; + else + m_50hz = false; + //CONF_VIDEO_NTSC and CONF_VIDEO_MPAL and m_rmode TVEurgb60Hz480IntDf are the same max height and width. if (type == CONF_VIDEO_PAL && m_rmode != &TVEurgb60Hz480IntDf) { @@ -224,7 +229,7 @@ void CVideo::cleanup(void) SMART_FREE(m_aaBuffer[i]); m_aaBufferSize[i] = 0; } - MEM1_free(m_fifo); + //MEM1_free(m_fifo); } void CVideo::prepareAAPass(int aaStep) diff --git a/source/gui/video.hpp b/source/gui/video.hpp index 85b4154b..4477a4b1 100644 --- a/source/gui/video.hpp +++ b/source/gui/video.hpp @@ -61,6 +61,7 @@ public: u32 width2D(void) { return m_width2D; } u32 height2D(void) { return m_height2D; } bool wide(void) const { return m_wide; } + bool vid_50hz(void) const { return m_50hz; } void set2DViewport(u32 w, u32 h, int x, int y); void prepareStencil(void); void renderStencil(void); @@ -80,6 +81,7 @@ private: float m_yScale; u32 m_xfbHeight; bool m_wide; + bool m_50hz; u32 m_width2D; u32 m_height2D; int m_x2D; diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index f861d81d..b740ce5e 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -325,7 +325,7 @@ void CMenu::init(void) } } - m_cf.init(m_base_font, m_base_font_size); + m_cf.init(m_base_font, m_base_font_size, m_vid.vid_50hz()); //Make important folders first. makedir((char *)m_cacheDir.c_str());