Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpoutReceiver.exe /// full screen #52

Closed
nuclearsugar opened this issue Jul 2, 2020 · 17 comments
Closed

SpoutReceiver.exe /// full screen #52

nuclearsugar opened this issue Jul 2, 2020 · 17 comments

Comments

@nuclearsugar
Copy link

nuclearsugar commented Jul 2, 2020

When using the SpoutReceiver.exe application, the full screen option will always use the 'main display' (determined in the Windows display settings).

Would it be possible to instead full screen to the monitor that the SpoutReceiver.exe window is currently located within?

  • I've searched extensively for a alternative Spout Receiver that can simply full screen a Spout stream to a specific monitor, but it doesn't exist on Github or such.
  • It would be particularly useful for performers that need a quick way to full screen a Spout stream, without needing to rely on Resolume or such mapping software. Also since multiple instances of the SpoutReceiver.exe can be running at once, then the user could full screen a unique Spout stream to each monitor/projector.
@leadedge
Copy link
Owner

leadedge commented Jul 3, 2020

This was addressed back in 2017 by Tim Thompson, who changed the full screen function to allow for multiple monitors. It required some changes to use (MonitorFromWindow). If it's on a different monitor this function detects it. Default is the primary monitor. I can't see any changes since then that might affect it. Unfortunately I can't test it because I don't have a multiple monitor setup.
Check the version you are using. The changed occurred for Version 2.019. The latest version is 2.024. At that time it worked for him, so it should be same now. It might be possible with Openframeworks or something similar, but again I don't have the means to do anything with it. Perhaps you know somebody who might be able to help.

@leadedge leadedge closed this as completed Jul 3, 2020
@nuclearsugar
Copy link
Author

Thanks for the info.

I'm using SpoutReciever v2.023, as bundled with the latest Spout_2006_update-3 Install. Unfortunately SpoutReciever will currently only use the main display for full screening. This is confirmed from several different people using multi-monitor setups.

@nosuchtim - Would you be interested and willing to look at the SpoutReciever code again?

@leadedge
Copy link
Owner

leadedge commented Jul 3, 2020

2.024 is at https://github.com/leadedge/Spout2/tree/beta/DEMO. But I am sure it won't make any difference.
If Tim has the time, I am available by email to look at details.

@leadedge
Copy link
Owner

leadedge commented Jul 3, 2020

Try this version - 2.021 -

SpoutReceiver.zip

just after the modifications were made:

@nuclearsugar
Copy link
Author

I just tested out SpoutReciever v2.021 and it will only use the main display for full screening. So perhaps something within Windows or a library has changed since then. Alas!

@leadedge
Copy link
Owner

leadedge commented Jul 4, 2020

Here is Version 2.020

SpoutReceiver_2020.zip

That goes back a little more. I can't find 2.019.

Edit : - I found it in backups. Try both of these and that will narrow down the code changes.

SpoutReceiver_2019.zip

@nosuchtim
Copy link

nosuchtim commented Jul 4, 2020 via email

@leadedge
Copy link
Owner

leadedge commented Jul 4, 2020

Thanks very much Tim.
The menu is now removed and the TaskBar put lowest order before the resizing.
Could you try both 2.021 and 2.024?
This should confirm where the problem is.
There is no repo for this, but I can send you a complete project for Visual Studio 2017.

@nosuchtim
Copy link

nosuchtim commented Jul 4, 2020 via email

@nosuchtim
Copy link

nosuchtim commented Jul 4, 2020 via email

@leadedge
Copy link
Owner

leadedge commented Jul 4, 2020

Thanks Tim.
The only thing different between 2.020 and 2.021 is -

		GetMonitorInfoA(monitor, &mi);
		int w = (int)(mi.rcMonitor.right - mi.rcMonitor.left); // rcMonitor dimensions are LONG
		int h = (int)(mi.rcMonitor.bottom - mi.rcMonitor.top);
		// Setting topmost causes a grey screen for Windows 10
		// If scaling is set larger than 100% e.g. 125%
		// Also there seems to be a delay in receiving keystrokes even if set to 100%
		// SetWindowPos(g_hwnd, HWND_TOPMOST, 0, 0, w, h, SWP_SHOWWINDOW);
		// This seems to fix it.
		SetWindowPos(g_hwnd, HWND_NOTOPMOST, 0, 0, w, h, SWP_SHOWWINDOW);
		SetWindowPos(g_hwnd, HWND_TOP, 0, 0, w, h, SWP_SHOWWINDOW);

So I removed the NOTOPMOST/TOP and went back to a single TOPMOST. It no longer goes grey for me at this time. Could have been be a driver issue.

SpoutReceiver_2005.zip

If that still doesn't work, I am not sure where to look.

@nosuchtim
Copy link

nosuchtim commented Jul 4, 2020 via email

@nuclearsugar
Copy link
Author

I tested each version and SpoutReceiver v2.020 is the only version that will fullscreen to any monitor.

@pom256 - have any experience with this?

@leadedge
Copy link
Owner

leadedge commented Jul 5, 2020

I think I found the problem. While I was trying to solve the grey screen effect, I forgot to include the monitor origin in the moves.

		int x = (int)mi.rcMonitor.left;
		int y = (int)mi.rcMonitor.top;
		int w = (int)(mi.rcMonitor.right - mi.rcMonitor.left);
		int h = (int)(mi.rcMonitor.bottom - mi.rcMonitor.top);
		SetWindowPos(g_hwnd, HWND_NOTOPMOST, x, y, w, h, SWP_SHOWWINDOW);
		SetWindowPos(g_hwnd, HWND_TOP, x, y, w, h, SWP_SHOWWINDOW);

SpoutReceiver_2026.zip

@nuclearsugar
Copy link
Author

SpoutReceiver v2.026 fixed the issue! Nicely done.

@pom256
Copy link

pom256 commented Jul 5, 2020

I always think that the demo receiver was designed for the main monitor only so I didn't try on a second monitor. But many NestDrop user tell me the same as NuclearSugar regards as even if they drag the Window on the second screen, it will go back to the primary in fullscreen mode. So I just tell them that they change the main monitor in Window setup... But it's more a patch for the moment then a real fix.

I confirm that the receiver which came with Spout 2.0.0.6 go back to my main monitor in full screen when I press f on it, and return to my second monitor when I exit the full screen.

I know that the real 'fullscreen' mode in Directx was targeted the main monitor only. But I remember read some comment in spout code that the fullscreen was just replaced by a floating window with the same size than the screen... But this is old stuff and I'm sure that leadedge is already far beyond that...

@leadedge
Copy link
Owner

leadedge commented Jul 5, 2020

OK @nuclearsugar. That's got it working for you.
@pom256 - yes it's not real fullscreen. The window menu and borders are removed and the remainder is resized and put on top. This was always intended as a demo testing program and the code is ancient. There will come a time when it won't work but until then it does the job.
I read that there is more involved with DPI and scaling, but it's going too far for this program. I have enabled "Per Monitor High DPI Aware" in the project settings, so hopefully that will look after it.
@nosuchtim many thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants