[ui] ensure the default download directory for updates is the current app dir

* Closes #299
* Also fix update save dialog not retrieving the path when compiled for Vista or later
This commit is contained in:
Pete Batard 2014-03-17 20:42:10 +00:00
parent 54b7fdcddc
commit 77d9e919d2
5 changed files with 25 additions and 16 deletions

View file

@ -433,9 +433,10 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
update_check_in_progress = TRUE;
verbose = ReadRegistryKey32(REGKEY_HKCU, REGKEY_VERBOSE_UPDATES);
// Without this the FileDialog will produce error 0x8001010E when compiled for Vista or later
IGNORE_RETVAL(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED));
// Unless the update was forced, wait a while before performing the update check
if (!force_update_check) {
// TODO: Also check on inactivity
// It would of course be a lot nicer to use a timer and wake the thread, but my
// development time is limited and this is FASTER to implement.
do {