mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
17 lines
397 B
C
17 lines
397 B
C
/**
|
|
* @file detect.h
|
|
* @brief Kernel capability detection
|
|
* @author plutoo
|
|
* @copyright libnx Authors
|
|
*/
|
|
#pragma once
|
|
#include "../types.h"
|
|
#include "svc.h"
|
|
|
|
/// Returns true if the process has a debugger attached.
|
|
NX_INLINE bool detectDebugger(void) {
|
|
u64 tmp = 0;
|
|
Result rc = svcGetInfo(&tmp, InfoType_DebuggerAttached, INVALID_HANDLE, 0);
|
|
return R_SUCCEEDED(rc) && tmp != 0;
|
|
}
|