Use MSVC 4.20 definition of MIDICALLBACK

This commit is contained in:
Christian Semmler 2024-01-18 13:39:26 -05:00
parent be045514ed
commit ea9d92e1e3
No known key found for this signature in database
GPG key ID: 086DAA1360BEEE5C
3 changed files with 4 additions and 15 deletions

View file

@ -38,7 +38,7 @@ class MxMusicManager : public MxAudioManager {
void SetMIDIVolume(); void SetMIDIVolume();
static void CALLBACK static void CALLBACK
MidiCallbackProc(HMIDIOUT p_hmo, UINT p_wMsg, DWORD_PTR p_dwInstance, DWORD_PTR p_dwParam1, DWORD_PTR p_dwParam2); MxMusicManager::MidiCallbackProc(HDRVR p_hdrvr, UINT p_uMsg, DWORD p_dwUser, DWORD p_dw1, DWORD p_dw2);
HMIDISTRM m_midiStreamH; // 0x30 HMIDISTRM m_midiStreamH; // 0x30
MxBool m_midiInitialized; // 0x34 MxBool m_midiInitialized; // 0x34

View file

@ -129,16 +129,10 @@ void MxMusicManager::SetMIDIVolume()
} }
// FUNCTION: LEGO1 0x100c0820 // FUNCTION: LEGO1 0x100c0820
void CALLBACK MxMusicManager::MidiCallbackProc( void CALLBACK MxMusicManager::MidiCallbackProc(HDRVR p_hdrvr, UINT p_uMsg, DWORD p_dwUser, DWORD p_dw1, DWORD p_dw2)
HMIDIOUT p_hmo,
UINT p_wMsg,
DWORD_PTR p_dwInstance,
DWORD_PTR p_dwParam1,
DWORD_PTR p_dwParam2
)
{ {
if (p_wMsg == MOM_DONE) if (p_uMsg == MOM_DONE)
((MxMusicManager*) p_dwInstance)->ResetStream(); ((MxMusicManager*) p_dwUser)->ResetStream();
} }
// FUNCTION: LEGO1 0x100c0840 // FUNCTION: LEGO1 0x100c0840

View file

@ -15,11 +15,6 @@
#define COMPAT_CONST #define COMPAT_CONST
#endif #endif
// DWORD_PTR didn't exist in older Windows SDKs
#if (defined(_MSC_VER) && _MSC_VER < 1100)
typedef unsigned long DWORD_PTR, *PDWORD_PTR;
#endif
// Disable "identifier was truncated to '255' characters" warning. // Disable "identifier was truncated to '255' characters" warning.
// Impossible to avoid this if using STL map or set. // Impossible to avoid this if using STL map or set.
// This removes most (but not all) occurrences of the warning. // This removes most (but not all) occurrences of the warning.