diff options
Diffstat (limited to 'zencore/zencore.cpp')
| -rw-r--r-- | zencore/zencore.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/zencore/zencore.cpp b/zencore/zencore.cpp index d0b1135dc..122719d90 100644 --- a/zencore/zencore.cpp +++ b/zencore/zencore.cpp @@ -67,6 +67,23 @@ IsDebuggerPresent() #endif } +bool +IsInteractiveSession() +{ +#if ZEN_PLATFORM_WINDOWS + DWORD dwSessionId = 0; + if (ProcessIdToSessionId(GetCurrentProcessId(), &dwSessionId)) + { + return (dwSessionId != 0); + } + + return false; +#else + // TODO: figure out what makes sense here + return true; +#endif +} + ////////////////////////////////////////////////////////////////////////// static int s_ApplicationExitCode = 0; |