From 0b8ef1a206ec687f485fb72a56c56a708cee37e6 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 17 Feb 2013 17:35:08 +0200 Subject: [PATCH] Fixed incorrect state logic --- foo_cad/Plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foo_cad/Plugin.cpp b/foo_cad/Plugin.cpp index 6749a54..99b9edb 100644 --- a/foo_cad/Plugin.cpp +++ b/foo_cad/Plugin.cpp @@ -197,7 +197,7 @@ void foo_cad::register_cad(HWND cad) GetModuleFileName(GetModuleHandle(nullptr), filename, MAX_PATH); WCHAR buffer[MAX_PATH + 64]; - int len = _snwprintf_s(buffer, _TRUNCATE, L"1\tCD Art Display IPC Class\tfoobar2000\t%s\t", filename); + int len = wsprintf(buffer, L"1\tCD Art Display IPC Class\tfoobar2000\t%s\t", filename); COPYDATASTRUCT cds; cds.dwData = PM_REGISTER; @@ -359,8 +359,8 @@ LRESULT CALLBACK foo_cad::window_proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA case CM_GETSTATE: { - return pbc->is_playing() ? PS_PLAYING : - pbc->is_paused() ? PS_PAUSED : + return pbc->is_paused() ? PS_PAUSED : + pbc->is_playing() ? PS_PLAYING : PS_STOPPED; }