From 415d4790e29d9dce1ca8f6bcee815e46e2d00f6b Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 21 Mar 2021 17:19:08 -0400 Subject: [PATCH] Fix a crash on first unfocus --- desktop_version/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 57418b5d..823ef0ef 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -249,7 +249,7 @@ static const struct ImplFunc unfocused_func_list[] = { }; static const struct ImplFunc* unfocused_funcs = unfocused_func_list; static int num_unfocused_funcs = SDL_arraysize(unfocused_func_list); -static int unfocused_func_index = -1; +static int unfocused_func_index = 0; // This does not get incremented on start, do NOT use -1! static enum IndexCode increment_unfocused_func_index(void) {