Skip to content

Commit

Permalink
Fix engine switching with Microsoft UIAutomation.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1maker committed Aug 31, 2024
1 parent 5f6d5ea commit 210009d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SRC/SRAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ BOOL FindProcess(const wchar_t* name) {
#endif
static Engine* get_engine(int);
static void speech_engine_update() {
if (!g_currentEngine->GetActive() || g_currentEngine->GetNumber() == ENGINE_SAPI) {
if (!g_currentEngine->GetActive() || g_currentEngine->GetNumber() == ENGINE_SAPI || g_currentEngine->GetNumber() == ENGINE_UIA) {
#ifdef _WIN32
if (FindProcess(L"narrator.exe") == TRUE) {
g_currentEngine = get_engine(ENGINE_UIA);
Expand All @@ -301,7 +301,7 @@ static void speech_engine_update() {
break;
}
}
}
}
#ifdef _WIN32
}
#endif
Expand Down

0 comments on commit 210009d

Please sign in to comment.