small fix and increased version number to 2.0.4

This commit is contained in:
fourtf 2018-06-25 12:52:07 +02:00
parent c75b3578a7
commit ef2365e81a
2 changed files with 4 additions and 3 deletions

View file

@ -2,7 +2,7 @@
#include <QtGlobal>
#define CHATTERINO_VERSION "2.0.3"
#define CHATTERINO_VERSION "2.0.4"
#if defined(Q_OS_WIN)
#define CHATTERINO_OS "win"

View file

@ -448,10 +448,10 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r
case WM_SHOWWINDOW: {
// if (IsWindows8Point1OrGreater()) {
HINSTANCE shcore = LoadLibrary(L"Shcore.dll");
static HINSTANCE shcore = LoadLibrary(L"Shcore.dll");
if (shcore != nullptr) {
if (auto getDpiForMonitor =
(GetDpiForMonitor_)GetProcAddress(shcore, "GetDpiForMonitor")) {
GetDpiForMonitor_(GetProcAddress(shcore, "GetDpiForMonitor"))) {
HMONITOR monitor = MonitorFromWindow(msg->hwnd, MONITOR_DEFAULTTONEAREST);
UINT xScale, yScale;
@ -466,6 +466,7 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r
this->updateScale();
}
}
return true;
}
case WM_NCCALCSIZE: {