- the last bit of needed exports for GZDoom.

The ADL banks must be accessible to the menu for properly setting up this player.
This commit is contained in:
Christoph Oelckers 2020-02-08 14:23:29 +01:00
parent ee291e37d0
commit 55921d0d34
2 changed files with 14 additions and 0 deletions

View file

@ -333,6 +333,7 @@ extern "C"
// The rest of the decoder interface is only useful for streaming music. // The rest of the decoder interface is only useful for streaming music.
DLL_IMPORT const ZMusicMidiOutDevice *ZMusic_GetMidiDevices(int *pAmount); DLL_IMPORT const ZMusicMidiOutDevice *ZMusic_GetMidiDevices(int *pAmount);
DLL_IMPORT int ZMusic_GetADLBanks(const char* const** pNames);
// Direct access to the CD drive. // Direct access to the CD drive.
// Stops playing the CD // Stops playing the CD

View file

@ -270,10 +270,23 @@ MIDIDevice *CreateADLMIDIDevice(const char *Args)
return new ADLMIDIDevice(&config); return new ADLMIDIDevice(&config);
} }
DLL_EXPORT int ZMusic_GetADLBanks(const char* const** pNames)
{
if (pNames) *pNames = adl_getBankNames();
return adl_getBanksCount();
}
#else #else
MIDIDevice* CreateADLMIDIDevice(const char* Args) MIDIDevice* CreateADLMIDIDevice(const char* Args)
{ {
throw std::runtime_error("ADL device not supported in this configuration"); 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 #endif