Screen Saver with Love Multiple Monitors

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
layneok
Prole
Posts: 2
Joined: Fri Nov 14, 2014 12:32 am

Screen Saver with Love Multiple Monitors

Post by layneok »

Hi all,

I am enjoying Love, and am working on a screen saver (Windows). However I can't seem figure out how to:
1. Create one form that spans all monitors. OR
2. Blank out (black background multiple forms) each monitor then use love.window.setMode display=1 to display SS on the primary monitor.

Any ideas or suggestions?

Thanks!
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: Screen Saver with Love Multiple Monitors

Post by rmcode »

Welcome to the forums layneok,

Regarding your first question, I don't think that it is possible (at this moment), but I could be wrong.

If you use the "normal" FullscreenType it should blank the other monitors. You could use a conf.lua to set these values before the screensaver is launched.

Code: Select all

function love.conf(t)
[...]
    t.window.fullscreen = true;
    t.window.fullscreentype = "normal";
    t.window.display = 1;
[...]
end
Hope that helps.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Screen Saver with Love Multiple Monitors

Post by zorg »

First, you can't make multiple windows with löve, so your only chance is #1, one form across all monitors.

Now, i think you can create a non-resizable, borderless window that'd span all your monitors, but there is one big issue with it that would prevent it from working on computers other than yours (if they also have multiple monitors):

Since löve only gives you access to the SDL functionality, that gives you the position of the window relative to the display where it's topleft corner is, and there's no way to get how the screens are positioned relatively to each other, you can't programatically deduce (you can't make the program figure it out by itself) which display id is the "leftmost", where it should place the "oversized, spanning all screens" window.

But if you only want this to work on your own computer, or if you allow others to manually set their screen's offsets relative to the leftmost, then you can probably have this working.

Another thing is that this way, the window would not be "always on top", so it would only behave like a screensaver up to the point where another application's window would get focus, popping up above it.

Hope this wasn't too complex an answer, ask if i didn't make any sense somewhere! :3
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests