koreader/koreader-base

SDL: Disables screensaver

JasonInOttawa opened this issue · 8 comments

SDL 2.0 defaults to "disable screensaver", so leaving the emulator running keeps the screensaver from starting (at least it does on a Mac).

The attached files call SDL_EnableScreensaver to fix this.

SDL2_0.lua.txt
SDL2_0_h.lua.txt

pmset -g assertions

pid 56400(luajit): [0x0001681a00059f9b] 00:00:06 PreventUserIdleDisplaySleep named: "luajit using SDL_DisableScreenSaver"

Alternatively setting this environment variable enables the screensaver

export SDL_VIDEO_ALLOW_SCREENSAVER=1

Thanks, sounds good. You don't want to put it in a PR? :-)

Thanks, I will do that.

Would adding the environment variable to the kodev script be a good way to proceed?

What you've proposed here seems better to me, applicable to all (SDL) platforms in all conditions.

(As opposed to adding that environment variable to all the individual scripts.)

Thanks again. Would adding it to the kodev script also propagate the change to the Linux deb/rpm?

(I'm not sure how much of this works)

Sorry, I misunderstood. I will put the code changes to the SDL lua files in a PR

The change is in PR 1091