mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 01:38:12 +00:00
(runloop_msg) Add rarch_main_msg_queue_pushf()
This commit is contained in:
parent
6a99893705
commit
6dfa580dfa
@ -30,6 +30,9 @@
|
||||
#ifndef snprintf
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#ifndef vsnprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef UNICODE /* Do not bother with UNICODE at this time. */
|
||||
|
@ -344,6 +344,9 @@ int rarch_main_iterate(unsigned *sleep_ms);
|
||||
void rarch_main_msg_queue_push(const char *msg, unsigned prio,
|
||||
unsigned duration, bool flush);
|
||||
|
||||
void rarch_main_msg_queue_pushf(unsigned prio, unsigned duration,
|
||||
bool flush, const char *fmt, ...);
|
||||
|
||||
void rarch_main_msg_queue_push_new(uint32_t hash, unsigned prio,
|
||||
unsigned duration, bool flush);
|
||||
|
||||
|
@ -89,6 +89,17 @@ void rarch_main_msg_queue_push(const char *msg, unsigned prio, unsigned duration
|
||||
}
|
||||
}
|
||||
|
||||
void rarch_main_msg_queue_pushf(unsigned prio, unsigned duration,
|
||||
bool flush, const char *fmt, ...)
|
||||
{
|
||||
char buf[1024];
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
va_end(ap);
|
||||
rarch_main_msg_queue_push(buf, prio, duration, flush);
|
||||
}
|
||||
|
||||
void rarch_main_msg_queue_free(void)
|
||||
{
|
||||
if (!g_msg_queue)
|
||||
|
Loading…
Reference in New Issue
Block a user