Publish curated LumaOps source from c85ee9ef8f1454f5c305398902afbb9e6738de40
Managed validation / full (push) Failing after 8s

This commit is contained in:
Public Source Publisher committed 2026-09-30 00:26:45 +00:00
1 parent 91f8b3e3c1
commit def7920856
2271 files changed
+501225 -501178

No files matched your search

+48 -48
View File
@@ -1,48 +1,48 @@
/*---------------------------------------------------------*\
| SuspendResume_Windows.cpp |
| |
| Suspend/resume Windows implementation |
| |
| Zach Deibert (zachdeibert) 12 Nov 2024 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <QByteArray>
#include <QCoreApplication>
#include "SuspendResume.h"
#include "windows.h"
SuspendResumeListener::SuspendResumeListener()
{
QCoreApplication::instance()->installNativeEventFilter(this);
}
SuspendResumeListener::~SuspendResumeListener()
{
QCoreApplication::instance()->removeNativeEventFilter(this);
}
bool SuspendResumeListener::nativeEventFilter(const QByteArray &event_type, void *message, NEFResultType *result)
{
(void)result;
if(event_type == "windows_generic_MSG")
{
switch(((MSG *)message)->message)
{
case WM_POWERBROADCAST:
switch(((MSG *)message)->wParam)
{
case PBT_APMSUSPEND:
OnSuspend();
break;
case PBT_APMRESUMEAUTOMATIC:
OnResume();
break;
}
break;
}
}
return false;
}
/*---------------------------------------------------------*\
| SuspendResume_Windows.cpp |
| |
| Suspend/resume Windows implementation |
| |
| Zach Deibert (zachdeibert) 12 Nov 2024 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <QByteArray>
#include <QCoreApplication>
#include "SuspendResume.h"
#include "windows.h"
SuspendResumeListener::SuspendResumeListener()
{
QCoreApplication::instance()->installNativeEventFilter(this);
}
SuspendResumeListener::~SuspendResumeListener()
{
QCoreApplication::instance()->removeNativeEventFilter(this);
}
bool SuspendResumeListener::nativeEventFilter(const QByteArray &event_type, void *message, NEFResultType *result)
{
(void)result;
if(event_type == "windows_generic_MSG")
{
switch(((MSG *)message)->message)
{
case WM_POWERBROADCAST:
switch(((MSG *)message)->wParam)
{
case PBT_APMSUSPEND:
OnSuspend();
break;
case PBT_APMRESUMEAUTOMATIC:
OnResume();
break;
}
break;
}
}
return false;
}