Closed rib closed 1 year ago
There's a notable portability hazard currently due to the game-activity and native-activity backends exposing different Keycode types.
game-activity
native-activity
Keycode
For example https://github.com/rust-windowing/winit/commit/918430979f8219648daade44796c00893e42fdd8#diff-9169a22d6397a250be741006cd857b8a575f804c74cc07e3a4fb8f3341606d9b and https://github.com/rust-windowing/winit/commit/4a36741f9ccaa03ca0842362dd1ebc24fd2a1b11 both recently assumed they could use the ndk::event::Keycode type which inadvertently broke building Winit against the game-activity backend.
ndk::event::Keycode
We should either use ndk::event::Keycode in both backends or move the current game-activity Keycode type so it can be shared.
Also relates to https://github.com/rust-mobile/android-activity/issues/45
Perhaps also relates to #48 when considering reusing ndk types that look/feel too similar to their game-activity counterpart.
ndk
We could even rewrite parts of the C code to make them similar if desired.
There's a notable portability hazard currently due to the
game-activity
andnative-activity
backends exposing differentKeycode
types.For example https://github.com/rust-windowing/winit/commit/918430979f8219648daade44796c00893e42fdd8#diff-9169a22d6397a250be741006cd857b8a575f804c74cc07e3a4fb8f3341606d9b and https://github.com/rust-windowing/winit/commit/4a36741f9ccaa03ca0842362dd1ebc24fd2a1b11 both recently assumed they could use the
ndk::event::Keycode
type which inadvertently broke building Winit against thegame-activity
backend.We should either use
ndk::event::Keycode
in both backends or move the currentgame-activity
Keycode
type so it can be shared.Also relates to https://github.com/rust-mobile/android-activity/issues/45