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
bd9e5747
Commit
bd9e5747
authored
Feb 10, 2003
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added colourmapexample; fixed LinuxVNC to show the right colours
parent
4a1355d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
3 deletions
+38
-3
.cvsignore
examples/.cvsignore
+1
-1
Makefile.am
examples/Makefile.am
+1
-1
colourmaptest.c
examples/colourmaptest.c
+32
-0
VNConsole.c
vncterm/VNConsole.c
+4
-1
No files found.
examples/.cvsignore
View file @
bd9e5747
...
@@ -9,4 +9,4 @@ storepasswd
...
@@ -9,4 +9,4 @@ storepasswd
vncev
vncev
Makefile.in
Makefile.in
.deps
.deps
colourmaptest
examples/Makefile.am
View file @
bd9e5747
...
@@ -10,7 +10,7 @@ endif
...
@@ -10,7 +10,7 @@ endif
noinst_HEADERS
=
radon.h
noinst_HEADERS
=
radon.h
noinst_PROGRAMS
=
example pnmshow regiontest pnmshow24 fontsel
\
noinst_PROGRAMS
=
example pnmshow regiontest pnmshow24 fontsel
\
vncev storepasswd
$(BACKGROUND_TEST)
$(MAC)
vncev storepasswd
colourmaptest
$(BACKGROUND_TEST)
$(MAC)
LDADD
=
-L
..
-lvncserver
LDADD
=
-L
..
-lvncserver
examples/colourmaptest.c
0 → 100644
View file @
bd9e5747
#include "rfb.h"
int
main
(
int
argc
,
char
**
argv
)
{
int
i
;
uint8_t
bytes
[
256
*
3
];
rfbScreenInfoPtr
server
=
rfbGetScreen
(
&
argc
,
argv
,
256
,
256
,
8
,
1
,
1
);
server
->
rfbServerFormat
.
trueColour
=
FALSE
;
server
->
colourMap
.
count
=
256
;
server
->
colourMap
.
is16
=
FALSE
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
bytes
[
i
*
3
+
0
]
=
255
-
i
;
/* red */
bytes
[
i
*
3
+
1
]
=
0
;
/* green */
bytes
[
i
*
3
+
2
]
=
i
;
/* blue */
}
bytes
[
128
*
3
+
0
]
=
0xff
;
bytes
[
128
*
3
+
1
]
=
0
;
bytes
[
128
*
3
+
2
]
=
0
;
server
->
colourMap
.
data
.
bytes
=
bytes
;
server
->
frameBuffer
=
malloc
(
256
*
256
);
for
(
i
=
0
;
i
<
256
*
256
;
i
++
)
server
->
frameBuffer
[
i
]
=
(
i
/
256
);
rfbInitServer
(
server
);
rfbRunEventLoop
(
server
,
-
1
,
FALSE
);
return
(
0
);
}
vncterm/VNConsole.c
View file @
bd9e5747
...
@@ -24,11 +24,14 @@ unsigned char colourMap16[16*3]={
...
@@ -24,11 +24,14 @@ unsigned char colourMap16[16*3]={
void
MakeColourMap16
(
vncConsolePtr
c
)
void
MakeColourMap16
(
vncConsolePtr
c
)
{
{
int
i
,
j
;
rfbColourMap
*
colourMap
=&
(
c
->
rfbScreen
->
colourMap
);
rfbColourMap
*
colourMap
=&
(
c
->
rfbScreen
->
colourMap
);
if
(
colourMap
->
count
)
if
(
colourMap
->
count
)
free
(
colourMap
->
data
.
bytes
);
free
(
colourMap
->
data
.
bytes
);
colourMap
->
data
.
bytes
=
malloc
(
16
*
3
);
colourMap
->
data
.
bytes
=
malloc
(
16
*
3
);
memcpy
(
colourMap
->
data
.
bytes
,
colourMap16
,
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
];
colourMap
->
count
=
16
;
colourMap
->
count
=
16
;
colourMap
->
is16
=
FALSE
;
colourMap
->
is16
=
FALSE
;
c
->
rfbScreen
->
rfbServerFormat
.
trueColour
=
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