Linux: Fixed crash
This commit is contained in:
parent
e6f8857439
commit
a1e593cee0
|
@ -306,17 +306,33 @@ final class LinuxDisplay implements DisplayImplementation {
|
||||||
|
|
||||||
public int getMinCursorSize() {
|
public int getMinCursorSize() {
|
||||||
lockAWT();
|
lockAWT();
|
||||||
|
try {
|
||||||
|
incDisplay();
|
||||||
int min_size = nGetMinCursorSize();
|
int min_size = nGetMinCursorSize();
|
||||||
unlockAWT();
|
decDisplay();
|
||||||
return min_size;
|
return min_size;
|
||||||
|
} catch (LWJGLException e) {
|
||||||
|
LWJGLUtil.log("Exception occurred in getMinCursorSize: " + e);
|
||||||
|
return 0;
|
||||||
|
} finally {
|
||||||
|
unlockAWT();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private static native int nGetMinCursorSize();
|
private static native int nGetMinCursorSize();
|
||||||
|
|
||||||
public int getMaxCursorSize() {
|
public int getMaxCursorSize() {
|
||||||
lockAWT();
|
lockAWT();
|
||||||
|
try {
|
||||||
|
incDisplay();
|
||||||
int max_size = nGetMaxCursorSize();
|
int max_size = nGetMaxCursorSize();
|
||||||
unlockAWT();
|
decDisplay();
|
||||||
return max_size;
|
return max_size;
|
||||||
|
} catch (LWJGLException e) {
|
||||||
|
LWJGLUtil.log("Exception occurred in getMaxCursorSize: " + e);
|
||||||
|
return 0;
|
||||||
|
} finally {
|
||||||
|
unlockAWT();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private static native int nGetMaxCursorSize();
|
private static native int nGetMaxCursorSize();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue