2025-03-26 09:46:44 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-03-15 19:49:51 +08:00
|
|
|
#ifndef NDEBUG
|
2026-10-03 10:21:08 +08:00
|
|
|
#include "fastfetch.h"
|
|
|
|
|
#include "common/time.h"
|
2025-03-15 19:49:51 +08:00
|
|
|
|
2026-10-03 10:21:08 +08:00
|
|
|
[[gnu::nonnull(1, 3), gnu::format(printf, 3, 4)]]
|
|
|
|
|
void ffDebugPrint(const char* file, int line, const char* format, ...);
|
2025-03-16 10:38:04 +08:00
|
|
|
|
2026-10-03 10:21:08 +08:00
|
|
|
#define FF_DEBUG(format, ...) ffDebugPrint(__FILE__, __LINE__, format, ##__VA_ARGS__)
|
|
|
|
|
|
|
|
|
|
#if _WIN32
|
2026-03-27 20:14:47 +08:00
|
|
|
const char* ffDebugWin32Error(DWORD errorCode);
|
2026-03-14 22:55:16 +08:00
|
|
|
const char* ffDebugNtStatus(NTSTATUS status);
|
2026-06-13 15:20:40 +08:00
|
|
|
const char* ffDebugConfigRet(unsigned long /*CONFIGRET*/ ret);
|
2026-03-27 20:14:47 +08:00
|
|
|
const char* ffDebugHResult(HRESULT hr);
|
2026-10-03 10:21:08 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
#define FF_DEBUG(format, ...) ((void) 0)
|
2026-01-06 09:42:54 +08:00
|
|
|
#endif
|