If the window position is saved, make sure it's not negative
(since this indicates an invalid position, and it would appear like saving the position doesn't work). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11433 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -116,6 +116,11 @@ void IrrDriver::updateConfigIfRelevant()
|
||||
{
|
||||
int x = (int)placement.rcNormalPosition.left;
|
||||
int y = (int)placement.rcNormalPosition.top;
|
||||
// If the windows position is saved, it must be a non-negative
|
||||
// number. So if the window is partly off screen, move it to the
|
||||
// corresponding edge.
|
||||
if(x<0) x = 0;
|
||||
if(y<0) y = 0;
|
||||
printf("Retrieved window location for config : %i %i\n", x, y);
|
||||
|
||||
if (UserConfigParams::m_window_x != x || UserConfigParams::m_window_y != y)
|
||||
|
||||
Reference in New Issue
Block a user