示例#1
0
void clear_input_events(double older_than)
{
	if (older_than < 0) {
		drop_input_events_older_than = al_get_time();
	}
	else {
		drop_input_events_older_than = older_than;
	}

	while (input_events.size() > 0) {
		INPUT_EVENT &ie = *input_events.begin();
		if (ie.timestamp >= drop_input_events_older_than) {
			break;
		}
		input_events.erase(input_events.begin());
	}

	for (int i = 0; i < JOY_NUM_REPEATABLE; i++) {
		joystick_initial_repeat_countdown[i] = JOY_INITIAL_REPEAT_TIME;
		joystick_repeat_countdown[i] = JOY_REPEAT_TIME;
		joystick_repeat_started[i] = false;
		joystick_repeat_events[i] = EMPTY_INPUT_EVENT;
	}

	joy_axes[0] = joy_axes[1] = 0;

	Input *i = getInput();
	if (i) {
		i->reset();
	}

	clear_touches();

	released = true;
}
示例#2
0
void MCEventQueueClearTouches(void)
{
	// Clear the static state we have tracking touches.
	clear_touches();
	
	// And now clear anything touch-related in the message queue
	MCEventQueueFilter(clear_touches_filter, nil);
}
示例#3
0
文件: mbldc.cpp 项目: n9yty/livecode
MCScreenDC::~MCScreenDC(void)
{
    // Delete any lingering active touches (clear_touches does just the job)
    clear_touches();

    // Delete the main windows stack.
    delete m_main_windows;
}
示例#4
0
文件: mbldc.cpp 项目: bduck/livecode
MCScreenDC::~MCScreenDC(void)
{
	// Delete any lingering active touches (clear_touches does just the job)
	clear_touches();
	
	// Delete the main windows stack.
	delete m_main_windows;
	
	// MW-2013-06-18: [[ XPlatNotify ]] Finalize the notify module.
	MCNotifyFinalize();
}