mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Fix for cross-platform mxe build. #705

Closed crunkyball closed 2 years ago

crunkyball commented 2 years ago

Build fix for conflict with mxe's libsfml-graphics. I noticed that the previous version of this file had the extern commented out so I just did the same.

mickelson commented 2 years ago

thanks!!

oomek commented 2 years ago

These errors pop up due to redefinition of STB_IMAGE_IMPLEMENTATION. Since it was already defined in SFML it should be removed from image_loader.cpp

// #define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"

Modifying the extern block isn't required in that case.

crunkyball commented 2 years ago

Yeah, that was my original fix but when I noticed that the previous extern was commited out I just copied that.

crunkyball commented 2 years ago

For what it's worth, I think you're right that modifying image_loader.cpp is the better fix. Not least because it fixes any issues with future updates to stb_image.h.

mickelson commented 2 years ago

I don’t know, we don’t control what version of stb image comes in from sfml, and I’d rather know specifically what code is being called from image loader

Andrew

On Mar 22, 2022, at 10:30 AM, Darrell Blake @.***> wrote:

 For what it's worth, I think you're right that modifying image_loader.cpp is the better fix. Not least because it fixes any issues with future updates to stb_image.h.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.