Extremely silly mistake. I'm trying to reach for the largest possible canvas a reasonable graphics card has memory for, not a realistic monitor resolution.
6KWWBTHIBL5OC34J2QFGMVZHPMIGFHVICSABW2UP34OJO67J7EGQC
assert(settings.width < 4096 and settings.height < 4096, "You've hit a bug Kartik has been chasing for a while. Please let me know by emailing ak@akkartik.com, I'd really appreciate it.")
assert(settings.width < 4096 and settings.height < 4096, "You've hit an SDL limit. Please email Kartik at ak@akkartik.com, I'll ask you a couple of questions and create a workaround for you.")
local w = math.min(1600, Global_viewport.w)
local h = math.min(1600, Global_viewport.h)
-- Things go very bad if the canvas gets too large.
-- Even though it's in memory, LÖVE seems to use memory in the graphics card to write graphics to it.
-- If the canvas is too big to fit in graphics card memory, you get an unrecoverable error.
-- So I try to keep it from getting too large. But with a hard-coded constant because
-- I don't know how to measure how much graphics memory a computer has.
-- It might not protect older computers.
-- This is the place to experiment with if you run into an error about SDL limits and contacting Kartik.
local w = math.min(16000, Global_viewport.w)
local h = math.min(16000, Global_viewport.h)