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
c8ccb166
Commit
c8ccb166
authored
Jun 18, 2004
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanups; libvncclient supports -encodings already
parent
2e9817e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
SDLvncviewer.c
client_examples/SDLvncviewer.c
+12
-14
No files found.
client_examples/SDLvncviewer.c
View file @
c8ccb166
...
@@ -27,7 +27,7 @@ static rfbBool resize(rfbClient* client) {
...
@@ -27,7 +27,7 @@ static rfbBool resize(rfbClient* client) {
}
}
}
else
{
}
else
{
SDL_Surface
*
sdl
=
client
->
clientData
;
SDL_Surface
*
sdl
=
client
->
clientData
;
fprintf
(
stderr
,
"Could not set resolution %dx%d!
\n
"
,
rfbClientLog
(
"Could not set resolution %dx%d!
\n
"
,
client
->
width
,
client
->
height
);
client
->
width
,
client
->
height
);
if
(
sdl
)
{
if
(
sdl
)
{
client
->
width
=
sdl
->
w
;
client
->
width
=
sdl
->
w
;
...
@@ -167,15 +167,18 @@ rfbKeySym SDL_keysym2rfbKeySym(int keysym) {
...
@@ -167,15 +167,18 @@ rfbKeySym SDL_keysym2rfbKeySym(int keysym) {
case
SDLK_LALT
:
return
XK_Alt_L
;
case
SDLK_LALT
:
return
XK_Alt_L
;
case
SDLK_RMETA
:
return
XK_Meta_R
;
case
SDLK_RMETA
:
return
XK_Meta_R
;
case
SDLK_LMETA
:
return
XK_Meta_L
;
case
SDLK_LMETA
:
return
XK_Meta_L
;
//case SDLK_LSUPER: return XK_LSuper; /* left "windows" key */
#if 0
//case SDLK_RSUPER: return XK_RSuper; /* right "windows" key */
/* TODO: find out keysyms */
case SDLK_LSUPER: return XK_LSuper; /* left "windows" key */
case SDLK_RSUPER: return XK_RSuper; /* right "windows" key */
case SDLK_COMPOSE: return XK_Compose;
#endif
case
SDLK_MODE
:
return
XK_Mode_switch
;
case
SDLK_MODE
:
return
XK_Mode_switch
;
//case SDLK_COMPOSE: return XK_Compose;
case
SDLK_HELP
:
return
XK_Help
;
case
SDLK_HELP
:
return
XK_Help
;
case
SDLK_PRINT
:
return
XK_Print
;
case
SDLK_PRINT
:
return
XK_Print
;
case
SDLK_SYSREQ
:
return
XK_Sys_Req
;
case
SDLK_SYSREQ
:
return
XK_Sys_Req
;
case
SDLK_BREAK
:
return
XK_Break
;
case
SDLK_BREAK
:
return
XK_Break
;
default:
fprintf
(
stderr
,
"Unknown keysym: %d
\n
"
,
keysym
);
default:
rfbClientLog
(
"Unknown keysym: %d
\n
"
,
keysym
);
}
}
}
}
...
@@ -195,15 +198,6 @@ int main(int argc,char** argv) {
...
@@ -195,15 +198,6 @@ int main(int argc,char** argv) {
SDL_Init
(
SDL_INIT_VIDEO
|
SDL_INIT_NOPARACHUTE
);
SDL_Init
(
SDL_INIT_VIDEO
|
SDL_INIT_NOPARACHUTE
);
cl
=
rfbGetClient
(
5
,
3
,
2
);
cl
=
rfbGetClient
(
5
,
3
,
2
);
i
=
1
;
while
(
i
<
argc
-
1
)
{
if
(
i
+
1
<
argc
-
1
&&
!
strcmp
(
argv
[
i
],
"-encodings"
))
{
cl
->
appData
.
encodingsString
=
argv
[
i
+
1
];
i
+=
2
;
}
}
argc
-=
i
-
1
;
memmove
(
argv
+
1
,
argv
+
i
,(
argc
-
1
)
*
sizeof
(
char
*
));
cl
->
MallocFrameBuffer
=
resize
;
cl
->
MallocFrameBuffer
=
resize
;
cl
->
GotFrameBufferUpdate
=
update
;
cl
->
GotFrameBufferUpdate
=
update
;
if
(
!
rfbInitClient
(
cl
,
&
argc
,
argv
))
if
(
!
rfbInitClient
(
cl
,
&
argc
,
argv
))
...
@@ -238,6 +232,10 @@ int main(int argc,char** argv) {
...
@@ -238,6 +232,10 @@ int main(int argc,char** argv) {
case
SDL_QUIT
:
case
SDL_QUIT
:
rfbClientCleanup
(
cl
);
rfbClientCleanup
(
cl
);
return
0
;
return
0
;
case
SDL_ACTIVEEVENT
:
break
;
default:
rfbClientLog
(
"ignore SDL event: 0x%x
\n
"
,
e
.
type
);
}
}
else
{
else
{
i
=
WaitForMessage
(
cl
,
500
);
i
=
WaitForMessage
(
cl
,
500
);
...
...
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