1
0
Fork 0
forked from len0rd/rockbox

First stages of rockboy menu - press A/B mode to enter, contributed by pabs

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6120 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michiel Van Der Kolk 2005-03-03 19:54:47 +00:00
parent 3921e1aa69
commit cd040ddd7c
5 changed files with 33 additions and 34 deletions

View file

@ -45,16 +45,24 @@ void doevents()
/* convenience macro for printing loading state */
#define PUTS(str) do { \
rb->lcd_putsxy(1, y, str); \
rb->lcd_getstringsize(str, &w, &h); \
y += h + 1; \
} while (0)
int gnuboy_main(char *rom)
{
int i;
int i, w, h, y;
y = 1;
// Avoid initializing video if we don't have to
// If we have special perms, drop them ASAP!
rb->splash(HZ*1, true, "Init exports");
PUTS("Init exports");
init_exports();
rb->splash(HZ*1, true, "Loading default config");
PUTS("Loading default config");
for (i = 0; defaultconfig[i]; i++)
rc_command(defaultconfig[i]);
@ -65,19 +73,20 @@ int gnuboy_main(char *rom)
// rc_command(cmd);
// FIXME - make interface modules responsible for atexit()
rb->splash(HZ*1, true, "Init video");
PUTS("Init video");
vid_init();
rb->splash(HZ*1, true, "Init sound (nosound)");
PUTS("Init sound (nosound)");
pcm_init();
rb->splash(HZ*1, true, "Loading rom");
PUTS("Loading rom");
loader_init(rom);
if(shut)
return PLUGIN_ERROR;
rb->splash(HZ*1, true, "Emu reset");
PUTS("Emu reset");
emu_reset();
rb->splash(HZ*1, true, "Emu run");
PUTS("Emu run");
emu_run();
// never reached
return PLUGIN_OK;
}
#undef PUTS