8289770: Remove Windows version macro from ShellFolder2.cpp
Reviewed-by: jwaters, tr, serb
This commit is contained in:
parent
6158da5e95
commit
3d5eeac3a3
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -119,17 +119,6 @@ static jstring lsSize;
|
||||
static jstring lsType;
|
||||
static jstring lsDate;
|
||||
|
||||
// Some macros from awt.h, because it is not included in release
|
||||
#ifndef IS_WIN2000
|
||||
#define IS_WIN2000 (LOBYTE(LOWORD(::GetVersion())) >= 5)
|
||||
#endif
|
||||
#ifndef IS_WINXP
|
||||
#define IS_WINXP ((IS_WIN2000 && HIBYTE(LOWORD(::GetVersion())) >= 1) || LOBYTE(LOWORD(::GetVersion())) > 5)
|
||||
#endif
|
||||
#ifndef IS_WINVISTA
|
||||
#define IS_WINVISTA (!(::GetVersion() & 0x80000000) && LOBYTE(LOWORD(::GetVersion())) >= 6)
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
@ -1090,12 +1079,10 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits
|
||||
// XP supports alpha in some icons, and depending on device.
|
||||
// This should take precedence over the icon mask bits.
|
||||
BOOL hasAlpha = FALSE;
|
||||
if (IS_WINXP) {
|
||||
for (int i = 0; i < nBits; i++) {
|
||||
if ((colorBits[i] & 0xff000000) != 0) {
|
||||
hasAlpha = TRUE;
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < nBits; i++) {
|
||||
if ((colorBits[i] & 0xff000000) != 0) {
|
||||
hasAlpha = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasAlpha) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user