Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linux mouse wheel #21

Merged
merged 3 commits into from Jun 11, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Fix typo in linux version of mouse wheel code.

  • Loading branch information
metajack committed Jun 11, 2013
commit 00351030674abc54572385b0948b8deeeae2e69e
@@ -296,15 +296,15 @@ pub fn mouse_wheel_callback_tls_key(_callback: @@fn(wheel: c_int,
#[cfg(target_os="linux")]
pub extern fn mouse_wheel_callback(wheel: c_int, direction: c_int, x: c_int, y: c_int) {
unsafe {
let callback = local_data_get(wheel_callback_tls_key).get();
let callback = local_data_get(mouse_wheel_callback_tls_key).get();
(*callback)(wheel, direction, x, y)
}
}

#[cfg(target_os="linux")]
pub fn mouse_wheel_func(callback: @fn(wheel: c_int, direction: c_int, x: c_int, y: c_int)) {
unsafe {
local_data_set(wheel_callback_tls_key, @callback);
local_data_set(mouse_wheel_callback_tls_key, @callback);
glutMouseWheelFunc(mouse_wheel_callback);
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.