mirror of
https://github.com/itsPLK/ps5-payload-manager.git
synced 2026-10-22 03:42:51 -05:00
27 lines
686 B
C
27 lines
686 B
C
#include "notification.h"
|
|
#include "pldmgr.h"
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
/* PS5 SDK Function */
|
|
int sceKernelSendNotificationRequest(int device, notify_request_t *request,
|
|
size_t size, int unused);
|
|
|
|
void pldmgr_notify(const char *fmt, ...) {
|
|
notify_request_t req;
|
|
va_list args;
|
|
|
|
memset(&req, 0, sizeof(req));
|
|
va_start(args, fmt);
|
|
vsnprintf(req.message, sizeof(req.message), fmt, args);
|
|
va_end(args);
|
|
|
|
/* Send to PS5 notification system */
|
|
sceKernelSendNotificationRequest(0, &req, sizeof(req), 0);
|
|
|
|
/* Also write to internal log */
|
|
pldmgr_log("[Notify] %s\n", req.message);
|
|
}
|