Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

  1. //===== Copyright � 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #include "mm_title_richpresence.h"
  7. // memdbgon must be the last include file in a .cpp file!!!
  8. #include "tier0/memdbgon.h"
  9. static void SetAllUsersContext( DWORD dwContextId, DWORD dwValue, bool bAsync = true )
  10. {
  11. #ifdef _X360
  12. for ( int k = 0; k < ( int ) XBX_GetNumGameUsers(); ++ k )
  13. {
  14. if ( XBX_GetUserIsGuest( k ) )
  15. continue;
  16. int iCtrlr = XBX_GetUserId( k );
  17. if ( bAsync )
  18. XUserSetContextEx( iCtrlr, dwContextId, dwValue, MMX360_NewOverlappedDormant() );
  19. else
  20. XUserSetContext( iCtrlr, dwContextId, dwValue );
  21. }
  22. #endif
  23. }
  24. static void SetAllUsersProperty( DWORD dwPropertyId, DWORD cbValue, void const *pvValue )
  25. {
  26. #ifdef _X360
  27. for ( int k = 0; k < ( int ) XBX_GetNumGameUsers(); ++ k )
  28. {
  29. if ( XBX_GetUserIsGuest( k ) )
  30. continue;
  31. int iCtrlr = XBX_GetUserId( k );
  32. XUserSetPropertyEx( iCtrlr, dwPropertyId, cbValue, pvValue, MMX360_NewOverlappedDormant() );
  33. }
  34. #endif
  35. }
  36. KeyValues * MM_Title_RichPresence_PrepareForSessionCreate( KeyValues *pSettings )
  37. {
  38. return NULL;
  39. }
  40. void MM_Title_RichPresence_Update( KeyValues *pFullSettings, KeyValues *pUpdatedSettings )
  41. {
  42. }
  43. void MM_Title_RichPresence_PlayersChanged( KeyValues *pFullSettings )
  44. {
  45. }