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::VCenterIncrease, KBDK_PAGEDOWN, MOD3 },
|
||||||
{ Event::VSizeAdjustDecrease, KBDK_PAGEDOWN, KBDM_SHIFT | MOD3 },
|
{ Event::VSizeAdjustDecrease, KBDK_PAGEDOWN, KBDM_SHIFT | MOD3 },
|
||||||
{ Event::VSizeAdjustIncrease, KBDK_PAGEUP, 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::VolumeDecrease, KBDK_LEFTBRACKET, MOD3 },
|
||||||
{ Event::VolumeIncrease, KBDK_RIGHTBRACKET, MOD3 },
|
{ Event::VolumeIncrease, KBDK_RIGHTBRACKET, MOD3 },
|
||||||
{ Event::SoundToggle, KBDK_RIGHTBRACKET, KBDM_CTRL },
|
{ Event::SoundToggle, KBDK_RIGHTBRACKET, KBDM_CTRL },
|
||||||
|
|
|
@ -125,12 +125,12 @@ void BilinearBlitter::recreateTexturesIfNecessary()
|
||||||
SDL_UpdateTexture(myTexture, nullptr, myStaticData->pixels, myStaticData->pitch);
|
SDL_UpdateTexture(myTexture, nullptr, myStaticData->pixels, myStaticData->pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::array<SDL_Texture*, 2> textures = { myTexture, mySecondaryTexture };
|
if (myAttributes.blending) {
|
||||||
for (SDL_Texture* texture: textures) {
|
const std::array<SDL_Texture*, 2> textures = { myTexture, mySecondaryTexture };
|
||||||
if (!texture) continue;
|
for (SDL_Texture* texture: textures) {
|
||||||
|
if (!texture) continue;
|
||||||
|
|
||||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||||
if (myAttributes.blending) {
|
|
||||||
const auto blendAlpha = static_cast<uInt8>(myAttributes.blendalpha * 2.55);
|
const auto blendAlpha = static_cast<uInt8>(myAttributes.blendalpha * 2.55);
|
||||||
SDL_SetTextureAlphaMod(texture, blendAlpha);
|
SDL_SetTextureAlphaMod(texture, blendAlpha);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1376,14 +1376,21 @@ bool FrameBuffer::loadBezel()
|
||||||
if(isValid)
|
if(isValid)
|
||||||
{
|
{
|
||||||
// Scale bezel to fullscreen (preserve or stretch) or window size
|
// Scale bezel to fullscreen (preserve or stretch) or window size
|
||||||
const uInt32 bezelH = std::min(myActiveVidMode.screenS.h,
|
const uInt32 bezelW = std::min(
|
||||||
myActiveVidMode.imageR.h());
|
myActiveVidMode.screenS.w,
|
||||||
const uInt32 bezelW = std::min(myActiveVidMode.screenS.w,
|
static_cast<uInt32>(myActiveVidMode.imageR.w() * (16.F / 9.F) / (4.F / 3.F)));
|
||||||
static_cast<uInt32>(bezelH * (16.F / 9.F)));
|
const uInt32 bezelH = std::min(
|
||||||
|
myActiveVidMode.screenS.h,
|
||||||
|
myActiveVidMode.imageR.h());
|
||||||
|
cerr << bezelW << " x " << bezelH << endl;
|
||||||
myBezelSurface->setDstSize(bezelW, bezelH);
|
myBezelSurface->setDstSize(bezelW, bezelH);
|
||||||
myBezelSurface->setDstPos((myActiveVidMode.screenS.w - bezelW) / 2,
|
myBezelSurface->setDstPos((myActiveVidMode.screenS.w - bezelW) / 2,
|
||||||
(myActiveVidMode.screenS.h - bezelH) / 2); // center
|
(myActiveVidMode.screenS.h - bezelH) / 2); // center
|
||||||
myBezelSurface->setScalingInterpolation(ScalingInterpolation::sharp);
|
myBezelSurface->setScalingInterpolation(ScalingInterpolation::sharp);
|
||||||
|
|
||||||
|
myBezelSurface->attributes().blending = true;
|
||||||
|
myBezelSurface->attributes().blendalpha = 100;
|
||||||
|
myBezelSurface->applyAttributes();
|
||||||
}
|
}
|
||||||
if(myBezelSurface)
|
if(myBezelSurface)
|
||||||
myBezelSurface->setVisible(isValid);
|
myBezelSurface->setVisible(isValid);
|
||||||
|
|
Loading…
Reference in New Issue