Use scrcpy input events for mouse processors

Pass scrcpy input events instead of SDL input events to mouse
processors.

These events represent exactly what mouse processors need, abstracted
from any visual orientation and scaling applied on the SDL window.

This makes the mouse processors independent of the "screen" instance,
and the implementation source code independent of the SDL API.
This commit is contained in:
Romain Vimont
2021-12-29 16:24:20 +01:00
parent b4b638e8fe
commit 9460bdd87b
5 changed files with 169 additions and 104 deletions

View File

@@ -13,11 +13,9 @@ struct sc_mouse_inject {
struct sc_mouse_processor mouse_processor; // mouse processor trait
struct controller *controller;
struct screen *screen;
};
void
sc_mouse_inject_init(struct sc_mouse_inject *mi, struct controller *controller,
struct screen *screen);
sc_mouse_inject_init(struct sc_mouse_inject *mi, struct controller *controller);
#endif