Skip to content
This repository
Browse code

[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 authored January 16, 2013
4  xbmc/main/osx/SDLMain.mm
@@ -417,7 +417,7 @@ - (void) deviceDidUnMountNotification:(NSNotification *) note
417 417
   [pool release];
418 418
 }
419 419
 
420  
-#define VK_SLEEP            0x5F
  420
+#define VK_SLEEP            0x143
421 421
 #define VK_VOLUME_MUTE      0xAD
422 422
 #define VK_VOLUME_DOWN      0xAE
423 423
 #define VK_VOLUME_UP        0xAF
@@ -428,7 +428,7 @@ - (void) deviceDidUnMountNotification:(NSNotification *) note
428 428
 #define VK_REWIND           0x9D
429 429
 #define VK_FAST_FWD         0x9E
430 430
 
431  
-- (void)MediaKeyPower
  431
+- (void)powerKeyNotification
432 432
 {
433 433
   SDL_Event event;
434 434
   memset(&event, 0, sizeof(event));
3  xbmc/osx/HotKeyController.m
@@ -294,7 +294,8 @@ - (id)init
294 294
     m_active = NO;
295 295
     m_eventPort = NULL;
296 296
     m_runLoopSource = NULL;
297  
-    m_controlSysPower = NO;
  297
+    // power button controls xbmc sleep button (this will also trigger the osx shutdown menu - we can't prevent this as it seems)
  298
+    m_controlSysPower = YES;
298 299
     m_controlSysVolume = YES; // volume keys control xbmc volume
299 300
   }
300 301
   return self;

0 notes on commit 2fbabe5

Please sign in to comment.
Something went wrong with that request. Please try again.