Follow change of lcd_lyout to globalconfig.lcdstate in simulat0r
This commit is contained in:
parent
1643d90e0a
commit
001974153a
|
@ -96,10 +96,10 @@ public:
|
||||||
for (int x = 0; x < dimx; ++x) {
|
for (int x = 0; x < dimx; ++x) {
|
||||||
for(int y=0; y<dimy; ++y) {
|
for(int y=0; y<dimy; ++y) {
|
||||||
int color;
|
int color;
|
||||||
if(lcd_layout & LCD_INVERTED) {
|
if(globalconfig.lcdstate & LCD_INVERTED) {
|
||||||
color=lcdGetPixel((lcd_layout & LCD_MIRRORX)?(RESX-x-1):x,(lcd_layout & LCD_MIRRORY)?(RESY-y-1):y)?colorInvertedPixelOn:colorInvertedPixelOff;
|
color=lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?colorInvertedPixelOn:colorInvertedPixelOff;
|
||||||
} else {
|
} else {
|
||||||
color=lcdGetPixel((lcd_layout & LCD_MIRRORX)?(RESX-x-1):x,(lcd_layout & LCD_MIRRORY)?(RESY-y-1):y)?colorPixelOn:colorPixelOff;
|
color=lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?colorPixelOn:colorPixelOff;
|
||||||
}
|
}
|
||||||
for(int minix=0; minix<pixw; ++minix) {
|
for(int minix=0; minix<pixw; ++minix) {
|
||||||
for(int miniy=0; miniy<pixh; ++miniy) {
|
for(int miniy=0; miniy<pixh; ++miniy) {
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
#include "simulator.h"
|
#include "simulator.h"
|
||||||
|
#include "../firmware/basic/basic.h"
|
||||||
#include "../firmware/lcd/display.h"
|
#include "../firmware/lcd/display.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
extern int lcd_layout;
|
|
||||||
|
|
||||||
void simlcdDisplayUpdate() {
|
void simlcdDisplayUpdate() {
|
||||||
write(1,"\033[H",3);
|
write(1,"\033[H",3);
|
||||||
for(int y=0; y<RESY; ++y) {
|
for(int y=0; y<RESY; ++y) {
|
||||||
for(int x=0; x<RESX; ++x) {
|
for(int x=0; x<RESX; ++x) {
|
||||||
if(lcd_layout & LCD_INVERTED) {
|
if(globalconfig.lcdstate & LCD_INVERTED) {
|
||||||
write(1,(lcdGetPixel((lcd_layout & LCD_MIRRORX)?(RESX-x-1):x,(lcd_layout & LCD_MIRRORY)?(RESY-y-1):y)?"#":"_"),1);
|
write(1,(lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?"#":"_"),1);
|
||||||
} else {
|
} else {
|
||||||
write(1,(lcdGetPixel((lcd_layout & LCD_MIRRORX)?(RESX-x-1):x,(lcd_layout & LCD_MIRRORY)?(RESY-y-1):y)?".":"@"),1);
|
write(1,(lcdGetPixel((globalconfig.lcdstate & LCD_MIRRORX)?(RESX-x-1):x,(globalconfig.lcdstate & LCD_MIRRORY)?(RESY-y-1):y)?".":"@"),1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
write(1,("\n"),1);
|
write(1,("\n"),1);
|
||||||
|
|
Loading…
Reference in New Issue