Ticket #6712: MythGameFixes.3.diff
File MythGameFixes.3.diff, 5.8 KB (added by , 15 years ago) |
---|
-
mythgame/mythgame/gamehandler.cpp
459 459 "publisher, version, fanart, boxart) " 460 460 "VALUES (:SYSTEM, :ROMNAME, :GAMENAME, :GENRE, :YEAR, " 461 461 ":GAMETYPE, :ROMPATH, :COUNTRY, :CRC32, '1', '1', :PLOT, :PUBLISHER, :VERSION, " 462 ":FANART, BOXART)");462 ":FANART, :BOXART)"); 463 463 464 464 465 465 -
mythgame/mythgame/gameui.cpp
74 74 75 75 m_gameTree = new MythGenericTree("game root", 0, false); 76 76 77 timer = new QTimer(this);78 connect(timer, SIGNAL(timeout()), SLOT(showImageTimeout()));79 80 77 // create system filter to only select games where handlers are present 81 78 QString systemFilter; 82 79 … … 196 193 node->deleteAllChildren(); 197 194 fillNode(node); 198 195 } 199 if (timer->isActive())200 timer->stop();201 196 clearRomInfo(); 202 197 } 203 198 else … … 206 201 if (romInfo->Romname().isEmpty()) 207 202 romInfo->fillData(); 208 203 updateRomInfo(romInfo); 209 if (!romInfo-> ImagePath().isEmpty() || !romInfo->Fanart().isEmpty() ||204 if (!romInfo->Screenshot().isEmpty() || !romInfo->Fanart().isEmpty() || 210 205 !romInfo->Boxart().isEmpty()) 211 { 212 if (timer->isActive()) 213 timer->changeInterval(330); 214 else 215 timer->start(330, true); 216 } 206 showImages(); 217 207 else 218 208 { 219 209 if (m_gameImage->IsVisible()) … … 264 254 } 265 255 } 266 256 267 void GameUI::showImage Timeout(void)257 void GameUI::showImages(void) 268 258 { 269 259 m_gameImage->Load(); 270 260 if (!m_gameImage->IsVisible()) -
mythgame/mythgame/rominfo.cpp
267 267 setBoxart(query.value(16).toString()); 268 268 } 269 269 270 query.prepare("SELECT screenshots FROM gameplayers "271 "WHERE playername = :SYSTEM");272 query.bindValue(":SYSTEM",system);273 query.exec();274 275 if (query.next())276 {277 if (!query.value(0).toString().isEmpty())278 {279 QString Image = query.value(0).toString() + "/" + romname;280 if (FindImage(query.value(0).toString() + "/" + romname, &Image))281 setImagePath(Image);282 else283 setImagePath("");284 }285 }286 287 270 setRomCount(romInDB(romname,gametype)); 288 271 289 272 // If we have more than one instance of this rom in the DB fill in all -
mythgame/mythgame/gameui.h
24 24 public slots: 25 25 void nodeChanged(MythGenericTree* node); 26 26 void itemClicked(MythUIButtonListItem* item); 27 void showImage Timeout(void);27 void showImages(void); 28 28 void searchComplete(QString); 29 29 30 30 private: -
mythgame/mythgame/rominfo.h
43 43 system = lhs.system; 44 44 gamename = lhs.gamename; 45 45 genre = lhs.genre; 46 imagepath = lhs.imagepath;47 46 year = lhs.year; 48 47 favorite = lhs.favorite; 49 48 rompath = lhs.rompath; … … 107 106 QString CRC_VALUE() const { return crc_value; } 108 107 void setCRC_VALUE(const QString &lcrc_value) { crc_value = lcrc_value; } 109 108 110 QString ImagePath() const { return imagepath; }111 void setImagePath(const QString &limagepath) { imagepath = limagepath; }112 113 109 QString Plot() const { return plot; } 114 110 void setPlot(const QString &lplot) { plot = lplot; } 115 111 … … 136 132 QString system; 137 133 QString gamename; 138 134 QString genre; 139 QString imagepath;140 135 QString country; 141 136 QString crc_value; 142 137 QString gametype; -
mythgame/mythgame/gamesettings.cpp
89 89 HostLineEdit *GetScreenshotDir() 90 90 { 91 91 HostLineEdit *gc = new HostLineEdit("mythgame.screenshotdir"); 92 gc->setLabel(QObject::tr("Directory where Game Screenshot isstored"));92 gc->setLabel(QObject::tr("Directory where Game Screenshots are stored")); 93 93 gc->setValue(GetConfDir() + "/MythGame/Screenshots"); 94 94 gc->setHelpText(QObject::tr("This directory will be the default browse " 95 95 "location when assigning screenshots.")); … … 228 228 }; 229 229 }; 230 230 231 232 class ScreenPath : public LineEditSetting, public GameDBStorage233 {234 public:235 ScreenPath(const MythGamePlayerSettings &parent) :236 LineEditSetting(this), GameDBStorage(this, parent, "screenshots")237 {238 setLabel(QObject::tr("ScreenShots"));239 setHelpText(QObject::tr("Path to any screenshots for this player"));240 };241 };242 243 231 MythGamePlayerSettings::MythGamePlayerSettings() 244 232 { 245 233 // must be first … … 251 239 group->addChild(new GameType(*this)); 252 240 group->addChild(new Command(*this)); 253 241 group->addChild(new RomPath(*this)); 254 group->addChild(new ScreenPath(*this));255 242 group->addChild(new WorkingDirPath(*this)); 256 243 group->addChild(new Extensions(*this)); 257 244 group->addChild(new AllowMultipleRoms(*this));