File tree Expand file tree Collapse file tree
crates/processing_glfw/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ pub struct GlfwContext {
1414 window : PWindow ,
1515 events : GlfwReceiver < ( f64 , WindowEvent ) > ,
1616 surface : Option < Entity > ,
17- scale_factor : f32 ,
1817}
1918
2019impl GlfwContext {
@@ -31,14 +30,11 @@ impl GlfwContext {
3130 window. set_all_polling ( true ) ;
3231 window. show ( ) ;
3332
34- let ( scale_factor, _) = window. get_content_scale ( ) ;
35-
3633 Ok ( Self {
3734 glfw,
3835 window,
3936 events,
4037 surface : None ,
41- scale_factor,
4238 } )
4339 }
4440
@@ -127,8 +123,7 @@ impl GlfwContext {
127123 return false ;
128124 }
129125 WindowEvent :: CursorPos ( x, y) => {
130- let s = self . scale_factor ;
131- input_set_mouse_move ( surface, x as f32 / s, y as f32 / s) . unwrap ( ) ;
126+ input_set_mouse_move ( surface, x as f32 , y as f32 ) . unwrap ( ) ;
132127 }
133128 WindowEvent :: MouseButton ( button, action, _mods) => {
134129 if let Some ( btn) = glfw_button_to_bevy ( button) {
You can’t perform that action at this time.
0 commit comments