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
9b51d63d
Commit
9b51d63d
authored
Apr 28, 2006
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SDLvncviewer for widths which are not divisible by 8
parent
21b1fd47
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
SDLvncviewer.c
client_examples/SDLvncviewer.c
+2
-1
No files found.
client_examples/SDLvncviewer.c
View file @
9b51d63d
...
@@ -24,6 +24,7 @@ static rfbBool resize(rfbClient* client) {
...
@@ -24,6 +24,7 @@ static rfbBool resize(rfbClient* client) {
if
(
okay
)
{
if
(
okay
)
{
SDL_Surface
*
sdl
=
SDL_SetVideoMode
(
width
,
height
,
depth
,
flags
);
SDL_Surface
*
sdl
=
SDL_SetVideoMode
(
width
,
height
,
depth
,
flags
);
rfbClientSetClientData
(
client
,
SDL_Init
,
sdl
);
rfbClientSetClientData
(
client
,
SDL_Init
,
sdl
);
client
->
width
=
sdl
->
pitch
/
(
depth
/
8
);
client
->
frameBuffer
=
sdl
->
pixels
;
client
->
frameBuffer
=
sdl
->
pixels
;
if
(
first
||
depth
!=
client
->
format
.
bitsPerPixel
)
{
if
(
first
||
depth
!=
client
->
format
.
bitsPerPixel
)
{
first
=
FALSE
;
first
=
FALSE
;
...
@@ -41,7 +42,7 @@ static rfbBool resize(rfbClient* client) {
...
@@ -41,7 +42,7 @@ static rfbBool resize(rfbClient* client) {
rfbClientLog
(
"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
->
pitch
/
(
depth
/
8
)
;
client
->
height
=
sdl
->
h
;
client
->
height
=
sdl
->
h
;
}
else
{
}
else
{
client
->
width
=
0
;
client
->
width
=
0
;
...
...
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