From 03f8528315fa46c95991a34f3325d7b33ae5538c Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Sat, 02 May 2020 21:48:36 +0000
Subject: [PATCH] Update source to SDL2 2.0.12

---
 source/include/SDL_test_common.h |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/source/include/SDL_test_common.h b/source/include/SDL_test_common.h
index be2e6b2..3ad2030 100644
--- a/source/include/SDL_test_common.h
+++ b/source/include/SDL_test_common.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -140,11 +140,30 @@
  */
 int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
 
+
+/**
+ * \brief Logs command line usage info.
+ *
+ * This logs the appropriate command line options for the subsystems in use
+ *  plus other common options, and then any application-specific options.
+ *  This uses the SDL_Log() function and splits up output to be friendly to
+ *  80-character-wide terminals.
+ *
+ * \param state The common state describing the test window for the app.
+ * \param argv0 argv[0], as passed to main/SDL_main.
+ * \param options an array of strings for application specific options. The last element of the array should be NULL.
+ */
+void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
+
 /**
  * \brief Returns common usage information
  *
- * \param state The common state describing the test window to create.
+ * You should (probably) be using SDLTest_CommonLogUsage() instead, but this
+ *  function remains for binary compatibility. Strings returned from this
+ *  function are valid until SDLTest_CommonQuit() is called, in which case
+ *  those strings' memory is freed and can no longer be used.
  *
+ * \param state The common state describing the test window to create.
  * \returns String with usage information
  */
 const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
@@ -159,6 +178,17 @@
 SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
 
 /**
+ * \brief Easy argument handling when test app doesn't need any custom args.
+ *
+ * \param state The common state describing the test window to create.
+ * \param argc argc, as supplied to SDL_main
+ * \param argv argv, as supplied to SDL_main
+ *
+ * \returns False if app should quit, true otherwise.
+ */
+SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);
+
+/**
  * \brief Common event handler for test windows.
  *
  * \param state The common state used to create test window.

--
Gitblit v1.9.3