summaryrefslogtreecommitdiff
path: root/plugins/BASS_interface/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-01 21:11:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-01 21:11:59 +0000
commitb2269a81668efaf157d541f2ffd67e52b89417c6 (patch)
tree128980a09b93abf48f63ee78bb51a041b607e8a2 /plugins/BASS_interface/src
parentbe6c3121411e55055383900f45d17a1ef887ccdd (diff)
useless Folders support checks removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@3824 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BASS_interface/src')
-rw-r--r--plugins/BASS_interface/src/Main.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index e72a855339..d477ba81bb 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -555,24 +555,20 @@ int OnFoldersChanged(WPARAM, LPARAM)
int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
- if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
- {
- hBASSFolder = FoldersRegisterCustomPathT("Bass Interface", "Bass library", PLUGINS_PATHT _T("\\Bass"));
+ if (hBASSFolder = FoldersRegisterCustomPathT("Bass Interface", "Bass library", PLUGINS_PATHT _T("\\Bass"))) {
FoldersGetCustomPathT(hBASSFolder, CurrBassPath, MAX_PATH, _T(""));
_tcscat(CurrBassPath, _T("\\bass.dll"));
}
- else
- {
- DBVARIANT dbv = {0};
- if (db_get_ts(NULL, ModuleName, OPT_BASSPATH, &dbv))
- {
- TCHAR* tszFolder = Utils_ReplaceVarsT(_T("%miranda_path%\\plugins\\Bass\\bass.dll"));
- lstrcpyn(CurrBassPath, tszFolder, SIZEOF(CurrBassPath));
- mir_free(tszFolder);
+ else {
+ DBVARIANT dbv;
+ if ( db_get_ts(NULL, ModuleName, OPT_BASSPATH, &dbv)) {
+ lstrcpyn(CurrBassPath, VARST( _T("%miranda_path%\\plugins\\Bass\\bass.dll")), SIZEOF(CurrBassPath));
db_set_ts(NULL, ModuleName, OPT_BASSPATH, CurrBassPath);
}
- else lstrcpy(CurrBassPath, dbv.ptszVal);
- DBFreeVariant(&dbv);
+ else {
+ lstrcpy(CurrBassPath, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ }
}
LoadBassLibrary(CurrBassPath);