jiayouxjh / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Palette defect after changing resolution #405

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
*What steps will reproduce the problem?*
Change the resolution (from inside grafx2.)

*What is the expected output?*
Grafx2 should have full control over the palette.

*What do you see instead?*
After changing the resolution, the palette is shared by Windows. I believe 
Windows reserves the last 19 colours, causing strange effects if you change 
those colours. This is a particularly noticable defect if you're using the 
DPaint/Scene skins.

Tabbing in and out or launching the program in fullscreen mode fixes the 
problem. However these are temporary solutions because the problem persists if 
you change the resolution again.

*What version of GrafX2 are you using? On what operating system?*
Milestone-2.1
OpSys-Windows (XP Professional SP3)

*Please provide any additional information below.*
- Same problem in all version I have tried, except for the old Eclipse port.

Original issue reported on code.google.com by Ravey1...@gmail.com on 19 Nov 2010 at 6:44

GoogleCodeExporter commented 9 years ago
This is likely a bug somewhere between SDL and your video card driver.
The Eclipse port doesn't use SDL.

Something you may try is checking the 'run this program in 256 colors' checkbox 
in the compatibility tab of the executable properties (cause yes, we're still 
running in 256 colors).

Original comment by pulkoma...@gmail.com on 21 Nov 2010 at 4:16

GoogleCodeExporter commented 9 years ago
Here is a modified SDL.dll that allows you to choose color depth.
Put it in same directory as executable of grafx2 (any version), and before 
running grafx2 you should set environment variable SDL_BPP=32 to force using a 
graphical 32bit mode (instead of first checking if 8bit mode is available). If 
the color depth is not available for the resolution you ask, the library will 
still try other color depths until it finds one that works (as it does usually).
This DLL accepts values 15, 16, 24 and 32 for SDL_BPP, other values are ignored.

This should help find the problem.

SDL is distributed under the terms of the Lesser GNU Public License (LGPL). I 
started with official 1.2.13 source archive, and the only modified file 
(SDL_video.c) is attached to this post too. Do not redistribute this DLL alone. 
If this DLL is useful, I'll make a nicer package.

Original comment by yrizoud on 21 Nov 2010 at 5:34

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for looking into this problem.

I have a feeling this is a problem with Service Pack 3, though I haven't seen 
anything to confirm that. I've tried a second PC with SP3 which has the same 
problem, so I'll try rolling back that update. Fortunately, I have no problems 
running grafx2 in Ubuntu - Probably not a SDL->Video Card driver issue.

Compatibility/256-colour mode unfortunately doesn't help, but shows that 
Windows uses the last 19 colours in 256-colour mode unless grafx2 is focused by 
alt-tabbing.

Original comment by Ravey1...@gmail.com on 22 Nov 2010 at 8:31

GoogleCodeExporter commented 9 years ago
All the Windows XP machines I've tested had SP3. I wouldn't advise to rollback 
the SP3 just for grafx2... If the problem is with fullscreen only, you can 
still run grafx2 as a maximized window and use the pixel scalers to reduce the 
effective resolution (bigger pixels).

Here are shortcuts to run grafx2 with specific parameters for the modified 
SDL.DLL above. It should be easier to use.
Copy them in the same directory as DLL (and grafx2.exe). Run grafx2-16.cmd for 
16bpp, or grafx2-32.cmd for 32bpp (It will only affect fullscreen modes).

Original comment by yrizoud on 26 Nov 2010 at 12:53

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by pulkoma...@gmail.com on 20 Jan 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Maybe try SDL 1.2.15 ? Is it any better ?

Original comment by pulkoma...@gmail.com on 12 May 2012 at 2:43