summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/steam_proto.h')
-rw-r--r--protocols/Steam/src/steam_proto.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h
index e2a76fa44b..6ee5b79a8a 100644
--- a/protocols/Steam/src/steam_proto.h
+++ b/protocols/Steam/src/steam_proto.h
@@ -316,7 +316,20 @@ protected:
static INT_PTR CALLBACK BlockListOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
// helpers
- inline int IdleSeconds() { return m_idleTS ? time(0) - m_idleTS : 0; }
+ inline int IdleSeconds() {
+ // Based on idle time we report Steam server will mark us as online/away/snooze
+ switch (this->m_iStatus) {
+ case ID_STATUS_AWAY:
+ return STEAM_API_IDLEOUT_AWAY;
+ case ID_STATUS_NA:
+ return STEAM_API_IDLEOUT_SNOOZE;
+ default:
+ return 0;
+ }
+
+ // ... or we can report real idle info
+ // return m_idleTS ? time(0) - m_idleTS : 0;
+ }
};
int OnReloadIcons(WPARAM wParam, LPARAM lParam);