mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-09-11 04:18:42 -06:00
Fixed Minor Macro Issue
This commit is contained in:
@@ -33,19 +33,12 @@ os.environ.setdefault("QT_LOGGING_RULES", "qt.qpa.*=false;*.debug=false")
|
|||||||
from qasync import QEventLoop
|
from qasync import QEventLoop
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
try:
|
try:
|
||||||
# Swallow Qt warnings like OleInitialize failures on Windows consoles
|
# Swallow Qt framework messages to keep console clean
|
||||||
def _qt_msg_handler(mode, context, message):
|
def _qt_msg_handler(mode, context, message):
|
||||||
# Intentionally suppress all Qt framework messages to keep console clean
|
|
||||||
return
|
return
|
||||||
QtCore.qInstallMessageHandler(_qt_msg_handler)
|
QtCore.qInstallMessageHandler(_qt_msg_handler)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
try:
|
|
||||||
# Pre-initialize OLE to reduce chances of RPC_E_CHANGED_MODE warnings
|
|
||||||
import ctypes
|
|
||||||
ctypes.windll.ole32.OleInitialize(0)
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
from PIL import ImageGrab
|
from PIL import ImageGrab
|
||||||
|
|
||||||
# New modularized components
|
# New modularized components
|
||||||
|
Reference in New Issue
Block a user