Skip to content

Commit

Permalink
Fix compile error for libretro, and minor warnings from clang.
Browse files Browse the repository at this point in the history
  • Loading branch information
sa666666 committed Aug 24, 2023
1 parent 201fc97 commit e0374fe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/common/FBBackendSDL2.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ class FBBackendSDL2 : public FBBackend
{ return SDL_MapRGB(myPixelFormat, r, g, b); }

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
Expand Down
8 changes: 4 additions & 4 deletions src/emucore/FrameBuffer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1422,8 +1422,7 @@ bool FrameBuffer::loadBezel()

if(isValid)
{
const float overscan = 1 - myOSystem.settings().getInt("tia.fs_overscan") / 100.0;
bool fs = fullScreen();
const float overscan = 1 - myOSystem.settings().getInt("tia.fs_overscan") / 100.F;

uInt32 imageW, imageH;
if(fullScreen())
Expand Down Expand Up @@ -1469,15 +1468,16 @@ float FrameBuffer::maxWindowZoom() const
float multiplier = 1;

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(;;)
{
// Figure out the zoomed size of the window
const uInt32 width = TIAConstants::viewableWidth * multiplier * scaleW;
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;

multiplier += ZOOM_STEPS;
Expand Down
2 changes: 1 addition & 1 deletion src/emucore/FrameBuffer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ class FrameBuffer
Return bezel names, which are either read from the properties
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
*/
Expand Down
3 changes: 3 additions & 0 deletions src/os/libretro/FBBackendLIBRETRO.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class FBBackendLIBRETRO : public FBBackend
uInt32 mapRGB(uInt8 r, uInt8 g, uInt8 b) const override {
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
Expand Down

2 comments on commit e0374fe

@thrust26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still working on the branch, do not waste your time.

@sa666666
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I figured. Just getting the libretro stuff sorted, since I didn't think you had a build environment for that one.

Please sign in to comment.