X-Git-Url: https://gitweb.ps.run/autorec/blobdiff_plain/4264345d06a81cb561047d0973c44a129db934aa..8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index d89c199..4f4a866 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,10 +39,9 @@ HideNotificationIcon() void changeIcon(HWND hwnd, HINSTANCE hInstance, WORD id) { HICON icon = LoadIcon(hInstance, MAKEINTRESOURCE(id)); - HideNotificationIcon(); niData.hIcon = icon; if (! IsWindowVisible(hwnd)) - ShowNotificationIcon(); + Shell_NotifyIconA(NIM_MODIFY, &niData); SendMessage(hwnd, WM_SETICON, 0, (LPARAM)icon); SendMessage(hwnd, WM_SETICON, 1, (LPARAM)icon); } @@ -188,7 +187,7 @@ WinMain(HINSTANCE hInstance, lay_id col1 = win::createLayId(&window.ctx, row2, 80, 0, LAY_COLUMN, LAY_VCENTER); lstActiveProcesses.addStyle(WS_VSCROLL); - + lay_set_margins_ltrb(ctx, col1, 5, 0, 5, 0); win::ListBox lstMonitoredProcesses(&window, row2, 0, 0, 0, LAY_FILL); @@ -253,7 +252,7 @@ WinMain(HINSTANCE hInstance, SetTimer(window.hwnd, 10123, 100, [](HWND, UINT, UINT_PTR, DWORD) { if (!recording) { - if (checkForegroundProcess("notepad.exe")) { + if (checkForegroundProcess("League of Legends.exe")) { recording = true; process = getHwndProcess(GetForegroundWindow()); startRecording(); @@ -270,4 +269,6 @@ WinMain(HINSTANCE hInstance, while (window.update()) { ws::update(); } + + return 0; }