simple optimization
This commit is contained in:
parent
8f4b0eb455
commit
5a01a1313a
|
@ -137,6 +137,9 @@ public class Mouse {
|
|||
|
||||
private static boolean isGrabbed;
|
||||
|
||||
/** Whether we're running windows - which need to manually update cursor animation */
|
||||
private static final boolean isWindows = System.getProperty("os.name").startsWith("Win");
|
||||
|
||||
/**
|
||||
* Mouse cannot be constructed.
|
||||
*/
|
||||
|
@ -585,7 +588,7 @@ public class Mouse {
|
|||
* shouldn't be called otherwise
|
||||
*/
|
||||
public static void updateCursor() {
|
||||
if (System.getProperty("os.name").startsWith("Win") && currentCursor != null && currentCursor.hasTimedOut()) {
|
||||
if (isWindows && currentCursor != null && currentCursor.hasTimedOut()) {
|
||||
currentCursor.nextCursor();
|
||||
try {
|
||||
setNativeCursor(currentCursor);
|
||||
|
|
Loading…
Reference in New Issue