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
9e192f40
Commit
9e192f40
authored
Nov 19, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first support for colourmaps
parent
bbcc2f51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
x11vnc.c
x11vnc.c
+23
-6
No files found.
x11vnc.c
View file @
9e192f40
...
@@ -131,6 +131,8 @@ void checkForImageUpdates(rfbScreenInfoPtr s,char *b)
...
@@ -131,6 +131,8 @@ void checkForImageUpdates(rfbScreenInfoPtr s,char *b)
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
Screen
*
sc
;
Colormap
cm
;
XImage
*
framebufferImage
;
XImage
*
framebufferImage
;
char
*
backupImage
;
char
*
backupImage
;
int
xscreen
,
i
;
int
xscreen
,
i
;
...
@@ -168,12 +170,27 @@ int main(int argc,char** argv)
...
@@ -168,12 +170,27 @@ int main(int argc,char** argv)
screen
->
rfbServerFormat
.
trueColour
=
TRUE
;
screen
->
rfbServerFormat
.
trueColour
=
TRUE
;
if
(
screen
->
rfbServerFormat
.
bitsPerPixel
==
8
)
{
if
(
screen
->
rfbServerFormat
.
bitsPerPixel
==
8
)
{
screen
->
rfbServerFormat
.
redShift
=
0
;
if
(
CellsOfScreen
(
ScreenOfDisplay
(
dpy
,
xscreen
))
!=
0
)
{
screen
->
rfbServerFormat
.
greenShift
=
2
;
XColor
color
[
256
];
screen
->
rfbServerFormat
.
blueShift
=
5
;
int
i
;
screen
->
rfbServerFormat
.
redMax
=
3
;
screen
->
rfbServerFormat
.
trueColour
=
FALSE
;
screen
->
rfbServerFormat
.
greenMax
=
7
;
screen
->
colourMap
=
malloc
(
sizeof
(
rfbColourMap
));
screen
->
rfbServerFormat
.
blueMax
=
3
;
screen
->
colourMap
.
is16
=
TRUE
;
screen
->
colourMap
.
count
=
XQueryColors
(
dpy
,
DefaultColormap
(
dpy
,
xscreen
),
color
,
256
);
screen
->
colourMap
.
data
.
shorts
=
malloc
(
6
*
screen
->
colourMap
.
count
);
for
(
i
=
0
;
i
<
screen
->
colourMap
.
count
;
i
++
)
{
screen
->
colourMap
.
data
.
shorts
[
i
*
6
+
0
]
=
color
[
i
].
red
;
screen
->
colourMap
.
data
.
shorts
[
i
*
6
+
2
]
=
color
[
i
].
green
;
screen
->
colourMap
.
data
.
shorts
[
i
*
6
+
4
]
=
color
[
i
].
blue
;
}
}
else
{
screen
->
rfbServerFormat
.
redShift
=
0
;
screen
->
rfbServerFormat
.
greenShift
=
2
;
screen
->
rfbServerFormat
.
blueShift
=
5
;
screen
->
rfbServerFormat
.
redMax
=
3
;
screen
->
rfbServerFormat
.
greenMax
=
7
;
screen
->
rfbServerFormat
.
blueMax
=
3
;
}
}
else
{
}
else
{
screen
->
rfbServerFormat
.
redShift
=
0
;
screen
->
rfbServerFormat
.
redShift
=
0
;
if
(
framebufferImage
->
red_mask
)
if
(
framebufferImage
->
red_mask
)
...
...
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