2
0
forked from Ivasoft/DSView

fix: print a invalid screen index

This commit is contained in:
dreamsourcelabTAI
2024-01-22 18:06:20 +08:00
parent 049b86fbb3
commit 288a459c93

View File

@@ -523,7 +523,16 @@ void MainFrame::readSettings()
move(left, top);
#endif
showMaximized(); // show max by system api
dsv_info("show as max, screen:%s", QGuiApplication::screens().at(scrIndex)->name().toStdString().c_str());
QString scrName;
if (scrIndex == -1){
scrName = QGuiApplication::primaryScreen()->name();
}
else{
scrName = QGuiApplication::screens().at(scrIndex)->name();
}
dsv_info("show as max, screen:%s", scrName.toStdString().c_str());
}
else if (bReset)
{