flat assembler
Message board for the users of flat assembler.

Index > Windows > Win 10 PeekMessage strange behavior.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
64 bits.
I use PeekMessage and render Directx 12.
Code:
Backzz1:    
     invoke PeekMessage,msg, 0, 0, 0, PM_REMOVE
     test   eax,eax
     jz     .2
     invoke  TranslateMessage,  msg
     invoke  DispatchMessage,  msg
     PressKey "1",.2  ;if not press '1' then jmp .2
     invoke MessageBox,0,'reload',0,0 
.2:  invoke Sleep,0

     cmp     byte [FocusWinLost],0
     jz      .render                   
     invoke Sleep,50
     jmp     .norender
.render:
     invoke  DX12CameraFP     
     inc     word [IgnorRndr]
     cmp     word [IgnorRndr],105
     jbe     .norender
     mov     word [IgnorRndr],0    
     invoke   DX12TestRender
.norender:     
     cmp            [CloseWin],1
     jnz      Backzz1  
    


I get work render and MessageBox !
But how i expected MessageBox must stop my loop and not do invoke DX12TestRender
All work in one thread ! But MessageBox stop render after 11 seconds !

When i move mouse on WindowsTaskMenedger my program halt all at few seconds !

I show this bug:
https://www.youtube.com/watch?v=cGb2WeL0poI&feature=youtu.be&ab_channel=Roman8139


Last edited by Roman on 07 Dec 2020, 15:39; edited 3 times in total
Post 07 Dec 2020, 15:27
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
I use this code in Windows 7 on CPU Intel I5 2320 and not get this bugs.

Now i use CPU Ryzen 3500 6 cores and Windows 10
Post 07 Dec 2020, 15:29
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3387
Location: vpcmipstrm
bitRAKE
I suspect PressKey macro unless you are pressing "1".

Why do you doubt PeekMessage? If you want to inspect what PeekMessage is receiving then use WinSpy type program.

Too little information to diagnose further.

_________________
¯\(°_o)/¯ unlicense.org
Post 07 Dec 2020, 18:20
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
I try comment PressKey macro but its not help.
My CPU load at 35% if i move mouse on another window.
And Win 10 few seconds not responded.
Post 07 Dec 2020, 19:07
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.