Пример #1
0
/*:::::*/
static int driver_init(char *title, int w, int h, int depth_arg, int refresh_rate, int flags)
{
	int depth = MAX(8, depth_arg);

	if (depth == 8) {
		depth = 24;
		blitter = fb_hGetBlitter(32, FALSE);
	} else {
		blitter = NULL;
	}

	if (flags & DRIVER_OPENGL)
		return -1;

	if (!XVideoSetMode(w, h, depth == 32 ? 24 : depth, refresh_rate))
		return -1;

	framebuffer = XVideoGetFB();

	quitting = FALSE;

	//XInput_Init();

	/* !!!FIXME!!! use rtlib thread creation function */
	XCreateThread(driver_update, NULL, NULL);

	return 0;
}
Пример #2
0
int XBOX_VideoInit(_THIS, SDL_PixelFormat *vformat)
{
	XVideoSetMode(640, 480, 32, 0);
	/* Determine the screen depth (use default 8-bit depth) */
	/* we change this during the SDL_SetVideoMode implementation... */
	vformat->BitsPerPixel = 32;
	vformat->BytesPerPixel = 4;

	/* We're done! */
	return(0);
}