Trying to tackle issue with undrawn region on screen
This commit is contained in:
parent
c1c9487057
commit
2f73bae07e
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
|00 @System &vector $2 &wst $1 &rst $1 &eaddr $2 &ecode $1 &pad $1 &r $2 &g $2 &b $2 &debug $1 &halt $1
|
|00 @System &vector $2 &wst $1 &rst $1 &eaddr $2 &ecode $1 &pad $1 &r $2 &g $2 &b $2 &debug $1 &halt $1
|
||||||
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
||||||
|
|
||||||
|000
|
|000
|
||||||
|
|
||||||
@dvd &x $2 &y $2
|
@dvd &x $2 &y $2
|
||||||
|
@ -39,7 +40,7 @@
|
||||||
( top ) ORAk ?{
|
( top ) ORAk ?{
|
||||||
[ LIT2 ADD2 _&y ] STR }
|
[ LIT2 ADD2 _&y ] STR }
|
||||||
( bottom ) DUP2 [ LIT2 &hit-ver $2 ] NEQ2 ?{
|
( bottom ) DUP2 [ LIT2 &hit-ver $2 ] NEQ2 ?{
|
||||||
[ LIT2 ADD2 _&y ] STR }
|
[ LIT2 SUB2 _&y ] STR }
|
||||||
#0001 [ &y ADD2 ] .dvd/y STZ2
|
#0001 [ &y ADD2 ] .dvd/y STZ2
|
||||||
#01 <draw-dvd>
|
#01 <draw-dvd>
|
||||||
BRK
|
BRK
|
||||||
|
|
|
@ -147,6 +147,7 @@ set_window_size(SDL_Window *window, int w, int h)
|
||||||
if(w == win_old.x && h == win_old.y) return;
|
if(w == win_old.x && h == win_old.y) return;
|
||||||
SDL_RenderClear(emu_renderer);
|
SDL_RenderClear(emu_renderer);
|
||||||
SDL_SetWindowSize(window, w, h);
|
SDL_SetWindowSize(window, w, h);
|
||||||
|
screen_resize(uxn_screen.width, uxn_screen.height, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -430,10 +431,10 @@ emu_run(char *rom)
|
||||||
now = SDL_GetPerformanceCounter();
|
now = SDL_GetPerformanceCounter();
|
||||||
next_refresh = now + frame_interval;
|
next_refresh = now + frame_interval;
|
||||||
uxn_eval(screen_vector);
|
uxn_eval(screen_vector);
|
||||||
if(uxn_screen.x2)
|
if(screen_changed())
|
||||||
emu_redraw();
|
emu_redraw();
|
||||||
}
|
}
|
||||||
if(screen_vector || uxn_screen.x2) {
|
if(screen_vector) {
|
||||||
Uint64 delay_ms = (next_refresh - now) / ms_interval;
|
Uint64 delay_ms = (next_refresh - now) / ms_interval;
|
||||||
if(delay_ms > 0) SDL_Delay(delay_ms);
|
if(delay_ms > 0) SDL_Delay(delay_ms);
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue