summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/CmpSelectDlg.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-05 22:10:15 +0200
committerAki <please@ignore.pl>2022-04-05 22:10:15 +0200
commitb61b59ae1b7cd4041ef0a815b7e96537418298c9 (patch)
treefd696fa483da2ee6db0f1d67784302d52f768d48 /StarsEx/CmpSelectDlg.h
parent3ccf42bc86d745b1b71a4cfb46cb6c024ba110cd (diff)
downloadstarshatter-b61b59ae1b7cd4041ef0a815b7e96537418298c9.zip
starshatter-b61b59ae1b7cd4041ef0a815b7e96537418298c9.tar.gz
starshatter-b61b59ae1b7cd4041ef0a815b7e96537418298c9.tar.bz2
Fixed more potential locking problems in Campaign selection screen
Diffstat (limited to 'StarsEx/CmpSelectDlg.h')
-rw-r--r--StarsEx/CmpSelectDlg.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/StarsEx/CmpSelectDlg.h b/StarsEx/CmpSelectDlg.h
index 093e21d..ee52425 100644
--- a/StarsEx/CmpSelectDlg.h
+++ b/StarsEx/CmpSelectDlg.h
@@ -14,7 +14,8 @@
#ifndef CmpSelectDlg_h
#define CmpSelectDlg_h
-#include <mutex>
+#include <shared_mutex>
+#include <thread>
#include "Types.h"
#include "FormWindow.h"
@@ -53,7 +54,7 @@ public:
virtual void OnAccept(AWEvent* event);
virtual void OnCancel(AWEvent* event);
- virtual DWORD LoadProc();
+ virtual void LoadProc();
protected:
virtual void StartLoadProc();
@@ -76,8 +77,8 @@ protected:
Starshatter* stars;
Campaign* campaign;
int selected_mission;
- HANDLE hproc;
- std::mutex sync;
+ std::thread hproc;
+ std::shared_mutex sync;
bool loading;
bool loaded;
Text load_file;