serialisation of HRQNG is fixed so it would not make illegal reflective access on Java 17

This commit is contained in:
minjaesong
2022-02-04 11:03:59 +09:00
parent 5d587dcc12
commit efe5c49463
9 changed files with 53 additions and 15 deletions

View File

@@ -12,18 +12,19 @@ object ScreencapNogui: ConsoleCommand {
override fun execute(args: Array<String>) {
if (args.size == 2) {
IngameRenderer.screencapExportCallback = {
val w = 960
val h = 640
val p = Pixmap.createFromFrameBuffer((it.width - w).ushr(1), (it.height - h).ushr(1), w, h)
val p = Pixmap.createFromFrameBuffer(0, 0, it.width, it.height)
PixmapIO2.writeTGA(Gdx.files.absolute(App.defaultDir + "/Exports/${args[1]}.tga"), p, true)
p.dispose()
}
IngameRenderer.screencapRequested = true
Echo("FBO exported to$ccG Exports/${args[1]}.tga")
}
else {
printUsage()
}
}
override fun printUsage() {
Echo("Usage: screencapnogui <output filename>")
}
}