diff options
author | 2008-01-29 16:37:58 +0000 | |
---|---|---|
committer | 2008-01-29 16:37:58 +0000 | |
commit | 839029d30256b05cdfed594eecf995d02a5f5812 (patch) | |
tree | 5eced076c5b16b64302d897a43982a3287d71b77 /src/emu/tilemap.c | |
parent | bd18da7d71cad0cb3296db82f2ffe42deaa9fdec (diff) |
From: Dirk Best
the latest changes in MAME 0.122u7 broke the screenless systems in
MESS. The attached patch fixes this.
Diffstat (limited to 'src/emu/tilemap.c')
-rw-r--r-- | src/emu/tilemap.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c index 24ef7360d8f..37bbc9a7730 100644 --- a/src/emu/tilemap.c +++ b/src/emu/tilemap.c @@ -265,15 +265,18 @@ INLINE tilemap *indexed_tilemap(int index) void tilemap_init(running_machine *machine) { - screen_width = Machine->screen[0].width; - screen_height = Machine->screen[0].height; + screen_width = machine->screen[0].width; + screen_height = machine->screen[0].height; - tilemap_list = NULL; - tilemap_tailptr = &tilemap_list; - tilemap_instance = 0; - - priority_bitmap = auto_bitmap_alloc(screen_width, screen_height, BITMAP_FORMAT_INDEXED8); - add_exit_callback(machine, tilemap_exit); + if (screen_width != 0 && screen_height != 0) + { + tilemap_list = NULL; + tilemap_tailptr = &tilemap_list; + tilemap_instance = 0; + + priority_bitmap = auto_bitmap_alloc(screen_width, screen_height, BITMAP_FORMAT_INDEXED8); + add_exit_callback(machine, tilemap_exit); + } } |