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