Avoid always calling system.get_window_mode

This commit is contained in:
Francesco Abbate
2021-04-12 13:31:32 +02:00
parent 46791aefe5
commit 4de97d51fb
3 changed files with 16 additions and 2 deletions
+10
View File
@@ -117,6 +117,16 @@ top:
rencache_invalidate();
lua_pushstring(L, "exposed");
return 1;
} else if (e.window.event == SDL_WINDOWEVENT_MINIMIZED) {
lua_pushstring(L, "minimized");
return 1;
} else if (e.window.event == SDL_WINDOWEVENT_MAXIMIZED) {
fprintf(stderr, "maximized event!\n");
lua_pushstring(L, "maximized");
return 1;
} else if (e.window.event == SDL_WINDOWEVENT_RESTORED) {
lua_pushstring(L, "restored");
return 1;
}
if (e.window.event == SDL_WINDOWEVENT_FOCUS_LOST) {
lua_pushstring(L, "focuslost");