Move rotation coordinates to screen

Move the window-to-frame coordinates conversion from the input manager
to the screen.

This will allow to apply more screen-related transformations without
impacting the input manager.
This commit is contained in:
Romain Vimont
2020-04-17 18:43:29 +02:00
parent 44f720e4a4
commit 3c9ae99dda
3 changed files with 39 additions and 33 deletions

View File

@@ -114,4 +114,9 @@ screen_set_rotation(struct screen *screen, unsigned rotation);
void
screen_handle_window_event(struct screen *screen, const SDL_WindowEvent *event);
// convert point from window coordinates to frame coordinates
// x and y are expressed in pixels
struct point
screen_convert_to_frame_coords(struct screen *screen, int32_t x, int32_t y);
#endif