From 63898f61b0ce4e321b5a7c39da2cfb5b16cfde5f Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Mon, 18 Jun 2018 21:21:45 +0100 Subject: Codechange: Rearrange struct packing defines and make MinGW use _Pragma pack style --- src/music/dmusic.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/music') diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index d48f51e85..56707a797 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -102,21 +102,19 @@ private: bool ReadDLSWave(FILE *f, DWORD list_length, long offset); }; -#pragma pack(2) /** A RIFF chunk header. */ -struct ChunkHeader { +PACK_N(struct ChunkHeader { FOURCC type; ///< Chunk type. DWORD length; ///< Length of the chunk, not including the chunk header itself. -}; +}, 2); /** Buffer format for a DLS wave download. */ -struct WAVE_DOWNLOAD { +PACK_N(struct WAVE_DOWNLOAD { DMUS_DOWNLOADINFO dlInfo; ULONG ulOffsetTable[2]; DMUS_WAVE dmWave; DMUS_WAVEDATA dmWaveData; -}; -#pragma pack() +}, 2); struct PlaybackSegment { uint32 start, end; -- cgit v1.2.3-70-g09d2