amiga_imgv
changeset 9:01bd8bbc46d4
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 29 Oct 2017 21:56:28 +0200 |
parents | a9edbbdb8213 |
children | 5614fbb9c1de |
files | src/sdl/gfx.c |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/src/sdl/gfx.c Sun Oct 29 15:08:29 2017 +0200 1.2 +++ b/src/sdl/gfx.c Sun Oct 29 21:56:28 2017 +0200 1.3 @@ -8,6 +8,8 @@ 1.4 static int fb_width, fb_height; 1.5 static int num_bitplanes; 1.6 static int init_flags; 1.7 +static unsigned char *amigafb; 1.8 +static unsigned char *bplptr[6]; 1.9 1.10 1.11 int gfx_init(int nbpl, unsigned int flags) 1.12 @@ -28,6 +30,13 @@ 1.13 } 1.14 SDL_WM_SetCaption("imgv SDL version", 0); 1.15 1.16 + if(gfx_set_framebuffer(0, fb_width, fb_height) == -1) { 1.17 + fprintf(stderr, "failed to create %dx%d/%d bitplane amiga framebuffer\n", 1.18 + fb_width, fb_height, nbpl); 1.19 + SDL_Quit(); 1.20 + return -1; 1.21 + } 1.22 + 1.23 return 0; 1.24 } 1.25 1.26 @@ -50,7 +59,8 @@ 1.27 1.28 void *gfx_set_framebuffer(void *fb, int width, int height) 1.29 { 1.30 - return 0; 1.31 + fb_width = width; 1.32 + fb_height = height; 1.33 } 1.34 1.35 void *gfx_get_framebuffer(void)