Skip to content

Commit c79c5ff

Browse files
committed
fix: GPO saved rising/falling configuration does not correctly recall settings at startup CasparCG#305
1 parent df81415 commit c79c5ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Core/DatabaseManager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ QList<GpiPortModel> DatabaseManager::getGpiPorts()
514514

515515
QList<GpiPortModel> models;
516516
while (sql.next())
517-
models.push_back(GpiPortModel(sql.value("Id").toInt(),
517+
models.push_back(GpiPortModel(sql.value("Id").toInt() - 1,
518518
sql.value("RisingEdge").toInt() == 1, Playout::fromString(sql.value("Action").toString())));
519519

520520
return models;
@@ -549,7 +549,7 @@ QList<GpoPortModel> DatabaseManager::getGpoPorts()
549549

550550
QList<GpoPortModel> models;
551551
while (sql.next())
552-
models.push_back(GpoPortModel(sql.value("Id").toInt(),
552+
models.push_back(GpoPortModel(sql.value("Id").toInt() - 1,
553553
sql.value("RisingEdge").toInt() == 1, sql.value("PulseLengthMillis").toInt()));
554554

555555
return models;

0 commit comments

Comments
 (0)