mirror of https://github.com/PCSX2/pcsx2.git
Qt: Cancel existing BIOS search on refresh
Stops lockups if you set a large directory.
This commit is contained in:
parent
d9587e20c0
commit
b601c49f6c
|
@ -65,6 +65,7 @@ void BIOSSettingsWidget::refreshList()
|
||||||
{
|
{
|
||||||
if (m_refresh_thread)
|
if (m_refresh_thread)
|
||||||
{
|
{
|
||||||
|
m_refresh_thread->requestInterruption();
|
||||||
m_refresh_thread->wait();
|
m_refresh_thread->wait();
|
||||||
delete m_refresh_thread;
|
delete m_refresh_thread;
|
||||||
}
|
}
|
||||||
|
@ -176,6 +177,9 @@ void BIOSSettingsWidget::RefreshThread::run()
|
||||||
{
|
{
|
||||||
for (const QFileInfo& info : dir.entryInfoList(QDir::Files))
|
for (const QFileInfo& info : dir.entryInfoList(QDir::Files))
|
||||||
{
|
{
|
||||||
|
if (isInterruptionRequested())
|
||||||
|
break;
|
||||||
|
|
||||||
BIOSInfo bi;
|
BIOSInfo bi;
|
||||||
QString full_path(info.absoluteFilePath());
|
QString full_path(info.absoluteFilePath());
|
||||||
if (!IsBIOS(full_path.toUtf8().constData(), bi.version, bi.description, bi.region, bi.zone))
|
if (!IsBIOS(full_path.toUtf8().constData(), bi.version, bi.description, bi.region, bi.zone))
|
||||||
|
|
Loading…
Reference in New Issue