Skip to content

Commit

Permalink
OMv15: Oops.
Browse files Browse the repository at this point in the history
  • Loading branch information
bribi5940 committed Jun 30, 2023
1 parent a6e5e21 commit f37fc98
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions OmniMIDIv2/SynthMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ bool OmniMIDI::SynthModule::ProcessEvBuf() {
return true;
}

if (!(tev - 0xC0 & 0xE0)) len = 2;
if (!((tev - 0xC0) & 0xE0)) len = 2;
else if (cmd == 0xF0)
{
switch (GETCHANNEL(tev))
Expand Down Expand Up @@ -243,7 +243,7 @@ bool OmniMIDI::SynthModule::LoadFuncs() {
assert(NanoSleep != 0);

if (!NanoSleep)
FNERROR(SynErr, L"How even? How can your OS not have NtDelayExecution??? Are we in NT 4.0????");
FNERROR(SynErr, L"Where's NtDelayExecution... Is this Windows 95?");

void* ptr = nullptr;

Expand Down
14 changes: 11 additions & 3 deletions OmniMIDIv2/WDMDrv.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/*
OmniMIDI v15+ (Rewrite) for Windows NT
*
OmniMIDI v15+ (Rewrite) for Windows NT
This file contains the required code to run the driver under Windows 7 SP1 and later.
This file is useful only if you want to compile the driver under Windows, it's not needed for Linux/macOS porting.
This file contains the required code to run the driver under Windows 7 SP1 and later.
This file is useful only if you want to compile the driver under Windows, it's not needed for Linux/macOS porting.
*/

#include "pch.h"
Expand Down Expand Up @@ -96,6 +98,12 @@ unsigned long WinDriver::DriverMask::GiveCaps(UINT DeviceIdentifier, PVOID CapsP
Caps2W.vDriverVersion = MAKEWORD(6, 2);
memcpy((LPMIDIOUTCAPS2W)CapsPointer, &Caps2W, min(CapsSize, sizeof(Caps2W)));
break;

default:
// ???????
NERROR(MaskErr, L"Size passed to CapsSize does not match any valid MIDIOUTCAPS struct.", false);
return MMSYSERR_INVALPARAM;

}

return MMSYSERR_NOERROR;
Expand Down

0 comments on commit f37fc98

Please sign in to comment.