From 960bc0022977bc471be128a73b785e491d1b8aee Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 27 May 2008 04:03:32 +0000 Subject: [PATCH] fix memwatch to have working tabs (modeless dialogs need special treatment involving IsDialogMessage() in the app message pump) --- src/drivers/win/main.cpp | 17 +++++++++++++---- src/drivers/win/res.rc | Bin 152780 -> 152784 bytes 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 9a81efb9..862ad2c4 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -286,11 +286,20 @@ int BlockingCheck() { //other accelerator capable dialogs could be added here extern HWND hwndMemWatch; - int accelerated = 0; - if(IsChild(hwndMemWatch,msg.hwnd)) - accelerated = TranslateAccelerator(hwndMemWatch,fceu_hAccel,&msg); + int handled = 0; + if(hwndMemWatch) + { + if(IsChild(hwndMemWatch,msg.hwnd)) + handled = TranslateAccelerator(hwndMemWatch,fceu_hAccel,&msg); + if(!handled) + { + int resylt = IsDialogMessage(hwndMemWatch,&msg); + handled = resylt; + } + } - if(!accelerated) + + if(!handled) { TranslateMessage(&msg); DispatchMessage(&msg); diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index e1b5a4b0825eacb1e6c2c286d835bf789363969d..b2a23b829ddc73bb3b09a328d59b025336e62d0a 100644 GIT binary patch delta 81 zcmV-X0IvVcsR_`j39udllY|GPgTMl}zybl56qkUP0V0#Yr39A_ECG_2J}dzUmrfc1 nFt>&m0a_H3NXQO{t}Fq!t}FsFCzq@%0;HGL6apHToKylZ*Bu;_ delta 76 zcmcbxlJm?;&JA)*(?10=Eowf*wEYkh<1~@!AEq)YOgE5b6xi+|!5Aenxn~o{