From 6248f0763438cc84bc08a126707dbada63d274d7 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 6 Oct 2013 17:12:19 +0300 Subject: [PATCH] Disable skin menu "Use D2D rendering" item if D2D is globally disabled --- Library/ContextMenu.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/ContextMenu.cpp b/Library/ContextMenu.cpp index 84b34a36..eb40b6be 100644 --- a/Library/ContextMenu.cpp +++ b/Library/ContextMenu.cpp @@ -346,7 +346,11 @@ HMENU ContextMenu::CreateSkinMenu(MeterWindow* meterWindow, int index, HMENU men if (Gfx::CanvasD2D::Initialize()) { - if (meterWindow->GetUseD2D()) + if (!Rainmeter::GetInstance().GetUseD2D()) + { + EnableMenuItem(settingsMenu, IDM_SKIN_USED2D, MF_BYCOMMAND | MF_GRAYED); + } + else if (meterWindow->GetUseD2D()) { CheckMenuItem(settingsMenu, IDM_SKIN_USED2D, MF_BYCOMMAND | MF_CHECKED); }