Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[osx] - fix sleep button for nyxboard - use the sleep button key code…

… which will be introduced via PR #2077
  • Loading branch information...
commit 2fbabe588bed625340d9127ef624a1aeedd09de9 1 parent efd6686
@Memphiz Memphiz authored
Showing with 4 additions and 3 deletions.
  1. +2 −2 xbmc/main/osx/SDLMain.mm
  2. +2 −1  xbmc/osx/HotKeyController.m
View
4 xbmc/main/osx/SDLMain.mm
@@ -417,7 +417,7 @@ - (void) deviceDidUnMountNotification:(NSNotification *) note
[pool release];
}
-#define VK_SLEEP 0x5F
+#define VK_SLEEP 0x143
#define VK_VOLUME_MUTE 0xAD
#define VK_VOLUME_DOWN 0xAE
#define VK_VOLUME_UP 0xAF
@@ -428,7 +428,7 @@ - (void) deviceDidUnMountNotification:(NSNotification *) note
#define VK_REWIND 0x9D
#define VK_FAST_FWD 0x9E
-- (void)MediaKeyPower
+- (void)powerKeyNotification
{
SDL_Event event;
memset(&event, 0, sizeof(event));
View
3  xbmc/osx/HotKeyController.m
@@ -294,7 +294,8 @@ - (id)init
m_active = NO;
m_eventPort = 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
}
return self;
Please sign in to comment.
Something went wrong with that request. Please try again.