Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
47c481b7
Commit
47c481b7
authored
Feb 10, 2003
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed LinuxVNC colours
parent
d3bb5fb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
LinuxVNC.c
vncterm/LinuxVNC.c
+16
-0
VNConsole.c
vncterm/VNConsole.c
+1
-3
No files found.
vncterm/LinuxVNC.c
View file @
47c481b7
...
...
@@ -65,6 +65,17 @@ void do_key(Bool down,KeySym keySym,rfbClientPtr cl)
isControl
--
;
}
/* these colours are from linux kernel drivers/char/console.c */
unsigned
char
color_table
[]
=
{
0
,
4
,
2
,
6
,
1
,
5
,
3
,
7
,
8
,
12
,
10
,
14
,
9
,
13
,
11
,
15
};
/* the default colour table, for VGA+ colour systems */
int
default_red
[]
=
{
0x00
,
0xaa
,
0x00
,
0xaa
,
0x00
,
0xaa
,
0x00
,
0xaa
,
0x55
,
0xff
,
0x55
,
0xff
,
0x55
,
0xff
,
0x55
,
0xff
};
int
default_grn
[]
=
{
0x00
,
0x00
,
0xaa
,
0x55
,
0x00
,
0x00
,
0xaa
,
0xaa
,
0x55
,
0x55
,
0xff
,
0xff
,
0x55
,
0x55
,
0xff
,
0xff
};
int
default_blu
[]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x55
,
0x55
,
0x55
,
0x55
,
0xff
,
0xff
,
0xff
,
0xff
};
int
main
(
int
argc
,
char
**
argv
)
{
int
width
=
80
,
height
=
25
;
...
...
@@ -103,6 +114,11 @@ int main(int argc,char **argv)
/* console init */
console
=
vcGetConsole
(
&
argc
,
argv
,
width
,
height
,
&
vgaFont
,
TRUE
);
for
(
i
=
0
;
i
<
16
;
i
++
)
{
console
->
rfbScreen
->
colourMap
.
data
.
bytes
[
i
*
3
+
0
]
=
default_red
[
color_table
[
i
]];
console
->
rfbScreen
->
colourMap
.
data
.
bytes
[
i
*
3
+
1
]
=
default_grn
[
color_table
[
i
]];
console
->
rfbScreen
->
colourMap
.
data
.
bytes
[
i
*
3
+
2
]
=
default_blu
[
color_table
[
i
]];
}
console
->
rfbScreen
->
desktopName
=
title
;
console
->
rfbScreen
->
kbdAddEvent
=
do_key
;
console
->
selectTimeOut
=
100000
;
...
...
vncterm/VNConsole.c
View file @
47c481b7
...
...
@@ -29,9 +29,7 @@ void MakeColourMap16(vncConsolePtr c)
if
(
colourMap
->
count
)
free
(
colourMap
->
data
.
bytes
);
colourMap
->
data
.
bytes
=
malloc
(
16
*
3
);
for
(
i
=
0
;
i
<
16
;
i
++
)
for
(
j
=
0
;
j
<
3
;
j
++
)
colourMap
->
data
.
bytes
[
i
*
3
+
2
-
j
]
=
colourMap16
[
i
*
3
+
j
];
memcpy
(
colourMap
->
data
.
bytes
,
colourMap16
,
16
*
3
);
colourMap
->
count
=
16
;
colourMap
->
is16
=
FALSE
;
c
->
rfbScreen
->
rfbServerFormat
.
trueColour
=
FALSE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment