You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For key bindings provided by the user of my engine, my code uses:
to!SDL_Keycode("SDLK_a");
Up until version 1.2.4 this worked since SDL_Keycode was defined as:
enum SDL_Keycode { }
However, in later versions of the bindings, the code changed to:
alias SDL_KeyCode = uint;
enum : SDL_KeyCode{ }
Now this automated conversion from string containing the enum member name to enum member is not possible anymore:
std.conv.ConvException@/usr/include/dmd/phobos/std/conv.d(2533): Unexpected 'S' when converting from type string to type int
Is there an easy way to restore the original behaviour?
My engine uses a config file to allow the user to configure SDL_Keycode (and SDL_EventType) to allow rebind-able keys (on runtime) to be coupled to in engine events, e.g.:
For key bindings provided by the user of my engine, my code uses:
Up until version 1.2.4 this worked since SDL_Keycode was defined as:
enum SDL_Keycode { }
However, in later versions of the bindings, the code changed to:
Now this automated conversion from string containing the enum member name to enum member is not possible anymore:
Is there an easy way to restore the original behaviour?
My engine uses a config file to allow the user to configure SDL_Keycode (and SDL_EventType) to allow rebind-able keys (on runtime) to be coupled to in engine events, e.g.:
The text was updated successfully, but these errors were encountered: