Small fix at spixel.

This commit is contained in:
mibi88 2023-01-23 17:49:36 +01:00
parent 2b1f4fa1b3
commit 6cd9a9a4e6
4 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,9 @@
/******* DISPLAY *******/
#define SWIDTH 128
#define SHEIGHT 64
enum {SWHITE = 0, SBLACK};
/* void sclear(void);

View File

@ -27,7 +27,9 @@ void supdate() {
}
void spixel(int x, int y, int color) {
_Bdisp_SetPoint_VRAM(x, y, color);
if(x>=0 && x<SWIDTH && y>=0 && y<SHEIGHT){
_Bdisp_SetPoint_VRAM(x, y, color);
}
}
void srect(int x1, int y1, int x2, int y2) {

View File

@ -7,6 +7,9 @@
/******* DISPLAY *******/
#define SWIDTH 128
#define SHEIGHT 64
enum {SWHITE = 0, SBLACK};
/* void sclear(void);

Binary file not shown.