mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-11 16:28:12 -04:00
bitblt fix for same device, and better markDirty code
This commit is contained in:
parent
fabe7bac43
commit
1ecd2b1e6e
@ -648,12 +648,12 @@ object TextBuffer {
|
||||
|
||||
override def onBufferSet(col: Int, row: Int, s: String, vertical: Boolean) {
|
||||
super.onBufferSet(col, row, s, vertical)
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onBufferBitBlt(col: Int, row: Int, w: Int, h: Int, id: Int, fromCol: Int, fromRow: Int): Unit = {
|
||||
super.onBufferBitBlt(col, row, w, h, id, fromCol, fromRow)
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onBufferRamInit(id: Int, buffer: TextBufferProxy): Unit = {
|
||||
|
@ -232,7 +232,7 @@ class GraphicsCard(val tier: Int) extends prefab.ManagedEnvironment with DeviceI
|
||||
if (dstIdx == srcIdx) {
|
||||
val tx = col - fromCol
|
||||
val ty = row - fromRow
|
||||
dst.copy(col, row, w, h, tx, ty)
|
||||
dst.copy(fromCol - 1, fromRow - 1, w, h, tx, ty)
|
||||
result(true)
|
||||
} else {
|
||||
// at least one of the two buffers is a gpu buffer
|
||||
@ -454,8 +454,6 @@ class GraphicsCard(val tier: Int) extends prefab.ManagedEnvironment with DeviceI
|
||||
val vertical = args.optBoolean(3, false)
|
||||
|
||||
screen(s => {
|
||||
val x2 = if (vertical) x else x + value.length - 1
|
||||
val y2 = if (!vertical) y else y + value.length - 1
|
||||
if (consumeViewportPower(s, context, setCosts(tier), value.length, Settings.get.gpuSetCost)) {
|
||||
s.set(x, y, value, vertical)
|
||||
result(true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user