mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 15:04:03 +09:00
more minor fixes on things
This commit is contained in:
@@ -83,12 +83,11 @@ internal class UnsafePtr(pointer: Long, allocSize: Long) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private inline fun checkNullPtr(index: Long) { // ignore what IDEA says and do inline this
|
private inline fun checkNullPtr(index: Long) { // ignore what IDEA says and do inline this
|
||||||
// commenting out because of the suspected (or minor?) performance impact.
|
//// commenting out because of the suspected (or minor?) performance impact.
|
||||||
// You may break the glass and use this tool when some fucking incomprehensible bugs ("vittujen vitun bugit")
|
//// You may break the glass and use this tool when some fucking incomprehensible bugs ("vittujen vitun bugit")
|
||||||
// appear (e.g. getting garbage values when it fucking shouldn't)
|
//// appear (e.g. getting garbage values when it fucking shouldn't)
|
||||||
assert(!destroyed) { throw NullPointerException("The pointer is already destroyed ($this)") }
|
|
||||||
|
|
||||||
// OOB Check: debugging purposes only -- comment out for the production
|
//assert(!destroyed) { throw NullPointerException("The pointer is already destroyed ($this)") }
|
||||||
//if (index !in 0 until size) throw IndexOutOfBoundsException("Index: $index; alloc size: $size")
|
//if (index !in 0 until size) throw IndexOutOfBoundsException("Index: $index; alloc size: $size")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ data class AdapterConfig(
|
|||||||
val paletteShader: String = DRAW_SHADER_FRAG
|
val paletteShader: String = DRAW_SHADER_FRAG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: if TTY size is greater than 80*32, SEGFAULT will occur because text buffer is fixed in size
|
||||||
|
*/
|
||||||
open class GraphicsAdapter(val vm: VM, val config: AdapterConfig) :
|
open class GraphicsAdapter(val vm: VM, val config: AdapterConfig) :
|
||||||
GlassTty(config.textRows, config.textCols), PeriBase {
|
GlassTty(config.textRows, config.textCols), PeriBase {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user