aboutsummaryrefslogtreecommitdiff
path: root/src/demorec.c
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-03-10 20:37:28 +0000
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-04-06 16:41:13 +0100
commitdaa55cade14146f04814cf8a7ad2028becf4db66 (patch)
tree62933a231e8068f4498596a9064f59e1a4842723 /src/demorec.c
parent244fea664121acf12871ab5858a5fe95a2606b52 (diff)
downloadsst-daa55cade14146f04814cf8a7ad2028becf4db66.tar.gz
sst-daa55cade14146f04814cf8a7ad2028becf4db66.zip
Use C23 void-argument-free prototypes
In the future we can also consider moving to {} instead of {0} for initialisers, but my old Clang (16) doesn't support this, so it might be wise to wait longer on that one so people don't need too bleeding-edge of a compiler just to build this thing.
Diffstat (limited to 'src/demorec.c')
-rw-r--r--src/demorec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/demorec.c b/src/demorec.c
index 66ffa1d..039b24e 100644
--- a/src/demorec.c
+++ b/src/demorec.c
@@ -52,8 +52,8 @@ bool demorec_forceauto = false;
#define SIGNONSTATE_SPAWN 5
#define SIGNONSTATE_FULL 6
-DEF_PREDICATE(DemoControlAllowed, void)
-DEF_EVENT(DemoRecordStarting, void)
+DEF_PREDICATE(DemoControlAllowed)
+DEF_EVENT(DemoRecordStarting)
DEF_EVENT(DemoRecordStopped, int)
typedef void (*VCALLCONV SetSignonState_func)(void *, int);
@@ -169,7 +169,7 @@ static void hook_stop_cb(const struct con_cmdargs *args) {
wantstop = false;
}
-static inline bool find_demorecorder(void) {
+static inline bool find_demorecorder() {
#ifdef _WIN32
const uchar *insns = (const uchar *)orig_stop_cb;
// The stop command loads `demorecorder` into ECX to call IsRecording()
@@ -241,7 +241,7 @@ bool demorec_start(const char *name) {
return *recording;
}
-int demorec_stop(void) {
+int demorec_stop() {
// note: our set-to-0-and-back hack actually has the nice side effect of
// making this correct when recording and stopping in the menu lol
int ret = *demonum;
@@ -250,7 +250,7 @@ int demorec_stop(void) {
return ret;
}
-int demorec_demonum(void) {
+int demorec_demonum() {
return *recording ? *demonum : -1;
}