Use software cursor with attached display

--HG--
branch : multipass-stereo
This commit is contained in:
kaetemi 2014-08-07 19:45:26 +02:00
parent 38abf2193f
commit 93376226c4
5 changed files with 13 additions and 7 deletions

View file

@ -223,7 +223,7 @@ void connectionRestaureVideoMode ()
}
// And setup hardware mouse if we have to
InitMouseWithCursor (ClientCfg.HardwareCursor);
InitMouseWithCursor (ClientCfg.HardwareCursor && !StereoDisplayAttached);
SetMouseFreeLook ();
SetMouseCursor ();
SetMouseSpeed (ClientCfg.CursorSpeed);
@ -278,6 +278,8 @@ void setOutGameFullScreen()
{
setVideoMode(wantedMode);
}
InitMouseWithCursor(ClientCfg.HardwareCursor && !StereoDisplayAttached);
/*
InitMouseWithCursor (true);
Driver->showCursor(false);
@ -396,7 +398,7 @@ bool connection (const string &cookie, const string &fsaddr)
// not initialized at login and remain hardware until here ...
// Re-initialise the mouse (will be now in hardware mode, if required)
//InitMouseWithCursor (ClientCfg.HardwareCursor); // the return value of enableLowLevelMouse() has already been tested at startup
//InitMouseWithCursor (ClientCfg.HardwareCursor && !StereoDisplayAttached); // the return value of enableLowLevelMouse() has already been tested at startup
// no ui init if character selection is automatic
//SetMouseFreeLook ();
@ -556,7 +558,7 @@ bool reconnection()
{
// Re-initialise the mouse (will be now in hardware mode, if required)
SetMousePosFirstTime = true;
InitMouseWithCursor (ClientCfg.HardwareCursor); // the return value of enableLowLevelMouse() has already been tested at startup
InitMouseWithCursor (ClientCfg.HardwareCursor && !StereoDisplayAttached); // the return value of enableLowLevelMouse() has already been tested at startup
// no ui init if character selection is automatic
SetMouseFreeLook ();

View file

@ -1261,7 +1261,7 @@ void initMainLoop()
// Re-initialise the mouse (will be now in hardware mode, if required)
SetMousePosFirstTime = true;
InitMouseWithCursor (ClientCfg.HardwareCursor); // the return value of enableLowLevelMouse() has already been tested at startup
InitMouseWithCursor (ClientCfg.HardwareCursor && !StereoDisplayAttached); // the return value of enableLowLevelMouse() has already been tested at startup
// Re-initialise the keyboard, now in low-level mode, if required
// NB nico : done at end of loading
@ -1504,6 +1504,7 @@ void initWelcomeWindow()
// ***************************************************************************
// NOTE: This feature is not really used anymore, it is a patch transition
void initHardwareCursor(bool secondCall)
{
CInterfaceManager * pIM = CInterfaceManager::getInstance();

View file

@ -21,6 +21,7 @@
/////////////
#include "stdpch.h"
// Client
#include "global.h"
#include "actions.h"
#include "input.h"
#include "interface_v3/interface_manager.h"
@ -310,6 +311,6 @@ CNiceInputAuto::~CNiceInputAuto()
nlassert(_Count >= 0);
if (_Count == 0)
{
InitMouseWithCursor(ClientCfg.HardwareCursor);
InitMouseWithCursor(ClientCfg.HardwareCursor && !StereoDisplayAttached);
}
}

View file

@ -867,7 +867,7 @@ bool login()
SetMouseSpeed (ClientCfg.CursorSpeed);
SetMouseAcceleration (ClientCfg.CursorAcceleration);
SetMousePosFirstTime = true;
InitMouseWithCursor (ClientCfg.HardwareCursor);
InitMouseWithCursor (ClientCfg.HardwareCursor && !StereoDisplayAttached);
// if (ClientCfg.TestBrowser)
// {

View file

@ -73,6 +73,8 @@ void updateFromClientCfg()
if (!StereoDisplayAttached)
setVideoMode(UDriver::CMode(ClientCfg.Width, ClientCfg.Height, (uint8)ClientCfg.Depth,
ClientCfg.Windowed, ClientCfg.Frequency));
// force software cursor when attached
InitMouseWithCursor(ClientCfg.HardwareCursor && !StereoDisplayAttached);
}
// GRAPHICS - GENERAL
@ -292,7 +294,7 @@ void updateFromClientCfg()
{
if (ClientCfg.HardwareCursor != IsMouseCursorHardware())
{
InitMouseWithCursor (ClientCfg.HardwareCursor);
InitMouseWithCursor (ClientCfg.HardwareCursor && !StereoDisplayAttached);
}
}