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FEISDB6BY7KDAC
GFXWHTE6POBIOBUMRAWD5QS22JEO52EF4VTLMB4CDK4RLSCK7HCAC
2Y7YH7UPQWDNYDJN4BYY2MOHA36B2BIRX6DMIAKHJPQC7UP2R6NQC
2CK5QI7WA7M4IVSACFGOJYAIDKRUTZVMMPSFWEJTUNMWTN7AX4NAC
3QNOKBFMKBGXBVJIRHR2444JRRMBTABHE4674NR3DT67RRM2X6GAC
JCXL74WVQ23V53EOCKA2NXQIYA5NNOXGN5WYC7ZW42EI2I6D5IJAC
PESSMQBJCOIA5PYNVKUG4D25VTFIG44QVCAOFRD4PKOJNW2AIHKAC
KRLRRLVGMTN66AWJ3EB6P6ZLFSGVBMMGACA7I4FXCGVRNTKOYV7AC
CUFW4EJL75OAA5BS5EXGTM5RMRNJOBBPAXUJADGZ3VLP2ZMKFOTAC
A4BSGS2CX4JK7IELL655EC6HAY6ILCWTGIHWZXHRGQOKU3HSUPLAC
ECBDENZ4ZEIYS3FJQNTIW2NITDIQLYUFPIPA7KV4Z5TYVI5EECPAC
VMV4LBR4O26OBLEBKG5UD53H5JOIZOTSVVJ5PNZCPG54PHMLYEFAC
BJ5X5O4ACBBJ56LRBBSTCW6IBQP4HAEOOOPNH3SKTA4F66YTOIDAC
QFOQPDDW2C7TDPDNT67VU76HGZGTFXQY52R3BNONU5C4F5NYPAOQC
2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC
function App.version_check()
Mode = 'version_check'
Supported_versions = {'11.5', '11.4', '11.3', '11.2', '11.1', '11.0', '12.0'} -- put the recommended version first
local minor_version
Major_version, minor_version = love.getVersion()
Version = Major_version..'.'..minor_version
if array.find(Supported_versions, Version) then
Mode = 'run'
end
end
if Current_app == nil then
Current_app = 'run'
elseif current_app_is_warning() then
if Current_app == 'run' then
run.initialize_globals()
elseif Current_app == 'source' then
source.initialize_globals()
elseif current_app_is_warning() then
else
assert(false, 'unknown app "'..Current_app..'"')
end
function App.initialize_globals()
Supported_versions = {'11.5', '11.4', '12.0'} -- put the recommended version first
check_love_version_for_tests()
-- Another weird bit for a class of corner cases. E.g.:
-- * I press ctrl+e, switch Current_app. I don't want the new app to receive
-- text_input and key_release events.
-- If I try to avoid text_input events by switching modes on key_release, I
-- hit a new problem:
-- * I press ctrl+e, am running an untested version, Current_app goes to
-- 'warning', and immediately rolls back out of 'warning' in the
-- key_release event.
-- Skip_rest_of_key_events is ugly, but feels cleaner than creating yet
-- another possible value for Current_app.
Skip_rest_of_key_events = nil
end
check_love_version()
end
function check_love_version()
if array.find(Supported_versions, Version) == nil then
Mode = 'version_check'
-- continue initializing everything; hopefully we won't have errors during initialization
love.graphics.printf(("This app doesn't support version %s; please use version %s. Press any key to try it with this version anyway."):format(Version, Supported_versions[1]), 40,40, 400)
love.graphics.printf(("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1]), 40,40, 400)
elseif current_app_is_warning() then
love.graphics.printf(Current_app.message, 40,40, 600)
Skip_rest_of_key_events = nil
if current_app_is_warning() then
else
clear_warning()
Skip_rest_of_key_events = true
Skip_rest_of_key_events = true
end
if Skip_rest_of_key_events then return end
if Current_app == 'run' then
if current_app_is_warning() then return end
if current_app_is_warning() then return end
if current_app_is_warning() then return end
if current_app_is_warning() then return end
end
function current_app_is_warning()
return type(Current_app) == 'table' and Current_app.name == 'warning'
end
function show_warning(message)
assert(type(Current_app) == 'string')
Current_app = {
name = 'warning',
message = message,
next_app = Current_app,
}
function clear_warning()
assert(type(Current_app) == 'table')
Current_app = Current_app.next_app
if current_app_is_warning() then return end
function check_love_version()
if array.find(Supported_versions, Version) == nil then
show_warning(
("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1]))
-- continue initializing everything; hopefully we won't have errors during initialization
end
end
if current_app_is_warning() then return end
error('There were test failures:\n\n'..table.concat(Test_errors))
local error_message = ''
if Warning_before_tests then
error_message = Warning_before_tests..'\n\n'
end
error_message = error_message .. ('There were %d test failures:\n%s'):format(#Test_errors, table.concat(Test_errors))
error(error_message)
function App.love_version()
local major_version, minor_version = love.getVersion()
local version = major_version..'.'..minor_version
return version, major_version
end
App = {}
App = {}
function App.love_version()
local major_version, minor_version = love.getVersion()
local version = major_version..'.'..minor_version
return version, major_version
end
local error_message = ''
if Warning_before_tests then
error_message = Warning_before_tests..'\n\n'
end
error_message = error_message .. ('There were %d test failures:\n%s'):format(#Test_errors, table.concat(Test_errors))
error(error_message)
Version, Major_version = App.love_version()
* run with an untested version. Error message pops up. Press a key. Text editor comes up, and doesn't receive the key. Press ctrl+e. Error pops up. Press a key. Source editor opens up. Press ctrl+e. Error pops up. Press a key. Text editor returns.
* create a couple of spuriously failing tests. Run with an untested version. Error message includes message about untested version.