Skip to content

Commit

Permalink
Skip newline char in Wh_Log() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
m1lhaus committed Dec 10, 2023
1 parent 5321cc0 commit bc18cf7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mods/toggle-taskbar-autohide.wh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,18 +552,18 @@ class UIAutomationWrapper {
if (SUCCEEDED(result)) {
isCOMInitialized = true;
} else {
Wh_Log(L"CoInitializeEx failed\n");
Wh_Log(L"CoInitializeEx failed");
return false;
}

result = CoCreateInstance(CLSID_CUIAutomation, NULL, CLSCTX_INPROC_SERVER, __uuidof(IUIAutomation), (void **)&uiAutomationInstance);
if (SUCCEEDED(result)) {
isUIAutomationInitialized = true;
} else {
Wh_Log(L"CoCreateInstance failed\n");
Wh_Log(L"CoCreateInstance failed");
return false;
}
Wh_Log(L"UIAutomationWrapper initilized\n");
Wh_Log(L"UIAutomationWrapper initilized");
return true;
}

Expand Down Expand Up @@ -1009,14 +1009,14 @@ bool OnMouseClick(HWND hWnd, WPARAM wParam, LPARAM lParam) {

IUIAutomation *pUIAutomation = g_UIAutomation.getInstance();
if (pUIAutomation == NULL) {
Wh_Log(L"UIAutomationWrapper failed to get instance\n");
Wh_Log(L"UIAutomationWrapper failed to get instance");
return false;
}

winrt::com_ptr<IUIAutomationElement> pWindowElement = NULL;
HRESULT hr = pUIAutomation->ElementFromPoint(pointerLocation, pWindowElement.put());
if (FAILED(hr) || !pWindowElement) {
Wh_Log(L"Failed to retrieve UI element from mouse click\n");
Wh_Log(L"Failed to retrieve UI element from mouse click");
return false;
}

Expand Down Expand Up @@ -1059,7 +1059,7 @@ BOOL Wh_ModInit() {

// init UIAutomation before hooks, otherwise subclass won't be unset and Explorer will crash if UIAutomation fails
if (!g_UIAutomation.init()) {
Wh_Log(L"UIAutomationWrapper failed to initialize\n");
Wh_Log(L"UIAutomationWrapper failed to initialize");
return FALSE;
}

Expand Down

0 comments on commit bc18cf7

Please sign in to comment.