Example #1
0
/* _win_switch_in:
 *  Puts the library in the foreground.
 */
void _win_switch_in(void)
{
   int mode;

   _TRACE(PREFIX_I "switch in\n");

   _win_app_foreground = TRUE;

   key_dinput_acquire();
   mouse_dinput_acquire();
   joystick_dinput_acquire();

   if (win_gfx_driver && win_gfx_driver->switch_in)
      win_gfx_driver->switch_in();

   /* handle switch modes */
   mode = get_display_switch_mode();

   if ((mode == SWITCH_AMNESIA) || (mode == SWITCH_PAUSE)) {
      _TRACE(PREFIX_I "AMNESIA or PAUSE mode recovery\n");
      SetEvent(foreground_event);

      /* restore old priority and wake up */
      SetThreadPriority(allegro_thread, allegro_thread_priority);
   }

   _switch_in();
}
Example #2
0
/* _win_switch_in:
 *  Puts the library in the foreground.
 */
void _win_switch_in(void)
{
   _TRACE(PREFIX_I "switch in\n");

   _win_app_foreground = TRUE;

   /* update keyboard modifiers  */
   _al_win_kbd_update_shifts();

   if (win_gfx_driver && win_gfx_driver->switch_in)
      win_gfx_driver->switch_in();

   _switch_in();
}
Example #3
0
/* come_back:
 *  Performs a switch back.
 */
static void come_back(void)
{
	_unix_bg_man->disable_interrupts();

	if (gfx_driver && gfx_driver->restore_video_state)
		gfx_driver->restore_video_state();

	_restore_switch_state();

	ioctl(__al_linux_console_fd, VT_RELDISP, VT_ACKACQ);
	console_active = 1;

	/* __al_linux_resume_standard_drivers(); */

	_unix_bg_man->enable_interrupts();

	_switch_in();

	__al_linux_switching_blocked--;
}