The mode_index is being incremented by 12, but we are
only displaying 6 video modes per line. This results in
the "Available video modes" listing to ignore half of the
valid video modes.
Do not access directly the SDL_Surface Screen_pixels
use new functions Get_Screen_pixel_ptr() Set_Screen_pixel(),
Get_Screen_pixel()
And SetPalette()
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
These functions are called explicitly in a few places and need to be
handed the corresponding enum value to correctly get the button value.
Since they were previously called with -1, they would cause segfaults.
These seemed to happen when restoring backups or loading images to both
pages.
<corefoundation/corefoundation.h>
should be
<CoreFoundation/CoreFoundation.h>
Many MacOS FS are case insensitives, but not all, so we must use
the correct case.
Issue detected by the MacPorts buildbot : https://trac.macports.org/ticket/56490
in Error(0) the palette was not properly restored
as it was always restored to the Main_palette.
Now we really restore the right palette !
Also clarified/simplified the change directory code in case of error.
http://pulkomandy.tk/projects/GrafX2/ticket/46
Particularly useful when working for platforms with non-linear palettes.
For example the Thomson TO8 has a Gamma correction of 2.8, so the
darkest shade of color is already very bright. It is important to take
this into account when drawing pictures to avoid bad surprises when
showing them on the real machine.
The setting is available from the command line, or from the extended
palette window, which gets a little relayout using horizontal sliders
now that these are available.
Patch by miniupnp, with some C89 adjustments.
Enabled for Haiku and the generic Linux/*BSD part of the Makefile.
Please adjust as needed.
Fixes#10 for codepages for which we have a font.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2172 416bcca6-2ee7-4201-b75f-2eb2f807beb1