Ejemplo n.º 1
0
void gp2x_init(void)
{
    printf("entering init()\n");
    fflush(stdout);

    gp2x_screen = malloc(320*240*2 + 32);
    if(gp2x_screen == NULL) return;
    memset(gp2x_screen, 0, 320*240*2 + 32);

    if(SDL_Init(SDL_INIT_NOPARACHUTE))
    {
        printf("Could not initialize SDL: %s.\n", SDL_GetError());
        return;
    }

    if(SDL_InitSubSystem(SDL_INIT_VIDEO)==-1)
    {
        puts(SDL_GetError());
        return;
    }

    SDL_ShowCursor(0);

    gp2x_video_changemode(8);

    /* init usb joys -GnoStiC */
    gp2x_usbjoy_init();

    SDL_PumpEvents();

    printf("gp2x_init done.\n");
}
Ejemplo n.º 2
0
void gp2x_init(void)
{
	printf("entering init()\n"); fflush(stdout);

	gp2x_screen = malloc(320*240*2 + 320*2);
	memset(gp2x_screen, 0, 320*240*2 + 320*2);

	// snd
  	mixerdev = open("/dev/mixer", O_RDWR);
	if (mixerdev == -1)
		printf("open(\"/dev/mixer\") failed with %i\n", errno);

	gtk_initf();

	gp2x_usbjoy_init();

	printf("exitting init()\n"); fflush(stdout);
}