plplot/patches/050-linuxvga-320x240x16M.patch |
1 | 1 | Index: plplot-5.9.7/drivers/linuxvga.c |
2 | 2 | =================================================================== |
3 | | +++ plplot-5.9.7/drivers/linuxvga.c 2011-01-09 14:23:05.000000000 +0100 |
| 3 | --- plplot-5.9.7.orig/drivers/linuxvga.c 2011-01-30 19:15:09.000000000 +0100 |
4 | 4 | @@ -39,8 +39,8 @@ |
5 | 5 | |
6 | 6 | /* INDENT ON */ |
... | ... | |
13 | 13 | |
14 | 14 | /* A flag to tell us whether we are in text or graphics mode */ |
15 | 15 | |
16 | | @@ -95,7 +95,7 @@ |
| 16 | @@ -53,6 +53,7 @@ |
| 17 | static int mode = TEXT_MODE; |
| 18 | static int col = 1; |
| 19 | static int totcol = 16; |
| 20 | +static int vgacol = 0; |
| 21 | |
| 22 | #define CLEAN 0 |
| 23 | #define DIRTY 1 |
| 24 | @@ -95,7 +96,7 @@ |
17 | 25 | /* What kind of VGA mode one wants is set up here. |
18 | 26 | * It can be easyly made interactive! */ |
19 | 27 | |
... | ... | |
22 | 30 | if ( vga_hasmode( mode ) ) |
23 | 31 | vga_setmode( mode ); |
24 | 32 | else |
25 | | @@ -111,7 +111,7 @@ |
| 33 | @@ -111,7 +112,7 @@ |
26 | 34 | |
27 | 35 | totcol = vga_getcolors(); |
28 | 36 | |
... | ... | |
31 | 39 | plP_setphy( 0, vgax, 0, vgay ); |
32 | 40 | } |
33 | 41 | |
34 | | @@ -202,24 +202,34 @@ |
| 42 | @@ -163,6 +164,7 @@ |
| 43 | |
| 44 | /* vga_setmode(mode); */ |
| 45 | vga_clear(); /* just clean it */ |
| 46 | + vga_setcolor(vgacol); /* restore color (reset by vga_clear()) */ |
| 47 | |
| 48 | page_state = CLEAN; |
| 49 | } |
| 50 | @@ -202,24 +204,34 @@ |
35 | 51 | void |
36 | 52 | plD_state_vga( PLStream *pls, PLINT op ) |
37 | 53 | { |
... | ... | |
60 | 76 | + { |
61 | 77 | + r = pls->curcolor.r, g = pls->curcolor.g, b = pls->curcolor.b; |
62 | 78 | + } |
63 | | + vga_setrgbcolor (r, g, b); |
| 79 | + vgacol = vga_setrgbcolor (r, g, b); |
64 | 80 | + break; |
65 | 81 | case PLSTATE_COLOR1: |
66 | 82 | + if ( !pls->color ) |
... | ... | |
71 | 87 | + { |
72 | 88 | + r = pls->curcolor.r, g = pls->curcolor.g, b = pls->curcolor.b; |
73 | 89 | + } |
74 | | + vga_setrgbcolor( r, g, b ); |
| 90 | + vgacol = vga_setrgbcolor( r, g, b ); |
75 | 91 | break; |
76 | 92 | } |
77 | 93 | } |