aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alffplay.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-11-23 06:41:49 -0800
committerChris Robinson <[email protected]>2022-11-23 06:41:49 -0800
commit3b838bc781ca2a314fa51e08389037ebce34a9cc (patch)
treea468a5266e920138e8367df460a29db37516cd79 /examples/alffplay.cpp
parent4b67a1f667297fed2d0dc4a910800b76e6c02e10 (diff)
Avoid overriding main with SDL
Diffstat (limited to 'examples/alffplay.cpp')
-rw-r--r--examples/alffplay.cpp3
1 files changed, 3 insertions, 0 deletions
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<MovieState> movState;
if(argc < 2)