1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Input: Remove usage of platform dependent event IDs.

The ID property for InputEvents is set by `SceneTree` when sending the event down the tree.
So there's no need for the platform specific code to set this value when it will later be overriden anyway...
This commit is contained in:
Andreas Haas
2017-03-26 15:59:13 +02:00
parent a0b0dff6fd
commit c0b6756875
28 changed files with 104 additions and 186 deletions

View File

@@ -344,15 +344,12 @@ String OSUWP::get_clipboard() const {
void OSUWP::input_event(InputEvent &p_event) {
p_event.ID = ++last_id;
input->parse_input_event(p_event);
if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index > 3) {
//send release for mouse wheel
p_event.mouse_button.pressed = false;
p_event.ID = ++last_id;
input->parse_input_event(p_event);
}
};
@@ -680,7 +677,7 @@ uint64_t OSUWP::get_ticks_usec() const {
void OSUWP::process_events() {
last_id = joypad->process_controllers(last_id);
joypad->process_controllers();
process_key_events();
}
@@ -907,7 +904,6 @@ OSUWP::OSUWP() {
pressrc = 0;
old_invalid = true;
last_id = 0;
mouse_mode = MOUSE_MODE_VISIBLE;
#ifdef STDOUT_FILE
stdo = fopen("stdout.txt", "wb");