Cleanup (JNA check)

GitOrigin-RevId: f6f57ec9f396b98f6430833be6d97ebbdf57b668
This commit is contained in:
Roman Shevchenko
2019-05-14 22:10:55 +03:00
committed by intellij-monorepo-bot
parent 42a29df9cb
commit d4aba02795
@@ -1,6 +1,7 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide;
import com.intellij.jna.JnaLoader;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.SystemInfo;
import com.sun.jna.platform.win32.User32;
@@ -11,7 +12,7 @@ public class RemoteDesktopDetector extends RemoteDesktopService {
private volatile boolean myRemoteDesktopConnected;
private RemoteDesktopDetector() {
if (SystemInfo.isWindows) {
if (SystemInfo.isWindows && JnaLoader.isLoaded()) {
DisplayChangeDetector.getInstance().addListener(this::updateState);
updateState();
}
@@ -37,4 +38,4 @@ public class RemoteDesktopDetector extends RemoteDesktopService {
public boolean isRemoteDesktopConnected() {
return myRemoteDesktopConnected;
}
}
}