From 3b838bc781ca2a314fa51e08389037ebce34a9cc Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 23 Nov 2022 06:41:49 -0800 Subject: Avoid overriding main with SDL --- examples/alffplay.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/alffplay.cpp') diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp index ef7aa89d..ae40a51a 100644 --- a/examples/alffplay.cpp +++ b/examples/alffplay.cpp @@ -57,6 +57,7 @@ constexpr auto AVErrorEOF = AVERROR_EOF; struct SwsContext; } +#define SDL_MAIN_HANDLED #include "SDL.h" #ifdef __GNUC__ _Pragma("GCC diagnostic pop") @@ -1899,6 +1900,8 @@ std::ostream &operator<<(std::ostream &os, const PrettyTime &rhs) int main(int argc, char *argv[]) { + SDL_SetMainReady(); + std::unique_ptr movState; if(argc < 2) -- cgit v1.2.3