mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
Code cleanup
This commit is contained in:
parent
f86b00c9ba
commit
3041c0494d
113 changed files with 3414 additions and 4115 deletions
|
|
@ -1,31 +1,31 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* * Neither the name of 'LWJGL' nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* * Neither the name of 'LWJGL' nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
|
@ -43,11 +43,12 @@ import org.lwjgl.opengl.Display;
|
|||
* $Id$
|
||||
*
|
||||
* System class (named Sys so as not to conflict with java.lang.System)
|
||||
*
|
||||
*
|
||||
* @author cix_foo <cix_foo@users.sourceforge.net>
|
||||
* @version $Revision$
|
||||
*/
|
||||
public final class Sys {
|
||||
|
||||
public static final String VERSION = "0.93";
|
||||
|
||||
/** Low process priority. @see #setProcessPriority() */
|
||||
|
|
@ -58,7 +59,7 @@ public final class Sys {
|
|||
* JVM has when it is started up normally. Note that if the JVM is started
|
||||
* inside a process which is already a different priority then this will not
|
||||
* be the initial priority.
|
||||
*
|
||||
*
|
||||
* @see #setProcessPriority(int)
|
||||
*/
|
||||
public static final int NORMAL_PRIORITY = 0;
|
||||
|
|
@ -72,9 +73,9 @@ public final class Sys {
|
|||
* that this puts it at a higher priority than many OS critical tasks, such
|
||||
* as disk writes or mouse input and the like. Hence it is quite possible to
|
||||
* completely freeze your machine if you have an errant thread.
|
||||
*
|
||||
*
|
||||
* This priority is <strong>not</strong> recommended for gaming applications.
|
||||
*
|
||||
*
|
||||
* @see #setProcessPriority(int)
|
||||
*/
|
||||
public static final int REALTIME_PRIORITY = 2;
|
||||
|
|
@ -84,13 +85,13 @@ public final class Sys {
|
|||
|
||||
/** The platform adapter class name */
|
||||
private static String PLATFORM;
|
||||
|
||||
|
||||
/**
|
||||
* Debug flag.
|
||||
*/
|
||||
public static final boolean DEBUG = Boolean.getBoolean("org.lwjgl.Sys.debug");
|
||||
|
||||
private static boolean initialized = false;
|
||||
private static boolean initialized;
|
||||
|
||||
static {
|
||||
initialize();
|
||||
|
|
@ -129,7 +130,7 @@ public final class Sys {
|
|||
System.loadLibrary(LIBRARY_NAME);
|
||||
String native_version = getNativeLibraryVersion();
|
||||
if (!native_version.equals(VERSION))
|
||||
throw new LinkageError("Version mismatch: jar version is '" + VERSION +
|
||||
throw new LinkageError("Version mismatch: jar version is '" + VERSION +
|
||||
"', native libary version is '" + native_version + "'");
|
||||
setDebug(DEBUG);
|
||||
|
||||
|
|
@ -153,11 +154,11 @@ public final class Sys {
|
|||
* @return timer resolution in ticks per second or 0 if no timer is present.
|
||||
*/
|
||||
public static native long getTimerResolution();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the current value of the hires timer, in ticks. When the Sys class is first loaded
|
||||
* the hires timer is reset to 0. If no hires timer is present then this method will always
|
||||
* return 0.<p><strong>NOTEZ BIEN</strong> that the hires timer WILL wrap around.
|
||||
* return 0.<p><strong>NOTEZ BIEN</strong> that the hires timer WILL wrap around.
|
||||
*
|
||||
* @return the current hires time, in ticks (always >= 0)
|
||||
*/
|
||||
|
|
@ -165,28 +166,28 @@ public final class Sys {
|
|||
return ngetTime() & 0x7FFFFFFFFFFFFFFFL;
|
||||
}
|
||||
private static native long ngetTime();
|
||||
|
||||
|
||||
/**
|
||||
* Set the process priority in a system independent way. Because of the various
|
||||
* differences in operating systems this might or might not have any effect or
|
||||
* the correct effect.
|
||||
*
|
||||
*
|
||||
* The default process priority is NORMAL_PRIORITY.
|
||||
*
|
||||
*
|
||||
* REALTIME_PRIORITY processes should theoretically be the maximum priority of
|
||||
* any process on the system and may have side effects on I/O and other fundamental
|
||||
* operating system functions - use with caution.
|
||||
*
|
||||
*
|
||||
* It is unlikely that any games will want to change the priority of the Java
|
||||
* process; but there are some other applications for this library which require
|
||||
* process priority adjustments, such as in soft-realtime graphics rendering
|
||||
* for broadcast television.
|
||||
*
|
||||
*
|
||||
* @param priority a priority class, which will be one of REALTIME_PRIORITY,
|
||||
* HIGH_PRIORITY, NORMAL_PRIORITY, or LOW_PRIORITY.
|
||||
*/
|
||||
public static native void setProcessPriority(int priority);
|
||||
|
||||
|
||||
/**
|
||||
* Attempt to display a modal alert to the user. This method should be used
|
||||
* when a game fails to initialize properly or crashes out losing its display
|
||||
|
|
@ -227,7 +228,7 @@ public final class Sys {
|
|||
}
|
||||
|
||||
private static native void nAlert(String title, String message);
|
||||
|
||||
|
||||
/**
|
||||
* Open the system web browser and point it at the specified URL. It is recommended
|
||||
* that this not be called whilst your game is running, but on application exit in
|
||||
|
|
@ -267,7 +268,7 @@ public final class Sys {
|
|||
* clipboard (particularly if it doesn't even have a keyboard) in which case
|
||||
* we return null. Otherwise we return a String, which may be the empty
|
||||
* string "".
|
||||
*
|
||||
*
|
||||
* @return a String, or null if there is no system clipboard.
|
||||
*/
|
||||
public static String getClipboard() {
|
||||
|
|
@ -280,6 +281,6 @@ public final class Sys {
|
|||
return nGetClipboard();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static native String nGetClipboard();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue