-Fixes issue 152 (color picker cursor)
-Switches FreeBSD to cumulated update method, they shouldn't need macosX tricks for that they are using X11 :) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@767 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
a216785b59
commit
780bf3a751
@ -40,7 +40,7 @@
|
||||
// UPDATE_METHOD can be set from makefile, otherwise it's selected here
|
||||
// depending on the platform :
|
||||
#ifndef UPDATE_METHOD
|
||||
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||
#if defined(__macosx__)
|
||||
#define UPDATE_METHOD UPDATE_METHOD_FULL_PAGE
|
||||
#else
|
||||
#define UPDATE_METHOD UPDATE_METHOD_CUMULATED
|
||||
|
||||
50
windows.c
50
windows.c
@ -1635,24 +1635,28 @@ void Display_cursor(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG("B",0);
|
||||
temp=(Config.Cursor)?CURSOR_SHAPE_THIN_COLORPICKER:CURSOR_SHAPE_COLORPICKER;
|
||||
start_x=Mouse_X-Cursor_offset_X[temp];
|
||||
start_y=Mouse_Y-Cursor_offset_Y[temp];
|
||||
|
||||
for (x_pos=start_x,counter_x=0;counter_x<15;x_pos++,counter_x++)
|
||||
for (y_pos=start_y,counter_y=0;counter_y<15;y_pos++,counter_y++)
|
||||
{
|
||||
color=GFX_cursor_sprite[temp][counter_y][counter_x];
|
||||
if ( (x_pos>=0) && (x_pos<Screen_width)
|
||||
&& (y_pos>=0) && (y_pos<Screen_height) )
|
||||
{
|
||||
CURSOR_BACKGROUND[counter_y][counter_x]=Read_pixel(x_pos,y_pos);
|
||||
if (color!=MC_Trans)
|
||||
Pixel(x_pos,y_pos,color);
|
||||
}
|
||||
}
|
||||
Update_rect(start_x,start_y,16,16);
|
||||
}
|
||||
for (x_pos=start_x,counter_x=0;counter_x<15;x_pos++,counter_x++)
|
||||
{
|
||||
if(x_pos<0) continue;
|
||||
if(x_pos>=Screen_width) break;
|
||||
for (y_pos=start_y,counter_y=0;counter_y<15;y_pos++,counter_y++)
|
||||
{
|
||||
if(y_pos<0) continue;
|
||||
if(y_pos>=Screen_height) break;
|
||||
color=GFX_cursor_sprite[temp][counter_y][counter_x];
|
||||
// On sauvegarde dans CURSOR_BACKGROUND pour restaurer plus tard
|
||||
CURSOR_BACKGROUND[counter_y][counter_x]=Read_pixel(x_pos,y_pos);
|
||||
if (color!=MC_Trans)
|
||||
Pixel(x_pos,y_pos,color);
|
||||
}
|
||||
}
|
||||
Update_rect(Max(start_x,0),Max(start_y,0),counter_x,counter_y);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1941,12 +1945,18 @@ void Hide_cursor(void)
|
||||
start_x=Mouse_X-Cursor_offset_X[temp];
|
||||
start_y=Mouse_Y-Cursor_offset_Y[temp];
|
||||
|
||||
for (x_pos=start_x,counter_x=0;counter_x<15;x_pos++,counter_x++)
|
||||
for (y_pos=start_y,counter_y=0;counter_y<15;y_pos++,counter_y++)
|
||||
if ( (x_pos>=0) && (x_pos<Screen_width) && (y_pos>=0) && (y_pos<Screen_height) )
|
||||
Pixel(x_pos,y_pos,CURSOR_BACKGROUND[counter_y][counter_x]);
|
||||
|
||||
Update_rect(Max(start_x,0),Max(start_y,0),16,16);
|
||||
for (x_pos=start_x,counter_x=0;counter_x<15;x_pos++,counter_x++)
|
||||
{
|
||||
if(x_pos<0) continue;
|
||||
if(x_pos>=Screen_width) break;
|
||||
for (y_pos=start_y,counter_y=0;counter_y<15;y_pos++,counter_y++)
|
||||
{
|
||||
if(y_pos<0) continue;
|
||||
if(y_pos>=Screen_height) break;
|
||||
Pixel(x_pos,y_pos,CURSOR_BACKGROUND[counter_y][counter_x]);
|
||||
}
|
||||
}
|
||||
Update_rect(Max(start_x,0),Max(start_y,0),counter_x,counter_y);
|
||||
}
|
||||
}
|
||||
if (!Paintbrush_hidden)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user