(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:
@@ -225,11 +225,23 @@ static bool CreateMainSurface(uint w, uint h)
|
||||
snprintf(caption, sizeof(caption), "OpenTTD %s", _openttd_revision);
|
||||
set_window_title(caption);
|
||||
|
||||
enable_hardware_cursor();
|
||||
select_mouse_cursor(MOUSE_CURSOR_ARROW);
|
||||
show_mouse(_allegro_screen);
|
||||
|
||||
GameSizeChanged();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VideoDriver_Allegro::ClaimMousePointer()
|
||||
{
|
||||
select_mouse_cursor(MOUSE_CURSOR_NONE);
|
||||
show_mouse(_allegro_screen);
|
||||
disable_hardware_cursor();
|
||||
return true;
|
||||
}
|
||||
|
||||
struct VkMapping {
|
||||
uint16 vk_from;
|
||||
byte vk_count;
|
||||
|
@@ -31,6 +31,8 @@ public:
|
||||
|
||||
/* virtual */ bool AfterBlitterChange();
|
||||
|
||||
/* virtual */ bool ClaimMousePointer();
|
||||
|
||||
/* virtual */ const char *GetName() const { return "allegro"; }
|
||||
};
|
||||
|
||||
|
@@ -259,13 +259,18 @@ static bool CreateMainSurface(uint w, uint h)
|
||||
|
||||
snprintf(caption, sizeof(caption), "OpenTTD %s", _openttd_revision);
|
||||
SDL_CALL SDL_WM_SetCaption(caption, caption);
|
||||
SDL_CALL SDL_ShowCursor(0);
|
||||
|
||||
GameSizeChanged();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VideoDriver_SDL::ClaimMousePointer()
|
||||
{
|
||||
SDL_CALL SDL_ShowCursor(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
struct VkMapping {
|
||||
uint16 vk_from;
|
||||
byte vk_count;
|
||||
|
@@ -31,6 +31,8 @@ public:
|
||||
|
||||
/* virtual */ bool AfterBlitterChange();
|
||||
|
||||
/* virtual */ bool ClaimMousePointer();
|
||||
|
||||
/* virtual */ const char *GetName() const { return "sdl"; }
|
||||
};
|
||||
|
||||
|
@@ -56,6 +56,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool ClaimMousePointer()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the driver has a graphical user interface with the end user.
|
||||
* Or in other words, whether we should spawn a thread for world generation
|
||||
|
@@ -81,6 +81,12 @@ static void UpdatePalette(HDC dc, uint start, uint count)
|
||||
SetDIBColorTable(dc, start, count, rgb);
|
||||
}
|
||||
|
||||
bool VideoDriver_Win32::ClaimMousePointer()
|
||||
{
|
||||
MyShowCursor(false, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
struct VkMapping {
|
||||
byte vk_from;
|
||||
byte vk_count;
|
||||
|
@@ -31,6 +31,8 @@ public:
|
||||
|
||||
/* virtual */ bool AfterBlitterChange();
|
||||
|
||||
/* virtual */ bool ClaimMousePointer();
|
||||
|
||||
/* virtual */ const char *GetName() const { return "win32"; }
|
||||
|
||||
bool MakeWindow(bool full_screen);
|
||||
|
Reference in New Issue
Block a user