mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Hand-picked Mac OSX cursor and bundle path fixes from https://bitbucket.org/toabi/minetest-mac
This commit is contained in:
parent
13f469073e
commit
5d1ae85ab9
2 changed files with 28 additions and 4 deletions
10
src/game.cpp
10
src/game.cpp
|
@ -1366,7 +1366,11 @@ void the_game(
|
|||
if((device->isWindowActive() && noMenuActive()) || random_input)
|
||||
{
|
||||
if(!random_input)
|
||||
device->getCursorControl()->setVisible(false);
|
||||
{
|
||||
// Mac OSX gets upset if this is set every frame
|
||||
if(device->getCursorControl()->isVisible())
|
||||
device->getCursorControl()->setVisible(false);
|
||||
}
|
||||
|
||||
if(first_loop_after_window_activation){
|
||||
//std::cout<<"window active, first loop"<<std::endl;
|
||||
|
@ -1397,7 +1401,9 @@ void the_game(
|
|||
input->setMousePos(displaycenter.X, displaycenter.Y);
|
||||
}
|
||||
else{
|
||||
device->getCursorControl()->setVisible(true);
|
||||
// Mac OSX gets upset if this is set every frame
|
||||
if(device->getCursorControl()->isVisible() == false)
|
||||
device->getCursorControl()->setVisible(true);
|
||||
|
||||
//std::cout<<"window inactive"<<std::endl;
|
||||
first_loop_after_window_activation = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue