mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
serialisation of HRQNG is fixed so it would not make illegal reflective access on Java 17
This commit is contained in:
@@ -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>")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user