From d81193521bc73a8ae7547ebb1c68fa755223a642 Mon Sep 17 00:00:00 2001 From: jthedering <51533355+jthedering@users.noreply.github.com> Date: Tue, 14 Apr 2015 18:44:29 +0000 Subject: [PATCH] Version 0.9.2 Added: New troubleshooting options have been added to the Configurator that can be tried in case of problems. Improved: E-APO is now normally always installed as LFX/GFX, also in Windows 8.1 and later, to avoid problems with some applications bypassing SFX/MFX APOs (e.g. Skype). Fixed: If the input channel count was higher than the output channel count and there was no child APO, Equalizer APO could crash during initialization. Fixed: If a file in the config path was only renamed (not modified), the configuration was not reloaded. --- Benchmark/Benchmark.cpp | 2 +- Configurator/Configurator.cpp | 368 ++++++++++++++++++++------ Configurator/Configurator.h | 14 + Configurator/Configurator.rc | Bin 15258 -> 18750 bytes Configurator/resource.h | Bin 4062 -> 5700 bytes DeviceAPOInfo.cpp | 454 ++++++++++++++++++++++----------- DeviceAPOInfo.h | 54 +++- DllMain.cpp | 32 +-- EqualizerAPO.cpp | 24 +- EqualizerAPO.h | 8 +- FilterEngine.cpp | 12 +- FilterEngine.h | 10 +- Release checklist.txt | 7 + filters/StageFilterFactory.cpp | 11 +- filters/StageFilterFactory.h | 3 +- helpers/LogHelper.cpp | 4 +- helpers/RegistryHelper.cpp | 1 - version.h | 2 +- 18 files changed, 708 insertions(+), 298 deletions(-) create mode 100644 Release checklist.txt diff --git a/Benchmark/Benchmark.cpp b/Benchmark/Benchmark.cpp index 38d2d6a..0795016 100644 --- a/Benchmark/Benchmark.cpp +++ b/Benchmark/Benchmark.cpp @@ -163,7 +163,7 @@ int main(int argc, char** argv) timer.start(); FilterEngine engine; - engine.setDeviceInfo(false, StringHelper::toWString(devicenameArg.getValue(), CP_ACP), + engine.setDeviceInfo(false, true, StringHelper::toWString(devicenameArg.getValue(), CP_ACP), StringHelper::toWString(connectionnameArg.getValue(), CP_ACP), StringHelper::toWString(guidArg.getValue(), CP_ACP)); engine.initialize((float)sampleRate, channelCount, channelCount, channelCount, channelMask, batchsize); diff --git a/Configurator/Configurator.cpp b/Configurator/Configurator.cpp index 67479f0..75bf3b1 100644 --- a/Configurator/Configurator.cpp +++ b/Configurator/Configurator.cpp @@ -19,6 +19,7 @@ #define WIN32_LEAN_AND_MEAN #include +#include #include #include "helpers/StringHelper.h" #include "helpers/RegistryHelper.h" @@ -45,6 +46,17 @@ void Configurator::onInitDialog(HWND hDlg) cancelButton = GetDlgItem(hDlg, IDCANCEL); requestLabel = GetDlgItem(hDlg, IDC_REQUEST); copyDeviceCommandButton = GetDlgItem(hDlg, IDC_COPY_DEVICE_COMMAND); + toggleTroubleShooting = GetDlgItem(hDlg, IDC_TOGGLE_TROUBLESHOOTING); + troubleShootingGroup = GetDlgItem(hDlg, IDC_TROUBLESHOOTING_GROUP); + preMixLabel = GetDlgItem(hDlg, IDC_PRE_MIX_LABEL); + postMixLabel = GetDlgItem(hDlg, IDC_POST_MIX_LABEL); + installPreMix = GetDlgItem(hDlg, IDC_INSTALL_PRE_MIX); + installPostMix = GetDlgItem(hDlg, IDC_INSTALL_POST_MIX); + useOriginalAPOPreMix = GetDlgItem(hDlg, IDC_USE_ORIGINAL_APO_PRE_MIX); + useOriginalAPOPostMix = GetDlgItem(hDlg, IDC_USE_ORIGINAL_APO_POST_MIX); + installModeComboBox = GetDlgItem(hDlg, IDC_INSTALL_MODE_COMBOBOX); + + expandTroubleShooting(false); wchar_t stringBuf[255]; @@ -70,6 +82,42 @@ void Configurator::onInitDialog(HWND hDlg) LoadStringW(hInstance, IDS_CANCEL, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); SetWindowTextW(cancelButton, stringBuf); + LoadStringW(hInstance, IDS_TOGGLE_TROUBLESHOOTING, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + SetWindowTextW(toggleTroubleShooting, stringBuf); + int width = 185; + if(wcsncmp(stringBuf, L"Probleml", 8) == 0) + width = 215; + RECT rect = {0, 0, width, 10}; + MapDialogRect(hDlg, &rect); + SetWindowPos(toggleTroubleShooting, NULL, 0, 0, rect.right-rect.left, rect.bottom-rect.top, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); + + LoadStringW(hInstance, IDS_PRE_MIX_LABEL, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + SetWindowTextW(preMixLabel, stringBuf); + + LoadStringW(hInstance, IDS_POST_MIX_LABEL, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + SetWindowTextW(postMixLabel, stringBuf); + + LoadStringW(hInstance, IDS_INSTALL_APO, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + SetWindowTextW(installPreMix, stringBuf); + SetWindowTextW(installPostMix, stringBuf); + + LoadStringW(hInstance, IDS_USE_ORIGINAL_APO, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + SetWindowTextW(useOriginalAPOPreMix, stringBuf); + SetWindowTextW(useOriginalAPOPostMix, stringBuf); + + LoadStringW(hInstance, IDS_INSTALL_MODE_LFX_GFX, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + ComboBox_AddString(installModeComboBox, stringBuf); + + if(RegistryHelper::isWindowsVersionAtLeast(6, 3)) // Windows 8.1 + { + LoadStringW(hInstance, IDS_INSTALL_MODE_SFX_MFX, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + ComboBox_AddString(installModeComboBox, stringBuf); + + LoadStringW(hInstance, IDS_INSTALL_MODE_SFX_EFX, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + ComboBox_AddString(installModeComboBox, stringBuf); + } + ComboBox_SetCurSel(installModeComboBox, 0); + for(int i=0; i<=1; i++) { HWND deviceList = deviceLists[i]; @@ -143,112 +191,147 @@ void Configurator::onInitDialog(HWND hDlg) void Configurator::onLvnItemChanged(unsigned sourceId, LPNMLISTVIEW info) { int index = (sourceId == IDC_PLAYBACK_LIST ? 0 : 1); - HWND deviceList = deviceLists[index]; - int itemCount = ListView_GetItemCount(deviceList); - - if(apoInfos[index].size() == itemCount) - { - DeviceAPOInfo apoInfo = apoInfos[index][info->lParam]; - bool checked = ListView_GetCheckState(deviceList,info->iItem) != 0; - wchar_t stringBuf[255]; - if(checked && !apoInfo.isInstalled) - LoadStringW(hInstance, IDS_WILL_BE_INSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); - else if(!checked && apoInfo.isInstalled) - LoadStringW(hInstance, IDS_WILL_BE_UNINSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); - else if(apoInfo.isInstalled && apoInfo.canBeUpgraded()) - LoadStringW(hInstance, IDS_WILL_BE_UPGRADED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); - else if(apoInfo.isInstalled) - LoadStringW(hInstance, IDS_ALREADY_INSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); - else if(apoInfo.isExperimental()) - LoadStringW(hInstance, IDS_CAN_BE_INSTALLED_EXPERIMENTAL, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); - else - LoadStringW(hInstance, IDS_CAN_BE_INSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); - - ListView_SetItemText(deviceList, info->iItem, 2, stringBuf); - - EnableWindow(okButton, isChanged()); - - EnableWindow(copyDeviceCommandButton, ListView_GetSelectedCount(deviceList) > 0); - } + updateList(index, info->iItem); + updateButtons(index); } bool Configurator::onButtonClicked(unsigned sourceId) { - if(sourceId == IDOK) + switch(sourceId) { - for(int index = 0; index <= 1; index++) + case IDOK: { + for(int index = 0; index <= 1; index++) + { + HWND deviceList = deviceLists[index]; + + for(int i = 0; i < ListView_GetItemCount(deviceList); i++) + { + LVITEM item; + item.iItem = i; + item.iSubItem = 0; + item.mask = LVIF_PARAM; + ListView_GetItem(deviceList, &item); + + try + { + DeviceAPOInfo info = apoInfos[index][item.lParam]; + if(ListView_GetCheckState(deviceList, i) && !info.isInstalled) + info.install(); + else if(!ListView_GetCheckState(deviceList, i) && info.isInstalled) + info.uninstall(); + else if(ListView_GetCheckState(deviceList, i) && (info.canBeUpgraded() || info.hasChanges())) + { + info.uninstall(); + info.load(info.deviceGuid); + info.install(); + } + } + catch(RegistryException e) + { + MessageBoxW(hDlg, e.getMessage().c_str(), L"Error while accessing the registry", MB_ICONERROR | MB_OK); + } + } + } + } + break; + case IDC_COPY_DEVICE_COMMAND: + { + wstring command = L"Device: "; + + int index = TabCtrl_GetCurSel(categoryTabCtrl); HWND deviceList = deviceLists[index]; + bool first = true; for(int i = 0; i < ListView_GetItemCount(deviceList); i++) { LVITEM item; item.iItem = i; item.iSubItem = 0; - item.mask = LVIF_PARAM; + item.mask = LVIF_PARAM | LVIF_STATE; + item.stateMask = LVIS_SELECTED; ListView_GetItem(deviceList, &item); - try + if(item.state & LVIS_SELECTED) { + if(first) + first = false; + else + command += L"; "; + DeviceAPOInfo info = apoInfos[index][item.lParam]; - if(ListView_GetCheckState(deviceList, i) && !info.isInstalled) - info.install(); - else if(!ListView_GetCheckState(deviceList, i) && info.isInstalled) - info.uninstall(); - else if(ListView_GetCheckState(deviceList, i) && info.canBeUpgraded()) - { - info.uninstall(); - info.load(info.deviceGuid); - info.install(); - } - } - catch(RegistryException e) - { - MessageBoxW(hDlg, e.getMessage().c_str(), L"Error while accessing the registry", MB_ICONERROR | MB_OK); + command += StringHelper::replaceCharacters(info.deviceName + L" " + info.connectionName + L" " + info.deviceGuid, L";", L" "); } } + + OpenClipboard(hDlg); + + HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (command.length() + 1) * sizeof(wchar_t)); + wchar_t* data = (wchar_t*)GlobalLock(hData); + memcpy(data, command.c_str(), (command.length() + 1) * sizeof(wchar_t)); + GlobalUnlock(data); + + SetClipboardData(CF_UNICODETEXT, hData); + + CloseClipboard(); } - } - else if(sourceId == IDC_COPY_DEVICE_COMMAND) - { - wstring command = L"Device: "; - - int index = TabCtrl_GetCurSel(categoryTabCtrl); - HWND deviceList = deviceLists[index]; - - bool first = true; - for(int i = 0; i < ListView_GetItemCount(deviceList); i++) + break; + case IDC_TOGGLE_TROUBLESHOOTING: { - LVITEM item; - item.iItem = i; - item.iSubItem = 0; - item.mask = LVIF_PARAM | LVIF_STATE; - item.stateMask = LVIS_SELECTED; - ListView_GetItem(deviceList, &item); - - if(item.state & LVIS_SELECTED) - { - if(first) - first = false; - else - command += L"; "; - - DeviceAPOInfo info = apoInfos[index][item.lParam]; - command += StringHelper::replaceCharacters(info.deviceName + L" " + info.connectionName + L" " + info.deviceGuid, L";", L" "); - } + bool checked = IsDlgButtonChecked(hDlg, IDC_TOGGLE_TROUBLESHOOTING) == BST_CHECKED; + expandTroubleShooting(checked); } + break; + case IDC_INSTALL_PRE_MIX: + case IDC_INSTALL_POST_MIX: + case IDC_USE_ORIGINAL_APO_PRE_MIX: + case IDC_USE_ORIGINAL_APO_POST_MIX: + case IDC_INSTALL_MODE_COMBOBOX: + { + int index = TabCtrl_GetCurSel(categoryTabCtrl); + HWND deviceList = deviceLists[index]; - OpenClipboard(hDlg); + unsigned selectedCount = ListView_GetSelectedCount(deviceList); + for(int i = 0; i < ListView_GetItemCount(deviceList); i++) + { + LVITEM item; + item.iItem = i; + item.iSubItem = 0; + item.mask = LVIF_PARAM | LVIF_STATE; + item.stateMask = LVIS_SELECTED; + ListView_GetItem(deviceList, &item); - HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (command.length() + 1) * sizeof(wchar_t)); - wchar_t* data = (wchar_t*)GlobalLock(hData); - memcpy(data, command.c_str(), (command.length() + 1) * sizeof(wchar_t)); - GlobalUnlock(data); + if(item.state & LVIS_SELECTED) + { + DeviceAPOInfo& info = apoInfos[index][item.lParam]; - SetClipboardData(CF_UNICODETEXT, hData); + switch(sourceId) + { + case IDC_INSTALL_PRE_MIX: + info.selectedInstallState.installPreMix = Button_GetCheck(installPreMix) == BST_CHECKED; + break; + case IDC_INSTALL_POST_MIX: + info.selectedInstallState.installPostMix = Button_GetCheck(installPostMix) == BST_CHECKED; + break; + case IDC_USE_ORIGINAL_APO_PRE_MIX: + info.selectedInstallState.useOriginalAPOPreMix = Button_GetCheck(useOriginalAPOPreMix) == BST_CHECKED; + break; + case IDC_USE_ORIGINAL_APO_POST_MIX: + info.selectedInstallState.useOriginalAPOPostMix = Button_GetCheck(useOriginalAPOPostMix) == BST_CHECKED; + break; + case IDC_INSTALL_MODE_COMBOBOX: + info.selectedInstallState.installMode = (DeviceAPOInfo::InstallMode)ComboBox_GetCurSel(installModeComboBox); + break; + } - CloseClipboard(); + updateList(index, i); + } + } + + updateButtons(index); + } + break; } if(sourceId == IDCANCEL && hasUpgrades()) @@ -310,9 +393,9 @@ void Configurator::onTcnSelChange(unsigned sourceId) ShowWindow(deviceLists[index], SW_SHOW); ShowWindow(deviceLists[1 - index], SW_HIDE); - EnableWindow(copyDeviceCommandButton, ListView_GetSelectedCount(deviceLists[index]) > 0); - SetFocus(deviceLists[index]); + + updateButtons(index); } bool Configurator::isChanged() @@ -330,8 +413,9 @@ bool Configurator::isChanged() item.iSubItem = 0; item.mask = LVIF_PARAM; ListView_GetItem(deviceList, &item); - if((ListView_GetCheckState(deviceList, i) != 0) != apoInfos[index][item.lParam].isInstalled - || ListView_GetCheckState(deviceList, i) && apoInfos[index][item.lParam].isInstalled && apoInfos[index][item.lParam].canBeUpgraded()) + DeviceAPOInfo apoInfo = apoInfos[index][item.lParam]; + if((ListView_GetCheckState(deviceList, i) != 0) != apoInfo.isInstalled + || ListView_GetCheckState(deviceList, i) && apoInfo.isInstalled && (apoInfo.canBeUpgraded() || apoInfo.hasChanges())) { changed = true; break; @@ -357,7 +441,8 @@ bool Configurator::hasUpgrades() item.iSubItem = 0; item.mask = LVIF_PARAM; ListView_GetItem(deviceList, &item); - if(ListView_GetCheckState(deviceList, i) && apoInfos[index][item.lParam].isInstalled && apoInfos[index][item.lParam].canBeUpgraded()) + DeviceAPOInfo apoInfo = apoInfos[index][item.lParam]; + if(ListView_GetCheckState(deviceList, i) && apoInfo.isInstalled && apoInfo.canBeUpgraded()) { hasUpgrades = true; break; @@ -368,6 +453,121 @@ bool Configurator::hasUpgrades() return hasUpgrades; } +void Configurator::expandTroubleShooting(bool expand) +{ + int showCmd = expand ? SW_SHOW : SW_HIDE; + ShowWindow(troubleShootingGroup, showCmd); + ShowWindow(preMixLabel, showCmd); + ShowWindow(postMixLabel, showCmd); + ShowWindow(postMixLabel, showCmd); + ShowWindow(installPreMix, showCmd); + ShowWindow(installPostMix, showCmd); + ShowWindow(useOriginalAPOPreMix, showCmd); + ShowWindow(useOriginalAPOPostMix, showCmd); + ShowWindow(installModeComboBox, showCmd); + + int y = expand ? 229 : 188; + + HDWP hdwp = BeginDeferWindowPos(3); + hdwp = moveWindow(hdwp, copyDeviceCommandButton, 7, y); + hdwp = moveWindow(hdwp, okButton, 285, y); + hdwp = moveWindow(hdwp, cancelButton, 343, y); + EndDeferWindowPos(hdwp); + + WINDOWINFO windowInfo; + GetWindowInfo(hDlg, &windowInfo); + int height = expand ? 250 : 209; + RECT rect={0, 0, 401, height}; + MapDialogRect(hDlg, &rect); + AdjustWindowRect(&rect, windowInfo.dwStyle, false); + SetWindowPos(hDlg, NULL, 0, 0, rect.right-rect.left, rect.bottom-rect.top, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); +} + +HDWP Configurator::moveWindow(HDWP hdwp, HWND hWnd, int x, int y) +{ + RECT rect={x, y, 0, 0}; + MapDialogRect(hDlg, &rect); + return DeferWindowPos(hdwp, hWnd, NULL, rect.left, rect.top, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER); +} + +void Configurator::updateList(int listIndex, int itemIndex) +{ + HWND deviceList = deviceLists[listIndex]; + + int itemCount = ListView_GetItemCount(deviceList); + + if(apoInfos[listIndex].size() == itemCount) + { + DeviceAPOInfo apoInfo = apoInfos[listIndex][itemIndex]; + bool checked = ListView_GetCheckState(deviceList, itemIndex) != 0; + wchar_t stringBuf[255]; + if(checked && !apoInfo.isInstalled) + LoadStringW(hInstance, IDS_WILL_BE_INSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + else if(!checked && apoInfo.isInstalled) + LoadStringW(hInstance, IDS_WILL_BE_UNINSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + else if(apoInfo.isInstalled && apoInfo.canBeUpgraded()) + LoadStringW(hInstance, IDS_WILL_BE_UPGRADED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + else if(apoInfo.isInstalled && apoInfo.hasChanges()) + LoadStringW(hInstance, IDS_WILL_BE_CHANGED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + else if(apoInfo.isInstalled) + LoadStringW(hInstance, IDS_ALREADY_INSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + else if(apoInfo.isExperimental()) + LoadStringW(hInstance, IDS_CAN_BE_INSTALLED_EXPERIMENTAL, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + else + LoadStringW(hInstance, IDS_CAN_BE_INSTALLED, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); + + ListView_SetItemText(deviceList, itemIndex, 2, stringBuf); + + ListView_SetColumnWidth(deviceList, 2, LVSCW_AUTOSIZE); + } +} + +void Configurator::updateButtons(int listIndex) +{ + HWND deviceList = deviceLists[listIndex]; + + EnableWindow(okButton, isChanged()); + + unsigned selectedCount = ListView_GetSelectedCount(deviceList); + EnableWindow(copyDeviceCommandButton, selectedCount > 0); + + bool enable = false; + bool isInput = false; + bool hasOriginalAPOPreMix = true; + bool hasOriginalAPOPostMix = true; + DeviceAPOInfo::InstallState installState; + if(selectedCount == 1) + { + int selectedIndex = ListView_GetNextItem(deviceList, -1, LVNI_SELECTED); + if(selectedIndex != -1) + { + enable = ListView_GetCheckState(deviceList, selectedIndex) != 0; + + DeviceAPOInfo apoInfo = apoInfos[listIndex][selectedIndex]; + isInput = apoInfo.isInput; + hasOriginalAPOPreMix = apoInfo.getOriginalAPOPreMix() != L""; + hasOriginalAPOPostMix = apoInfo.getOriginalAPOPostMix() != L""; + installState = apoInfo.selectedInstallState; + } + } + + EnableWindow(preMixLabel, enable); + EnableWindow(postMixLabel, enable && !isInput); + EnableWindow(installPreMix, enable); + EnableWindow(installPostMix, enable && !isInput); + EnableWindow(useOriginalAPOPreMix, enable && hasOriginalAPOPreMix && installState.installPreMix); + EnableWindow(useOriginalAPOPostMix, enable && !isInput && hasOriginalAPOPostMix && installState.installPostMix); + EnableWindow(installModeComboBox, enable); + + Button_SetCheck(installPreMix, installState.installPreMix); + Button_SetCheck(installPostMix, installState.installPostMix); + Button_SetCheck(useOriginalAPOPreMix, installState.useOriginalAPOPreMix && hasOriginalAPOPreMix); + Button_SetCheck(useOriginalAPOPostMix, installState.useOriginalAPOPostMix && hasOriginalAPOPostMix); + + if(RegistryHelper::isWindowsVersionAtLeast(6, 3)) // Windows 8.1 + ComboBox_SetCurSel(installModeComboBox, installState.installMode); +} + INT_PTR CALLBACK dlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); int APIENTRY wWinMain(HINSTANCE hInstance, diff --git a/Configurator/Configurator.h b/Configurator/Configurator.h index 970090e..87b8cd3 100644 --- a/Configurator/Configurator.h +++ b/Configurator/Configurator.h @@ -44,7 +44,21 @@ private: HWND cancelButton; HWND copyDeviceCommandButton; HWND requestLabel; + HWND toggleTroubleShooting; + HWND troubleShootingGroup; + HWND preMixLabel; + HWND postMixLabel; + HWND installPreMix; + HWND installPostMix; + HWND useOriginalAPOPreMix; + HWND useOriginalAPOPostMix; + HWND installModeComboBox; + std::wstring cmdLine; + void expandTroubleShooting(bool expand); + HDWP moveWindow(HDWP hdwp, HWND hWnd, int x, int y); + void updateList(int listIndex, int itemIndex); + void updateButtons(int listIndex); std::vector apoInfos[2]; }; diff --git a/Configurator/Configurator.rc b/Configurator/Configurator.rc index 4e77efda69e7aacd5f2c17640262a466ca484c4e..0243d500cc41e8af70f6431a7798185fd1773990 100644 GIT binary patch delta 3130 zcmd5;&2L*p5Fe9*!UJrljd5dR^J)-H6G!nUNrP1B#Ys~OyU)Q11tAe7PDo2)J9Uz# zl|T`94v0A*A-I+c2ZZktaNxi{z`0T{T#(>^I3UDtcAvlVMG*)+z1_EOcV>Sx`# zR7U$7ZPPAQXdQi(wrGcLp|4=JLM9EP-GzjSzh$&nX&Ew`_`0K3nbfIIOWlEVjrNp| zRn=ai2t7jvnS9Ui_zFNNX!F4J2KpRXG|jhD=LRB5-x`f!w_9|Vruequf29B$im;+f z0y=U)(t1R?3OjZ><$Yqk$Xi&SgBA3zmAv>dX$-$pu|D5Vg_{f59x1mGNjO!Wx z*6;@#=OL%IMeo4Qn^-G6}Gvhc1;E-J!emI4;*(0^78PUeSdZzeK z!#k7#4=rIJte$E55caZt_JyH6_^?K+_`eQ&9>OBwOpSKf8u9VLNTB}n;FgQe_j`F{ zG{IN;zpnrO;@eO1AO4lc6O^V{y>$Ky7d{honLUC0QyCmcg-TGe$>l)MlcXr-FpEA- zasDJQ@0#GB0&nq0u`@iCyuzOaU)J*VAA?!fkdB)hiVMQc9Nj?sCKc-gp}u3Lc_4I= zqv1_|gOYPjI2I6)HeBp_?)l8IA*#rrL%0C66L{ljQ|Oa4sm3Wv@%y3i{ROzFis00t zybU^3@ksbeFq`;p1+!3U7=J3D%sqVXf@EvxWvvNMEj!~Xh-E^qJwGo!nJwxb}3vT68MVro&T6MoD>`KykbmcpT-I1FwXABXX2 zHIDJ;f$_X#owh8|0r1f50{uBhpJ<&_WJsWo(xhmd@5vlpI*-mkqE8MeK{32?P;sSI z4k-%@tlfP+uGCw|jpkCVo?*d%6Wwl%>WxfR-pc~b6Pf<*hha|-0{USbA?m~zYw zhsN=xsrv6g{+sUhB93~ZX`%tT;bj3WoQ0qDy$sIClYvk3DhhSNn!k8%Ux$4+Pg}QG zmkhKfpj)S|%Z_VO*heBm+KdzZGb%Y2kXCH)^*Z7+3)U_GMT^0&Q_+BcWJFxuyc7=d zcY|l^_rqU4=1L;B`1t09Ye?NG(xV?PJc|*IM$PGwTnoNPseXU#z<89BY2!c4v~rdI zf65~iPKTr~!I(WM*cvxr1SwwMHC3eS_JYX?VbQj6G`V_9q;5=dcXbs^7!RupqJ#^l zj7Q2ODJoWVv1A{;UvIH=_hGQa|EhJ|!PA*awnykUmFj+vwYw`zulP~J(Pd=c@Gx>+Q0HeiZPL1fvxA-C^ zFVirCn6UYwh9~3XJZ*`|Sz331bj##x@_ds|DJ`2EAkVe=oADpU$wsDPlR3;hz?K_L zZsZr8oMk2kwI9K=WH6e%)hv1P8AYkd25umyi)}u~7R9*vfs_;1<`d?8T$?%E%$Nbp CzeI}w diff --git a/Configurator/resource.h b/Configurator/resource.h index e0b3da184d7b174c296001c6649ac2b898d65b5b..549a84350c16e72e6d6534c400ed76e996559394 100644 GIT binary patch delta 925 zcmb7DT}lE`6h8CgWQ=5DVrF*hK|%_0NGXUOCNq=9l+^Ie+JWt&hhE~Wz#Rl`AfpA? z1|pZ>4*Krslv-$U87_C``#I;HZ{Ef0?$fHt&$@n8qcRn+9LiIZYIKEjole|ymCkW0 z<86^Hf!Q2e7G-##iC6^;$t(fW!0wO@cAgyWs#{u?(yaIr@d{L`(D@D5HiVL8B^c$F z&mWOa5@|!p0p2EX`A$m$)AtKe$5-iBhHnuyNxZ~*NJWYHEXvZp^xd9TD}i_F@*O&J z>n+HgZx_O-H8Y1(9dSxy98^Bj$K&KZ4*KXCf;W82i#gn{EpL|ldYmh!ff^3jQe)gR z_0GE4Qg;3^9=-^sxMliNvxnHkr45H%;kFs!7h_G@%^2jPnN$wFvgVCaOJn2%EiN?^ z)7L){77nRGvw$8oEPkRVLcf2g`*4Z~vkkLQE|p_p*|iZ5Kr;!r^RNnxUjk;YJA tPj&lDO;`RMvm63f!Vgh)p9a6FVf38!dhR>~dMX;~8d1JkTH*WP^(Ts(sPX^+ delta 29 lcmX@2b5DMQ1ovhqz7odGpM)+jP5#6$F DeviceAPOInfo::loadAllInfos(bool input) { @@ -51,7 +68,10 @@ vector DeviceAPOInfo::loadAllInfos(bool input) DeviceAPOInfo info; if(info.load(deviceGuidString)) + { + info.selectedInstallState = info.currentInstallState; result.push_back(info); + } } return result; @@ -81,89 +101,126 @@ bool DeviceAPOInfo::load(const wstring& deviceGuid) deviceName = RegistryHelper::readValue(keyPath + L"\\Properties", deviceValueName); isInstalled = false; - isLFX = false; - isAPO2 = false; - installAsAPO2 = false; + currentInstallState.installMode = INSTALL_LFX_GFX; + version = L"0"; + preMixChildGuid = L""; + postMixChildGuid = L""; + currentInstallState.installPreMix = true; + currentInstallState.installPostMix = !isInput; + currentInstallState.useOriginalAPOPreMix = true; + currentInstallState.useOriginalAPOPostMix = !isInput; if(!RegistryHelper::keyExists(keyPath + L"\\FxProperties")) { - originalLfxGuid = APOGUID_NOKEY; - originalGfxGuid = APOGUID_NOKEY; + for(int i=0; i < allGuidValueNameCount; i++) + originalApoGuids[i] = APOGUID_NOKEY; } else { - originalLfxGuid = APOGUID_NOVALUE; - originalGfxGuid = APOGUID_NOVALUE; - - installAsAPO2 = RegistryHelper::isWindowsVersionAtLeast(6, 3) // Windows 8.1 - && (RegistryHelper::valueExists(keyPath + L"\\FxProperties", lfxGuidValueName2) - || RegistryHelper::valueExists(keyPath + L"\\FxProperties", gfxGuidValueName2)); - - wstring lfxValueName; - wstring gfxValueName; - if(installAsAPO2) + for(int i=0; i < allGuidValueNameCount; i++) { - lfxValueName = lfxGuidValueName2; - gfxValueName = gfxGuidValueName2; - } - else - { - lfxValueName = lfxGuidValueName; - gfxValueName = gfxGuidValueName; + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", allGuidValueNames[i])) + originalApoGuids[i] = RegistryHelper::readValue(keyPath + L"\\FxProperties", allGuidValueNames[i]); + else + originalApoGuids[i] = APOGUID_NOVALUE; } bool found = false; - if(isInput) - found = tryAPOGuid(keyPath, lfxValueName, EQUALIZERAPO_LFX_GUID, true, installAsAPO2); - else - found = tryAPOGuid(keyPath, lfxValueName, EQUALIZERAPO_LFX_GUID, true, installAsAPO2) && tryAPOGuid(keyPath, gfxValueName, EQUALIZERAPO_GFX_GUID, false, installAsAPO2); - isDual = found; - - if(!found) - found = tryAPOGuid(keyPath, lfxGuidValueName, EQUALIZERAPO_GFX_GUID, true, false); - if(!found) - found = tryAPOGuid(keyPath, gfxGuidValueName, EQUALIZERAPO_GFX_GUID, false, false); - if(!found) - found = tryAPOGuid(keyPath, lfxGuidValueName2, EQUALIZERAPO_GFX_GUID, true, true); - if(!found) - found = tryAPOGuid(keyPath, gfxGuidValueName2, EQUALIZERAPO_GFX_GUID, false, true); - isInstalled = found; - - if(found) + bool foundAt[allGuidValueNameCount]; + for(int i=0; i < allGuidValueNameCount; i++) { - if(RegistryHelper::keyExists(APP_REGPATH L"\\Child APOs\\" + deviceGuid)) + foundAt[i] = false; + + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", allGuidValueNames[i])) { - if(isAPO2) + wstring apoGuidString = RegistryHelper::readValue(keyPath + L"\\FxProperties", allGuidValueNames[i]); + + GUID apoGuid; + if(SUCCEEDED(CLSIDFromString(apoGuidString.c_str(), &apoGuid))) { - originalLfxGuid = RegistryHelper::readValue(APP_REGPATH L"\\Child APOs\\" + deviceGuid, lfxGuidValueName2); - originalGfxGuid = RegistryHelper::readValue(APP_REGPATH L"\\Child APOs\\" + deviceGuid, gfxGuidValueName2); - } - else - { - originalLfxGuid = RegistryHelper::readValue(APP_REGPATH L"\\Child APOs\\" + deviceGuid, lfxGuidValueName); - originalGfxGuid = RegistryHelper::readValue(APP_REGPATH L"\\Child APOs\\" + deviceGuid, gfxGuidValueName); - } - } - else if(RegistryHelper::valueExists(APP_REGPATH L"\\Child APOs", deviceGuid)) - { - if(isLFX) - { - originalLfxGuid = RegistryHelper::readValue(APP_REGPATH L"\\Child APOs", deviceGuid); - originalGfxGuid = L""; - } - else - { - originalLfxGuid = L""; - originalGfxGuid = RegistryHelper::readValue(APP_REGPATH L"\\Child APOs", deviceGuid); + if(apoGuid == EQUALIZERAPO_PRE_MIX_GUID || apoGuid == EQUALIZERAPO_POST_MIX_GUID) + { + foundAt[i] = true; + found = true; + } } } } - else + + if(found) { - if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", lfxValueName)) - originalLfxGuid = RegistryHelper::readValue(keyPath + L"\\FxProperties", lfxValueName); - if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", gfxValueName)) - originalGfxGuid = RegistryHelper::readValue(keyPath + L"\\FxProperties", gfxValueName); + isInstalled = true; + + if(RegistryHelper::keyExists(childApoPath L"\\" + deviceGuid)) + { + if(RegistryHelper::valueExists(childApoPath L"\\" + deviceGuid, versionValueName)) + { + version = RegistryHelper::readValue(childApoPath L"\\" + deviceGuid, versionValueName); + if(version != installVersion) + throw RegistryException(L"Unsupported version of APO installation detected! Please uninstall newer Equalizer APO before using this version of Configurator."); + } + else + { + version = L"1"; + } + + for(int i=0; i < allGuidValueNameCount; i++) + { + if(RegistryHelper::valueExists(childApoPath L"\\" + deviceGuid, allGuidValueNames[i])) + originalApoGuids[i] = RegistryHelper::readValue(childApoPath L"\\" + deviceGuid, allGuidValueNames[i]); + } + + if(version == installVersion) + { + if(RegistryHelper::valueExists(childApoPath L"\\" + deviceGuid, preMixChildGuidValueName)) + preMixChildGuid = RegistryHelper::readValue(childApoPath L"\\" + deviceGuid, preMixChildGuidValueName); + if(RegistryHelper::valueExists(childApoPath L"\\" + deviceGuid, postMixChildGuidValueName)) + postMixChildGuid = RegistryHelper::readValue(childApoPath L"\\" + deviceGuid, postMixChildGuidValueName); + + currentInstallState.installPreMix = foundAt[LFX_INDEX] || foundAt[SFX_INDEX]; + currentInstallState.installPostMix = foundAt[GFX_INDEX] || foundAt[MFX_INDEX] || foundAt[EFX_INDEX]; + + if(preMixChildGuid == L"") + currentInstallState.useOriginalAPOPreMix = false; + if(postMixChildGuid == L"") + currentInstallState.useOriginalAPOPostMix = false; + + if(foundAt[LFX_INDEX] || foundAt[GFX_INDEX]) + currentInstallState.installMode = INSTALL_LFX_GFX; + else if(foundAt[EFX_INDEX]) + currentInstallState.installMode = INSTALL_SFX_EFX; + else if(foundAt[SFX_INDEX] || foundAt[MFX_INDEX]) + currentInstallState.installMode = INSTALL_SFX_MFX; + } + else + { + if(RegistryHelper::valueExists(childApoPath L"\\" + deviceGuid, lfxGuidValueName)) + { + preMixChildGuid = originalApoGuids[0]; + postMixChildGuid = originalApoGuids[1]; + } + else + { + preMixChildGuid = originalApoGuids[2]; + postMixChildGuid = originalApoGuids[3]; + } + } + } + else if(RegistryHelper::valueExists(childApoPath, deviceGuid)) + { + for(int i=0; i < allGuidValueNameCount; i++) + { + if(foundAt[i]) + { + originalApoGuids[i] = RegistryHelper::readValue(childApoPath, deviceGuid); + if(i == LFX_INDEX || i == SFX_INDEX) + preMixChildGuid = originalApoGuids[i]; + else + postMixChildGuid = originalApoGuids[i]; + break; + } + } + } } } @@ -172,45 +229,96 @@ bool DeviceAPOInfo::load(const wstring& deviceGuid) bool DeviceAPOInfo::canBeUpgraded() { - return isInstalled && !isDual; + return isInstalled && version != installVersion; +} + +bool DeviceAPOInfo::hasChanges() +{ + return isInstalled && selectedInstallState != currentInstallState; } bool DeviceAPOInfo::isExperimental() { - return !isInstalled && originalGfxGuid == APOGUID_NOKEY; + return !isInstalled && originalApoGuids[0] == APOGUID_NOKEY; +} + +wstring DeviceAPOInfo::getOriginalAPOPreMix() +{ + wstring guid; + switch(selectedInstallState.installMode) + { + case INSTALL_LFX_GFX: + guid = originalApoGuids[LFX_INDEX]; + if(RegistryHelper::isWindowsVersionAtLeast(6, 3)) // Windows 8.1 + { + if(originalApoGuids[LFX_INDEX] == APOGUID_NOVALUE && originalApoGuids[GFX_INDEX] == APOGUID_NOVALUE) + guid = originalApoGuids[SFX_INDEX]; + } + break; + case INSTALL_SFX_MFX: + guid = originalApoGuids[SFX_INDEX]; + if(originalApoGuids[SFX_INDEX] == APOGUID_NOVALUE && originalApoGuids[MFX_INDEX] == APOGUID_NOVALUE) + guid = originalApoGuids[LFX_INDEX]; + break; + case INSTALL_SFX_EFX: + guid = originalApoGuids[SFX_INDEX]; + if(originalApoGuids[SFX_INDEX] == APOGUID_NOVALUE && originalApoGuids[EFX_INDEX] == APOGUID_NOVALUE) + guid = originalApoGuids[LFX_INDEX]; + break; + } + + if(guid == APOGUID_NOKEY || guid == APOGUID_NOVALUE) + guid = L""; + + return guid; +} + +wstring DeviceAPOInfo::getOriginalAPOPostMix() +{ + wstring guid; + switch(selectedInstallState.installMode) + { + case INSTALL_LFX_GFX: + guid = originalApoGuids[GFX_INDEX]; + if(RegistryHelper::isWindowsVersionAtLeast(6, 3)) // Windows 8.1 + { + if(originalApoGuids[LFX_INDEX] == APOGUID_NOVALUE && originalApoGuids[GFX_INDEX] == APOGUID_NOVALUE) + guid = originalApoGuids[MFX_INDEX]; + } + break; + case INSTALL_SFX_MFX: + guid = originalApoGuids[MFX_INDEX]; + if(originalApoGuids[SFX_INDEX] == APOGUID_NOVALUE && originalApoGuids[MFX_INDEX] == APOGUID_NOVALUE) + guid = originalApoGuids[GFX_INDEX]; + break; + case INSTALL_SFX_EFX: + guid = originalApoGuids[EFX_INDEX]; + if(originalApoGuids[SFX_INDEX] == APOGUID_NOVALUE && originalApoGuids[EFX_INDEX] == APOGUID_NOVALUE) + guid = originalApoGuids[GFX_INDEX]; + break; + } + + if(guid == APOGUID_NOKEY || guid == APOGUID_NOVALUE) + guid = L""; + + return guid; } void DeviceAPOInfo::install() { - RegistryHelper::createKey(APP_REGPATH L"\\Child APOs"); - RegistryHelper::createKey(APP_REGPATH L"\\Child APOs\\" + deviceGuid); + if(!selectedInstallState.installPreMix && !selectedInstallState.installPostMix) + return; - wstring lfxValueName; - wstring gfxValueName; - if(installAsAPO2) - { - lfxValueName = lfxGuidValueName2; - gfxValueName = gfxGuidValueName2; - } - else - { - lfxValueName = lfxGuidValueName; - gfxValueName = gfxGuidValueName; - } - - RegistryHelper::writeValue(APP_REGPATH L"\\Child APOs\\" + deviceGuid, lfxValueName, originalLfxGuid); - if(isInput) - RegistryHelper::writeValue(APP_REGPATH L"\\Child APOs\\" + deviceGuid, gfxValueName, L""); - else - RegistryHelper::writeValue(APP_REGPATH L"\\Child APOs\\" + deviceGuid, gfxValueName, originalGfxGuid); + RegistryHelper::createKey(childApoPath); + RegistryHelper::createKey(childApoPath L"\\" + deviceGuid); wstring keyPath; - if(isInput) - keyPath = captureKeyPath L"\\" + deviceGuid; - else + if(!isInput) keyPath = renderKeyPath L"\\" + deviceGuid; + else + keyPath = captureKeyPath L"\\" + deviceGuid; - if(originalGfxGuid == APOGUID_NOKEY) + if(!RegistryHelper::keyExists(keyPath + L"\\FxProperties")) { try { @@ -226,25 +334,97 @@ void DeviceAPOInfo::install() } RegistryHelper::writeValue(keyPath + L"\\FxProperties", fxTitleValueName, L"Equalizer APO"); - RegistryHelper::writeMultiValue(keyPath + L"\\FxProperties", sfxProcessingModesValueName, defaultProcessingModeValue); - RegistryHelper::writeMultiValue(keyPath + L"\\FxProperties", mfxProcessingModesValueName, defaultProcessingModeValue); + + for(int i=0; i < allGuidValueNameCount; i++) + { + RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, allGuidValueNames[i], APOGUID_NOKEY); + } } else { vector valuenames; - if(originalLfxGuid != APOGUID_NOVALUE) - valuenames.push_back(lfxValueName); - if(!isInput && originalGfxGuid != APOGUID_NOVALUE) - valuenames.push_back(gfxValueName); + + for(int i=0; i < allGuidValueNameCount; i++) + { + wstring apoGuidString = APOGUID_NOVALUE; + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", allGuidValueNames[i])) + { + apoGuidString = RegistryHelper::readValue(keyPath + L"\\FxProperties", allGuidValueNames[i]); + valuenames.push_back(allGuidValueNames[i]); + } + + RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, allGuidValueNames[i], apoGuidString); + } if(!valuenames.empty()) RegistryHelper::saveToFile(keyPath + L"\\FxProperties", valuenames, L"backup_" + StringHelper::replaceIllegalCharacters(deviceName) + L"_" + StringHelper::replaceIllegalCharacters(connectionName) + L".reg"); } - RegistryHelper::writeValue(keyPath + L"\\FxProperties", lfxValueName, RegistryHelper::getGuidString(EQUALIZERAPO_LFX_GUID)); - if(!isInput) - RegistryHelper::writeValue(keyPath + L"\\FxProperties", gfxValueName, RegistryHelper::getGuidString(EQUALIZERAPO_GFX_GUID)); + wstring preMixValue; + wstring postMixValue; + if(selectedInstallState.useOriginalAPOPreMix) + preMixValue = getOriginalAPOPreMix(); + if(selectedInstallState.useOriginalAPOPostMix) + postMixValue = getOriginalAPOPostMix(); + RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, preMixChildGuidValueName, preMixValue); + RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, postMixChildGuidValueName, postMixValue); + + RegistryHelper::writeValue(childApoPath L"\\" + deviceGuid, versionValueName, installVersion); + + if(selectedInstallState.installMode == INSTALL_LFX_GFX) + { + if(selectedInstallState.installPreMix) + RegistryHelper::writeValue(keyPath + L"\\FxProperties", lfxGuidValueName, RegistryHelper::getGuidString(EQUALIZERAPO_PRE_MIX_GUID)); + if(selectedInstallState.installPostMix && !isInput) + RegistryHelper::writeValue(keyPath + L"\\FxProperties", gfxGuidValueName, RegistryHelper::getGuidString(EQUALIZERAPO_POST_MIX_GUID)); + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", sfxGuidValueName)) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", sfxGuidValueName); + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", mfxGuidValueName)) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", mfxGuidValueName); + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", efxGuidValueName)) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", efxGuidValueName); + } + else if(selectedInstallState.installMode == INSTALL_SFX_MFX) + { + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", lfxGuidValueName)) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", lfxGuidValueName); + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", gfxGuidValueName)) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", gfxGuidValueName); + if(selectedInstallState.installPreMix) + { + RegistryHelper::writeValue(keyPath + L"\\FxProperties", sfxGuidValueName, RegistryHelper::getGuidString(EQUALIZERAPO_PRE_MIX_GUID)); + if(!RegistryHelper::valueExists(keyPath + L"\\FxProperties", sfxProcessingModesValueName)) + RegistryHelper::writeMultiValue(keyPath + L"\\FxProperties", sfxProcessingModesValueName, defaultProcessingModeValue); + } + if(selectedInstallState.installPostMix && !isInput) + { + RegistryHelper::writeValue(keyPath + L"\\FxProperties", mfxGuidValueName, RegistryHelper::getGuidString(EQUALIZERAPO_POST_MIX_GUID)); + if(!RegistryHelper::valueExists(keyPath + L"\\FxProperties", mfxProcessingModesValueName)) + RegistryHelper::writeMultiValue(keyPath + L"\\FxProperties", mfxProcessingModesValueName, defaultProcessingModeValue); + } + // don't change efx + } + else if(selectedInstallState.installMode == INSTALL_SFX_EFX) + { + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", lfxGuidValueName)) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", lfxGuidValueName); + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", gfxGuidValueName)) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", gfxGuidValueName); + if(selectedInstallState.installPreMix) + { + RegistryHelper::writeValue(keyPath + L"\\FxProperties", sfxGuidValueName, RegistryHelper::getGuidString(EQUALIZERAPO_PRE_MIX_GUID)); + if(!RegistryHelper::valueExists(keyPath + L"\\FxProperties", sfxProcessingModesValueName)) + RegistryHelper::writeMultiValue(keyPath + L"\\FxProperties", sfxProcessingModesValueName, defaultProcessingModeValue); + } + // don't change mfx + if(selectedInstallState.installPostMix && !isInput) + { + RegistryHelper::writeValue(keyPath + L"\\FxProperties", efxGuidValueName, RegistryHelper::getGuidString(EQUALIZERAPO_POST_MIX_GUID)); + if(!RegistryHelper::valueExists(keyPath + L"\\FxProperties", efxProcessingModesValueName)) + RegistryHelper::writeMultiValue(keyPath + L"\\FxProperties", efxProcessingModesValueName, defaultProcessingModeValue); + } + } } void DeviceAPOInfo::uninstall() @@ -255,64 +435,32 @@ void DeviceAPOInfo::uninstall() else keyPath = captureKeyPath L"\\" + deviceGuid; - if(originalLfxGuid == APOGUID_NOKEY || originalGfxGuid == APOGUID_NOKEY) + if(originalApoGuids[0] == APOGUID_NOKEY) { RegistryHelper::deleteKey(keyPath + L"\\FxProperties"); } else { - wstring lfxValueName; - wstring gfxValueName; - if(isAPO2) + for(int i=0; i < allGuidValueNameCount; i++) { - lfxValueName = lfxGuidValueName2; - gfxValueName = gfxGuidValueName2; - } - else - { - lfxValueName = lfxGuidValueName; - gfxValueName = gfxGuidValueName; - } - - if(originalLfxGuid == APOGUID_NOVALUE) - RegistryHelper::deleteValue(keyPath + L"\\FxProperties", lfxValueName); - else if(originalLfxGuid != L"") - RegistryHelper::writeValue(keyPath + L"\\FxProperties", lfxValueName, originalLfxGuid); - - if(originalGfxGuid == APOGUID_NOVALUE) - RegistryHelper::deleteValue(keyPath + L"\\FxProperties", gfxValueName); - else if(originalGfxGuid != L"") - RegistryHelper::writeValue(keyPath + L"\\FxProperties", gfxValueName, originalGfxGuid); - } - - if(RegistryHelper::valueExists(APP_REGPATH L"\\Child APOs", deviceGuid)) - RegistryHelper::deleteValue(APP_REGPATH L"\\Child APOs", deviceGuid); - - if(RegistryHelper::keyExists(APP_REGPATH L"\\Child APOs\\" + deviceGuid)) - RegistryHelper::deleteKey(APP_REGPATH L"\\Child APOs\\" + deviceGuid); - - if(RegistryHelper::keyEmpty(APP_REGPATH L"\\Child APOs")) - RegistryHelper::deleteKey(APP_REGPATH L"\\Child APOs"); -} - -bool DeviceAPOInfo::tryAPOGuid(const wstring& keyPath, const wstring& valueName, GUID guid, bool lfx, bool apo2) -{ - if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", valueName)) - { - wstring apoGuidString = RegistryHelper::readValue(keyPath + L"\\FxProperties", valueName); - - GUID apoGuid; - if(SUCCEEDED(CLSIDFromString(apoGuidString.c_str(), &apoGuid))) - { - if(apoGuid == guid) + if(originalApoGuids[i] == APOGUID_NOVALUE) { - isLFX = lfx; - isAPO2 = apo2; - - return true; + if(RegistryHelper::valueExists(keyPath + L"\\FxProperties", allGuidValueNames[i])) + RegistryHelper::deleteValue(keyPath + L"\\FxProperties", allGuidValueNames[i]); + } + else if(originalApoGuids[i] != L"") + { + RegistryHelper::writeValue(keyPath + L"\\FxProperties", allGuidValueNames[i], originalApoGuids[i]); } } } - return false; -} \ No newline at end of file + if(RegistryHelper::valueExists(childApoPath, deviceGuid)) + RegistryHelper::deleteValue(childApoPath, deviceGuid); + + if(RegistryHelper::keyExists(childApoPath L"\\" + deviceGuid)) + RegistryHelper::deleteKey(childApoPath L"\\" + deviceGuid); + + if(RegistryHelper::keyEmpty(childApoPath)) + RegistryHelper::deleteKey(childApoPath); +} diff --git a/DeviceAPOInfo.h b/DeviceAPOInfo.h index 7e7f6dc..044e902 100644 --- a/DeviceAPOInfo.h +++ b/DeviceAPOInfo.h @@ -29,25 +29,61 @@ class DeviceAPOInfo { public: + enum InstallMode + { + INSTALL_LFX_GFX = 0, + INSTALL_SFX_MFX = 1, + INSTALL_SFX_EFX = 2 + }; + + struct InstallState + { + bool installPreMix; + bool installPostMix; + bool useOriginalAPOPreMix; + bool useOriginalAPOPostMix; + InstallMode installMode; + + InstallState() + { + installPreMix = false; + installPostMix = false; + useOriginalAPOPreMix = false; + useOriginalAPOPostMix = false; + installMode = INSTALL_LFX_GFX; + } + + bool operator!=(InstallState& other) + { + return memcmp(this, &other, sizeof(InstallState)) != 0; + } + }; + static std::vector loadAllInfos(bool input); bool load(const std::wstring& deviceGuid); bool canBeUpgraded(); + bool hasChanges(); bool isExperimental(); + std::wstring getOriginalAPOPreMix(); + std::wstring getOriginalAPOPostMix(); void install(); void uninstall(); std::wstring deviceName; std::wstring connectionName; std::wstring deviceGuid; - std::wstring originalLfxGuid; - std::wstring originalGfxGuid; + + // used for creating child APO + std::wstring preMixChildGuid; + std::wstring postMixChildGuid; + + // used for uninstallation + std::wstring originalApoGuids[5]; + bool isInput; bool isInstalled; - bool isLFX; - bool isAPO2; - bool isDual; - bool installAsAPO2; - -private: - bool tryAPOGuid(const std::wstring& keyPath, const std::wstring& valueName, GUID guid, bool lfx, bool apo2); + std::wstring version; + InstallState currentInstallState; + // selection in GUI + InstallState selectedInstallState; }; diff --git a/DllMain.cpp b/DllMain.cpp index 50dc4e9..bcc0d01 100644 --- a/DllMain.cpp +++ b/DllMain.cpp @@ -48,7 +48,7 @@ STDAPI DllCanUnloadNow() STDAPI DllGetClassObject(const CLSID& clsid, const IID& iid, void** ppv) { - if(clsid != EQUALIZERAPO_GFX_GUID && clsid != EQUALIZERAPO_LFX_GUID) + if(clsid != EQUALIZERAPO_POST_MIX_GUID && clsid != EQUALIZERAPO_PRE_MIX_GUID) return CLASS_E_CLASSNOTAVAILABLE; ClassFactory* factory = new ClassFactory(); @@ -66,43 +66,43 @@ STDAPI DllRegisterServer() wchar_t filename[1024]; GetModuleFileNameW(hModule, filename, sizeof(filename)/sizeof(wchar_t)); - HRESULT hr = RegisterAPO(EqualizerAPO::regGfxProperties); + HRESULT hr = RegisterAPO(EqualizerAPO::regPostMixProperties); if(FAILED(hr)) { - UnregisterAPO(EQUALIZERAPO_GFX_GUID); + UnregisterAPO(EQUALIZERAPO_POST_MIX_GUID); return hr; } - hr = RegisterAPO(EqualizerAPO::regLfxProperties); + hr = RegisterAPO(EqualizerAPO::regPreMixProperties); if(FAILED(hr)) { - UnregisterAPO(EQUALIZERAPO_GFX_GUID); - UnregisterAPO(EQUALIZERAPO_LFX_GUID); + UnregisterAPO(EQUALIZERAPO_POST_MIX_GUID); + UnregisterAPO(EQUALIZERAPO_PRE_MIX_GUID); return hr; } try { - wstring apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_GFX_GUID); + wstring apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_POST_MIX_GUID); RegistryHelper::createKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString); - RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString, L"", L"EqualizerAPO GFX Class"); + RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString, L"", L"EqualizerAPO Post-Mix Class"); RegistryHelper::createKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32"); RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32", L"", filename); RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32", L"ThreadingModel", L"Both"); - apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_LFX_GUID); + apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_PRE_MIX_GUID); RegistryHelper::createKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString); - RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString, L"", L"EqualizerAPO LFX Class"); + RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString, L"", L"EqualizerAPO Pre-Mix Class"); RegistryHelper::createKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32"); RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32", L"", filename); RegistryHelper::writeValue(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32", L"ThreadingModel", L"Both"); } catch(RegistryException e) { - UnregisterAPO(EQUALIZERAPO_GFX_GUID); - UnregisterAPO(EQUALIZERAPO_LFX_GUID); + UnregisterAPO(EQUALIZERAPO_POST_MIX_GUID); + UnregisterAPO(EQUALIZERAPO_PRE_MIX_GUID); return E_FAIL; } @@ -113,12 +113,12 @@ STDAPI DllUnregisterServer() { try { - wstring apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_GFX_GUID); + wstring apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_POST_MIX_GUID); RegistryHelper::deleteKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32"); RegistryHelper::deleteKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString); - apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_LFX_GUID); + apoClsidString = RegistryHelper::getGuidString(EQUALIZERAPO_PRE_MIX_GUID); RegistryHelper::deleteKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString + L"\\InprocServer32"); RegistryHelper::deleteKey(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\" + apoClsidString); @@ -128,8 +128,8 @@ STDAPI DllUnregisterServer() return E_FAIL; } - HRESULT hr = UnregisterAPO(EQUALIZERAPO_GFX_GUID); - UnregisterAPO(EQUALIZERAPO_LFX_GUID); + HRESULT hr = UnregisterAPO(EQUALIZERAPO_POST_MIX_GUID); + UnregisterAPO(EQUALIZERAPO_PRE_MIX_GUID); return hr; } diff --git a/EqualizerAPO.cpp b/EqualizerAPO.cpp index 32c5428..ef35926 100644 --- a/EqualizerAPO.cpp +++ b/EqualizerAPO.cpp @@ -30,15 +30,15 @@ using namespace std; long EqualizerAPO::instCount = 0; -const CRegAPOProperties<1> EqualizerAPO::regGfxProperties( - EQUALIZERAPO_GFX_GUID, L"EqualizerAPO", L"Copyright (C) 2014", 1, 0, __uuidof(IAudioProcessingObject), +const CRegAPOProperties<1> EqualizerAPO::regPostMixProperties( + EQUALIZERAPO_POST_MIX_GUID, L"EqualizerAPO", L"Copyright (C) 2015", 1, 0, __uuidof(IAudioProcessingObject), (APO_FLAG)( APO_FLAG_FRAMESPERSECOND_MUST_MATCH | APO_FLAG_BITSPERSAMPLE_MUST_MATCH | APO_FLAG_INPLACE)); -const CRegAPOProperties<1> EqualizerAPO::regLfxProperties( - EQUALIZERAPO_LFX_GUID, L"EqualizerAPO", L"Copyright (C) 2014", 1, 0, __uuidof(IAudioProcessingObject), +const CRegAPOProperties<1> EqualizerAPO::regPreMixProperties( + EQUALIZERAPO_PRE_MIX_GUID, L"EqualizerAPO", L"Copyright (C) 2015", 1, 0, __uuidof(IAudioProcessingObject), (APO_FLAG)( APO_FLAG_FRAMESPERSECOND_MUST_MATCH | APO_FLAG_BITSPERSAMPLE_MUST_MATCH | APO_FLAG_INPLACE)); EqualizerAPO::EqualizerAPO(IUnknown* pUnkOuter) - :CBaseAudioProcessingObject(regGfxProperties) + :CBaseAudioProcessingObject(regPostMixProperties) { refCount = 1; if(pUnkOuter != NULL) @@ -113,7 +113,7 @@ HRESULT EqualizerAPO::Initialize(UINT32 cbDataSize, BYTE* pbyData) { LogF(L"Could not convert apo guid to guid string"); } - engine.setLfx((apoGuid == EQUALIZERAPO_LFX_GUID) != 0); + engine.setPreMix((apoGuid == EQUALIZERAPO_PRE_MIX_GUID) != 0); PROPVARIANT var; PropVariantInit(&var); @@ -133,12 +133,12 @@ HRESULT EqualizerAPO::Initialize(UINT32 cbDataSize, BYTE* pbyData) DeviceAPOInfo apoInfo; if(apoInfo.load(deviceGuid)) { - engine.setDeviceInfo(apoInfo.isInput, apoInfo.deviceName, apoInfo.connectionName, apoInfo.deviceGuid); + engine.setDeviceInfo(apoInfo.isInput, apoInfo.currentInstallState.installPostMix, apoInfo.deviceName, apoInfo.connectionName, apoInfo.deviceGuid); - if(apoGuid == EQUALIZERAPO_LFX_GUID) - childApoGuid = apoInfo.originalLfxGuid; + if(apoGuid == EQUALIZERAPO_PRE_MIX_GUID) + childApoGuid = apoInfo.preMixChildGuid; else - childApoGuid = apoInfo.originalGfxGuid; + childApoGuid = apoInfo.postMixChildGuid; } } catch(RegistryException e) @@ -154,7 +154,7 @@ HRESULT EqualizerAPO::Initialize(UINT32 cbDataSize, BYTE* pbyData) hr = CLSIDFromString(childApoGuid.c_str(), &childGuid); if(FAILED(hr)) { - LogF(L"Can't convert guid string to guid"); + LogF(L"Can't convert child apo guid string to guid"); return hr; } @@ -247,7 +247,7 @@ HRESULT EqualizerAPO::IsInputFormatSupported(IAudioMediaType* pOutputFormat, // we do not support downmixing currently if(hr == S_OK && inFormat.dwSamplesPerFrame > 2 && inFormat.dwSamplesPerFrame > outFormat.dwSamplesPerFrame) { - *ppSupportedInputFormat = pOutputFormat; + CreateAudioMediaTypeFromUncompressedAudioFormat(&outFormat, ppSupportedInputFormat); hr = S_FALSE; } } diff --git a/EqualizerAPO.h b/EqualizerAPO.h index 04b32b9..d17fe0d 100644 --- a/EqualizerAPO.h +++ b/EqualizerAPO.h @@ -32,9 +32,9 @@ class INonDelegatingUnknown }; // {EACD2258-FCAC-4FF4-B36D-419E924A6D79} -const GUID EQUALIZERAPO_LFX_GUID = { 0xeacd2258, 0xfcac, 0x4ff4, { 0xb3, 0x6d, 0x41, 0x9e, 0x92, 0x4a, 0x6d, 0x79 } }; +const GUID EQUALIZERAPO_PRE_MIX_GUID = { 0xeacd2258, 0xfcac, 0x4ff4, { 0xb3, 0x6d, 0x41, 0x9e, 0x92, 0x4a, 0x6d, 0x79 } }; // {EC1CC9CE-FAED-4822-828A-82A81A6F018F} -const GUID EQUALIZERAPO_GFX_GUID = { 0xec1cc9ce, 0xfaed, 0x4822, { 0x82, 0x8a, 0x82, 0xa8, 0x1a, 0x6f, 0x01, 0x8f } }; +const GUID EQUALIZERAPO_POST_MIX_GUID = { 0xec1cc9ce, 0xfaed, 0x4822, { 0x82, 0x8a, 0x82, 0xa8, 0x1a, 0x6f, 0x01, 0x8f } }; class EqualizerAPO : public CBaseAudioProcessingObject, public IAudioSystemEffects, public INonDelegatingUnknown @@ -71,8 +71,8 @@ public: virtual ULONG __stdcall NonDelegatingRelease(); static long instCount; - static const CRegAPOProperties<1> regGfxProperties; - static const CRegAPOProperties<1> regLfxProperties; + static const CRegAPOProperties<1> regPostMixProperties; + static const CRegAPOProperties<1> regPreMixProperties; private: long refCount; diff --git a/FilterEngine.cpp b/FilterEngine.cpp index 5737c34..1451298 100644 --- a/FilterEngine.cpp +++ b/FilterEngine.cpp @@ -56,8 +56,9 @@ using namespace mup; FilterEngine::FilterEngine() :parser(0) { - lfx = false; + preMix = false; capture = false; + postMixInstalled = true; inputChannelCount = 0; lastInputWasSilent = false; threadHandle = NULL; @@ -119,14 +120,15 @@ FilterEngine::~FilterEngine() DeleteCriticalSection(&loadSection); } -void FilterEngine::setLfx(bool lfx) +void FilterEngine::setPreMix(bool preMix) { - this->lfx = lfx; + this->preMix = preMix; } -void FilterEngine::setDeviceInfo(bool capture, const wstring& deviceName, const wstring& connectionName, const wstring& deviceGuid) +void FilterEngine::setDeviceInfo(bool capture, bool postMixInstalled, const wstring& deviceName, const wstring& connectionName, const wstring& deviceGuid) { this->capture = capture; + this->postMixInstalled = postMixInstalled; this->deviceName = deviceName; this->connectionName = connectionName; this->deviceGuid = deviceGuid; @@ -593,7 +595,7 @@ unsigned long __stdcall FilterEngine::notificationThread(void* parameter) { FilterEngine* engine = (FilterEngine*)parameter; - HANDLE notificationHandle = FindFirstChangeNotificationW(engine->configPath.c_str(), true, FILE_NOTIFY_CHANGE_LAST_WRITE); + HANDLE notificationHandle = FindFirstChangeNotificationW(engine->configPath.c_str(), true, FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE); if(notificationHandle == INVALID_HANDLE_VALUE) notificationHandle = NULL; diff --git a/FilterEngine.h b/FilterEngine.h index eadf49a..efba7b8 100644 --- a/FilterEngine.h +++ b/FilterEngine.h @@ -39,16 +39,17 @@ public: FilterEngine(); ~FilterEngine(); - void setLfx(bool lfx); - void setDeviceInfo(bool capture, const std::wstring& deviceName, const std::wstring& connectionName, const std::wstring& deviceGuid); + void setPreMix(bool preMix); + void setDeviceInfo(bool capture, bool postMixInstalled, const std::wstring& deviceName, const std::wstring& connectionName, const std::wstring& deviceGuid); void initialize(float sampleRate, unsigned inputChannelCount, unsigned realChannelCount, unsigned outputChannelCount, unsigned channelMask, unsigned maxFrameCount); void loadConfig(); void loadConfig(const std::wstring& path); void watchRegistryKey(const std::wstring& key); void process(float *output, float *input, unsigned frameCount); - bool isLfx() const {return lfx;} + bool isPreMix() const {return preMix;} bool isCapture() const {return capture;} + bool isPostMixInstalled() const {return postMixInstalled;} std::wstring getDeviceName() const {return deviceName;} std::wstring getConnectionName() const {return connectionName;} std::wstring getDeviceGuid() const {return deviceGuid;} @@ -67,8 +68,9 @@ private: std::vector factories; - bool lfx; + bool preMix; bool capture; + bool postMixInstalled; std::wstring deviceName; std::wstring connectionName; std::wstring deviceGuid; diff --git a/Release checklist.txt b/Release checklist.txt new file mode 100644 index 0000000..a4ee3f2 --- /dev/null +++ b/Release checklist.txt @@ -0,0 +1,7 @@ +1. Change version number in version.h +2. Create setups using build.bat +3. Export trunk to an external folder, create EqualizerAPO-src-x.zip from the folder contents +4. Upload EqualizerAPO32-x.zip, EqualizerAPO64-x.zip and EqualizerAPO-src-x.zip to new folder x +5. Update readme.txt using subversion log +6. Set EqualizerAPO64-x.zip as new default download +7. Create tag of trunk in tags/x \ No newline at end of file diff --git a/filters/StageFilterFactory.cpp b/filters/StageFilterFactory.cpp index d9b9955..f0b60be 100644 --- a/filters/StageFilterFactory.cpp +++ b/filters/StageFilterFactory.cpp @@ -26,15 +26,16 @@ using namespace std; void StageFilterFactory::initialize(FilterEngine* engine) { - lfx = engine->isLfx(); + preMix = engine->isPreMix(); capture = engine->isCapture(); + postMixInstalled = engine->isPostMixInstalled(); - engine->getParser()->DefineConst(L"stage", engine->isCapture() ? L"capture" : engine->isLfx() ? L"pre-mix" : L"post-mix"); + engine->getParser()->DefineConst(L"stage", engine->isCapture() ? L"capture" : engine->isPreMix() ? L"pre-mix" : L"post-mix"); } vector StageFilterFactory::startOfConfiguration() { - stageMatches = capture || !lfx; + stageMatches = capture || !preMix || !postMixInstalled; while(!stageMatchesStack.empty()) stageMatchesStack.pop(); @@ -62,7 +63,7 @@ vector StageFilterFactory::createFilter(const wstring& configPath, wst const wstring& part = *it; if(part == L"pre-mix") { - if(!capture && lfx) + if(!capture && preMix) { stageMatches = true; matchingPart = part; @@ -70,7 +71,7 @@ vector StageFilterFactory::createFilter(const wstring& configPath, wst } else if(part == L"post-mix") { - if(!capture && !lfx) + if(!capture && !preMix) { stageMatches = true; matchingPart = part; diff --git a/filters/StageFilterFactory.h b/filters/StageFilterFactory.h index 7cc7a8f..099e911 100644 --- a/filters/StageFilterFactory.h +++ b/filters/StageFilterFactory.h @@ -34,8 +34,9 @@ public: virtual std::vector endOfFile(const std::wstring& configPath); private: - bool lfx; + bool preMix; bool capture; + bool postMixInstalled; bool stageMatches; std::stack stageMatchesStack; diff --git a/helpers/LogHelper.cpp b/helpers/LogHelper.cpp index 09e0664..3615e3a 100644 --- a/helpers/LogHelper.cpp +++ b/helpers/LogHelper.cpp @@ -87,7 +87,7 @@ void LogHelper::log(const char* file, int line, const void* caller, bool trace, GetLocalTime(&___st); DWORD threadId = GetCurrentThreadId(); fwprintf(fp, L"%04d-%02d-%02d %02d:%02d:%02d.%03d %d %08X (%S:%d): ", - ___st.wYear, ___st.wMonth, ___st.wDay, ___st.wHour, ___st.wMinute, ___st.wSecond, ___st.wMilliseconds, threadId, caller, file, line); + ___st.wYear, ___st.wMonth, ___st.wDay, ___st.wHour, ___st.wMinute, ___st.wSecond, ___st.wMilliseconds, threadId, (DWORD)caller, file, line); } if(trace) @@ -125,4 +125,4 @@ void LogHelper::set(FILE* fp, bool enableTrace, bool compact, bool useConsoleCol LogHelper::enableTrace = enableTrace; LogHelper::compact = compact; LogHelper::useConsoleColors = useConsoleColors; -} \ No newline at end of file +} diff --git a/helpers/RegistryHelper.cpp b/helpers/RegistryHelper.cpp index 5a37c3b..b3c52b4 100644 --- a/helpers/RegistryHelper.cpp +++ b/helpers/RegistryHelper.cpp @@ -316,7 +316,6 @@ vector RegistryHelper::enumSubKeys(wstring key) wchar_t keyName[256]; DWORD keyLength = sizeof(keyName) / sizeof(wchar_t); int i=0; - int itemCount=0; LSTATUS status; while((status = RegEnumKeyExW(keyHandle, i++, keyName, &keyLength, NULL, NULL, NULL, NULL)) == ERROR_SUCCESS) diff --git a/version.h b/version.h index 19d0115..5c3fd05 100644 --- a/version.h +++ b/version.h @@ -1,3 +1,3 @@ #define MAJOR 0 #define MINOR 9 -#define REVISION 1 +#define REVISION 2