SDL Mouse position Cropped after resize
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm getting some strange behaviour with the mouse position in SDL. If I re-size the window bigger, the x,y positions from either mouse events, seem to be restricted to the original window Width and Height. If there some function call that I'm missing to tell SDL that the mousing area has increased in size. The relevant parts of the app: void Resize ( int width , int height ) { WindowWidth = width ; WindowHeight = height ; /* update OpenGL */ } void Init () { glClearColor ( 0.f , 0.f , 0.f , 1.f ); Resize ( WindowWidth ,