mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
ADLMIDI & OPNMIDI: Little clean and MSVC warnings muting
This commit is contained in:
parent
5acffa693f
commit
15e133afb9
3 changed files with 20 additions and 17 deletions
|
@ -107,13 +107,9 @@ ADLMIDI_EXPORT int adl_setBank(ADL_MIDIPlayer *device, int bank)
|
|||
MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer);
|
||||
if(static_cast<uint32_t>(bankno) >= NumBanks)
|
||||
{
|
||||
#ifndef __WATCOMC__
|
||||
std::stringstream s;
|
||||
s << "bank number may only be 0.." << (NumBanks - 1) << ".\n";
|
||||
play->setErrorString(s.str());
|
||||
#else
|
||||
play->setErrorString("Selected embedded bank is not exists!\n");
|
||||
#endif
|
||||
char errBuf[150];
|
||||
std::snprintf(errBuf, 150, "Embedded bank number may only be 0..%u!\n", (NumBanks - 1));
|
||||
play->setErrorString(errBuf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -142,14 +138,9 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4)
|
|||
MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer);
|
||||
if((unsigned int)ops4 > 6 * play->m_setup.NumCards)
|
||||
{
|
||||
#ifndef __WATCOMC__
|
||||
std::stringstream s;
|
||||
s << "number of four-op channels may only be 0.." << (6 * (play->m_setup.NumCards)) << " when " << play->m_setup.NumCards << " OPL3 cards are used.\n";
|
||||
play->setErrorString(s.str());
|
||||
#else
|
||||
play->setErrorString("number of four-op channels may not be more than 6 channels per each OPL3 chip!\n");
|
||||
#endif
|
||||
|
||||
char errBuff[250];
|
||||
std::snprintf(errBuff, 250, "number of four-op channels may only be 0..%u when %u OPL3 cards are used.\n", (6 * (play->m_setup.NumCards)), play->m_setup.NumCards);
|
||||
play->setErrorString(errBuff);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ typedef int32_t ssize_t;
|
|||
#include <vector>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
//#ifdef __WATCOMC__
|
||||
//#include <myset.h> //TODO: Implemnet a workaround for OpenWatcom to fix a crash while using those containers
|
||||
//#include <mymap.h>
|
||||
|
@ -105,6 +104,13 @@ typedef int32_t ssize_t;
|
|||
#include <deque>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4319)
|
||||
#pragma warning(disable:4267)
|
||||
#pragma warning(disable:4244)
|
||||
#pragma warning(disable:4146)
|
||||
#endif
|
||||
|
||||
#include "fraction.hpp"
|
||||
|
||||
#ifndef ADLMIDI_HW_OPL
|
||||
|
|
|
@ -56,7 +56,6 @@ typedef __int32 ssize_t;
|
|||
#include <vector>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <cstdlib>
|
||||
|
@ -78,6 +77,13 @@ typedef __int32 ssize_t;
|
|||
#include <deque>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4319)
|
||||
#pragma warning(disable:4267)
|
||||
#pragma warning(disable:4244)
|
||||
#pragma warning(disable:4146)
|
||||
#endif
|
||||
|
||||
#include "fraction.hpp"
|
||||
#ifdef OPNMIDI_USE_LEGACY_EMULATOR
|
||||
#include "Ym2612_ChipEmu.h"
|
||||
|
|
Loading…
Reference in a new issue