Previous 199869 Revisions Next

r34228 Tuesday 6th January, 2015 at 22:08:26 UTC by Couriersud
SDL: Driver accel (draw13.c) now supports "-filter", i.e. bilinear
filtering. [Couriersud]
[src/osd/sdl]draw13.c

trunk/src/osd/sdl/draw13.c
r242739r242740
389389   target_rect.w = round_nearest(prim->bounds.x1 - prim->bounds.x0);
390390   target_rect.h = round_nearest(prim->bounds.y1 - prim->bounds.y0);
391391
392#if 0
393   // no longer supported in SDL2
394    if ((PRIMFLAG_GET_SCREENTEX(prim->m_flags)) && video_config.filter)
395    {
396        SDL_SetTextureScaleMode(texture->m_texture_id,  DRAW2_SCALEMODE_BEST);
397    }
398    else
399    {
400        SDL_SetTextureScaleMode(texture->m_texture_id,  DRAW2_SCALEMODE_NEAREST);
401    }
402#endif
403392    SDL_SetTextureBlendMode(m_texture_id, m_sdl_blendmode);
404393    set_coloralphamode(m_texture_id, &prim->color);
405394    SDL_RenderCopy(m_renderer,  m_texture_id, NULL, &target_rect);
r242739r242740
528517   else
529518      osd_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : "<default>");
530519
520    /* Enable bilinear filtering in case it is supported.
521     * This applies to all texture operations. However, artwort is pre-scaled
522     * and thus shouldn't be affected.
523     */
524    if (video_config.filter)
525    {
526        SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
527    }
528    else
529    {
530        SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0");
531    }
532
531533   return 0;
532534}
533535


Previous 199869 Revisions Next


© 1997-2024 The MAME Team