mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Unignore and fix warnings elsewhere
This commit is contained in:
parent
a577608835
commit
c196396ad0
@ -17,7 +17,6 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4267;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -51,7 +51,7 @@ bool FontCollectionD2D::InitializeCollection()
|
||||
loader, &m_FileReferences, sizeof(m_FileReferences), &m_Collection);
|
||||
}
|
||||
|
||||
return m_Collection;
|
||||
return m_Collection != nullptr;
|
||||
}
|
||||
|
||||
bool FontCollectionD2D::AddFile(const WCHAR* file)
|
||||
|
@ -375,7 +375,7 @@ const WCHAR* Parse(
|
||||
{
|
||||
Operation op;
|
||||
if (lexer.nameLen <= FUNC_MAX_LEN &&
|
||||
((op.funcIndex = GetFunctionIndex(lexer.name, lexer.nameLen)) != FUNC_INVALID))
|
||||
((op.funcIndex = GetFunctionIndex(lexer.name, (BYTE)lexer.nameLen)) != FUNC_INVALID))
|
||||
{
|
||||
switch (op.funcIndex)
|
||||
{
|
||||
@ -402,13 +402,13 @@ const WCHAR* Parse(
|
||||
else
|
||||
{
|
||||
double dblval;
|
||||
if (getValue && getValue(lexer.name, lexer.nameLen, &dblval, getValueContext))
|
||||
if (getValue && getValue(lexer.name, (int)lexer.nameLen, &dblval, getValueContext))
|
||||
{
|
||||
parser.numStack[++parser.valTop] = dblval;
|
||||
break;
|
||||
}
|
||||
|
||||
std::wstring name(lexer.name, lexer.nameLen);
|
||||
const std::wstring name(lexer.name, lexer.nameLen);
|
||||
_snwprintf_s(errorBuffer, _TRUNCATE, eUnknFunc, name.c_str());
|
||||
return errorBuffer;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ std::wstring Widen(const char* str, int strLen, int cp)
|
||||
{
|
||||
if (strLen == -1)
|
||||
{
|
||||
strLen = strlen(str);
|
||||
strLen = (int)strlen(str);
|
||||
}
|
||||
|
||||
int bufLen = MultiByteToWideChar(cp, 0, str, strLen, nullptr, 0);
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -306,7 +306,7 @@ PLUGIN_EXPORT double Update(void* data)
|
||||
int trueIndex = child->ignoreCount ? child->index : ((child->index % parent->count) + parent->indexOffset);
|
||||
double value = 0;
|
||||
|
||||
if (!parent->files.empty() && trueIndex >= 0 && trueIndex < parent->files.size())
|
||||
if (!parent->files.empty() && trueIndex >= 0 && trueIndex < (int)parent->files.size())
|
||||
{
|
||||
switch (child->type)
|
||||
{
|
||||
@ -382,7 +382,7 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data)
|
||||
int trueIndex = child->ignoreCount ? child->index : ((child->index % parent->count) + parent->indexOffset);
|
||||
child->strValue = L"";
|
||||
|
||||
if (!parent->files.empty() && trueIndex >= 0 && trueIndex < parent->files.size())
|
||||
if (!parent->files.empty() && trueIndex >= 0 && trueIndex < (int)parent->files.size())
|
||||
{
|
||||
switch (child->type)
|
||||
{
|
||||
@ -511,7 +511,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
|
||||
if (parent->ownerChild == child)
|
||||
{
|
||||
if (parent->files.size() > parent->count)
|
||||
if ((int)parent->files.size() > parent->count)
|
||||
{
|
||||
if (_wcsicmp(args, L"PAGEUP") == 0)
|
||||
{
|
||||
@ -528,7 +528,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
}
|
||||
else if (_wcsicmp(args, L"PAGEDOWN") == 0)
|
||||
{
|
||||
if ((parent->indexOffset + ( 2 * parent->count)) < parent->files.size())
|
||||
if ((parent->indexOffset + (2 * parent->count)) < (int)parent->files.size())
|
||||
{
|
||||
parent->indexOffset += parent->count;
|
||||
parent->needsIcons = true;
|
||||
@ -554,7 +554,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
}
|
||||
else if (_wcsicmp(args, L"INDEXDOWN") == 0)
|
||||
{
|
||||
if ((parent->indexOffset + parent->count) < parent->files.size())
|
||||
if ((parent->indexOffset + parent->count) < (int)parent->files.size())
|
||||
{
|
||||
++parent->indexOffset;
|
||||
parent->needsIcons = true;
|
||||
@ -583,7 +583,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
else
|
||||
{
|
||||
parent->path.clear();
|
||||
for (int i = 0; i < path.size() - 1; ++i)
|
||||
for (size_t i = 0; i < path.size() - 1; ++i)
|
||||
{
|
||||
parent->path += path[i];
|
||||
parent->path += L"\\";
|
||||
@ -600,7 +600,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
}
|
||||
|
||||
int trueIndex = child->ignoreCount ? child->index : ((child->index % parent->count) + parent->indexOffset);
|
||||
if (!parent->files.empty() && trueIndex >= 0 && trueIndex < parent->files.size())
|
||||
if (!parent->files.empty() && trueIndex >= 0 && trueIndex < (int)parent->files.size())
|
||||
{
|
||||
if (_wcsicmp(args, L"OPEN") == 0)
|
||||
{
|
||||
@ -618,7 +618,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
else
|
||||
{
|
||||
parent->path.clear();
|
||||
for (int i = 0; i < path.size() - 1; ++i)
|
||||
for (size_t i = 0; i < path.size() - 1; ++i)
|
||||
{
|
||||
parent->path += path[i];
|
||||
parent->path += L"\\";
|
||||
@ -876,7 +876,7 @@ unsigned __stdcall SystemThreadProc(void* pParam)
|
||||
EnterCriticalSection(&g_CriticalSection);
|
||||
int trueIndex = iter->ignoreCount ? iter->index : ((iter->index % iter->parent->count) + iter->parent->indexOffset);
|
||||
|
||||
if (iter->type == TYPE_ICON && trueIndex >= 0 && trueIndex < tmp->files.size())
|
||||
if (iter->type == TYPE_ICON && trueIndex >= 0 && trueIndex < (int)tmp->files.size())
|
||||
{
|
||||
std::wstring filePath = tmp->files[trueIndex].path;
|
||||
filePath += (tmp->files[trueIndex].fileName == L"..") ? L"" :tmp->files[trueIndex].fileName;
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -131,7 +131,9 @@ void CFolderInfo::CalculateSize()
|
||||
}
|
||||
else if (!isFolder && m_RegExpFilter)
|
||||
{
|
||||
int utf8BufLen = WideCharToMultiByte(CP_UTF8, 0, findData.cFileName, wcslen(findData.cFileName) + 1, utf8Buf, MAX_PATH * 3, nullptr, nullptr);
|
||||
const int utf8BufLen = WideCharToMultiByte(
|
||||
CP_UTF8, 0, findData.cFileName, (int)wcslen(findData.cFileName) + 1, utf8Buf, MAX_PATH * 3,
|
||||
nullptr, nullptr);
|
||||
if (0 != pcre_exec(m_RegExpFilter, nullptr, utf8Buf, utf8BufLen, 0, 0, nullptr, 0))
|
||||
{
|
||||
continue;
|
||||
@ -177,7 +179,7 @@ void CFolderInfo::SetRegExpFilter(LPCWSTR filter)
|
||||
|
||||
if (*filter)
|
||||
{
|
||||
int filterLen = wcslen(filter) + 1;
|
||||
const int filterLen = (int)wcslen(filter) + 1;
|
||||
int bufLen = WideCharToMultiByte(CP_UTF8, 0, filter, filterLen, nullptr, 0, nullptr, nullptr);
|
||||
|
||||
char* buf = new char[bufLen];
|
||||
|
@ -58,7 +58,7 @@ PLUGIN_EXPORT void Initialize(void** data, void* rm)
|
||||
LPCWSTR str = RmReadString(rm, L"Folder", L"", FALSE);
|
||||
if (*str == L'[')
|
||||
{
|
||||
int len = wcslen(str);
|
||||
const size_t len = wcslen(str);
|
||||
for (auto iter = g_Measures.cbegin(); iter != g_Measures.cend(); ++iter)
|
||||
{
|
||||
if ((*iter)->folder &&
|
||||
@ -130,7 +130,7 @@ PLUGIN_EXPORT double Update(void* data)
|
||||
switch (measure->type)
|
||||
{
|
||||
case MEASURE_FOLDERSIZE:
|
||||
return measure->folder->GetSize();
|
||||
return (double)measure->folder->GetSize();
|
||||
|
||||
case MEASURE_FILECOUNT:
|
||||
return measure->folder->GetFileCount();
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4244;4267;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -79,7 +79,7 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
||||
{
|
||||
// PlayerName starts with [ so use referenced section
|
||||
++str;
|
||||
int len = wcslen(str);
|
||||
size_t len = wcslen(str);
|
||||
if (len > 0 && str[len - 1] == L']')
|
||||
{
|
||||
--len;
|
||||
@ -198,7 +198,7 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
||||
parent->player->AddInstance();
|
||||
parent->playerPath = RmReadString(rm, L"PlayerPath", L"");
|
||||
parent->trackChangeAction = RmReadString(rm, L"TrackChangeAction", L"", FALSE);
|
||||
parent->disableLeadingZero = RmReadInt(rm, L"DisableLeadingZero", 0);
|
||||
parent->disableLeadingZero = RmReadInt(rm, L"DisableLeadingZero", 0) != 0;
|
||||
|
||||
if (oldPlayer)
|
||||
{
|
||||
@ -518,7 +518,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
{
|
||||
++arg; // Skip the space
|
||||
|
||||
if (wcsnicmp(args, L"SetPosition", 11) == 0)
|
||||
if (_wcsnicmp(args, L"SetPosition", 11) == 0)
|
||||
{
|
||||
int position = (_wtoi(arg) * (int)player->GetDuration()) / 100;
|
||||
if (arg[0] == L'+' || arg[0] == L'-')
|
||||
@ -528,7 +528,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
|
||||
player->SetPosition(position);
|
||||
}
|
||||
else if (wcsnicmp(args, L"SetRating", 9) == 0)
|
||||
else if (_wcsnicmp(args, L"SetRating", 9) == 0)
|
||||
{
|
||||
int rating = _wtoi(arg);
|
||||
if (rating >= 0 && rating <= 5)
|
||||
@ -536,7 +536,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
player->SetRating(rating);
|
||||
}
|
||||
}
|
||||
else if (wcsnicmp(args, L"SetVolume", 9) == 0)
|
||||
else if (_wcsnicmp(args, L"SetVolume", 9) == 0)
|
||||
{
|
||||
int volume = _wtoi(arg);
|
||||
if (arg[0] == L'+' || arg[0] == L'-')
|
||||
@ -555,7 +555,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
}
|
||||
player->SetVolume(volume);;
|
||||
}
|
||||
else if (wcsnicmp(args, L"SetShuffle", 9) == 0)
|
||||
else if (_wcsnicmp(args, L"SetShuffle", 9) == 0)
|
||||
{
|
||||
int state = _wtoi(arg);
|
||||
if (state == -1)
|
||||
@ -564,10 +564,10 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
}
|
||||
else if (state == 0 || state == 1)
|
||||
{
|
||||
player->SetShuffle((bool)state);
|
||||
player->SetShuffle(state != 0);
|
||||
}
|
||||
}
|
||||
else if (wcsnicmp(args, L"SetRepeat", 9) == 0)
|
||||
else if (_wcsnicmp(args, L"SetRepeat", 9) == 0)
|
||||
{
|
||||
int state = _wtoi(arg);
|
||||
if (state == -1)
|
||||
@ -576,7 +576,7 @@ PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
|
||||
}
|
||||
else if (state == 0 || state == 1)
|
||||
{
|
||||
player->SetRepeat((bool)state);
|
||||
player->SetRepeat(state != 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -137,8 +137,8 @@ void PlayerAIMP::UpdateData()
|
||||
return;
|
||||
}
|
||||
|
||||
m_Position = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_POS);
|
||||
m_Volume = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_VOLUME);
|
||||
m_Position = (UINT)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_POS);
|
||||
m_Volume = (UINT)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_VOLUME);
|
||||
|
||||
AIMP2FileInfo* info = (AIMP2FileInfo*)m_FileMap;
|
||||
if (info->cbSizeOf > 0 &&
|
||||
@ -169,11 +169,11 @@ void PlayerAIMP::UpdateData()
|
||||
m_Duration = info->nDuration / 1000;
|
||||
m_Number = (UINT)info->nTrackID;
|
||||
|
||||
m_Shuffle = (bool)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_SHUFFLE);
|
||||
m_Repeat = (bool)SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_REPEAT);
|
||||
m_Shuffle = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_SHUFFLE) != 0;
|
||||
m_Repeat = SendMessage(m_Window, WM_AIMP_COMMAND, WM_AIMP_STATUS_GET, AIMP_STS_REPEAT) != 0;
|
||||
|
||||
// Get rating through the AIMP Winamp API
|
||||
m_Rating = SendMessage(m_WinampWindow, WM_WA_IPC, 0, IPC_GETRATING);
|
||||
m_Rating = (UINT)SendMessage(m_WinampWindow, WM_WA_IPC, 0, IPC_GETRATING);
|
||||
|
||||
if (filepath != m_FilePath)
|
||||
{
|
||||
|
@ -234,25 +234,25 @@ LRESULT CALLBACK PlayerCAD::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
|
||||
|
||||
case IPC_VOLUME_CHANGED_NOTIFICATION:
|
||||
{
|
||||
player->m_Volume = wParam;
|
||||
player->m_Volume = (UINT)wParam;
|
||||
break;
|
||||
}
|
||||
|
||||
case IPC_REPEAT_CHANGED_NOTIFICATION:
|
||||
{
|
||||
player->m_Repeat = (bool)wParam;
|
||||
player->m_Repeat = wParam != 0;
|
||||
break;
|
||||
}
|
||||
|
||||
case IPC_SHUFFLE_CHANGED_NOTIFICATION:
|
||||
{
|
||||
player->m_Shuffle = (bool)wParam;
|
||||
player->m_Shuffle = wParam != 0;
|
||||
break;
|
||||
}
|
||||
|
||||
case IPC_RATING_CHANGED_NOTIFICATION:
|
||||
{
|
||||
player->m_Rating = (wParam + 1) / 2; // From 0 - 10 to 0 - 5
|
||||
player->m_Rating = ((UINT)wParam + 1) / 2; // From 0 - 10 to 0 - 5
|
||||
break;
|
||||
}
|
||||
|
||||
@ -270,8 +270,8 @@ LRESULT CALLBACK PlayerCAD::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
|
||||
PCOPYDATASTRUCT cds = (PCOPYDATASTRUCT)lParam;
|
||||
if (cds->dwData == IPC_CURRENT_TRACK_NOTIFICATION)
|
||||
{
|
||||
player->m_Shuffle = (bool)SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE);
|
||||
player->m_Repeat = (bool)SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT);
|
||||
player->m_Shuffle = SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE) != 0;
|
||||
player->m_Repeat = SendMessage(player->m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT) != 0;
|
||||
|
||||
// TODO: Sent on track update?
|
||||
++player->m_TrackCount;
|
||||
@ -418,8 +418,8 @@ void PlayerCAD::UpdateData()
|
||||
{
|
||||
if (m_State != STATE_STOPPED)
|
||||
{
|
||||
m_Position = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_POSITION);
|
||||
m_Volume = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_VOLUME);
|
||||
m_Position = (UINT)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_POSITION);
|
||||
m_Volume = (UINT)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_VOLUME);
|
||||
}
|
||||
}
|
||||
|
||||
@ -504,7 +504,7 @@ void PlayerCAD::SetVolume(int volume)
|
||||
void PlayerCAD::SetShuffle(bool state)
|
||||
{
|
||||
SendMessage(m_PlayerWindow, WM_USER, (WPARAM)state, IPC_SET_SHUFFLE);
|
||||
m_Shuffle = (bool)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE);
|
||||
m_Shuffle = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_SHUFFLE) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -514,7 +514,7 @@ void PlayerCAD::SetShuffle(bool state)
|
||||
void PlayerCAD::SetRepeat(bool state)
|
||||
{
|
||||
SendMessage(m_PlayerWindow, WM_USER, (WPARAM)state, IPC_SET_REPEAT);
|
||||
m_Repeat = (bool)SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT);
|
||||
m_Repeat = SendMessage(m_PlayerWindow, WM_USER, 0, IPC_GET_REPEAT) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -340,7 +340,7 @@ void PlayerITunes::OnDatabaseChange()
|
||||
hr = playlist->get_Shuffle(&shuffle);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
m_Shuffle = (bool)shuffle;
|
||||
m_Shuffle = shuffle != VARIANT_FALSE;
|
||||
}
|
||||
|
||||
playlist->Release();
|
||||
@ -392,7 +392,7 @@ void PlayerITunes::OnTrackChange()
|
||||
hr = playlist->get_SongRepeat(&repeat);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
m_Repeat = (bool)repeat;
|
||||
m_Repeat = repeat != ITPlaylistRepeatModeOff;
|
||||
}
|
||||
|
||||
playlist->Release();
|
||||
|
@ -105,7 +105,7 @@ void PlayerWinamp::UpdateData()
|
||||
{
|
||||
if (m_Initialized || CheckWindow())
|
||||
{
|
||||
int playing = SendMessage(m_Window, WM_WA_IPC, 0, IPC_ISPLAYING);
|
||||
const auto playing = SendMessage(m_Window, WM_WA_IPC, 0, IPC_ISPLAYING);
|
||||
if (playing == 0)
|
||||
{
|
||||
// Make sure Winamp is still active
|
||||
@ -127,8 +127,8 @@ void PlayerWinamp::UpdateData()
|
||||
else
|
||||
{
|
||||
m_State = (playing == 1) ? STATE_PLAYING : STATE_PAUSED;
|
||||
m_Position = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETOUTPUTTIME) / 1000; // ms to secs
|
||||
m_Volume = (SendMessage(m_Window, WM_WA_IPC, -666, IPC_SETVOLUME) * 100) / 255; // 0 - 255 to 0 - 100
|
||||
m_Position = (UINT)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETOUTPUTTIME) / 1000; // ms to secs
|
||||
m_Volume = ((UINT)SendMessage(m_Window, WM_WA_IPC, -666, IPC_SETVOLUME) * 100) / 255; // 0 - 255 to 0 - 100
|
||||
}
|
||||
|
||||
WCHAR wBuffer[MAX_PATH];
|
||||
@ -145,7 +145,7 @@ void PlayerWinamp::UpdateData()
|
||||
else
|
||||
{
|
||||
// MediaMonkey doesn't support wide IPC messages
|
||||
int pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
|
||||
const auto pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
|
||||
LPCVOID address = (LPCVOID)SendMessage(m_Window, WM_WA_IPC, pos, IPC_GETPLAYLISTFILE);
|
||||
|
||||
if (!ReadProcessMemory(m_WinampHandle, address, &cBuffer, sizeof(cBuffer), nullptr))
|
||||
@ -165,12 +165,12 @@ void PlayerWinamp::UpdateData()
|
||||
|
||||
if (!m_PlayingStream)
|
||||
{
|
||||
int duration = SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
|
||||
const int duration = (int)SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
|
||||
m_Duration = (duration != -1) ? duration : 0;
|
||||
|
||||
m_Rating = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETRATING);
|
||||
m_Shuffle = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_SHUFFLE);
|
||||
m_Repeat = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_REPEAT);
|
||||
m_Rating = (UINT)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETRATING);
|
||||
m_Shuffle = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_SHUFFLE) != 0;
|
||||
m_Repeat = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_REPEAT) != 0;
|
||||
|
||||
TagLib::FileRef fr(wBuffer, false);
|
||||
TagLib::Tag* tag = fr.tag();
|
||||
@ -270,7 +270,7 @@ void PlayerWinamp::UpdateData()
|
||||
{
|
||||
if (m_Duration == 0)
|
||||
{
|
||||
int duration = SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
|
||||
const int duration = (int)SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
|
||||
m_Duration = (duration != -1) ? duration : 0;
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ void PlayerWinamp::UpdateData()
|
||||
}
|
||||
else
|
||||
{
|
||||
int pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
|
||||
const auto pos = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETLISTPOS);
|
||||
LPCVOID address = (LPCVOID)SendMessage(m_Window, WM_WA_IPC, pos, IPC_GETPLAYLISTTITLE);
|
||||
ReadProcessMemory(m_WinampHandle, address, &cBuffer, sizeof(cBuffer), nullptr);
|
||||
mbstowcs(wBuffer, cBuffer, MAX_PATH);
|
||||
|
@ -20,7 +20,6 @@
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>./taglib;./taglib/toolkit;./taglib/asf;./taglib/mpeg;./taglib/ogg;./taglib/ogg/flac;./taglib/flac;./taglib/mpc;./taglib/ogg/vorbis;./taglib/mpeg/id3v2;./taglib/mpeg/id3v2/frames;./taglib/mpeg/id3v1;./taglib/ape;./taglib/wavpack;.\SDKs\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4351;4800;4273;4251;4530;4996</DisableSpecificWarnings>
|
||||
<ExceptionHandling Condition="'$(Configuration)'=='Release'">false</ExceptionHandling>
|
||||
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'">false</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;PluginPing_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>PowrProf.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -60,7 +60,7 @@ void ScanFolder(std::vector<std::wstring>& files, std::vector<std::wstring>& fil
|
||||
{
|
||||
if (!filters.empty())
|
||||
{
|
||||
for (int i = 0; i < filters.size(); ++i)
|
||||
for (size_t i = 0; i < filters.size(); ++i)
|
||||
{
|
||||
if (!filters[i].empty() && PathMatchSpec(fileData.cFileName, filters[i].c_str()))
|
||||
{
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Rasapi32.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -301,7 +301,7 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (measure->data < ipTable->dwNumEntries)
|
||||
else if (measure->data < (int)ipTable->dwNumEntries)
|
||||
{
|
||||
DWORD ip = ipTable->table[measure->data].dwAddr;
|
||||
wsprintf(sBuffer, L"%i.%i.%i.%i", ip % 256, (ip >> 8) % 256, (ip >> 16) % 256, (ip >> 24) % 256);
|
||||
@ -314,7 +314,7 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data)
|
||||
if (NO_ERROR == GetIpAddrTable((PMIB_IPADDRTABLE)tmpBuffer, &tmpBufferLen, FALSE))
|
||||
{
|
||||
PMIB_IPADDRTABLE ipTable = (PMIB_IPADDRTABLE)tmpBuffer;
|
||||
if (measure->data < ipTable->dwNumEntries)
|
||||
if (measure->data < (int)ipTable->dwNumEntries)
|
||||
{
|
||||
DWORD ip = ipTable->table[measure->data].dwMask;
|
||||
wsprintf(sBuffer, L"%i.%i.%i.%i", ip % 256, (ip >> 8) % 256, (ip >> 16) % 256, (ip >> 24) % 256);
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;HAVE_CONFIG_H;SUPPORT_UTF8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4244;4267;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Urlmon.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -920,14 +920,14 @@ void ParseData(MeasureData* measure, LPCSTR parseData, DWORD dwSize)
|
||||
// Must convert the data to utf8
|
||||
utf8Data = StringUtil::NarrowUTF8((LPCWSTR)parseData, dwSize / 2);
|
||||
parseData = utf8Data.c_str();
|
||||
dwSize = utf8Data.length();
|
||||
dwSize = (DWORD)utf8Data.length();
|
||||
}
|
||||
else if (measure->codepage != CP_UTF8 && measure->codepage != 0) // 0 = CP_ACP
|
||||
{
|
||||
// Must convert the data to utf8
|
||||
utf8Data = ConvertAsciiToUTF8(parseData, dwSize, measure->codepage);
|
||||
parseData = utf8Data.c_str();
|
||||
dwSize = utf8Data.length();
|
||||
dwSize = (DWORD)utf8Data.length();
|
||||
}
|
||||
|
||||
rc = pcre_exec(
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>wlanapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -19,7 +19,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
@ -20,7 +20,6 @@
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>iTunesCOMWindowsSDK;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4018;4090;4114;4351;4786;4800;4996</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
</Link>
|
||||
|
Loading…
Reference in New Issue
Block a user