summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/tilemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/tilemap.c')
-rw-r--r--src/emu/tilemap.c19
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);
+ }
}