lilypad: Fix gcc strict-aliasing warning

The fixme I added was likely wrong. Not sure what I was thinking.
This commit is contained in:
Jonathan Li 2016-02-25 22:07:56 +00:00
parent 1103f9046a
commit fd8c762772
1 changed files with 3 additions and 3 deletions

View File

@ -753,9 +753,9 @@ inline void StopVibrate() {
inline void ResetVibrate(int port, int slot) { inline void ResetVibrate(int port, int slot) {
SetVibrate(port, slot, 0, 0); SetVibrate(port, slot, 0, 0);
SetVibrate(port, slot, 1, 0); SetVibrate(port, slot, 1, 0);
// FIXME: I think this is broken on 64-bits. pads[port][slot].vibrate[0] = 0x5A;
((int*)(pads[port][slot].vibrate))[0] = 0xFFFFFF5A; for (int i = 1; i < 8; ++i)
((int*)(pads[port][slot].vibrate))[1] = 0xFFFFFFFF; pads[port][slot].vibrate[i] = 0xFF;
} }
void ResetPad(int port, int slot) { void ResetPad(int port, int slot) {