mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-08 03:12:33 +03:00
try/except ctypes.windll.user32.CalculatePopupWindowPosition
As we can't rely on the is_wine check, use an exception for this.
This commit is contained in:
parent
e515c5b3e0
commit
5effd044ac
9
prefs.py
9
prefs.py
@ -206,7 +206,16 @@ elif platform == 'win32':
|
|||||||
|
|
||||||
CalculatePopupWindowPosition = None
|
CalculatePopupWindowPosition = None
|
||||||
if not is_wine:
|
if not is_wine:
|
||||||
|
try:
|
||||||
CalculatePopupWindowPosition = ctypes.windll.user32.CalculatePopupWindowPosition
|
CalculatePopupWindowPosition = ctypes.windll.user32.CalculatePopupWindowPosition
|
||||||
|
|
||||||
|
except AttributeError as e:
|
||||||
|
logger.error(
|
||||||
|
'win32 and not is_wine, but ctypes.windll.user32.CalculatePopupWindowPosition invalid',
|
||||||
|
exc_info=e
|
||||||
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
CalculatePopupWindowPosition.argtypes = [
|
CalculatePopupWindowPosition.argtypes = [
|
||||||
ctypes.POINTER(POINT),
|
ctypes.POINTER(POINT),
|
||||||
ctypes.POINTER(SIZE),
|
ctypes.POINTER(SIZE),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user