Fixed issue with duplicated resolutions + resolutions not always greyed out when the options menu is viewed in-game

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5562 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2010-06-26 15:00:13 +00:00
parent d87bc09303
commit 0350423907
2 changed files with 8 additions and 6 deletions

View File

@@ -134,9 +134,9 @@ void Widget::elementRemoved()
// -----------------------------------------------------------------------------
void Widget::setActivated()
{
if (!m_deactivated) return; // already active, nothing to do
{
// even if this one is already active, do it anyway on purpose, maybe the
// children widgets need to be updated
m_deactivated = false;
const int count = m_children.size();
for (int n=0; n<count; n++)
@@ -149,8 +149,8 @@ void Widget::setActivated()
void Widget::setDeactivated()
{
if (m_deactivated) return; // already deactivated, nothing to do
// even if this one is already inactive, do it anyway on purpose, maybe the
// children widgets need to be updated
m_deactivated = true;
const int count = m_children.size();
for (int n=0; n<count; n++)

View File

@@ -120,6 +120,8 @@ void OptionsScreenVideo::init()
// --- get resolution list from irrlicht the first time
if (!m_inited)
{
res->clearItems();
const std::vector<VideoMode>& modes = irr_driver->getVideoModes();
const int amount = modes.size();
for(int n=0; n<amount; n++)
@@ -150,7 +152,7 @@ void OptionsScreenVideo::init()
} // end if not inited
res->updateItemDisplay();
// forbid changing resolution from in-game
if (StateManager::get()->getGameState() == GUIEngine::INGAME_MENU)
{