From f1e8c0d9758cb94a8ee0afacbe70c6fb61f04608 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 12 Mar 2016 15:32:19 +0000 Subject: bass_interface: code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@16469 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BASS_interface/src/Main.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'plugins/BASS_interface') 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; -- cgit v1.2.3