diff --git a/UI/win-update/win-update.cpp b/UI/win-update/win-update.cpp index 00d891e83..06566daec 100644 --- a/UI/win-update/win-update.cpp +++ b/UI/win-update/win-update.cpp @@ -503,26 +503,6 @@ int AutoUpdateThread::queryUpdate(bool localManualUpdate, const char *text_utf8) return ret; } -static bool IsFileInUse(const wstring &file) -{ - WinHandle f = CreateFile(file.c_str(), GENERIC_WRITE, 0, nullptr, - OPEN_EXISTING, 0, nullptr); - if (!f.Valid()) { - int err = GetLastError(); - if (err == ERROR_SHARING_VIOLATION || - err == ERROR_LOCK_VIOLATION) - return true; - } - - return false; -} - -static bool IsGameCaptureInUse() -{ - wstring path = L"..\\..\\data\\obs-plugins\\win-capture\\graphics-hook"; - return IsFileInUse(path + L"32.dll") || IsFileInUse(path + L"64.dll"); -} - void AutoUpdateThread::run() try { long responseCode; @@ -546,29 +526,6 @@ try { BPtr manifestPath = GetConfigPathPtr("obs-studio\\updates\\manifest.json"); - auto ActiveOrGameCaptureLocked = [this]() { - if (obs_video_active()) { - if (manualUpdate) - info(QTStr("Updater.Running.Title"), - QTStr("Updater.Running.Text")); - return true; - } - if (IsGameCaptureInUse()) { - if (manualUpdate) - info(QTStr("Updater.GameCaptureActive.Title"), - QTStr("Updater.GameCaptureActive.Text")); - return true; - } - - return false; - }; - - /* ----------------------------------- * - * warn if running or gc locked */ - - if (ActiveOrGameCaptureLocked()) - return; - /* ----------------------------------- * * create signature provider */ @@ -665,12 +622,6 @@ try { if (!manualUpdate && updateVer == skipUpdateVer) return; - /* ----------------------------------- * - * warn again if running or gc locked */ - - if (ActiveOrGameCaptureLocked()) - return; - /* ----------------------------------- * * fetch updater module */