Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of linear texture scaling option #2255

Merged
merged 1 commit into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2066,23 +2066,12 @@ void options_manager::add_options_graphics()
false, COPT_CURSES_HIDE
);

add( "SCALING_MODE", "graphics", translate_marker( "Scaling mode" ),
translate_marker( "Sets the scaling mode, 'none' ( default ) displays at the game's native resolution, 'nearest' uses low-quality but fast scaling, and 'linear' provides high-quality scaling." ),
//~ Do not scale the game image to the window size.
{ { "none", translate_marker( "No scaling" ) },
//~ An algorithm for image scaling.
{ "nearest", translate_marker( "Nearest neighbor" ) },
//~ An algorithm for image scaling.
{ "linear", translate_marker( "Linear filtering" ) }
},
"none", COPT_CURSES_HIDE );

#if !defined(__ANDROID__)
add( "SCALING_FACTOR", "graphics", translate_marker( "Scaling factor" ),
translate_marker( "Factor by which to scale the display. Requires restart." ), {
add( "SCALING_FACTOR", "graphics", translate_marker( "Display scaling factor" ),
translate_marker( "Factor by which to scale the game display, 1x means no scaling. Requires restart." ), {
{ "1", translate_marker( "1x" ) },
{ "2", translate_marker( "2x" )},
{ "4", translate_marker( "4x" )}
{ "2", translate_marker( "2x" ) },
{ "4", translate_marker( "4x" ) }
},
"1", COPT_CURSES_HIDE );
#endif
Expand Down
5 changes: 2 additions & 3 deletions src/sdltiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ static void WinCreate()
WindowHeight = TERMINAL_HEIGHT * fontheight * scaling_factor;
window_flags |= SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI;

if( get_option<std::string>( "SCALING_MODE" ) != "none" ) {
SDL_SetHint( SDL_HINT_RENDER_SCALE_QUALITY, get_option<std::string>( "SCALING_MODE" ).c_str() );
}
// We want our textures clean and sharp when zooming in.
SDL_SetHint( SDL_HINT_RENDER_SCALE_QUALITY, "nearest" );

#if !defined(__ANDROID__)
const auto screen_mode = get_option<std::string>( "FULLSCREEN" );
Expand Down