Skip to content

Commit

Permalink
Fixed incorrect state logic
Browse files Browse the repository at this point in the history
  • Loading branch information
poiru committed Feb 19, 2013
1 parent 64ccf63 commit 0b8ef1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions foo_cad/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 0b8ef1a

Please sign in to comment.