summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wiiyourself/wiimote.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-02-05 04:08:21 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-02-05 04:08:21 +0100
commit0d82a0ccc3c9bb49f28f18e7460a5366e06516bc (patch)
tree0fc275578270194fea4b8d198b53f5e41d31f98e /tracker-wii/wiiyourself/wiimote.cpp
parent574ce54af4d17af1903f3e221b7b51803978b5da (diff)
tracker/wii: fix MSVC narrowing conversion warnings
Diffstat (limited to 'tracker-wii/wiiyourself/wiimote.cpp')
-rw-r--r--tracker-wii/wiiyourself/wiimote.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tracker-wii/wiiyourself/wiimote.cpp b/tracker-wii/wiiyourself/wiimote.cpp
index 46130cca..79893027 100644
--- a/tracker-wii/wiiyourself/wiimote.cpp
+++ b/tracker-wii/wiiyourself/wiimote.cpp
@@ -1685,6 +1685,7 @@ int wiimote::ParseReadAddress (BYTE* buff)
// decode the address that was queried:
int address = buff[4]<<8 | buff[5];
int size = buff[3] >> 4;
+ (void)size;
int changed = 0;
if((buff[3] & 0x08) != 0) {
@@ -2689,7 +2690,7 @@ bool wiimote::PlaySample (const wiimote_sample &sample, BYTE volume,
// Write 0x08 to register 0x04a20001
WriteData(0x04a20001, 0x08);
// Write 7-byte configuration to registers 0x04a20001-0x04a20008
- BYTE bytes[7] = { 0x00, 0x00, 0x00, 10+(BYTE)freq, volume, 0x00, 0x00 };
+ BYTE bytes[7] = { '\0', '\0', '\0', BYTE(10 + freq), volume, '\0', '\0' };
WriteData(0x04a20001, sizeof(bytes), bytes);
// + Write 0x01 to register 0x04a20008
WriteData(0x04a20008, 0x01);
@@ -2754,7 +2755,7 @@ bool wiimote::PlaySquareWave (speaker_freq freq, BYTE volume)
WriteData(0x04a20001, 0x08);
// write default sound mode (4bit ADPCM, we assume) 7-byte configuration
// to registers 0xa20001-0xa20008
- BYTE bytes[7] = { 0x00, 0x00, 0x00, 10+(BYTE)freq, volume, 0x00, 0x00 };
+ BYTE bytes[7] = { '\0', '\0', '\0', BYTE(10+freq), volume, '\0', '\0' };
WriteData(0x04a20001, sizeof(bytes), bytes);
// write 0x01 to register 0xa20008
WriteData(0x04a20008, 0x01);