Fix nvda switching to powershell on speak. (#14944)

This commit is contained in:
Barry Rowe 2023-02-02 23:40:53 -08:00 committed by GitHub
parent 338430d1ec
commit 78326188c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,8 +466,13 @@ static void init_nvda(void)
}
}
#endif
g_plat_win32_flags &= ~PLAT_WIN32_FLAG_USE_NVDA;
g_plat_win32_flags |= PLAT_WIN32_FLAG_USE_POWERSHELL;
/* The above code is executed on each accessibility speak event, so
* we should only revert to powershell if nvda_lib wasn't loaded previously,
* and we weren't able to load it on this call, or we don't HAVE_DYLIB */
if ((g_plat_win32_flags & PLAT_WIN32_FLAG_USE_NVDA) && !nvda_lib) {
g_plat_win32_flags &= ~PLAT_WIN32_FLAG_USE_NVDA;
g_plat_win32_flags |= PLAT_WIN32_FLAG_USE_POWERSHELL;
}
}
#endif