浏览代码

Fix Cursor Issue When Using True Color

This fixes an issue where, when using true color, the changeCursor
function would not actually write the cursor to the target array.

Fixes #407
Solly Ross 10 年之前
父节点
当前提交
ec31f82eda
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      include/display.js

+ 6 - 0
include/display.js

@@ -713,6 +713,12 @@ var Display;
                         cur.push(rgb[1]);  // green
                         cur.push(rgb[0]);  // red
                         cur.push(alpha);   // alpha
+                    } else {
+                        idx = ((w0 * y) + x) * 4;
+                        cur.push(pixels[idx + 2]); // blue
+                        cur.push(pixels[idx + 1]); // green
+                        cur.push(pixels[idx]);     // red
+                        cur.push(alpha);           // alpha
                     }
                 }
             }