# Disable the game loop to rely on the GLKView callbacks on each frame instead
redef fun run do end
lib/gamnit/gamnit_ios.nit:31,2--32,21
redef fun run
do
if debug_gamnit then print "run: start"
scene_created = false
while not destroyed do
if not active then
if debug_gamnit then print "run: wait"
app.poll_looper_pause -1
else
if debug_gamnit then print "run: frame"
var native_window = app.native_app_glue.window
assert not native_window.address_is_null
var display = display
assert display != null
var needs_recreate = display.check_egl_context(native_window)
if needs_recreate then
if display.native_window_is_invalid then
# This should be rare and may cause more issues, log it
print "The native window is invalid, skip frame"
set_inactive
continue
end
# The context was lost, reload everything
create_gamnit
recreate_gamnit
end
assert scene_created
frame_full
end
end
if debug_gamnit then print "run: exit"
exit 0
end
lib/gamnit/gamnit_android.nit:235,2--275,4