From 56d472d5b5c815325297b0f7648a6645fca4220e Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 18 Dec 2010 19:38:33 +0000 Subject: [PATCH] Minor tweaks to installer and MediaKeyPlugin. --- Plugins/PluginMediaKey/PluginMediaKey.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Plugins/PluginMediaKey/PluginMediaKey.cpp b/Plugins/PluginMediaKey/PluginMediaKey.cpp index 36130aa1..d7bc83fb 100644 --- a/Plugins/PluginMediaKey/PluginMediaKey.cpp +++ b/Plugins/PluginMediaKey/PluginMediaKey.cpp @@ -58,39 +58,37 @@ void SendKey(WORD key) void ExecuteBang(LPCTSTR args, UINT id) { - std::wstring wholeBang = args; - - if (_wcsicmp(wholeBang.c_str(), L"NextTrack") == 0) + if (_wcsicmp(args, L"NextTrack") == 0) { SendKey(VK_MEDIA_NEXT_TRACK); } - else if (_wcsicmp(wholeBang.c_str(), L"PrevTrack") == 0) + else if (_wcsicmp(args, L"PrevTrack") == 0) { SendKey(VK_MEDIA_PREV_TRACK); } - else if (_wcsicmp(wholeBang.c_str(), L"Stop") == 0) + else if (_wcsicmp(args, L"Stop") == 0) { SendKey(VK_MEDIA_STOP); } - else if (_wcsicmp(wholeBang.c_str(), L"PlayPause") == 0) + else if (_wcsicmp(args, L"PlayPause") == 0) { SendKey(VK_MEDIA_PLAY_PAUSE); } - else if (_wcsicmp(wholeBang.c_str(), L"VolumeMute") == 0) + else if (_wcsicmp(args, L"VolumeMute") == 0) { SendKey(VK_VOLUME_MUTE); } - else if (_wcsicmp(wholeBang.c_str(), L"VolumeDown") == 0) + else if (_wcsicmp(args, L"VolumeDown") == 0) { SendKey(VK_VOLUME_DOWN); } - else if (_wcsicmp(wholeBang.c_str(), L"VolumeUp") == 0) + else if (_wcsicmp(args, L"VolumeUp") == 0) { SendKey(VK_VOLUME_UP); } else { - LSLog(LOG_DEBUG, L"Rainmeter", L"MediaKeyPlugin: Unknown bang!"); + LSLog(LOG_WARNING, L"Rainmeter", L"MediaKeyPlugin: Unknown bang!"); } }