Skip to content

Commit

Permalink
[fix] ffi/SDL2: crash with SDL_FULLSCREEN
Browse files Browse the repository at this point in the history
Only actively used on device ports (Ubuntu Touch, Sailfish), so it was silently broken.

Cf. koreader/koreader#4960 and koreader#899
  • Loading branch information
Frenzie committed Apr 22, 2019
1 parent 4c2ed56 commit dc85617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ffi/SDL2_0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function S.open()

local full_screen = os.getenv("SDL_FULLSCREEN")
if full_screen then
local mode = ffi.new("struct SDL_DisplayMode")
local mode = ffi.new("SDL_DisplayMode")
if SDL.SDL_GetCurrentDisplayMode(0, mode) ~= 0 then
error("SDL cannot get current display mode.")
end
Expand Down

0 comments on commit dc85617

Please sign in to comment.