diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index d6d1ed62..48ed26dc 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -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; } diff --git a/BasiliskII/src/prefs_items.cpp b/BasiliskII/src/prefs_items.cpp index 07234d39..0de2f6ee 100644 --- a/BasiliskII/src/prefs_items.cpp +++ b/BasiliskII/src/prefs_items.cpp @@ -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 }; diff --git a/SheepShaver/src/prefs_items.cpp b/SheepShaver/src/prefs_items.cpp index f4db6031..b0a9f919 100644 --- a/SheepShaver/src/prefs_items.cpp +++ b/SheepShaver/src/prefs_items.cpp @@ -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 };