Advertisement
N3rdsWithGame

pausebuffer.lua

Jul 30th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local keys = input.get()
  2. local unpauseLag=false
  3. local consecutiveLagFrames=0
  4.  
  5. while true do
  6.     if consecutiveLagFrames>10 then
  7.         unpauseLag=true
  8.     end
  9.     if unpauseLag then
  10.         if not emu.islagged() then
  11.             joypad.set({Start=1},1)
  12.             unpauseLag=false
  13.         end
  14.     end
  15.     if emu.islagged() then
  16.         consecutiveLagFrames= consecutiveLagFrames + 1
  17.     else
  18.         consecutiveLagFrames=0
  19.     end
  20.     emu.frameadvance()
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement