View | Details | Raw Unified
Collapse All | Expand All

(-) SDL-1.2.7/src/video/fbcon/SDL_fbevents.c.old (-3 / +3 lines)
 Lines 835-841    Link Here 
static void switch_vt(_THIS, unsigned short which)
static void switch_vt(_THIS, unsigned short which)
{
{
	struct vt_stat vtstate;
	struct vt_stat vtstate;
	unsigned short current;
	unsigned short current_;
	SDL_Surface *screen;
	SDL_Surface *screen;
	__u16 saved_pal[3*256];
	__u16 saved_pal[3*256];
	Uint32 screen_arealen;
	Uint32 screen_arealen;
 Lines 846-852    Link Here 
	     (which == vtstate.v_active) ) {
	     (which == vtstate.v_active) ) {
		return;
		return;
	}
	}
	current = vtstate.v_active;
	current_ = vtstate.v_active;
	/* Save the contents of the screen, and go to text mode */
	/* Save the contents of the screen, and go to text mode */
	SDL_mutexP(hw_lock);
	SDL_mutexP(hw_lock);
 Lines 864-870    Link Here 
	if ( ioctl(keyboard_fd, VT_ACTIVATE, which) == 0 ) {
	if ( ioctl(keyboard_fd, VT_ACTIVATE, which) == 0 ) {
		/* Wait for our console to be activated again */
		/* Wait for our console to be activated again */
		ioctl(keyboard_fd, VT_WAITACTIVE, which);
		ioctl(keyboard_fd, VT_WAITACTIVE, which);
		while ( ioctl(keyboard_fd, VT_WAITACTIVE, current) < 0 ) {
		while ( ioctl(keyboard_fd, VT_WAITACTIVE, current_) < 0 ) {
			if ( (errno != EINTR) && (errno != EAGAIN) ) {
			if ( (errno != EINTR) && (errno != EAGAIN) ) {
				/* Unknown VT error - cancel this */
				/* Unknown VT error - cancel this */
				break;
				break;