mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 09:18:05 -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) {
|
override def onBufferSet(col: Int, row: Int, s: String, vertical: Boolean) {
|
||||||
super.onBufferSet(col, row, s, vertical)
|
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 = {
|
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)
|
super.onBufferBitBlt(col, row, w, h, id, fromCol, fromRow)
|
||||||
dirty = true
|
markDirty()
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onBufferRamInit(id: Int, buffer: TextBufferProxy): Unit = {
|
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) {
|
if (dstIdx == srcIdx) {
|
||||||
val tx = col - fromCol
|
val tx = col - fromCol
|
||||||
val ty = row - fromRow
|
val ty = row - fromRow
|
||||||
dst.copy(col, row, w, h, tx, ty)
|
dst.copy(fromCol - 1, fromRow - 1, w, h, tx, ty)
|
||||||
result(true)
|
result(true)
|
||||||
} else {
|
} else {
|
||||||
// at least one of the two buffers is a gpu buffer
|
// 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)
|
val vertical = args.optBoolean(3, false)
|
||||||
|
|
||||||
screen(s => {
|
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)) {
|
if (consumeViewportPower(s, context, setCosts(tier), value.length, Settings.get.gpuSetCost)) {
|
||||||
s.set(x, y, value, vertical)
|
s.set(x, y, value, vertical)
|
||||||
result(true)
|
result(true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user