home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
Media Portal freezes on wake
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mm1352000" data-source="post: 1160710" data-attributes="member: 82144"><p>Sure. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p>My theory is...</p><p>We only want to trigger the "Resuming operation of user interface" etc. part of the patch when the PC is waking up (after PBT_EVENT.PBT_APMRESUMEAUTOMATIC is received but PBT_EVENT.PBT_APMRESUMESUSPEND is not received), not when it is suspended/suspending.</p><p></p><p>_resumedAutomatic is set to false when PBT_EVENT.PBT_APMSUSPEND is received:</p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/MediaPortal.Application/MediaPortal.cs#L1779" target="_blank">https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/MediaPortal.Application/MediaPortal.cs#L1779</a></p><p></p><p>...and set to true when PBT_EVENT.PBT_APMRESUMEAUTOMATIC is received:</p><p><a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/MediaPortal.Application/MediaPortal.cs#L1851" target="_blank">https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/MediaPortal.Application/MediaPortal.cs#L1851</a></p><p></p><p>So, we know that if _resumedAutomatic is false the PC is suspending/suspended, and if _resumedAutomatic is true we know that the PC is waking up.</p><p>Therefore we can check _resumedAutomatic to check if the patch code should be executed.</p><p>If _resumedAutomatic is true, the PC is waking so it is okay to execute the patch code; otherwise the patch code should not be executed.</p><p></p><p>Is it clear? <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>AFAIK PBT_APMRESUMEAUTOMATIC comes alone if the PC wakes without user input (eg. scheduled recording or EPG grabbing). If/when the user provides input later, Windows should send PBT_APMRESUMESUSPEND. However for Jeffrios and keeperoftracken that PBT_APMRESUMESUSPEND is never sent/received. It is strange... but I can't solve problems with Windows or third party software. I can only provide a patch/workaround for MediaPortal.</p></blockquote><p></p>
[QUOTE="mm1352000, post: 1160710, member: 82144"] Sure. :) My theory is... We only want to trigger the "Resuming operation of user interface" etc. part of the patch when the PC is waking up (after PBT_EVENT.PBT_APMRESUMEAUTOMATIC is received but PBT_EVENT.PBT_APMRESUMESUSPEND is not received), not when it is suspended/suspending. _resumedAutomatic is set to false when PBT_EVENT.PBT_APMSUSPEND is received: [URL]https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/MediaPortal.Application/MediaPortal.cs#L1779[/URL] ...and set to true when PBT_EVENT.PBT_APMRESUMEAUTOMATIC is received: [URL]https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/MediaPortal.Application/MediaPortal.cs#L1851[/URL] So, we know that if _resumedAutomatic is false the PC is suspending/suspended, and if _resumedAutomatic is true we know that the PC is waking up. Therefore we can check _resumedAutomatic to check if the patch code should be executed. If _resumedAutomatic is true, the PC is waking so it is okay to execute the patch code; otherwise the patch code should not be executed. Is it clear? :) AFAIK PBT_APMRESUMEAUTOMATIC comes alone if the PC wakes without user input (eg. scheduled recording or EPG grabbing). If/when the user provides input later, Windows should send PBT_APMRESUMESUSPEND. However for Jeffrios and keeperoftracken that PBT_APMRESUMESUSPEND is never sent/received. It is strange... but I can't solve problems with Windows or third party software. I can only provide a patch/workaround for MediaPortal. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Media Portal freezes on wake
Contact us
RSS
Top
Bottom