Sfoglia il codice sorgente

FIX: Bug [0000811] "Random annoying access violation messages, prompts for exit or ignore (attached err)"

Alexander Koblov 11 anni fa
parent
commit
a1df9245ec
1 ha cambiato i file con 12 aggiunte e 1 eliminazioni
  1. 12 1
      src/platform/win/uTotalCommander.pas

+ 12 - 1
src/platform/win/uTotalCommander.pas

@@ -3,7 +3,7 @@
     -------------------------------------------------------------------------
     Creates Total Commander fake window (some plugins don't work without it)
 
-    Copyright (C) 2009  Koblov Alexander (A[email protected])
+    Copyright (C) 2009-2014 Alexander Koblov (a[email protected])
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -35,6 +35,9 @@ procedure CreateTotalCommanderWindow(hWindow: HWND);
 
 implementation
 
+uses
+  LCLVersion, Forms, JwaDbt, uDebug;
+
 var
   wcFakeWndClass: TWndClassEx;
   //hMainWindow,
@@ -57,6 +60,14 @@ begin
   }
   //SendMessage(hMainWindow, uiMsg, wParam, lParam);
 
+  {$IF (lcl_fullversion >= 1020000)}
+  if (uiMsg = WM_DEVICECHANGE) and (wParam = DBT_DEVNODES_CHANGED) and (lParam = 0) then
+  begin
+    Screen.UpdateMonitors; // Refresh monitor list
+    DCDebug('WM_DEVICECHANGE:DBT_DEVNODES_CHANGED');
+  end;
+  {$ENDIF}
+
   {$IFDEF DEBUG}
   WriteLn(uiMsg);
   {$ENDIF}