mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 10:22:52 +01:00
Add RWGame::hasFocus(), fix mouse warping
This commit is contained in:
parent
ac18d0a11b
commit
8d1c7e802d
@ -101,6 +101,8 @@ public:
|
||||
|
||||
void startScript(const std::string& name);
|
||||
|
||||
bool hasFocus() const { return inFocus; }
|
||||
|
||||
private:
|
||||
void tick(float dt);
|
||||
void render(float alpha, float dt);
|
||||
|
@ -99,7 +99,7 @@ void IngameState::tick(float dt)
|
||||
autolookTimer = std::max(autolookTimer - dt, 0.f);
|
||||
|
||||
auto player = getPlayer();
|
||||
if( player && player->isInputEnabled() )
|
||||
if( player && player->isInputEnabled() && game->hasFocus() )
|
||||
{
|
||||
float qpi = glm::half_pi<float>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user