mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-04 14:56:19 +00:00
Only allow waking PCs that are not online and paired
This commit is contained in:
@@ -46,6 +46,8 @@ QVariant ComputerModel::data(const QModelIndex& index, int role) const
|
||||
return computer->pairState == NvComputer::PS_PAIRED;
|
||||
case BusyRole:
|
||||
return computer->currentGameId != 0;
|
||||
case WakeableRole:
|
||||
return !computer->macAddress.isEmpty();
|
||||
case AddPcRole:
|
||||
return false;
|
||||
default:
|
||||
@@ -74,6 +76,7 @@ QHash<int, QByteArray> ComputerModel::roleNames() const
|
||||
names[PairedRole] = "paired";
|
||||
names[BusyRole] = "busy";
|
||||
names[AddPcRole] = "addPc";
|
||||
names[WakeableRole] = "wakeable";
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user