Fixed issue with screen resize
This commit is contained in:
parent
c3506869b5
commit
a747e4b20a
|
@ -25,7 +25,7 @@ typedef struct {
|
||||||
|
|
||||||
extern Audio audio[POLYPHONY];
|
extern Audio audio[POLYPHONY];
|
||||||
|
|
||||||
|
Uint8 audio_get_vu(Audio *c);
|
||||||
int audio_render(Audio *c, Sint16 *sample, Sint16 *end);
|
int audio_render(Audio *c, Sint16 *sample, Sint16 *end);
|
||||||
void audio_start(Audio *c, Uint16 adsr, Uint8 pitch);
|
void audio_start(Audio *c, Uint16 adsr, Uint8 pitch);
|
||||||
Uint8 audio_get_vu(Audio *c);
|
|
||||||
void audio_finished_handler(Audio *c);
|
void audio_finished_handler(Audio *c);
|
|
@ -139,7 +139,7 @@ file_delete(void)
|
||||||
return unlink(current_filename);
|
return unlink(current_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* API */
|
/* IO */
|
||||||
|
|
||||||
void
|
void
|
||||||
file_deo(Device *d, Uint8 port)
|
file_deo(Device *d, Uint8 port)
|
||||||
|
|
|
@ -154,7 +154,7 @@ screen_debug(Screen *p, Uint8 *stack, Uint8 wptr, Uint8 rptr, Uint8 *memory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* APIs */
|
/* IO */
|
||||||
|
|
||||||
Uint8
|
Uint8
|
||||||
screen_dei(Device *d, Uint8 port)
|
screen_dei(Device *d, Uint8 port)
|
||||||
|
@ -174,7 +174,7 @@ screen_deo(Device *d, Uint8 port)
|
||||||
switch(port) {
|
switch(port) {
|
||||||
case 0x1: d->vector = peek16(d->dat, 0x0); break;
|
case 0x1: d->vector = peek16(d->dat, 0x0); break;
|
||||||
case 0x5:
|
case 0x5:
|
||||||
/* TODO: if(!FIXED_SIZE) set_size(peek16(d->dat, 0x2), peek16(d->dat, 0x4), 1); */
|
if(!FIXED_SIZE) set_size(peek16(d->dat, 0x2), peek16(d->dat, 0x4), 1);
|
||||||
break;
|
break;
|
||||||
case 0xe: {
|
case 0xe: {
|
||||||
Uint16 x = peek16(d->dat, 0x8);
|
Uint16 x = peek16(d->dat, 0x8);
|
||||||
|
|
|
@ -27,6 +27,9 @@ typedef struct Screen {
|
||||||
|
|
||||||
extern Screen screen;
|
extern Screen screen;
|
||||||
|
|
||||||
|
/* this should probably be done differently */
|
||||||
|
int set_size(Uint16 width, Uint16 height, int is_resize);
|
||||||
|
|
||||||
void screen_palette(Screen *p, Uint8 *addr);
|
void screen_palette(Screen *p, Uint8 *addr);
|
||||||
void screen_resize(Screen *p, Uint16 width, Uint16 height);
|
void screen_resize(Screen *p, Uint16 width, Uint16 height);
|
||||||
void screen_clear(Screen *p, Layer *layer);
|
void screen_clear(Screen *p, Layer *layer);
|
||||||
|
|
|
@ -101,7 +101,7 @@ set_window_size(SDL_Window *window, int w, int h)
|
||||||
SDL_SetWindowSize(window, w, h);
|
SDL_SetWindowSize(window, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
set_size(Uint16 width, Uint16 height, int is_resize)
|
set_size(Uint16 width, Uint16 height, int is_resize)
|
||||||
{
|
{
|
||||||
screen_resize(&screen, width, height);
|
screen_resize(&screen, width, height);
|
||||||
|
|
Loading…
Reference in New Issue