Demo cleanup/enhance
This commit is contained in:
parent
84d2e8b9c1
commit
584bf2b30c
3 changed files with 19 additions and 20 deletions
|
|
@ -132,8 +132,8 @@ Wii.parsePrimaryWiimote = function(e) {
|
|||
* Filter down and figure out which "event" we're really looking at based on code
|
||||
* matchups; this gets messy pretty quickly...
|
||||
*/
|
||||
if(typeof buttonPressed !== 'undefined' && wii_remote.evtsInterestedIn[buttonPressed] !== 'undefined') {
|
||||
try { wii_remote.evtsInterestedIn[buttonPressed](wii_remote, wii_remoteCurrStatus); } catch(e) { alert(e.message); alert(Wii.currentBrowsingRemote); }
|
||||
if(typeof buttonPressed !== 'undefined' && typeof wii_remote.evtsInterestedIn[buttonPressed] === 'function') {
|
||||
wii_remote.evtsInterestedIn[buttonPressed](wii_remote, wii_remoteCurrStatus);
|
||||
}
|
||||
|
||||
/* Doing this in conjunction with preventDefault() halts an odd clicking bug or two. */
|
||||
|
|
|
|||
|
|
@ -156,8 +156,7 @@ Wii.parsePrimaryWiimote = function(e) {
|
|||
* matchups; this gets messy pretty quickly...
|
||||
*/
|
||||
if(typeof buttonPressed !== 'undefined' && typeof wii_remote.evtsInterestedIn[buttonPressed] === 'function') {
|
||||
try { wii_remote.evtsInterestedIn[buttonPressed](wii_remote, wii_remoteCurrStatus);
|
||||
} catch(e) { alert(e.message); }
|
||||
wii_remote.evtsInterestedIn[buttonPressed](wii_remote, wii_remoteCurrStatus);
|
||||
}
|
||||
|
||||
/* Doing this in conjunction with preventDefault() halts an odd clicking bug or two. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue