Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 125056 Details for
Bug 139347
Snes9X 1.5.1 bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
snes9x-1.51-opengl.patch
snes9x-1.51-opengl.patch (text/plain), 3.19 KB, created by
Justin Blanchard
on 2007-07-16 17:25:21 UTC
(
hide
)
Description:
snes9x-1.51-opengl.patch
Filename:
MIME Type:
Creator:
Justin Blanchard
Created:
2007-07-16 17:25:21 UTC
Size:
3.19 KB
patch
obsolete
>--- snes9x-1.51-src/gfx.h >+++ snes9x-1.51-src/gfx.h >@@ -331,7 +331,7 @@ > > inline uint16 COLOR_SUB(uint16 C1, uint16 C2) > { >- uint16 mC1, mC2, v = 0; >+ uint16 mC1, mC2, v = ALPHA_BITS_MASK; > > mC1 = C1 & FIRST_COLOR_MASK; > mC2 = C2 & FIRST_COLOR_MASK; >--- snes9x-1.51-src/unix/opengl.cpp >+++ snes9x-1.51-src/unix/opengl.cpp >@@ -233,14 +233,14 @@ > > // Strip dots from the version string > char *ptr; >- while (ptr = strchr (ver, '.')) >+ while ( (ptr = strchr (ver, '.')) != 0) > memmove (ptr, ptr + 1, strlen (ptr + 1) + 1); > >- // Pad the string with zeros to 4 digits >- while (strlen (ver) < 4) >- strcat (ver, "0"); >- > OpenGL.version = atoi (ver); >+ >+ // Pad the number with zeros to 4 digits >+ while (OpenGL.version < 1000) >+ OpenGL.version *= 10; > } > else > OpenGL.version = 1100; >@@ -400,7 +400,7 @@ > int i = 0; > for (uint32 y = 0; y < pheight; y++) > { >- uint16 *ptr = (uint16 *) (GFX.Screen + (y + startl) * GFX.Pitch) + startx; >+ uint16 *ptr = (uint16 *) (GFX.Screen + (y + startl) * GFX.Pitch/2) + startx; > for (uint32 x = 0; x < pwidth; x++) > { > int color = *ptr++; >@@ -418,7 +418,7 @@ > for (uint32 y = 0; y < pheight; y++) > { > memmove (basetexbuffer + sizeof (uint16) * texture_size * y, >- (GFX.Screen + (y + startl) * GFX.Pitch) + startx, >+ (GFX.Screen + (y + startl) * GFX.Pitch/2) + startx, > sizeof (uint16) * texture_size); > } > data = basetexbuffer; >--- snes9x-1.51-src/unix/x11.cpp >+++ snes9x-1.51-src/unix/x11.cpp >@@ -572,15 +572,29 @@ > } > delete[] color_diff; > >+ GUI.cmap = XCreateColormap (GUI.display, RootWindowOfScreen (GUI.screen), >+ GUI.visual, GUI.pseudo ? AllocAll : AllocNone); >+ if (GUI.pseudo) >+ { >+ for (i = 0; i < 256; i++) >+ { >+ GUI.colors[i].red = GUI.colors[i].green = GUI.colors[i].blue = 0; >+ GUI.colors[i].pixel = i; >+ GUI.colors[i].flags = DoRed | DoGreen | DoBlue; >+ } >+ XStoreColors (GUI.display, GUI.cmap, GUI.colors, 256); >+ } >+ > XSetWindowAttributes attrib; > > attrib.background_pixel = BlackPixelOfScreen (GUI.screen); >+ attrib.colormap = GUI.cmap; > GUI.window = XCreateWindow (GUI.display, RootWindowOfScreen (GUI.screen), > (WidthOfScreen(GUI.screen) - GUI.window_width) / 2, > (HeightOfScreen(GUI.screen) - GUI.window_height) / 2, > GUI.window_width, GUI.window_height, 0, > GUI.depth, InputOutput, GUI.visual, >- CWBackPixel, &attrib); >+ CWBackPixel | CWColormap, &attrib); > > #ifdef USE_DGA_EXTENSION > CreateFullScreenWindow (); >@@ -625,18 +639,6 @@ > ButtonPressMask | ButtonReleaseMask); > #endif > >- if (GUI.pseudo) >- { >- GUI.cmap = XCreateColormap (GUI.display, GUI.window, GUI.visual, True); >- XSetWindowColormap (GUI.display, GUI.window, GUI.cmap); >- for (i = 0; i < 256; i++) >- { >- GUI.colors[i].red = GUI.colors[i].green = GUI.colors[i].blue = 0; >- GUI.colors[i].pixel = i; >- GUI.colors[i].flags = DoRed | DoGreen | DoBlue; >- } >- XStoreColors (GUI.display, GUI.cmap, GUI.colors, 256); >- } > XMapRaised (GUI.display, GUI.window); > XClearWindow (GUI.display, GUI.window); > SetupImage ();
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 139347
:
93715
|
93716
|
93717
|
93718
|
93719
|
93720
|
104167
|
104168
|
117159
|
117771
|
117773
|
117774
|
117775
|
125055
| 125056 |
125058