(svn r23241) -Codechange: make the decision when to go to the custom drawn cursor more prominently during the initialisation of OpenTTD

This commit is contained in:
rubidium
2011-11-17 21:09:08 +00:00
parent cc85ef493a
commit 6e31c2f068
10 changed files with 44 additions and 7 deletions

View File

@@ -28,14 +28,16 @@
#include <sys/stat.h>
static bool _has_console;
static bool _cursor_disable = true;
static bool _cursor_visible = true;
static bool cursor_visible = true;
bool MyShowCursor(bool show)
bool MyShowCursor(bool show, bool toggle)
{
if (cursor_visible == show) return show;
if (toggle) _cursor_disable = !_cursor_disable;
if (_cursor_disable) return show;
if (_cursor_visible == show) return show;
cursor_visible = show;
_cursor_visible = show;
ShowCursor(show);
return !show;