Fixed issue with debugger

This commit is contained in:
neauoire 2023-08-16 13:46:36 -07:00
parent 8edf2da7c8
commit 4690a113c4
1 changed files with 9 additions and 7 deletions

View File

@ -149,11 +149,15 @@ screen_redraw(Uxn *u)
{ {
Uint8 *fg = uxn_screen.fg, *bg = uxn_screen.bg; Uint8 *fg = uxn_screen.fg, *bg = uxn_screen.bg;
Uint32 palette[16], *pixels = uxn_screen.pixels; Uint32 palette[16], *pixels = uxn_screen.pixels;
int i, x, y, w = uxn_screen.width, h = uxn_screen.height; int i, x, y, w = uxn_screen.width, h = uxn_screen.height, x1, y1, x2, y2;
int x1 = uxn_screen.x1; if(u->dev[0x0e]) {
int y1 = uxn_screen.y1; screen_change(0, 0, w, h);
int x2 = uxn_screen.x2 > w ? w : uxn_screen.x2; screen_debugger(u);
int y2 = uxn_screen.y2 > h ? h : uxn_screen.y2; }
x1 = uxn_screen.x1;
y1 = uxn_screen.y1;
x2 = uxn_screen.x2 > w ? w : uxn_screen.x2;
y2 = uxn_screen.y2 > h ? h : uxn_screen.y2;
for(i = 0; i < 16; i++) for(i = 0; i < 16; i++)
palette[i] = uxn_screen.palette[(i >> 2) ? (i >> 2) : (i & 3)]; palette[i] = uxn_screen.palette[(i >> 2) ? (i >> 2) : (i & 3)];
for(y = y1; y < y2; y++) for(y = y1; y < y2; y++)
@ -163,8 +167,6 @@ screen_redraw(Uxn *u)
} }
uxn_screen.x1 = uxn_screen.y1 = 0xffff; uxn_screen.x1 = uxn_screen.y1 = 0xffff;
uxn_screen.x2 = uxn_screen.y2 = 0; uxn_screen.x2 = uxn_screen.y2 = 0;
if(u->dev[0x0e])
screen_debugger(u);
} }
Uint8 Uint8