xbmc/xbmc — pull request #1215 by jabbera (2012-07-25 02:24:57+00:00)
Title: forceClose enableSound bit-wise probably wrong.

I'm determined to figure out this git thing, yet once again I made a mess of a pull request. This should hopefully be better.

(forceClose ? 0x01 : 0 | enableSound ? 0x02 : 0);
is actually (forceClose ? 0x01 : (0 | enableSound) ? 0x02 : 0); based on operator precedence of bit-wise or.

I'm pretty sure based on usage at: https://github.com/xbmc/xbmc/blob/master/xbmc/ApplicationMessenger.cpp#L676

that it should be:
((forceClose ? 0x01 : 0) | (enableSound ? 0x02 : 0));

I'm going to admit I haven't tested this.