[Bug 3182] New: test case demonstrating PeekMessage give up timeslices

Wine Bugs wine-bugs at winehq.org
Tue Aug 2 06:19:55 CDT 2005


http://bugs.winehq.org/show_bug.cgi?id=3182

           Summary: test case demonstrating PeekMessage give up timeslices
           Product: Wine
           Version: 20050725
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-binary
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: olivwork at web.de


Hi,  
  
the test case whitch demonstates the differece between Windows   
and wine.  
  
On Windows XP  
- Start 'test.exe' from a dos-box... you see some FAST counting integers  
- Start a other program witch consumes mutch cpu time.  
- the output of 'test.exe' is slower but FAST  
  
On wine  
- Start 'test.exe' from a dos-box... you see some FAST counting integers  
- Start a other program witch consumes mutch cpu time.  
- the output of 'test.exe' is very slow  
  
This different behavior starts from wine version 20041201. The version before   
was ok.  
  
I have no patch and it would be nice if someone can write a patch to fix this.  
  
Thanks  
  
Oliver Mössinger  
  
  
>>> test.cpp 
#include "windows.h" 
#include <iostream> 
 
 
bool bPEEK_MESSAGE( 
          void *pvMsg,                                                    // A 
          unsigned int uiFirstMessage,                                    // E 
          unsigned int uiLastMessage,                                     // E 
          bool bRemove)                                                   // E 
{ 
  return PeekMessage((MSG*)pvMsg,NULL,uiFirstMessage,uiLastMessage, 
                     bRemove ? PM_REMOVE : PM_NOREMOVE); 
} 
 
 
bool bKEYBOARD_MESSAGE_PENDING( 
        bool bIncludeMiddleMouseKey)                                    // E 
{ 
  MSG   msg; 
 
  if (bPEEK_MESSAGE(&msg,WM_KEYDOWN,WM_KEYDOWN,false) || 
      bPEEK_MESSAGE(&msg,WM_SYSKEYDOWN,WM_SYSKEYDOWN,false) || 
      bPEEK_MESSAGE(&msg,WM_LBUTTONDOWN,WM_LBUTTONDOWN,false) || 
      bPEEK_MESSAGE(&msg,WM_RBUTTONDOWN,WM_RBUTTONDOWN,false) || 
      bPEEK_MESSAGE(&msg,WM_NCLBUTTONDOWN,WM_NCLBUTTONDOWN,false) || 
      bPEEK_MESSAGE(&msg,WM_NCRBUTTONDOWN,WM_NCRBUTTONDOWN,false)) return 
true; 
  if (bIncludeMiddleMouseKey) 
  { 
    if (bPEEK_MESSAGE(&msg,WM_MBUTTONDOWN,WM_MBUTTONDOWN,false) || 
        bPEEK_MESSAGE(&msg,WM_NCMBUTTONDOWN,WM_NCMBUTTONDOWN,false)) return 
true; 
  } 
  return false; 
} 
 
 
int main(int argc, char** argv) 
{ 
  MSG msg; 
  int i=0; 
 
  while (true) 
  { 
    cout << ++i << endl; 
    bKEYBOARD_MESSAGE_PENDING(true); 
  } 
} 
<<< test.cpp

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list