diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-16 17:42:08 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-16 17:42:08 +0000 |
commit | 5975b2d0903bd5df128d55e20cd27d7c13b4e46c (patch) | |
tree | 6696492511c591fa8bf3b65a64864245caa3e7c2 /plugins/ListeningTo | |
parent | 8617d7e00546f892c9084f7c382648b23d8bbb63 (diff) |
another portion of "#ifdef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@448 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ListeningTo')
-rw-r--r-- | plugins/ListeningTo/options.cpp | 4 | ||||
-rw-r--r-- | plugins/ListeningTo/players/generic.cpp | 17 | ||||
-rw-r--r-- | plugins/ListeningTo/players/watrack.cpp | 8 | ||||
-rw-r--r-- | plugins/ListeningTo/players/wmp.cpp | 6 |
4 files changed, 11 insertions, 24 deletions
diff --git a/plugins/ListeningTo/options.cpp b/plugins/ListeningTo/options.cpp index 27dc7f6fea..3c93cf9855 100644 --- a/plugins/ListeningTo/options.cpp +++ b/plugins/ListeningTo/options.cpp @@ -145,7 +145,7 @@ BOOL IsTypeEnabled(LISTENINGTOINFO *lti) if (lti == NULL)
return TRUE;
-#ifdef UNICODE
+
if (lti->dwFlags & LTI_UNICODE) {
if (lstrcmpi(lti->ptszType, _T("Music")) == 0)
return opts.enable_music;
@@ -156,7 +156,7 @@ BOOL IsTypeEnabled(LISTENINGTOINFO *lti) return opts.enable_others;
}
else
-#endif
+
{
if (strcmpi(lti->pszType, "Music") == 0)
return opts.enable_music;
diff --git a/plugins/ListeningTo/players/generic.cpp b/plugins/ListeningTo/players/generic.cpp index 2300ace336..62582ab7bc 100644 --- a/plugins/ListeningTo/players/generic.cpp +++ b/plugins/ListeningTo/players/generic.cpp @@ -51,10 +51,10 @@ int m_log(const TCHAR *function, const TCHAR *fmt, ...) if (fp != NULL)
{
-#ifdef UNICODE
+
if (writeBOM)
fwprintf(fp, L"\xFEFF");
-#endif
+
_ftprintf(fp, _T("%s\r\n"), text);
fclose(fp);
@@ -157,12 +157,9 @@ void GenericPlayer::ProcessReceived() Player *player = this;
for (int i = FIRST_PLAYER; i < NUM_PLAYERS; i++)
{
-#ifdef UNICODE
+
WCHAR *player_name = players[i]->name;
-#else
- WCHAR player_name[128];
- MultiByteToWideChar(CP_ACP, 0, players[i]->name, -1, player_name, MAX_REGS(player_name));
-#endif
+
if (_wcsicmp(parts[1], player_name) == 0)
{
player = players[i];
@@ -274,11 +271,9 @@ void GenericPlayer::NewData(const WCHAR *data, size_t len) wcsncpy(received, data, len);
received[len] = L'\0';
-//#ifdef UNICODE
+
// m_log(_T("NewData"), _T("Text: %s"), received);
-//#else
-// m_log(_T("NewData"), _T("Text: %S"), received);
-//#endif
+
if (hTimer)
KillTimer(NULL, hTimer);
diff --git a/plugins/ListeningTo/players/watrack.cpp b/plugins/ListeningTo/players/watrack.cpp index bace34d2a4..133c97e57f 100644 --- a/plugins/ListeningTo/players/watrack.cpp +++ b/plugins/ListeningTo/players/watrack.cpp @@ -87,19 +87,13 @@ void WATrack::NewStatus(int event, int value) void WATrack::GetData()
{
-#ifdef UNICODE
+
SONGINFO *si = NULL;
int playing = CallService(MS_WAT_GETMUSICINFO, WAT_INF_UNICODE, (LPARAM) &si);
-#else
-
- SONGINFOA *si = NULL;
-
- int playing = CallService(MS_WAT_GETMUSICINFO, WAT_INF_ANSI, (LPARAM) &si);
-#endif
FreeData();
diff --git a/plugins/ListeningTo/players/wmp.cpp b/plugins/ListeningTo/players/wmp.cpp index a146976508..a636a45119 100644 --- a/plugins/ListeningTo/players/wmp.cpp +++ b/plugins/ListeningTo/players/wmp.cpp @@ -154,11 +154,9 @@ void WindowsMediaPlayer::NewData(const WCHAR *data, size_t len) wcsncpy(received, data, len);
received[len] = L'\0';
-/*#ifdef UNICODE
+/*
m_log(_T("ReceiverWndProc"), _T("WMP : New data: [%d] %s"), len, received);
-#else
- m_log(_T("ReceiverWndProc"), _T("WMP : New data: [%d] %S"), len, received);
-#endif
+
*/
if (hTimer)
KillTimer(NULL, hTimer);
|