mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
fix keyboard state access
* is somewhat playable already!
This commit is contained in:
@ -732,9 +732,8 @@ void CAdvMapInt::show(SDL_Surface * to)
|
||||
if((animValHitCount % (4/scrollSpeed)) == 0
|
||||
&& (
|
||||
(GH.topInt() == this)
|
||||
|| SDL_GetKeyState(nullptr)[SDLK_LCTRL]
|
||||
|| SDL_GetKeyState(nullptr)[SDLK_RCTRL]
|
||||
)
|
||||
|| isCtrlKeyDown()
|
||||
)
|
||||
)
|
||||
{
|
||||
if( (scrollingDir & LEFT) && (position.x>-CGI->mh->frameW) )
|
||||
@ -1054,7 +1053,7 @@ void CAdvMapInt::select(const CArmedInstance *sel, bool centerView /*= true*/)
|
||||
void CAdvMapInt::mouseMoved( const SDL_MouseMotionEvent & sEvent )
|
||||
{
|
||||
//adventure map scrolling with mouse
|
||||
if(!SDL_GetKeyState(nullptr)[SDLK_LCTRL] && isActive())
|
||||
if(!isCtrlKeyDown() && isActive())
|
||||
{
|
||||
if(sEvent.x<15)
|
||||
{
|
||||
|
Reference in New Issue
Block a user