Skip to content

Commit

Permalink
- the last bit of needed exports for GZDoom.
Browse files Browse the repository at this point in the history
The ADL banks must be accessible to the menu for properly setting up this player.
  • Loading branch information
coelckers committed Feb 8, 2020
1 parent ee291e3 commit 55921d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/zmusic.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ extern "C"
// The rest of the decoder interface is only useful for streaming music.

DLL_IMPORT const ZMusicMidiOutDevice *ZMusic_GetMidiDevices(int *pAmount);
DLL_IMPORT int ZMusic_GetADLBanks(const char* const** pNames);

// Direct access to the CD drive.
// Stops playing the CD
Expand Down
13 changes: 13 additions & 0 deletions source/mididevices/music_adlmidi_mididevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,23 @@ MIDIDevice *CreateADLMIDIDevice(const char *Args)
return new ADLMIDIDevice(&config);
}

DLL_EXPORT int ZMusic_GetADLBanks(const char* const** pNames)
{
if (pNames) *pNames = adl_getBankNames();
return adl_getBanksCount();
}

#else
MIDIDevice* CreateADLMIDIDevice(const char* Args)
{
throw std::runtime_error("ADL device not supported in this configuration");
}

DLL_EXPORT int ZMusic_GetADLBanks(const char* const** pNames)
{
// The export needs to be there even if non-functional.
return 0;
}

#endif

0 comments on commit 55921d0

Please sign in to comment.