2025-07-20 01:24 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000634Spring engineGeneralpublic2007-09-16 18:58
ReporterjK 
Assigned ToKloot 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000634: 2 Dualscreen bugfixes + new .springrc tag "fullscreenEdgeMove"
DescriptionLordMatt informed me that my new custom formations widget doesn't work with his Dualscreen setup (with minimap on the left).
So this patch fixes this bug in Lua's TraceScreenRay and additional a middle mouse button scrolling bug.
Also I always scroll with the middle mouse button and the edgemove scrolling in fullscreen mode is really annoying for me, so I also add a new .springrc option to turn it off ^^
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • patch file icon 2DualscreenBugfixes_and_fullscreenEdgeMove.patch (2,975 bytes) 2007-09-15 03:48 -
    Index: rts/Lua/LuaUnsyncedRead.cpp
    ===================================================================
    --- rts/Lua/LuaUnsyncedRead.cpp	(revision 4371)
    +++ rts/Lua/LuaUnsyncedRead.cpp	(working copy)
    @@ -610,10 +610,12 @@
     	}
     
     	// window coordinates
    -	const int wx = (int)lua_tonumber(L, 1) - gu->viewPosX;
    -	const int wy = gu->viewSizeY - 1 - (int)lua_tonumber(L, 2);
    -	if ((wx < gu->viewPosX) || (wx >= (gu->viewSizeX + gu->viewPosX)) ||
    -	    (wy < gu->viewPosY) || (wy >= (gu->viewSizeY + gu->viewPosY))) {
    +	const int mx = (int)lua_tonumber(L, 1);
    +	const int my = (int)lua_tonumber(L, 2);
    +	const int wx = mx + gu->viewPosX;
    +	const int wy = gu->viewSizeY - 1 - my - gu->viewPosY;
    +	if ((mx < 0) || (mx >= gu->viewSizeX) ||
    +	    (my < 0) || (my >= gu->viewSizeY)) {
     		return 0;
     	}
     
    Index: rts/Game/UI/MouseHandler.cpp
    ===================================================================
    --- rts/Game/UI/MouseHandler.cpp	(revision 4371)
    +++ rts/Game/UI/MouseHandler.cpp	(working copy)
    @@ -546,8 +546,8 @@
     void CMouseHandler::HideMouse()
     {
     	if (!hide) {
    -		lastx = gu->viewSizeX/2;
    -		lasty = gu->viewSizeY/2;
    +		lastx = gu->viewSizeX/2 + gu->viewPosX;
    +		lasty = gu->viewSizeY/2 + gu->viewPosY;
         SDL_ShowCursor(SDL_DISABLE);
     		mouseInput->SetPos(int2(lastx, lasty));
     		hide = true;
    @@ -638,10 +638,10 @@
     		return;
     	}
     
    -	int dx = lastx - gu->viewSizeX / 2;
    -	int dy = lasty - gu->viewSizeY / 2;
    -	lastx = gu->viewSizeX / 2;
    -	lasty = gu->viewSizeY / 2;
    +	int dx = lastx - (gu->viewSizeX / 2 + gu->viewPosX);
    +	int dy = lasty - (gu->viewSizeY / 2 + gu->viewPosY);
    +	lastx = gu->viewSizeX / 2 + gu->viewPosX;
    +	lasty = gu->viewSizeY / 2 + gu->viewPosY;
     
     	float3 move;
     	move.x = dx;
    
    Index: rts/Game/Game.cpp
    ===================================================================
    --- rts/Game/Game.cpp	(revision 4353)
    +++ rts/Game/Game.cpp	(working copy)
    @@ -238,6 +238,7 @@
     	hideInterface=false;
     	gameOver=false;
     	windowedEdgeMove=!!configHandler.GetInt("WindowedEdgeMove", 1);
    +	fullscreenEdgeMove=!!configHandler.GetInt("FullscreenEdgeMove", 1);
     	showFPS   = !!configHandler.GetInt("ShowFPS",   0);
     	showClock = !!configHandler.GetInt("ShowClock", 1);
     	playerRoster.SetSortTypeByCode(
    @@ -3232,7 +3233,7 @@
     
     		movement=float3(0,0,0);
     
    -		if (fullscreen || windowedEdgeMove) {
    +		if ((fullscreen && fullscreenEdgeMove) || windowedEdgeMove) {
     			int screenW = gu->dualScreenMode ? gu->viewSizeX*2 : gu->viewSizeX;
     			if (mouse->lasty < 2){
     				movement.y+=gu->lastFrameTime;
    
    Index: rts/Game/Game.h
    ===================================================================
    --- rts/Game/Game.h	(revision 4353)
    +++ rts/Game/Game.h	(working copy)
    @@ -94,6 +94,7 @@
     	bool hideInterface;
     	bool gameOver;
     	bool windowedEdgeMove;
    +	bool fullscreenEdgeMove;
     	bool showFPS;
     	bool showClock;
     	bool noSpectatorChat;			//prevents spectator msgs from being seen by players
    
    patch file icon 2DualscreenBugfixes_and_fullscreenEdgeMove.patch (2,975 bytes) 2007-09-15 03:48 +

-Relationships
+Relationships

-Notes

~0001260

imbaczek (reporter)

please resolve conflicts with the current revision

~0001262

jK (developer)

there aren't any?
(I test build it against the newest svn)

~0001263

imbaczek (reporter)

my svn must be lying to me then :/

~0001266

Kloot (developer)

committed in r4402
+Notes

-Issue History
Date Modified Username Field Change
2007-09-15 03:48 jK New Issue
2007-09-15 03:48 jK File Added: 2DualscreenBugfixes_and_fullscreenEdgeMove.patch
2007-09-15 11:54 imbaczek Note Added: 0001260
2007-09-15 16:16 jK Note Added: 0001262
2007-09-15 21:02 imbaczek Note Added: 0001263
2007-09-16 18:57 Kloot Note Added: 0001266
2007-09-16 18:58 Kloot Status new => resolved
2007-09-16 18:58 Kloot Resolution open => fixed
2007-09-16 18:58 Kloot Assigned To => Kloot
+Issue History