Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 149137 Details for
Bug 220335
Crashes when turning on full-screen mode
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Incomplete 16 bpp surface support
vultures-2.1.0-partial-16bpp-support.patch (text/plain), 2.52 KB, created by
Hans de Goede
on 2007-03-02 18:46:41 UTC
(
hide
)
Description:
Incomplete 16 bpp surface support
Filename:
MIME Type:
Creator:
Hans de Goede
Created:
2007-03-02 18:46:41 UTC
Size:
2.52 KB
patch
obsolete
>diff -ur vultures-2.1.0.orig/vultures/vultures_gra.c vultures-2.1.0/vultures/vultures_gra.c >--- vultures-2.1.0.orig/vultures/vultures_gra.c 2006-06-06 21:23:28.000000000 +0200 >+++ vultures-2.1.0/vultures/vultures_gra.c 2007-03-02 12:12:39.000000000 +0100 >@@ -129,22 +129,45 @@ > ) > { > int i,j; >- Uint32 *screen; >+ Uint16 *screen16; >+ Uint32 *screen32; > > if (SDL_MUSTLOCK(surface)) SDL_LockSurface(surface); >- screen = surface->pixels; >- >- for (i = x1; i <= x2; i++) >- { >- screen[y1*surface->w+i] = color; >- screen[y2*surface->w+i] = color; >- } >- for (j = y1; j <= y2; j++) >+ switch (surface->format->BitsPerPixel) > { >- screen[j*surface->w+x1] = color; >- screen[j*surface->w+x2] = color; >- } >+ case 16: >+ screen16 = surface->pixels; > >+ for (i = x1; i <= x2; i++) >+ { >+ screen16[y1*surface->w+i] = color; >+ screen16[y2*surface->w+i] = color; >+ } >+ for (j = y1; j <= y2; j++) >+ { >+ screen16[j*surface->w+x1] = color; >+ screen16[j*surface->w+x2] = color; >+ } >+ break; >+ case 32: >+ screen32 = surface->pixels; >+ >+ for (i = x1; i <= x2; i++) >+ { >+ screen32[y1*surface->w+i] = color; >+ screen32[y2*surface->w+i] = color; >+ } >+ for (j = y1; j <= y2; j++) >+ { >+ screen32[j*surface->w+x1] = color; >+ screen32[j*surface->w+x2] = color; >+ } >+ break; >+ default: >+ fprintf(stderr, "Error unsupported colordepth: %d\n", >+ surface->format->BitsPerPixel); >+ exit(1); >+ } > if (SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface); > } > >@@ -218,9 +243,9 @@ > /* Blitting would be a mistake here, because we need to preserve > * the alpha channel, which blitting does not do */ > for (i = topoffset; i < (y2+1-y1-bottomoffset); i++) >- memcpy(toSurface->pixels + toSurface->pitch*i + (leftoffset * 4), >- &srcpixels[(i+y1)*img_source->pitch + (x1 + leftoffset)*4], >- (x2+1-x1-leftoffset-rightoffset)*4); >+ memcpy(toSurface->pixels + toSurface->pitch*i + (leftoffset * img_source->format->BytesPerPixel), >+ &srcpixels[(i+y1)*img_source->pitch + (x1 + leftoffset)*img_source->format->BytesPerPixel], >+ (x2+1-x1-leftoffset-rightoffset)*img_source->format->BytesPerPixel); > > return toSurface; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 220335
:
149137
|
149138