mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-11 19:39:09 +01:00
-fixed bug which broke cover loading in plugin coverflow
for plugins where coverFolder is not set in the ini
This commit is contained in:
parent
51b62d7e7e
commit
b47d1285e7
@ -1665,14 +1665,22 @@ void CMenu::_initCF(void)
|
||||
tempname.assign(&tempname[tempname.find_last_of("/") + 1]);
|
||||
string coverFolder(m_plugin.GetCoverFolderName(m_gameList[i].settings[0]));
|
||||
if(EnabledPlugins.size() == 0) //all plugins
|
||||
m_cf.addItem(&m_gameList[i], fmt("%s/%s/%s.png", m_picDir.c_str(), coverFolder.c_str(), tempname.c_str()), fmt("%s/%s/%s.png", m_boxPicDir.c_str(), coverFolder.c_str(), tempname.c_str()), playcount, lastPlayed);
|
||||
{
|
||||
if(coverFolder.size() > 0)
|
||||
m_cf.addItem(&m_gameList[i], fmt("%s/%s/%s.png", m_picDir.c_str(), coverFolder.c_str(), tempname.c_str()), fmt("%s/%s/%s.png", m_boxPicDir.c_str(), coverFolder.c_str(), tempname.c_str()), playcount, lastPlayed);
|
||||
else
|
||||
m_cf.addItem(&m_gameList[i], fmt("%s/%s.png", m_picDir.c_str(), tempname.c_str()), fmt("%s/%s.png", m_boxPicDir.c_str(), tempname.c_str()), playcount, lastPlayed);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(u8 j = 0; j < EnabledPlugins.size(); j++)
|
||||
{
|
||||
if(EnabledPlugins[j] == true && m_gameList[i].settings[0] == m_plugin.getPluginMagic(j))
|
||||
{
|
||||
m_cf.addItem(&m_gameList[i], fmt("%s/%s/%s.png", m_picDir.c_str(), coverFolder.c_str(), tempname.c_str()), fmt("%s/%s/%s.png", m_boxPicDir.c_str(), coverFolder.c_str(), tempname.c_str()), playcount, lastPlayed);
|
||||
if(coverFolder.size() > 0)
|
||||
m_cf.addItem(&m_gameList[i], fmt("%s/%s/%s.png", m_picDir.c_str(), coverFolder.c_str(), tempname.c_str()), fmt("%s/%s/%s.png", m_boxPicDir.c_str(), coverFolder.c_str(), tempname.c_str()), playcount, lastPlayed);
|
||||
else
|
||||
m_cf.addItem(&m_gameList[i], fmt("%s/%s.png", m_picDir.c_str(), tempname.c_str()), fmt("%s/%s.png", m_boxPicDir.c_str(), tempname.c_str()), playcount, lastPlayed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,24 @@
|
||||
|
||||
//============================================================================
|
||||
// Name : plugin.cpp
|
||||
// Copyright : 2012 FIX94
|
||||
//============================================================================
|
||||
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2012 FIX94
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#include <gccore.h>
|
||||
#include <ogcsys.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "plugin.hpp"
|
||||
#include "memory/mem2.hpp"
|
||||
#include "gui/text.hpp"
|
||||
|
@ -1,9 +1,19 @@
|
||||
|
||||
//============================================================================
|
||||
// Name : plugin.hpp
|
||||
// Copyright : 2012 FIX94
|
||||
//============================================================================
|
||||
|
||||
/****************************************************************************
|
||||
* Copyright (C) 2012 FIX94
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
#ifndef _PLUGIN_HPP_
|
||||
#define _PLUGIN_HPP_
|
||||
|
||||
@ -12,11 +22,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "config/config.hpp"
|
||||
#include "loader/disc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define SWAP32(x) ((((x) & 0xff) << 24) | (((x) & 0xff00) << 8) | (((x) & 0xff0000) >> 8) | (((x) >> 24) & 0xff))
|
||||
|
||||
#define TAG_GAME_ID "{gameid}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user