Fix compile error for libretro, and minor warnings from clang.

This commit is contained in:
Stephen Anthony 2023-08-24 12:31:06 -02:30
parent 201fc97ecb
commit e0374fe681
4 changed files with 9 additions and 8 deletions

View File

@ -112,9 +112,7 @@ class FBBackendSDL2 : public FBBackend
{ return SDL_MapRGB(myPixelFormat, r, g, b); } { return SDL_MapRGB(myPixelFormat, r, g, b); }
inline uInt32 mapRGBA(uInt8 r, uInt8 g, uInt8 b, uInt8 a) const override inline uInt32 mapRGBA(uInt8 r, uInt8 g, uInt8 b, uInt8 a) const override
{ { return SDL_MapRGBA(myPixelFormat, r, g, b, a); }
return SDL_MapRGBA(myPixelFormat, r, g, b, a);
}
/** /**
This method is called to get a copy of the specified ARGB data from the This method is called to get a copy of the specified ARGB data from the

View File

@ -1422,8 +1422,7 @@ bool FrameBuffer::loadBezel()
if(isValid) if(isValid)
{ {
const float overscan = 1 - myOSystem.settings().getInt("tia.fs_overscan") / 100.0; const float overscan = 1 - myOSystem.settings().getInt("tia.fs_overscan") / 100.F;
bool fs = fullScreen();
uInt32 imageW, imageH; uInt32 imageW, imageH;
if(fullScreen()) if(fullScreen())
@ -1469,7 +1468,7 @@ float FrameBuffer::maxWindowZoom() const
float multiplier = 1; float multiplier = 1;
const bool showBezel = myOSystem.settings().getBool("bezel.show"); const bool showBezel = myOSystem.settings().getBool("bezel.show");
const double scaleW = showBezel ? (16. / 9.) / (4. / 3.) : 1; // = 1.333 const float scaleW = showBezel ? (16.F / 9.F) / (4.F / 3.F) : 1.F; // = 1.333
for(;;) for(;;)
{ {
@ -1477,7 +1476,8 @@ float FrameBuffer::maxWindowZoom() const
const uInt32 width = TIAConstants::viewableWidth * multiplier * scaleW; const uInt32 width = TIAConstants::viewableWidth * multiplier * scaleW;
const uInt32 height = TIAConstants::viewableHeight * multiplier; const uInt32 height = TIAConstants::viewableHeight * multiplier;
if((width > myAbsDesktopSize[display].w) || (height > myAbsDesktopSize[display].h)) if((width > myAbsDesktopSize[display].w) ||
(height > myAbsDesktopSize[display].h))
break; break;
multiplier += ZOOM_STEPS; multiplier += ZOOM_STEPS;

View File

@ -467,7 +467,7 @@ class FrameBuffer
Return bezel names, which are either read from the properties Return bezel names, which are either read from the properties
or generated from the cart name. or generated from the cart name.
@param The index of the returned bezel name @param index The index of the returned bezel name
@return The bezel name for the given index @return The bezel name for the given index
*/ */

View File

@ -47,6 +47,9 @@ class FBBackendLIBRETRO : public FBBackend
uInt32 mapRGB(uInt8 r, uInt8 g, uInt8 b) const override { uInt32 mapRGB(uInt8 r, uInt8 g, uInt8 b) const override {
return (r << 16) | (g << 8) | b; return (r << 16) | (g << 8) | b;
} }
uInt32 mapRGBA(uInt8 r, uInt8 g, uInt8 b, uInt8 a) const override {
return (a << 24) | (r << 16) | (g << 8) | b;
}
/** /**
This method is called to query and initialize the video hardware This method is called to query and initialize the video hardware