summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp13
-rw-r--r--plugins/PluginUpdater/src/Options.cpp2
-rw-r--r--plugins/PluginUpdater/src/stdafx.h2
-rw-r--r--plugins/PluginUpdater/src/version.h2
4 files changed, 8 insertions, 11 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index b8b9737b10..0b75c21b90 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -368,7 +368,7 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM
g_plugin.setDword(DB_SETTING_LAST_UPDATE, time(0));
- mir_forkthread(InitTimer);
+ InitTimer(0);
break;
}
@@ -794,7 +794,7 @@ static void CheckUpdates(void *)
else CallFunctionAsync(LaunchDialog, UpdateFiles);
}
- mir_forkthread(InitTimer, (success ? nullptr : (void*)2));
+ CallFunctionAsync(InitTimer, (success ? nullptr : (void*)2));
hashes.destroy();
hCheckThread = nullptr;
@@ -889,7 +889,6 @@ void InitTimer(void *type)
{
if (!opts.bUpdateOnPeriod)
return;
- Thread_SetName("PluginUpdater: InitTimer");
LONGLONG interval;
@@ -922,12 +921,10 @@ void InitTimer(void *type)
li.HighPart = ft.dwHighDateTime;
li.QuadPart += interval * 10000LL;
SetWaitableTimer(hTimer, &li, 0, TimerAPCProc, nullptr, 0);
-
- // Wait in an alertable state for the timer to go off.
- SleepEx(INFINITE, TRUE);
}
-void CreateTimer() {
+void CreateTimer()
+{
hTimer = CreateWaitableTimer(nullptr, FALSE, nullptr);
- mir_forkthread(InitTimer);
+ InitTimer(0);
}
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 4e83dc07cd..560aa2bc90 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -287,7 +287,7 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
Edit_GetText(GetDlgItem(hwndDlg, IDC_PERIOD), buffer, _countof(buffer));
g_plugin.setDword("Period", opts.Period = _wtoi(buffer));
- mir_forkthread(InitTimer, (void*)1);
+ InitTimer((void*)1);
bool bNoSymbols = false;
if (IsDlgButtonChecked(hwndDlg, IDC_STABLE)) {
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index 6d04baf458..2a74f8f77c 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -237,7 +237,7 @@ bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc);
void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number);
void __stdcall OpenPluginOptions(void*);
void CheckUpdateOnStartup();
-void InitTimer(void *type);
+void __stdcall InitTimer(void *type);
bool unzip(const wchar_t *ptszZipFile, wchar_t *ptszDestPath, wchar_t *ptszBackPath,bool ch);
diff --git a/plugins/PluginUpdater/src/version.h b/plugins/PluginUpdater/src/version.h
index a723d43878..afd5d9caf1 100644
--- a/plugins/PluginUpdater/src/version.h
+++ b/plugins/PluginUpdater/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>