mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-06-07 07:14:27 +00:00
[idd] helper: update notification icon to reflect GPU availability
This commit is contained in:
@@ -192,6 +192,11 @@ void CNotifyWindow::handleGPUNotification(bool hasGPU)
|
||||
L"Looking Glass (IDD) with GPU acceleration" :
|
||||
L"Looking Glass (IDD) with software rendering");
|
||||
|
||||
if (hasGPU)
|
||||
m_iconData.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(ID_GPU_ICON));
|
||||
else
|
||||
m_iconData.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(ID_NO_GPU_ICON));
|
||||
|
||||
if (!Shell_NotifyIcon(NIM_MODIFY, &m_iconData))
|
||||
{
|
||||
DEBUG_ERROR_HR(GetLastError(), "Shell_NotifyIcon(NIM_ADD)");
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "Resources.h"
|
||||
|
||||
ID_MAIN_ICON ICON "../../resources/icon.ico"
|
||||
ID_GPU_ICON ICON "../../resources/icon-gpu.ico"
|
||||
ID_NO_GPU_ICON ICON "../../resources/icon-nogpu.ico"
|
||||
|
||||
#define STRINGIFY2(s) L#s
|
||||
#define STRINGIFY(s) STRINGIFY2(s)
|
||||
|
||||
Reference in New Issue
Block a user