Skip to content

Commit

Permalink
lazy load bass
Browse files Browse the repository at this point in the history
  • Loading branch information
khang06 committed Nov 21, 2020
1 parent 28c6c06 commit ae4333e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dominohook/ReferenceAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ INT_PTR CALLBACK ReferenceAudioDlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARA
}

void ReferenceAudio::OpenDialog() {
if (LoadLibraryA("bass.dll") == NULL) {
Common::Warn((*g_pMainFrame)->m_hWnd, "BASS could not be loaded. Please copy the latest bass.dll into Domino's directory to use reference audio.");
return;
}

auto& hwnd = GetInstance()->m_hWnd;
if (!hwnd)
hwnd = CreateDialogA((HINSTANCE)&__ImageBase, MAKEINTRESOURCEA(IDD_REFAUDIO), (*g_pMainFrame)->m_hWnd, ReferenceAudioDlgProc);
Expand Down
1 change: 1 addition & 0 deletions dominohook/dominohook.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>bass.lib;shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<DelayLoadDLLs>bass.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down

0 comments on commit ae4333e

Please sign in to comment.