added mutex for ui refresh
This commit is contained in:
parent
7c00fd638c
commit
37317def9f
@ -7,12 +7,11 @@
|
|||||||
|
|
||||||
#include "../include/reHDD.h"
|
#include "../include/reHDD.h"
|
||||||
|
|
||||||
|
static std::mutex mxUIrefresh;
|
||||||
|
|
||||||
TUI::TUI(void)
|
TUI::TUI(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -53,6 +52,7 @@ void TUI::initTUI()
|
|||||||
|
|
||||||
void TUI::updateTUI(vector <Drive>* pvecDrives, uint8_t u8SelectedEntry)
|
void TUI::updateTUI(vector <Drive>* pvecDrives, uint8_t u8SelectedEntry)
|
||||||
{
|
{
|
||||||
|
mxUIrefresh.lock();
|
||||||
int stdscrX, stdscrY;
|
int stdscrX, stdscrY;
|
||||||
getmaxyx(stdscr, stdscrY, stdscrX);
|
getmaxyx(stdscr, stdscrY, stdscrX);
|
||||||
|
|
||||||
@ -135,6 +135,8 @@ void TUI::updateTUI(vector <Drive>* pvecDrives, uint8_t u8SelectedEntry)
|
|||||||
detailview=overwriteDetailViewWindow(((stdscrX)-(int)(stdscrX/3)-7), (stdscrY-15), (int)(stdscrX/3)+5);
|
detailview=overwriteDetailViewWindow(((stdscrX)-(int)(stdscrX/3)-7), (stdscrY-15), (int)(stdscrX/3)+5);
|
||||||
wrefresh(detailview);
|
wrefresh(detailview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mxUIrefresh.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TUI::UserInput TUI::readUserInput()
|
enum TUI::UserInput TUI::readUserInput()
|
||||||
|
Loading…
Reference in New Issue
Block a user