From 0300fca5b707e025d59e5eee755fdd0d99859d67 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 7 Mar 2005 21:41:10 +0000 Subject: Baild out instead of crashing when called directly (without playing a ROM file). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6167 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/rockboy/rockboy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 6c831d075f..a34fd7bf69 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c @@ -102,8 +102,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* if you are using a global api pointer, don't forget to copy it! otherwise you will get lovely "I04: IllInstr" errors... :-) */ rb = api; + + if (!parameter) { + rb->splash(HZ*3, true, "Play gameboy ROM file! (.gb/.gbc)"); + return PLUGIN_OK; + } #ifdef USE_IRAM - memcpy(iramstart, iramcopy, iramend-iramstart); + memcpy(iramstart, iramcopy, iramend-iramstart); #endif shut=0; cleanshut=0; -- cgit v1.2.3