mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-03 02:36:50 +13:00
Add comment
This commit is contained in:
parent
431ffe418e
commit
9d94f1f203
1 changed files with 2 additions and 0 deletions
|
@ -302,6 +302,8 @@ protected override void WndProc(ref Message m)
|
|||
{
|
||||
if (m.Msg == (int)WindowsMessages.QUERYENDSESSION)
|
||||
{
|
||||
// Casting to long before because the int conversion operator enforces checked semantics
|
||||
// thus crashes any 64 bits build. IntPtr -> long and long -> enum doesn't.
|
||||
EndSessionReasons reason = (EndSessionReasons)(long)(m.LParam);
|
||||
if (reason.HasFlag(EndSessionReasons.ENDSESSION_CLOSEAPP))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue