use debug to print debug info

This commit is contained in:
Qingping Hou
2012-04-19 00:16:49 +08:00
parent 35e4ceaf57
commit 3306346dba
14 changed files with 47 additions and 49 deletions

View File

@@ -254,7 +254,7 @@ function adjustKeyEvents(ev)
end
end
-- This should not happen.
print("# Unrecognizable rotation mode "..Screen.cur_rotation_mode.."!")
debug("# Unrecognizable rotation mode "..Screen.cur_rotation_mode.."!")
return nil
end
@@ -264,7 +264,7 @@ function input.saveWaitForEvent(timeout)
while retry do
local ok, ev = pcall(input.waitForEvent, timeout)
if not ok then
print("got error waiting for events:", ev)
debug("got error waiting for events:", ev)
if ev == "Waiting for input failed: 4\n" then
-- EINTR, we got interrupted. Try and restart
retry = true