add pref items for scaling

This commit is contained in:
kanjitalk755 2019-01-12 18:22:51 +09:00
parent 3db0cf3d0b
commit d736cc58de
3 changed files with 8 additions and 2 deletions

View File

@ -735,8 +735,8 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags
}
}
// Apply anti-aliasing, if and when appropriate (usually in fullscreen)
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, PrefsFindBool("scale_nearest") ? "nearest" : "linear");
/*
// Always use a resize-able window. This helps allow SDL to manage
// transitions involving fullscreen to or from windowed-mode.
@ -852,6 +852,8 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags
return NULL;
}
SDL_RenderSetIntegerScale(sdl_renderer, PrefsFindBool("scale_integer") ? SDL_TRUE : SDL_FALSE);
return guest_surface;
}

View File

@ -73,6 +73,8 @@ prefs_desc common_prefs_items[] = {
{"mousewheelmode",TYPE_BOOLEAN,"Use WheelMode"},
{"mousewheellines",TYPE_INT32,"wheel line nb"},
{"hotkey",TYPE_INT32,false,"hotkey modifier"},
{"scale_nearest",TYPE_BOOLEAN,false,"nearest neighbor scaling"},
{"scale_integer",TYPE_BOOLEAN,false,"integer scaling"},
{NULL, TYPE_END, false, NULL} // End of list
};

View File

@ -60,6 +60,8 @@ prefs_desc common_prefs_items[] = {
{"keyboardtype", TYPE_INT32, false, "hardware keyboard type"},
{"hardcursor", TYPE_BOOLEAN, false, "hardware mouse cursor"},
{"hotkey", TYPE_INT32, false, "hotkey modifier"},
{"scale_nearest",TYPE_BOOLEAN,false,"nearest neighbor scaling"},
{"scale_integer",TYPE_BOOLEAN,false,"integer scaling"},
{NULL, TYPE_END, false, NULL} // End of list
};