Page 1 of 2

Patched client which fixes Dual Screen mode

Posted: 28 Apr 2009, 21:54
by Garo
I've created a patched spring client which fixes many problems in the dual screen mode. This patched client works with normal clients.

Normally map and game viewport both took exactly half of the screen. This patch allows you to specify custom width and height for the dual screen map, which makes dual screen mode useful with two monitors with different resolutions. This works only in windowed mode. There's ready to use binary for Windows and a patch file for linux.

Instructions:
The patch adds the following variables, which you need to manually add into springsettings.cfg. The location of this file varies, but in my Windows XP SP3 computer it's located at C:\Documents and Settings\Garo\Local Settings\Application Data
Vista: C:\users\username\app data\local\springsettings.cfg

Required settings
DualScreenSplitWidth position in pixels from left side where the split between map and game viewport is located.

Optional settings
DualScreenMiniMapHeight optional height of the minimap. This is usefull if your secondary screen height is smaller than your primary screen. Default value is 0, which is same height as the spring window.
DualScreenMiniMapYOffset offset in pixels from bottom edge where map starts. Usefull if your screen bottom or top edges are at different eye level. Default value is 0.

You need to have dual screen mode enabled and you must not run in full screen. The map can be at left or right. You can set these using SpringSettings.exe

CustomFormations
CustomFormations plugin as a bug which prevents using it in dual screen mode. I've included a modified version called FixedFormations which corrects this bug.

Installation
1) Backup your spring.exe
2) Copy patched spring.exe over the original spring.exe
3) Copy lua_fixedformations.lua under LuaUI/Widgets
4) Disable CustomFormations and enable FixedFormations using F11 menu.

Configuration examples
My left screen resolution is 1200x1600 and primary screen resolution is 1920x1200. I set spring screen resolution to 3120x1200 using SpringSettings. After saving settings I edit springsettings.cfg and I add manually line DualScreenSplitWidth=1200. In practice I prefer to use slightly smaller resolution so I use 3100x1100 but keep DualScreenSplitWidth at 1200 (width of my left screen)

Known bugs
- Zooming using mouse wheel in minimap does not work correctly

Feedback
Please post all bugs and other feedback to this thread =)

Download
Download via this link: http://blog.juhonkoti.net/media/spring- ... ch-1.0.zip
EDIT: link broken. The patch file is attached into this post.

- Garo

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 05:37
by Forboding Angel
http://blog.juhonkoti.net/media/spring- ... ch-1.0.zip

Fixing his link before phpbb has a chance to fuck it up.

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 16:10
by 1v0ry_k1ng
nice work man

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 16:53
by lurker
Clearly forb has not tested this updated phpbb with ... links.

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 19:54
by Masure
Please make a true dual view support it you're able to. I mean without the need of desktop extension mode.

Anyway...

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 20:28
by aegis
Masure wrote:Please make a true dual view support it you're able to. I mean without the need of desktop extension mode.

Anyway...
uh, have you tested this?

windowed mode shouldn't require horizontal span

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 21:02
by Garo
Masure wrote:Please make a true dual view support it you're able to. I mean without the need of desktop extension mode.
Just as aegis said, this does not need desktop extension mode. All my displays have different resolutions and they are each individual screens in my Windows XP.

I'm not going to add support for true fullscreen, because that would be at least two order of magnitude harder as SDL does not support multiple screens.

Linux users can download spring sources, apply my patch and download client by them selfs. I'm not going to create any precompiled binaries for Linux.

Thanks to [eXe]andre for testing patch in Linux and [fi]PRO_Pullapitko for testing in Windows :)

- Garo

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 21:04
by Beherith
Excellent work, hope it gets folded into svn!

Re: Patched client which fixes Dual Screen mode

Posted: 29 Apr 2009, 21:27
by andre
Nice work, I even got it running fullscreen with linux and kde4.2
Image
Just make spring in the options windowed, then start it and wait until loading is finished and your ingame and then make Spring fullscreen with the KDE-Function (alt+f3 in the window -> advanced -> fullscreen)

example setup:

Code: Select all

left screen 17" 1280*1024 (minimap)
right screen 22" 1680*1050 (world)
and use this Configs:
.springrc (just the relevant parts)

Code: Select all

DualScreenMiniMapHeight=1024
DualScreenMiniMapOnLeft=1
DualScreenMiniMapYOffset=26
DualScreenMode=1
DualScreenSplitWidth=1280
XResolution=2960
YResolution=1050
xorg.conf (just relevant parts)

Code: Select all

Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection
Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "metamodes" "DFP-0: nvidia-auto-select +1280+0, DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Re: Patched client which fixes Dual Screen mode

Posted: 30 Apr 2009, 11:31
by Caradhras
cool

Re: Patched client which fixes Dual Screen mode

Posted: 01 May 2009, 18:36
by el_matarife
Garo wrote:I'm not going to add support for true fullscreen, because that would be at least two order of magnitude harder as SDL does not support multiple screens
SDL1.3 aka SDL2.0 will, if they ever finish it. I wonder how stable an SVN checkout build might be.

Re: Patched client which fixes Dual Screen mode

Posted: 01 May 2009, 19:57
by very_bad_soldier
Garo wrote: I'm not going to add support for true fullscreen, because that would be at least two order of magnitude harder as SDL does not support multiple screens.
I would love true dual screening.

Re: Patched client which fixes Dual Screen mode

Posted: 12 May 2009, 17:13
by elfir3
What would be wonderfull too, is to be able to switch between map and another view, i.e. to keep an eye on the base while leading units on the main screen.

Re: Patched client which fixes Dual Screen mode

Posted: 12 May 2009, 17:15
by aegis
supcom had a mod for just putting a separate view of the battle on each screen instead of a minimap on one monitor

Re: Patched client which fixes Dual Screen mode

Posted: 16 Jul 2009, 17:03
by ultraspoon
How do I access the F11 menu? I believe I have completed all steps, apart from the last one.

Thanks

Re: Patched client which fixes Dual Screen mode

Posted: 16 Jul 2009, 17:16
by Wombat
u press f11 ? X_x

Re: Patched client which fixes Dual Screen mode

Posted: 16 Jul 2009, 17:41
by ultraspoon
haha, but where? in the game? Ive tried in game, but nothing happens. O_o

Re: Patched client which fixes Dual Screen mode

Posted: 16 Jul 2010, 16:49
by thesleepless
link broken, anyone have a copy of this patch or could it be included in main line?

Re: Patched client which fixes Dual Screen mode

Posted: 16 Jul 2010, 22:43
by Garo
Hi,

sorry for letting the patch download link go down. I attached the original .patch file into this message. I don't remember what I had inside the .zip, but the patch file is most important anyway.

As the patch revision number says, I haven't had any time nor interest to port the patch to the current spring version and I doubt that I have the time anywhere in the future. I can however answer questions if there are some and also I can dig the original .zip file from my backups if somebody wants that.

- Garo

Re: Patched client which fixes Dual Screen mode

Posted: 17 Jul 2010, 20:10
by echoone
Guys, if inclusion of this patch is important to you, please voice your opinion here, in this thread.

Please be polite.

Edited to correct an incorrect statement I made. Replies which follow may be confusing but accurate at the time they were made.