mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
prints out system info on the game crash
This commit is contained in:
@@ -59,9 +59,9 @@ import static net.torvald.terrarum.TerrarumKt.*;
|
|||||||
*/
|
*/
|
||||||
public class App implements ApplicationListener {
|
public class App implements ApplicationListener {
|
||||||
|
|
||||||
|
public static final long startupTime = System.currentTimeMillis() / 1000L;
|
||||||
|
|
||||||
public static final String GAME_NAME = TerrarumAppConfiguration.GAME_NAME;
|
public static final String GAME_NAME = TerrarumAppConfiguration.GAME_NAME;
|
||||||
|
|
||||||
|
|
||||||
public static final int VERSION_RAW = TerrarumAppConfiguration.VERSION_RAW;
|
public static final int VERSION_RAW = TerrarumAppConfiguration.VERSION_RAW;
|
||||||
|
|
||||||
public static final String getVERSION_STRING() {
|
public static final String getVERSION_STRING() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package net.torvald.terrarum
|
package net.torvald.terrarum
|
||||||
|
|
||||||
|
import com.badlogic.gdx.Gdx
|
||||||
import java.awt.BorderLayout
|
import java.awt.BorderLayout
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
import java.awt.Dimension
|
import java.awt.Dimension
|
||||||
@@ -58,6 +59,24 @@ class GameCrashHandler(e: Throwable) : JFrame() {
|
|||||||
this.add(border, BorderLayout.CENTER)
|
this.add(border, BorderLayout.CENTER)
|
||||||
this.title = TerrarumAppConfiguration.GAME_NAME
|
this.title = TerrarumAppConfiguration.GAME_NAME
|
||||||
|
|
||||||
|
val uptime = App.getTIME_T() - App.startupTime
|
||||||
|
|
||||||
|
// print out device info
|
||||||
|
printStream.println("== System Info ==")
|
||||||
|
printStream.println("Uptime: ${uptime / 3600}h${(uptime % 3600) / 60}m${uptime % 60}s")
|
||||||
|
printStream.println("Java version: ${System.getProperty("java.version")}")
|
||||||
|
printStream.println("OS Name: ${App.OSName}")
|
||||||
|
printStream.println("OS Version: ${App.OSVersion}")
|
||||||
|
printStream.println("System architecture: ${App.systemArch}")
|
||||||
|
printStream.println("Processor: ${App.processor} x${Runtime.getRuntime().availableProcessors()} (${App.processorVendor})")
|
||||||
|
|
||||||
|
printStream.println()
|
||||||
|
|
||||||
|
printStream.println("== OpenGL Info ==")
|
||||||
|
printStream.println(Gdx.graphics.glVersion.debugVersionString)
|
||||||
|
|
||||||
|
printStream.println()
|
||||||
|
printStream.println("== The Error Info ==")
|
||||||
|
|
||||||
e.printStackTrace(printStream)
|
e.printStackTrace(printStream)
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
* e.g. 0x02010034 will be translated as 2.1.52
|
* e.g. 0x02010034 will be translated as 2.1.52
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const val VERSION_RAW = 0x00030000
|
const val VERSION_RAW = 0x00030001
|
||||||
// Commit counts up to the Release 0.3: 2259 (plz update!)
|
// Commit counts up to the Release 0.3: 2259 (plz update!)
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user