Merge text0

[?]
Sep 4, 2023, 9:17 PM
UZHSWA3DU3BPK6AGNIVZUEGPRTHIBA7SSX4DRUN3K4D42KNNN4YQC

Dependencies

  • [2] NILDKUJV Merge text0
  • [3] KE4T63TS stop using keyboard.isDown
  • [4] ORRSP7FV deduce test names on failures
  • [5] HLIF3YQE Merge text0
  • [6] AVTNUQYR basic test-enabled framework
  • [7] 7IDHIAYI rename modifier_down to key_down
  • [8] JFFUF5AL override mouse state lookups in tests
  • [9] N4T2HHMV Merge text0
  • [10] HKV72RZV bugfix: save modified files in save directory
  • [11] JNJ4R56X support running tests multiple times
  • [12] ED4Z6ORC cleaner API for file-system access
  • [13] JCXL74WV bring back everything from commit a68647ae22
  • [14] FPY4LO2W make a few names consistent with snake_case
  • [*] 3QNOKBFM beginnings of a test harness
  • [*] CUFW4EJL reorganize app.lua and its comments

Change contents

  • edit in app.lua at line 2
    [2.49]
    [2.49]
    local Keys_down = {}
  • edit in app.lua at line 9
    [17.69]
    [17.69]
    -- * recover from errors (by sending them to the driver and waiting for a command)
  • replacement in app.lua at line 20
    [4.137][4.137:175]()
    love.handlers[name] = App[name]
    [4.137]
    [4.175]
    -- love.keyboard.isDown doesn't work on Android, so emulate it using
    -- keypressed and keyreleased events
    if name == 'keypressed' then
    love.handlers[name] = function(key, scancode, isrepeat)
    Keys_down[key] = true
    return App.keypressed(key, scancode, isrepeat)
    end
    elseif name == 'keyreleased' then
    love.handlers[name] = function(key, scancode)
    Keys_down[key] = nil
    return App.keyreleased(key, scancode)
    end
    else
    love.handlers[name] = App[name]
    end
  • replacement in app.lua at line 66
    [4.950][4.950:994]()
    -- dispatch some methods to real hardware
    [4.950]
    [4.994]
    -- other methods dispatch to real hardware
  • replacement in app.lua at line 99
    [2.883][4.18:56](),[4.1641][4.18:56]()
    App.key_down = love.keyboard.isDown
    [2.883]
    [4.1684]
    App.key_down = function(key) return Keys_down[key] end
  • edit in app.lua at line 489
    [4.16026][3.36:58](),[4.16026][3.36:58](),[4.7787][3.59:755](),[4.7787][3.59:755](),[4.1018][3.756:813](),[4.1018][3.756:813](),[4.1018][3.756:813]()
    local Keys_down = {}
    -- love.keyboard.isDown doesn't work on Android, so emulate it using
    -- keypressed and keyreleased events
    if name == 'keypressed' then
    love.handlers[name] = function(key, scancode, isrepeat)
    Keys_down[key] = true
    return App.keypressed(key, scancode, isrepeat)
    end
    elseif name == 'keyreleased' then
    love.handlers[name] = function(key, scancode)
    Keys_down[key] = nil
    return App.keyreleased(key, scancode)
    end
    else
    love.handlers[name] = App[name]
    end
    App.key_down = function(key) return Keys_down[key] end