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
a20d0817
Commit
a20d0817
authored
Mar 06, 2005
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for older SDL versions
parent
4301cdf1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
SDLvncviewer.c
client_examples/SDLvncviewer.c
+9
-3
No files found.
client_examples/SDLvncviewer.c
View file @
a20d0817
...
...
@@ -3,7 +3,11 @@
static
rfbBool
resize
(
rfbClient
*
client
)
{
static
char
first
=
TRUE
;
#ifdef SDL_ASYNCBLIT
int
flags
=
SDL_HWSURFACE
|
SDL_ASYNCBLIT
|
SDL_HWACCEL
;
#else
int
flags
=
SDL_HWSURFACE
|
SDL_HWACCEL
;
#endif
int
width
=
client
->
width
,
height
=
client
->
height
,
depth
=
client
->
format
.
bitsPerPixel
;
rfbBool
okay
=
SDL_VideoModeOK
(
width
,
height
,
depth
,
flags
);
...
...
@@ -250,17 +254,19 @@ int main(int argc,char** argv) {
while
(
1
)
{
if
(
SDL_PollEvent
(
&
e
))
switch
(
e
.
type
)
{
#if SDL_MAJOR_VERSION>1 || SDL_MINOR_VERSION>=2
case
SDL_VIDEOEXPOSE
:
SendFramebufferUpdateRequest
(
cl
,
0
,
0
,
cl
->
width
,
cl
->
height
,
FALSE
);
break
;
#endif
case
SDL_MOUSEBUTTONUP
:
case
SDL_MOUSEBUTTONDOWN
:
case
SDL_MOUSEMOTION
:
{
int
x
,
y
;
int
state
=
SDL_GetMouseState
(
&
x
,
&
y
);
struct
{
int
sdl
;
int
rfb
;
}
buttonMapping
[]
=
{
{
SDL_BUTTON_LEFT
,
rfbButton1Mask
},
{
SDL_BUTTON_RIGHT
,
rfbButton2Mask
},
{
SDL_BUTTON_MIDDLE
,
rfbButton3Mask
},
{
1
,
rfbButton1Mask
},
{
3
,
rfbButton2Mask
},
{
2
,
rfbButton3Mask
},
{
0
,
0
}
};
int
i
;
...
...
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