]> repos.lx-s.de Git - winmute.git/commitdiff
Minor code rework
authorlx-s <lx-s@users.noreply.github.com>
Sun, 1 May 2022 13:07:50 +0000 (15:07 +0200)
committerlx-s <lx-s@users.noreply.github.com>
Sun, 1 May 2022 13:07:50 +0000 (15:07 +0200)
ScreensaverNotify/ScreensaverNotify.cpp

index 95acc39baaf069f561bcdeb5c8d12edf18a5b464..7e146b3ed91bc8ebdb5dcdbc967af5ef49939615 100644 (file)
@@ -57,8 +57,8 @@ static HINSTANCE hglobInstance_ = nullptr;
 
 static LRESULT CALLBACK MsgHookProc(UINT nCode, WPARAM wParam, LPARAM lParam)
 {
-   const LPMSG msg = reinterpret_cast<LPMSG>(lParam);
    if (nCode == HC_ACTION) {
+      const LPMSG msg = reinterpret_cast<LPMSG>(lParam);
       if (msg->message == WM_SYSCOMMAND) {
          if (msg->wParam == SC_SCREENSAVE) {
             PostMessage(hNotifyWnd_, notifyWndMsgId_, wParam, lParam);