Fixed bug that caused Wesnoth to fail to compile in ia64, ...

...and as a cause of that, not entering Debian Sarge (testing)
This commit is contained in:
uid67456 2004-01-29 01:26:22 +00:00
parent 9937e0b391
commit f57bb19eb7
2 changed files with 7 additions and 5 deletions

View file

@ -127,8 +127,8 @@ void pump()
SDL_UserEvent user_event;
user_event.type = DOUBLE_CLICK_EVENT;
user_event.code = 0;
user_event.data1 = reinterpret_cast<void*>(event.button.x);
user_event.data2 = reinterpret_cast<void*>(event.button.y);
user_event.data1 = new int(event.button.x);
user_event.data2 = new int(event.button.y);
::SDL_PushEvent(reinterpret_cast<SDL_Event*>(&user_event));
}
@ -188,4 +188,4 @@ void raise_draw_event()
}
}
}
}

View file

@ -225,8 +225,10 @@ void menu::handle_event(const SDL_Event& event)
x = event.button.x;
y = event.button.y;
} else {
x = reinterpret_cast<int>(event.user.data1);
y = reinterpret_cast<int>(event.user.data2);
x = *(reinterpret_cast<int*>(event.user.data1));
y = *(reinterpret_cast<int*>(event.user.data2));
delete reinterpret_cast<int*>(event.user.data1);
delete reinterpret_cast<int*>(event.user.data2);
}
const int item = hit(x,y);