mirror of https://github.com/stella-emu/stella.git
fixed bezel blend mode bug (only showed with TV-effects && Interpolation enabled)
changed default hotkey for correct aspect ratio
This commit is contained in:
parent
0b629f59c5
commit
3f6fe5df5e
|
@ -641,7 +641,7 @@ PhysicalKeyboardHandler::DefaultCommonMapping = {
|
|||
{ Event::VCenterIncrease, KBDK_PAGEDOWN, MOD3 },
|
||||
{ Event::VSizeAdjustDecrease, KBDK_PAGEDOWN, KBDM_SHIFT | MOD3 },
|
||||
{ Event::VSizeAdjustIncrease, KBDK_PAGEUP, KBDM_SHIFT | MOD3 },
|
||||
{ Event::ToggleCorrectAspectRatio, KBDK_C, KBDM_CTRL },
|
||||
{ Event::ToggleCorrectAspectRatio, KBDK_C, KBDM_SHIFT | KBDM_CTRL },
|
||||
{ Event::VolumeDecrease, KBDK_LEFTBRACKET, MOD3 },
|
||||
{ Event::VolumeIncrease, KBDK_RIGHTBRACKET, MOD3 },
|
||||
{ Event::SoundToggle, KBDK_RIGHTBRACKET, KBDM_CTRL },
|
||||
|
|
|
@ -125,12 +125,12 @@ void BilinearBlitter::recreateTexturesIfNecessary()
|
|||
SDL_UpdateTexture(myTexture, nullptr, myStaticData->pixels, myStaticData->pitch);
|
||||
}
|
||||
|
||||
const std::array<SDL_Texture*, 2> textures = { myTexture, mySecondaryTexture };
|
||||
for (SDL_Texture* texture: textures) {
|
||||
if (!texture) continue;
|
||||
if (myAttributes.blending) {
|
||||
const std::array<SDL_Texture*, 2> textures = { myTexture, mySecondaryTexture };
|
||||
for (SDL_Texture* texture: textures) {
|
||||
if (!texture) continue;
|
||||
|
||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||
if (myAttributes.blending) {
|
||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||
const auto blendAlpha = static_cast<uInt8>(myAttributes.blendalpha * 2.55);
|
||||
SDL_SetTextureAlphaMod(texture, blendAlpha);
|
||||
}
|
||||
|
|
|
@ -1376,14 +1376,21 @@ bool FrameBuffer::loadBezel()
|
|||
if(isValid)
|
||||
{
|
||||
// Scale bezel to fullscreen (preserve or stretch) or window size
|
||||
const uInt32 bezelH = std::min(myActiveVidMode.screenS.h,
|
||||
myActiveVidMode.imageR.h());
|
||||
const uInt32 bezelW = std::min(myActiveVidMode.screenS.w,
|
||||
static_cast<uInt32>(bezelH * (16.F / 9.F)));
|
||||
const uInt32 bezelW = std::min(
|
||||
myActiveVidMode.screenS.w,
|
||||
static_cast<uInt32>(myActiveVidMode.imageR.w() * (16.F / 9.F) / (4.F / 3.F)));
|
||||
const uInt32 bezelH = std::min(
|
||||
myActiveVidMode.screenS.h,
|
||||
myActiveVidMode.imageR.h());
|
||||
cerr << bezelW << " x " << bezelH << endl;
|
||||
myBezelSurface->setDstSize(bezelW, bezelH);
|
||||
myBezelSurface->setDstPos((myActiveVidMode.screenS.w - bezelW) / 2,
|
||||
(myActiveVidMode.screenS.h - bezelH) / 2); // center
|
||||
myBezelSurface->setScalingInterpolation(ScalingInterpolation::sharp);
|
||||
|
||||
myBezelSurface->attributes().blending = true;
|
||||
myBezelSurface->attributes().blendalpha = 100;
|
||||
myBezelSurface->applyAttributes();
|
||||
}
|
||||
if(myBezelSurface)
|
||||
myBezelSurface->setVisible(isValid);
|
||||
|
|
Loading…
Reference in New Issue