< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp
Print this page
@@ -2353,17 +2353,12 @@
JNIEXPORT jint JNICALL
Java_sun_awt_windows_WToolkit_getScreenWidth(JNIEnv *env, jobject self)
{
TRY;
- int width = ::GetSystemMetrics(SM_CXSCREEN);
+ return ::GetSystemMetrics(SM_CXSCREEN);
- Devices::InstanceAccess devices;
- AwtWin32GraphicsDevice *device = devices->GetDevice(
- AwtWin32GraphicsDevice::GetDefaultDeviceIndex());
-
- return (device == NULL) ? width : device->ScaleDownX(width);
CATCH_BAD_ALLOC_RET(0);
}
/*
* Class: sun_awt_windows_WToolkit
@@ -2373,16 +2368,11 @@
JNIEXPORT jint JNICALL
Java_sun_awt_windows_WToolkit_getScreenHeight(JNIEnv *env, jobject self)
{
TRY;
- int height = ::GetSystemMetrics(SM_CYSCREEN);
- Devices::InstanceAccess devices;
- AwtWin32GraphicsDevice *device = devices->GetDevice(
- AwtWin32GraphicsDevice::GetDefaultDeviceIndex());
-
- return (device == NULL) ? height : device->ScaleDownY(height);
+ return ::GetSystemMetrics(SM_CYSCREEN);
CATCH_BAD_ALLOC_RET(0);
}
/*
< prev index next >