From 3fd61b0535d2102658cea39767d27984a7031298 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 20 Mar 2025 16:42:40 -0700 Subject: [PATCH] Updated for SDL style --- test/testmessage.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/testmessage.c b/test/testmessage.c index 1387119523..97c796085e 100644 --- a/test/testmessage.c +++ b/test/testmessage.c @@ -23,8 +23,7 @@ #endif /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ -static void -quit(int rc) +static void quit(int rc) { SDL_Quit(); /* Let 'main()' return normally */ @@ -33,8 +32,7 @@ quit(int rc) } } -static int SDLCALL -button_messagebox(void *eventNumber) +static int SDLCALL button_messagebox(void *eventNumber) { int i; const SDL_MessageBoxButtonData buttons[] = { @@ -53,7 +51,7 @@ button_messagebox(void *eventNumber) NULL, /* no parent window */ "Custom MessageBox", "This is a custom messagebox", - sizeof(buttons) / sizeof(SDL_MessageBoxButtonData), + SDL_arraysize(buttons), NULL, /* buttons */ NULL /* Default color scheme */ };