From de693b0da1c25479b7da1b126e0deacc59b46d18 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 15 Jul 2018 15:28:09 +0200 Subject: [PATCH] Qt: handle upstream trolling --- rpcs3/rpcs3qt/gs_frame.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index 15ae6def05..b422dfa9ae 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -320,7 +320,14 @@ bool gs_frame::nativeEvent(const QByteArray &eventType, void *message, long *res { std::lock_guard lock(wm_event_lock); - MSG* msg = static_cast(message); + + // https://bugreports.qt.io/browse/QTBUG-69074?focusedCommentId=409797&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-409797 +#if (QT_VERSION == QT_VERSION_CHECK(5, 11, 1)) + MSG* msg = *reinterpret_cast(message); +#else + MSG* msg = reinterpret_cast(message); +#endif + switch (msg->message) { case WM_WINDOWPOSCHANGING: