make all calls to winapi format-agnostic (#1470)

This commit is contained in:
Ramen2X
2025-05-11 15:03:32 -04:00
committed by GitHub
parent 6968a3ba00
commit 2b3e7176d3
13 changed files with 66 additions and 66 deletions

View File

@@ -217,7 +217,7 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount)
for (; device < total; device++) {
MIDIOUTCAPSA caps;
midiOutGetDevCapsA(device, &caps, sizeof(MIDIOUTCAPSA));
midiOutGetDevCaps(device, &caps, sizeof(MIDIOUTCAPSA));
if (caps.wTechnology == MOD_FMSYNTH) {
break;
}

View File

@@ -71,7 +71,7 @@ MxResult MxDSFile::ReadChunks()
m_io.Read(&m_header, 0x0c);
if ((m_header.m_majorVersion != SI_MAJOR_VERSION) || (m_header.m_minorVersion != SI_MINOR_VERSION)) {
sprintf(tempBuffer, "Wrong SI file version. %d.%d expected.", SI_MAJOR_VERSION, SI_MINOR_VERSION);
MessageBoxA(NULL, tempBuffer, NULL, MB_ICONERROR);
MessageBox(NULL, tempBuffer, NULL, MB_ICONERROR);
return FAILURE;
}

View File

@@ -15,7 +15,7 @@ MxCriticalSection::MxCriticalSection()
HANDLE mutex;
if (g_useMutex) {
mutex = CreateMutexA(NULL, FALSE, NULL);
mutex = CreateMutex(NULL, FALSE, NULL);
m_mutex = mutex;
}
else {

View File

@@ -16,7 +16,7 @@ MxResult MxSemaphore::Init(MxU32 p_initialCount, MxU32 p_maxCount)
{
MxResult result = FAILURE;
if ((m_hSemaphore = CreateSemaphoreA(NULL, p_initialCount, p_maxCount, NULL))) {
if ((m_hSemaphore = CreateSemaphore(NULL, p_initialCount, p_maxCount, NULL))) {
result = SUCCESS;
}

View File

@@ -177,7 +177,7 @@ MxLong MxBitmap::Read(const char* p_filename)
MxResult result = FAILURE;
HANDLE handle = 0;
handle = CreateFileA(p_filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
handle = CreateFile(p_filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (handle == INVALID_HANDLE_VALUE) {
goto done;