mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
Fixed mapping the paddle buttons with the virtual controller
This commit is contained in:
@@ -160,7 +160,7 @@ SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc)
|
||||
int i, axis;
|
||||
|
||||
if (hwdata->desc.button_mask == 0) {
|
||||
for (i = 0; i < hwdata->desc.nbuttons && i < sizeof(Uint16)*8; ++i) {
|
||||
for (i = 0; i < hwdata->desc.nbuttons && i < sizeof(hwdata->desc.button_mask)*8; ++i) {
|
||||
hwdata->desc.button_mask |= (1 << i);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user