RemovableDriveManager: not calling update from status()
Update was called too often on main thread mostly from status() causing delays
This commit is contained in:
parent
c145d60df4
commit
b941560736
2 changed files with 2 additions and 3 deletions
|
@ -469,9 +469,6 @@ bool RemovableDriveManager::set_and_verify_last_save_path(const std::string &pat
|
||||||
|
|
||||||
RemovableDriveManager::RemovableDrivesStatus RemovableDriveManager::status()
|
RemovableDriveManager::RemovableDrivesStatus RemovableDriveManager::status()
|
||||||
{
|
{
|
||||||
#ifndef REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
|
|
||||||
this->update();
|
|
||||||
#endif // REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
|
|
||||||
|
|
||||||
RemovableDriveManager::RemovableDrivesStatus out;
|
RemovableDriveManager::RemovableDrivesStatus out;
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,6 +69,8 @@ public:
|
||||||
// On Windows, the function does not block, and the eject is detected in the background thread.
|
// On Windows, the function does not block, and the eject is detected in the background thread.
|
||||||
void eject_drive();
|
void eject_drive();
|
||||||
|
|
||||||
|
// Status is used to retrieve info for showing UI buttons.
|
||||||
|
// Status is called every time when change of UI buttons is possible therefore should not perform update.
|
||||||
struct RemovableDrivesStatus {
|
struct RemovableDrivesStatus {
|
||||||
bool has_removable_drives { false };
|
bool has_removable_drives { false };
|
||||||
bool has_eject { false };
|
bool has_eject { false };
|
||||||
|
|
Loading…
Reference in a new issue