In fullscreen mode, auto-activate wide/tall pixels when you load a C64 multicolor picture, or a PNG picture you saved with wide/tall pixels.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1019 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
b934f1d57c
commit
ba42b3cb17
34
buttons.c
34
buttons.c
@ -2842,8 +2842,6 @@ void Load_picture(byte image)
|
|||||||
}
|
}
|
||||||
|
|
||||||
new_mode=Best_video_mode();
|
new_mode=Best_video_mode();
|
||||||
// TODO : Utiliser ici Ratio_of_loaded_image pour passer dans la
|
|
||||||
// bonne taille de pixels.
|
|
||||||
if ((Config.Auto_set_res) && (new_mode!=Current_resolution))
|
if ((Config.Auto_set_res) && (new_mode!=Current_resolution))
|
||||||
{
|
{
|
||||||
Init_mode_video(
|
Init_mode_video(
|
||||||
@ -2853,6 +2851,20 @@ void Load_picture(byte image)
|
|||||||
Pixel_ratio);
|
Pixel_ratio);
|
||||||
Display_menu();
|
Display_menu();
|
||||||
}
|
}
|
||||||
|
// In window mode, activate wide or tall pixels if the image says so.
|
||||||
|
else if (!Video_mode[Current_resolution].Fullscreen &&
|
||||||
|
((Ratio_of_loaded_image == PIXEL_WIDE &&
|
||||||
|
Pixel_ratio != PIXEL_WIDE && Pixel_ratio != PIXEL_WIDE2) ||
|
||||||
|
(Ratio_of_loaded_image == PIXEL_TALL &&
|
||||||
|
Pixel_ratio != PIXEL_TALL && Pixel_ratio != PIXEL_TALL2)))
|
||||||
|
{
|
||||||
|
Init_mode_video(
|
||||||
|
Video_mode[Current_resolution].Width,
|
||||||
|
Video_mode[Current_resolution].Height,
|
||||||
|
Video_mode[Current_resolution].Fullscreen,
|
||||||
|
Ratio_of_loaded_image);
|
||||||
|
Display_menu();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Main_offset_X=0;
|
Main_offset_X=0;
|
||||||
@ -2932,9 +2944,7 @@ void Button_Reload(void)
|
|||||||
Main_magnifier_mode=0;
|
Main_magnifier_mode=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_mode=Best_video_mode();
|
new_mode=Best_video_mode();
|
||||||
// TODO : Utiliser içi Ratio_of_loaded_image pour passer dans la
|
|
||||||
// bonne taille de pixels.
|
|
||||||
if ( ((Config.Auto_set_res) && (new_mode!=Current_resolution)) &&
|
if ( ((Config.Auto_set_res) && (new_mode!=Current_resolution)) &&
|
||||||
(!Resolution_in_command_line) )
|
(!Resolution_in_command_line) )
|
||||||
{
|
{
|
||||||
@ -2945,6 +2955,20 @@ void Button_Reload(void)
|
|||||||
Pixel_ratio);
|
Pixel_ratio);
|
||||||
Display_menu();
|
Display_menu();
|
||||||
}
|
}
|
||||||
|
// In window mode, activate wide or tall pixels if the image says so.
|
||||||
|
else if (!Video_mode[Current_resolution].Fullscreen &&
|
||||||
|
((Ratio_of_loaded_image == PIXEL_WIDE &&
|
||||||
|
Pixel_ratio != PIXEL_WIDE && Pixel_ratio != PIXEL_WIDE2) ||
|
||||||
|
(Ratio_of_loaded_image == PIXEL_TALL &&
|
||||||
|
Pixel_ratio != PIXEL_TALL && Pixel_ratio != PIXEL_TALL2)))
|
||||||
|
{
|
||||||
|
Init_mode_video(
|
||||||
|
Video_mode[Current_resolution].Width,
|
||||||
|
Video_mode[Current_resolution].Height,
|
||||||
|
Video_mode[Current_resolution].Fullscreen,
|
||||||
|
Ratio_of_loaded_image);
|
||||||
|
Display_menu();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Main_offset_X=0;
|
Main_offset_X=0;
|
||||||
|
|||||||
@ -55,3 +55,6 @@ extern T_Format File_formats[NB_KNOWN_FORMATS];
|
|||||||
/// Function which attempts to save backups of the images (main and spare),
|
/// Function which attempts to save backups of the images (main and spare),
|
||||||
/// called in case of SIGSEGV.
|
/// called in case of SIGSEGV.
|
||||||
void Image_emergency_backup(void);
|
void Image_emergency_backup(void);
|
||||||
|
|
||||||
|
/// Pixel ratio of last loaded image: one of :PIXEL_SIMPLE, :PIXEL_WIDE or :PIXEL_TALL
|
||||||
|
extern enum PIXEL_RATIO Ratio_of_loaded_image;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user