Added Scaling Method option in config file
This commit is contained in:
parent
efa82628d5
commit
52df8b8ac0
2 changed files with 13 additions and 7 deletions
|
@ -961,10 +961,9 @@ void cfgfile_save_options(struct zfile* f, struct uae_prefs* p, int type)
|
|||
|
||||
#ifdef RASPBERRY
|
||||
cfgfile_write(f, _T("gfx_correct_aspect"), _T("%d"), p->gfx_correct_aspect);
|
||||
cfgfile_write(f, _T("gfx_fullscreen_ratio"), _T("%d"), p->gfx_fullscreen_ratio);
|
||||
cfgfile_write(f, _T("kbd_led_num"), _T("%d"), p->kbd_led_num);
|
||||
cfgfile_write(f, _T("kbd_led_scr"), _T("%d"), p->kbd_led_scr);
|
||||
cfgfile_write(f, _T("kbd_led_cap"), _T("%d"), p->kbd_led_cap);
|
||||
cfgfile_write(f, _T("scaling_method"), _T("%d"), p->scaling_method);
|
||||
#endif
|
||||
|
||||
cfgfile_write_bool(f, _T("immediate_blits"), p->immediate_blits);
|
||||
|
@ -1577,13 +1576,11 @@ static int cfgfile_parse_host(struct uae_prefs* p, TCHAR* option, TCHAR* value)
|
|||
#ifdef RASPBERRY
|
||||
if (cfgfile_intval(option, value, "gfx_correct_aspect", &p->gfx_correct_aspect, 1))
|
||||
return 1;
|
||||
if (cfgfile_intval(option, value, "gfx_fullscreen_ratio", &p->gfx_fullscreen_ratio, 1))
|
||||
return 1;
|
||||
if (cfgfile_intval(option, value, "kbd_led_num", &p->kbd_led_num, 1))
|
||||
return 1;
|
||||
if (cfgfile_intval(option, value, "kbd_led_scr", &p->kbd_led_scr, 1))
|
||||
return 1;
|
||||
if (cfgfile_intval(option, value, "kbd_led_cap", &p->kbd_led_cap, 1))
|
||||
if (cfgfile_intval(option, value, "scaling_method", &p->scaling_method, 1))
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
|
@ -4119,6 +4116,7 @@ void default_prefs(struct uae_prefs* p, int type)
|
|||
#ifdef RASPBERRY
|
||||
p->kbd_led_num = -1; // No status on numlock
|
||||
p->kbd_led_scr = -1; // No status on scrollock
|
||||
p->scaling_method = -1; //Default is Auto
|
||||
#endif
|
||||
|
||||
p->immediate_blits = 0;
|
||||
|
|
|
@ -111,9 +111,17 @@ static void open_screen(struct uae_prefs* p)
|
|||
p->gfx_resolution = p->gfx_size.width > 600 ? 1 : 0;
|
||||
width = p->gfx_size.width;
|
||||
height = p->gfx_size.height;
|
||||
if (isModeAspectRatioExact(&sdlMode, width, height))
|
||||
|
||||
if (p->scaling_method == -1)
|
||||
{
|
||||
if (isModeAspectRatioExact(&sdlMode, width, height))
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
|
||||
else
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
|
||||
}
|
||||
else if (p->scaling_method == 0)
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
|
||||
else
|
||||
else if (p->scaling_method == 1)
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue