mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-08-17 00:46:11 +00:00
parent
8fcef63890
commit
ac19f62ed9
@ -88,9 +88,14 @@ CenteredGridView {
|
|||||||
source: model.boxart
|
source: model.boxart
|
||||||
|
|
||||||
onSourceSizeChanged: {
|
onSourceSizeChanged: {
|
||||||
if ((sourceSize.width == 130 && sourceSize.height == 180) || // GFE 2.0 placeholder image
|
// Nearly all of Nvidia's official box art does not match the dimensions of placeholder
|
||||||
(sourceSize.width == 628 && sourceSize.height == 888) || // GFE 3.0 placeholder image
|
// images, however the one known exeception is Overcooked. Therefore, we only execute
|
||||||
(sourceSize.width == 200 && sourceSize.height == 266)) // Our no_app_image.png
|
// the image size checks if this is not an app collector game. We know the officially
|
||||||
|
// supported games all have box art, so this check is not required.
|
||||||
|
if (!model.isAppCollectorGame &&
|
||||||
|
((sourceSize.width == 130 && sourceSize.height == 180) || // GFE 2.0 placeholder image
|
||||||
|
(sourceSize.width == 628 && sourceSize.height == 888) || // GFE 3.0 placeholder image
|
||||||
|
(sourceSize.width == 200 && sourceSize.height == 266))) // Our no_app_image.png
|
||||||
{
|
{
|
||||||
isPlaceholder = true
|
isPlaceholder = true
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,8 @@ QVariant AppModel::data(const QModelIndex &index, int role) const
|
|||||||
return app.id;
|
return app.id;
|
||||||
case DirectLaunchRole:
|
case DirectLaunchRole:
|
||||||
return app.directLaunch;
|
return app.directLaunch;
|
||||||
|
case AppCollectorGameRole:
|
||||||
|
return app.isAppCollectorGame;
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@ -106,6 +108,7 @@ QHash<int, QByteArray> AppModel::roleNames() const
|
|||||||
names[HiddenRole] = "hidden";
|
names[HiddenRole] = "hidden";
|
||||||
names[AppIdRole] = "appid";
|
names[AppIdRole] = "appid";
|
||||||
names[DirectLaunchRole] = "directLaunch";
|
names[DirectLaunchRole] = "directLaunch";
|
||||||
|
names[AppCollectorGameRole] = "appCollectorGame";
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,8 @@ class AppModel : public QAbstractListModel
|
|||||||
BoxArtRole,
|
BoxArtRole,
|
||||||
HiddenRole,
|
HiddenRole,
|
||||||
AppIdRole,
|
AppIdRole,
|
||||||
DirectLaunchRole
|
DirectLaunchRole,
|
||||||
|
AppCollectorGameRole,
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user