summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-03-12 15:32:19 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-03-12 15:32:19 +0000
commitf1e8c0d9758cb94a8ee0afacbe70c6fb61f04608 (patch)
tree58adb158ee242d1e736de3215d71b9bd67f14bf4 /plugins
parent454e1d9c3dd95d332f2a31c261991cf4ba450bcc (diff)
bass_interface: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@16469 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/BASS_interface/src/Main.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index eb7c2bfeee..4b7fe540ff 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -26,7 +26,7 @@ FARPROC WINAPI delayHook(unsigned dliNotify, PDelayLoadInfo dli)
return NULL;
}
-extern "C" PfnDliHook __pfnDliNotifyHook2 = &delayHook;
+extern "C" PfnDliHook __pfnDliNotifyHook2 = delayHook;
HINSTANCE hInst;
int hLangpack;
@@ -445,15 +445,9 @@ void CreateFrame()
return;
WNDCLASS wndclass = { 0 };
- wndclass.style = 0;
wndclass.lpfnWndProc = FrameWindowProc;
- wndclass.cbClsExtra = 0;
- wndclass.cbWndExtra = 0;
wndclass.hInstance = hInst;
- wndclass.hIcon = NULL;
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
- wndclass.hbrBackground = 0;
- wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = _T("BassInterfaceFrame");
RegisterClass(&wndclass);
@@ -471,10 +465,12 @@ void CreateFrame()
ColourIDT colourid = { 0 };
colourid.cbSize = sizeof(ColourIDT);
- mir_strcpy(colourid.dbSettingsGroup, ModuleName);
- mir_strcpy(colourid.setting, "ColorFrame");
- mir_tstrcpy(colourid.name, LPGENT("Frame background"));
- mir_tstrcpy(colourid.group, _T(ModuleName));
+
+ strcpy_s(colourid.dbSettingsGroup, ModuleName);
+ strcpy_s(colourid.setting, "ColorFrame");
+ wcscpy_s(colourid.name, LPGENW("Frame background"));
+ wcscpy_s(colourid.group, _T(ModuleName));
+
colourid.defcolour = GetSysColor(COLOR_3DFACE);
ColourRegisterT(&colourid);
@@ -493,14 +489,16 @@ void DeleteFrame()
void LoadBassLibrary(const TCHAR *ptszPath)
{
hBass = LoadLibrary(ptszPath);
- if (hBass != NULL) {
+
+ if (hBass != NULL)
+ {
newBass = (BASS_SetConfig(BASS_CONFIG_DEV_DEFAULT, TRUE) != 0); // will use new "Default" device
DBVARIANT dbv = { 0 };
BASS_DEVICEINFO info;
if (!db_get_ts(NULL, ModuleName, OPT_OUTDEVICE, &dbv))
- for (int i = 1; BASS_GetDeviceInfo(i, &info); i++)
+ for (size_t i = 1; BASS_GetDeviceInfo(i, &info); i++)
if (!mir_tstrcmp(dbv.ptszVal, _A2T(info.name)))
device = i;