[[More color cursor tweaks]]
- when using color cursor, add a systematic check/set that we use the invisible b&w one - so reactivate the optimization checking if we already using the good cursor before changing it
This commit is contained in:
parent
5a1756550a
commit
7b04b302a3
1 changed files with 6 additions and 5 deletions
|
@ -166,10 +166,10 @@ void set(CURSOR_TYPE type)
|
|||
const CURSOR_TYPE new_cursor = use_colour_cursors() && colour_ready ? cursor::NO_CURSOR : current_cursor;
|
||||
|
||||
SDL_Cursor * cursor_image = get_cursor(new_cursor);
|
||||
// uncomment this line if you want to prevent SDL to redraw the cursor
|
||||
// (it was added to chase a blinking bug but had no effect and add a risk of bad update)
|
||||
//if (cursor_image != NULL && cursor_image != SDL_GetCursor())
|
||||
|
||||
if (cursor_image != NULL && cursor_image != SDL_GetCursor()) {
|
||||
SDL_SetCursor(cursor_image);
|
||||
}
|
||||
}
|
||||
|
||||
void set_dragging(bool drag)
|
||||
|
@ -226,9 +226,10 @@ void draw(surface screen)
|
|||
// display start to draw cursor
|
||||
// so it can now display colour cursor
|
||||
colour_ready = true;
|
||||
// just reset the cursor will hide the b&w
|
||||
set();
|
||||
}
|
||||
|
||||
// reset the cursor to be sure that we hide the b&w
|
||||
set();
|
||||
|
||||
if(have_focus == false) {
|
||||
cursor_buf = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue