diff -ur myth-0.17/mythgame/gametree.cpp myth-local/mythgame/gametree.cpp
--- myth-0.17/mythgame/gametree.cpp	2003-12-06 07:09:41.000000000 +1100
+++ myth-local/mythgame/gametree.cpp	2005-02-28 21:42:37.000000000 +1100
@@ -85,8 +85,11 @@
             regSystems.append(GameHandler::getHandler(i)->Systemname());
     }
 
+    bool isleaf = (first == "gamename");
+    QString selcols = isleaf ? "gamename, system" : first;
+
     QString thequery = QString("SELECT DISTINCT %1 FROM gamemetadata "
-                               "ORDER BY %2;").arg(first).arg(first);
+                               "ORDER BY %2;").arg(selcols).arg(first);
 
     QSqlQuery query = db->exec(thequery);
 
@@ -103,8 +106,25 @@
                 (regSystems.find(current) == regSystems.end()))
                 continue;
 
-            RomInfo *rinfo = new RomInfo();
-            rinfo->setField(first, current);
+            RomInfo* rinfo;
+            if (isleaf)
+            {
+                //  no guarantee System has been set so create a temp RomInfo so
+                //  that CreateRomInfo can create the correct subtype
+                RomInfo* temp = new RomInfo();
+                temp->setSystem(query.value(1).toString());
+                rinfo = GameHandler::CreateRomInfo(temp);
+                delete temp;
+
+                rinfo->setGamename(query.value(0).toString());
+                rinfo->setSystem(query.value(1).toString());
+                rinfo->fillData(db);
+            }
+            else
+            {
+                rinfo = new RomInfo();
+                rinfo->setField(first, current);
+            }
 
             GameTreeItem *titem = new GameTreeItem(first, rinfo);
 
@@ -246,9 +266,6 @@
     if (showfavs == "1")
       whereClause += " AND favorite=1";
 
-    QString thequery = QString("SELECT DISTINCT %1 FROM gamemetadata "
-                               "WHERE %2 ORDER BY %3;")
-                               .arg(column).arg(whereClause).arg(column);
 
     QStringList regSystems;
     if (column == "system")
@@ -258,6 +275,11 @@
     }
 
     bool isleaf = (column == "gamename");
+    QString selcols = isleaf ? "gamename, system" : column;
+
+    QString thequery = QString("SELECT DISTINCT %1 FROM gamemetadata "
+                               "WHERE %2 ORDER BY %3;")
+                               .arg(selcols).arg(whereClause).arg(column);
 
     QSqlQuery query = db->exec(thequery);
     if (query.isActive() && query.numRowsAffected() > 0)
@@ -273,8 +295,15 @@
             RomInfo* rinfo;
             if (isleaf)
             {
-                rinfo = GameHandler::CreateRomInfo(item->rominfo);
-                rinfo->setField(column, current);
+                //  no guarantee System has been set so create a temp RomInfo so
+                //  that CreateRomInfo can create the correct subtype
+                RomInfo* temp = new RomInfo();
+                temp->setSystem(query.value(1).toString());
+                rinfo = GameHandler::CreateRomInfo(temp);
+                delete temp;
+
+                rinfo->setGamename(query.value(0).toString());
+                rinfo->setSystem(query.value(1).toString());
                 rinfo->fillData(db);
             }
             else
