mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
Qt: Show game list scanning progress visually
This commit is contained in:
parent
0e3bcfa7b5
commit
21ecf231d9
|
@ -32,5 +32,7 @@ int main(int argc, char* argv[])
|
|||
std::unique_ptr<MainWindow> window = std::make_unique<MainWindow>(host_interface.get());
|
||||
window->show();
|
||||
|
||||
host_interface->refreshGameList();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "frontend-common/sdl_controller_interface.h"
|
||||
#include "mainwindow.h"
|
||||
#include "opengldisplaywidget.h"
|
||||
#include "qtprogresscallback.h"
|
||||
#include "qtsettingsinterface.h"
|
||||
#include "qtutils.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
@ -35,7 +36,6 @@ QtHostInterface::QtHostInterface(QObject* parent)
|
|||
qRegisterMetaType<SystemBootParameters>();
|
||||
|
||||
loadSettings();
|
||||
refreshGameList();
|
||||
createThread();
|
||||
}
|
||||
|
||||
|
@ -141,10 +141,14 @@ void QtHostInterface::loadSettings()
|
|||
|
||||
void QtHostInterface::refreshGameList(bool invalidate_cache /* = false */, bool invalidate_database /* = false */)
|
||||
{
|
||||
Assert(!isOnWorkerThread());
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_qsettings_mutex);
|
||||
QtSettingsInterface si(m_qsettings);
|
||||
m_game_list->SetSearchDirectoriesFromSettings(si);
|
||||
m_game_list->Refresh(invalidate_cache, invalidate_database);
|
||||
|
||||
QtProgressCallback progress(m_main_window);
|
||||
m_game_list->Refresh(invalidate_cache, invalidate_database, &progress);
|
||||
emit gameListRefreshed();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue