Skip to content

Commit

Permalink
Little correction
Browse files Browse the repository at this point in the history
Driver32 entry position wasn't communicated correctly
  • Loading branch information
Arakula committed Jan 3, 2022
1 parent 70f7d72 commit 207e2d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ummidiplg/ummidiplg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,16 @@ static RegisterDriverResult registerDriver
tstring driverName /*=_T("mt32emu.dll")*/,
tstring driverSubdir /*=T("")*/,
const bool wow64Process,
std::vector<tstring> &regs
std::vector<tstring> &regs,
int &entryIx
)
{
regs.clear();
for (int i = 0; i < 2; i++)
regs.push_back(_T(""));

HKEY hReg;
int entryIx;
entryIx = -1;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32"),
0L, (wow64Process ? (KEY_ALL_ACCESS | KEY_WOW64_64KEY) : KEY_ALL_ACCESS), &hReg))
Expand Down Expand Up @@ -678,7 +679,8 @@ return;

int legacyMidiEntryIx;
const RegisterDriverResult res = registerDriver(vars[0], vars[4],
wow64Process, rets);
wow64Process, rets,
legacyMidiEntryIx);
if (res == regdrvFailed)
{
pushstring(_T("Error: driver could not be registered!"));
Expand Down

0 comments on commit 207e2d5

Please sign in to comment.