Skip to content

Commit

Permalink
[osx] - fix sleep button for nyxboard - use the sleep button key code…
Browse files Browse the repository at this point in the history
… which will be introduced via PR #2077
  • Loading branch information
Memphiz committed Jan 16, 2013
1 parent efd6686 commit 2fbabe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xbmc/main/osx/SDLMain.mm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ - (void) deviceDidUnMountNotification:(NSNotification *) note
[pool release]; [pool release];
} }


#define VK_SLEEP 0x5F #define VK_SLEEP 0x143
#define VK_VOLUME_MUTE 0xAD #define VK_VOLUME_MUTE 0xAD
#define VK_VOLUME_DOWN 0xAE #define VK_VOLUME_DOWN 0xAE
#define VK_VOLUME_UP 0xAF #define VK_VOLUME_UP 0xAF
Expand All @@ -428,7 +428,7 @@ - (void) deviceDidUnMountNotification:(NSNotification *) note
#define VK_REWIND 0x9D #define VK_REWIND 0x9D
#define VK_FAST_FWD 0x9E #define VK_FAST_FWD 0x9E


- (void)MediaKeyPower - (void)powerKeyNotification
{ {
SDL_Event event; SDL_Event event;
memset(&event, 0, sizeof(event)); memset(&event, 0, sizeof(event));
Expand Down
3 changes: 2 additions & 1 deletion xbmc/osx/HotKeyController.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ - (id)init
m_active = NO; m_active = NO;
m_eventPort = NULL; m_eventPort = NULL;
m_runLoopSource = NULL; m_runLoopSource = NULL;
m_controlSysPower = NO; // power button controls xbmc sleep button (this will also trigger the osx shutdown menu - we can't prevent this as it seems)
m_controlSysPower = YES;
m_controlSysVolume = YES; // volume keys control xbmc volume m_controlSysVolume = YES; // volume keys control xbmc volume
} }
return self; return self;
Expand Down

0 comments on commit 2fbabe5

Please sign in to comment.