mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
stops centering the cursor to prevent camera jumping when the cursor grab is released
This commit is contained in:
parent
ef84ab6603
commit
2ac2f2d45e
@ -80,6 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- You can no longer stack self buffs
|
||||
- Renamed "Burning Potion" to "Potion of Combustion"
|
||||
- Render LoD terrain on the character selection screen
|
||||
- Camera no longer jumps on first mouse event after cursor grab is released on macos
|
||||
|
||||
### Removed
|
||||
- Medium and large potions from all loot tables
|
||||
|
@ -1162,6 +1162,10 @@ impl Show {
|
||||
ui.handle_event(ui::Event(
|
||||
conrod_core::input::Motion::MouseCursor { x: 0.0, y: 0.0 }.into(),
|
||||
));
|
||||
|
||||
//TODO: An underlying OS call in winit is causing the camera to jump upon the
|
||||
// next mouse movement event in macos https://github.com/rust-windowing/winit/issues/999
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
global_state.window.center_cursor();
|
||||
}
|
||||
}
|
||||
|
@ -988,6 +988,9 @@ impl Window {
|
||||
},
|
||||
WindowEvent::CursorMoved { position, .. } => {
|
||||
if self.cursor_grabbed {
|
||||
//TODO: An underlying OS call in winit is causing the camera to jump upon the
|
||||
// next mouse movement event in macos https://github.com/rust-windowing/winit/issues/999
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
self.center_cursor();
|
||||
} else {
|
||||
self.cursor_position = position;
|
||||
|
Loading…
Reference in New Issue
Block a user