Patched client which fixes Dual Screen mode

Patched client which fixes Dual Screen mode

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Garo
Posts: 11
Joined: 26 Apr 2009, 18:24

Patched client which fixes Dual Screen mode

Post 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
Attachments
spring_0.78.2.1-dualscreen.patch.txt
(7.66 KiB) Downloaded 133 times
Last edited by Garo on 16 Jul 2010, 22:44, edited 3 times in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Patched client which fixes Dual Screen mode

Post 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.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Patched client which fixes Dual Screen mode

Post by 1v0ry_k1ng »

nice work man
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Patched client which fixes Dual Screen mode

Post by lurker »

Clearly forb has not tested this updated phpbb with ... links.
Masure
Posts: 581
Joined: 30 Jan 2007, 15:23

Re: Patched client which fixes Dual Screen mode

Post by Masure »

Please make a true dual view support it you're able to. I mean without the need of desktop extension mode.

Anyway...
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Patched client which fixes Dual Screen mode

Post 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
Garo
Posts: 11
Joined: 26 Apr 2009, 18:24

Re: Patched client which fixes Dual Screen mode

Post 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
Last edited by Garo on 29 Apr 2009, 21:18, edited 1 time in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Patched client which fixes Dual Screen mode

Post by Beherith »

Excellent work, hope it gets folded into svn!
andre
Posts: 58
Joined: 21 Jun 2008, 04:52

Re: Patched client which fixes Dual Screen mode

Post 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
Caradhras
Posts: 381
Joined: 31 Jul 2006, 21:49

Re: Patched client which fixes Dual Screen mode

Post by Caradhras »

cool
el_matarife
Posts: 933
Joined: 27 Feb 2006, 02:04

Re: Patched client which fixes Dual Screen mode

Post 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.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Patched client which fixes Dual Screen mode

Post 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.
elfir3
Posts: 1
Joined: 12 May 2009, 17:10

Re: Patched client which fixes Dual Screen mode

Post 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.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Patched client which fixes Dual Screen mode

Post 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
ultraspoon
Posts: 7
Joined: 12 Jul 2009, 16:09

Re: Patched client which fixes Dual Screen mode

Post by ultraspoon »

How do I access the F11 menu? I believe I have completed all steps, apart from the last one.

Thanks
User avatar
Wombat
Posts: 3379
Joined: 15 Dec 2008, 15:53

Re: Patched client which fixes Dual Screen mode

Post by Wombat »

u press f11 ? X_x
ultraspoon
Posts: 7
Joined: 12 Jul 2009, 16:09

Re: Patched client which fixes Dual Screen mode

Post by ultraspoon »

haha, but where? in the game? Ive tried in game, but nothing happens. O_o
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Patched client which fixes Dual Screen mode

Post by thesleepless »

link broken, anyone have a copy of this patch or could it be included in main line?
Garo
Posts: 11
Joined: 26 Apr 2009, 18:24

Re: Patched client which fixes Dual Screen mode

Post 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
Attachments
spring_0.78.2.1-dualscreen.patch.txt
patch
(7.66 KiB) Downloaded 113 times
echoone
AI Developer
Posts: 150
Joined: 16 Nov 2009, 18:26

Re: Patched client which fixes Dual Screen mode

Post 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.
Last edited by echoone on 21 Jul 2010, 17:06, edited 2 times in total.
Post Reply

Return to “General Discussion”