# HG changeset patch # User John Tsiombikas # Date 1509306988 -7200 # Node ID 01bd8bbc46d4b7fa5ee964d5d83b30302eee1eef # Parent a9edbbdb8213e3e58cbc7a12ca07518de3f6b563 foo diff -r a9edbbdb8213 -r 01bd8bbc46d4 src/sdl/gfx.c --- a/src/sdl/gfx.c Sun Oct 29 15:08:29 2017 +0200 +++ b/src/sdl/gfx.c Sun Oct 29 21:56:28 2017 +0200 @@ -8,6 +8,8 @@ static int fb_width, fb_height; static int num_bitplanes; static int init_flags; +static unsigned char *amigafb; +static unsigned char *bplptr[6]; int gfx_init(int nbpl, unsigned int flags) @@ -28,6 +30,13 @@ } SDL_WM_SetCaption("imgv SDL version", 0); + if(gfx_set_framebuffer(0, fb_width, fb_height) == -1) { + fprintf(stderr, "failed to create %dx%d/%d bitplane amiga framebuffer\n", + fb_width, fb_height, nbpl); + SDL_Quit(); + return -1; + } + return 0; } @@ -50,7 +59,8 @@ void *gfx_set_framebuffer(void *fb, int width, int height) { - return 0; + fb_width = width; + fb_height = height; } void *gfx_get_framebuffer(void)