mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
fix warnings
This commit is contained in:
parent
f1b0896ec1
commit
d3e87739e3
|
@ -197,7 +197,6 @@ bool SystemData::loadConfig()
|
||||||
for(pugi::xml_node system = systemList.child("system"); system; system = system.next_sibling("system"))
|
for(pugi::xml_node system = systemList.child("system"); system; system = system.next_sibling("system"))
|
||||||
{
|
{
|
||||||
std::string name, fullname, path, cmd, themeFolder;
|
std::string name, fullname, path, cmd, themeFolder;
|
||||||
PlatformIds::PlatformId platformId = PlatformIds::PLATFORM_UNKNOWN;
|
|
||||||
|
|
||||||
name = system.child("name").text().get();
|
name = system.child("name").text().get();
|
||||||
fullname = system.child("fullname").text().get();
|
fullname = system.child("fullname").text().get();
|
||||||
|
|
|
@ -55,7 +55,6 @@ void GuiGamelistFilter::addFiltersToMenu()
|
||||||
|
|
||||||
FilterIndexType type = (*it).type; // type of filter
|
FilterIndexType type = (*it).type; // type of filter
|
||||||
std::map<std::string, int>* allKeys = (*it).allIndexKeys; // all possible filters for this type
|
std::map<std::string, int>* allKeys = (*it).allIndexKeys; // all possible filters for this type
|
||||||
std::vector<std::string>* allFilteredKeys = (*it).currentFilteredKeys; // current keys being filtered for
|
|
||||||
std::string menuLabel = (*it).menuLabel; // text to show in menu
|
std::string menuLabel = (*it).menuLabel; // text to show in menu
|
||||||
std::shared_ptr< OptionListComponent<std::string> > optionList;
|
std::shared_ptr< OptionListComponent<std::string> > optionList;
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,6 @@ int main(int argc, char* argv[])
|
||||||
int ps_time = SDL_GetTicks();
|
int ps_time = SDL_GetTicks();
|
||||||
|
|
||||||
bool running = true;
|
bool running = true;
|
||||||
bool ps_standby = false;
|
|
||||||
|
|
||||||
while(running)
|
while(running)
|
||||||
{
|
{
|
||||||
|
|
|
@ -258,7 +258,7 @@ bool resizeImage(const std::string& path, int maxWidth, int maxHeight)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool saved = FreeImage_Save(format, imageRescaled, path.c_str());
|
bool saved = (FreeImage_Save(format, imageRescaled, path.c_str()) != 0);
|
||||||
FreeImage_Unload(imageRescaled);
|
FreeImage_Unload(imageRescaled);
|
||||||
|
|
||||||
if(!saved)
|
if(!saved)
|
||||||
|
|
|
@ -117,7 +117,7 @@ HttpReq::Status HttpReq::status()
|
||||||
|
|
||||||
int msgs_left;
|
int msgs_left;
|
||||||
CURLMsg* msg;
|
CURLMsg* msg;
|
||||||
while(msg = curl_multi_info_read(s_multi_handle, &msgs_left))
|
while((msg = curl_multi_info_read(s_multi_handle, &msgs_left)) != nullptr)
|
||||||
{
|
{
|
||||||
if(msg->msg == CURLMSG_DONE)
|
if(msg->msg == CURLMSG_DONE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,6 @@ std::vector<unsigned char> ImageIO::loadFromMemoryRGBA32(const unsigned char * d
|
||||||
if (fiBitmap != nullptr)
|
if (fiBitmap != nullptr)
|
||||||
{
|
{
|
||||||
//loaded. convert to 32bit if necessary
|
//loaded. convert to 32bit if necessary
|
||||||
FIBITMAP * fiConverted = nullptr;
|
|
||||||
if (FreeImage_GetBPP(fiBitmap) != 32)
|
if (FreeImage_GetBPP(fiBitmap) != 32)
|
||||||
{
|
{
|
||||||
FIBITMAP * fiConverted = FreeImage_ConvertTo32Bits(fiBitmap);
|
FIBITMAP * fiConverted = FreeImage_ConvertTo32Bits(fiBitmap);
|
||||||
|
@ -36,7 +35,6 @@ std::vector<unsigned char> ImageIO::loadFromMemoryRGBA32(const unsigned char * d
|
||||||
{
|
{
|
||||||
width = FreeImage_GetWidth(fiBitmap);
|
width = FreeImage_GetWidth(fiBitmap);
|
||||||
height = FreeImage_GetHeight(fiBitmap);
|
height = FreeImage_GetHeight(fiBitmap);
|
||||||
unsigned int pitch = FreeImage_GetPitch(fiBitmap);
|
|
||||||
//loop through scanlines and add all pixel data to the return vector
|
//loop through scanlines and add all pixel data to the return vector
|
||||||
//this is necessary, because width*height*bpp might not be == pitch
|
//this is necessary, because width*height*bpp might not be == pitch
|
||||||
unsigned char * tempData = new unsigned char[width * height * 4];
|
unsigned char * tempData = new unsigned char[width * height * 4];
|
||||||
|
|
|
@ -275,14 +275,14 @@ void ThemeData::parseIncludes(const pugi::xml_node& root)
|
||||||
if(!result)
|
if(!result)
|
||||||
throw error << "Error parsing file: \n " << result.description();
|
throw error << "Error parsing file: \n " << result.description();
|
||||||
|
|
||||||
pugi::xml_node root = includeDoc.child("theme");
|
pugi::xml_node theme = includeDoc.child("theme");
|
||||||
if(!root)
|
if(!theme)
|
||||||
throw error << "Missing <theme> tag!";
|
throw error << "Missing <theme> tag!";
|
||||||
|
|
||||||
parseVariables(root);
|
parseVariables(theme);
|
||||||
parseIncludes(root);
|
parseIncludes(theme);
|
||||||
parseViews(root);
|
parseViews(theme);
|
||||||
parseFeatures(root);
|
parseFeatures(theme);
|
||||||
|
|
||||||
mPaths.pop_back();
|
mPaths.pop_back();
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ void ComponentList::render(const Eigen::Affine3f& parentTrans)
|
||||||
for(unsigned int i = 0; i < mEntries.size(); i++)
|
for(unsigned int i = 0; i < mEntries.size(); i++)
|
||||||
{
|
{
|
||||||
auto& entry = mEntries.at(i);
|
auto& entry = mEntries.at(i);
|
||||||
drawAll = !mFocused || i != mCursor;
|
drawAll = !mFocused || i != (unsigned int)mCursor;
|
||||||
for(auto it = entry.data.elements.begin(); it != entry.data.elements.end(); it++)
|
for(auto it = entry.data.elements.begin(); it != entry.data.elements.end(); it++)
|
||||||
{
|
{
|
||||||
if(drawAll || it->invert_when_selected)
|
if(drawAll || it->invert_when_selected)
|
||||||
|
|
|
@ -218,7 +218,6 @@ void ImageGridComponent<T>::updateImages()
|
||||||
Eigen::Vector2i gridSize = getGridSize();
|
Eigen::Vector2i gridSize = getGridSize();
|
||||||
|
|
||||||
int cursorRow = mCursor / gridSize.x();
|
int cursorRow = mCursor / gridSize.x();
|
||||||
int cursorCol = mCursor % gridSize.x();
|
|
||||||
|
|
||||||
int start = (cursorRow - (gridSize.y() / 2)) * gridSize.x();
|
int start = (cursorRow - (gridSize.y() / 2)) * gridSize.x();
|
||||||
|
|
||||||
|
@ -240,7 +239,7 @@ void ImageGridComponent<T>::updateImages()
|
||||||
}
|
}
|
||||||
|
|
||||||
Eigen::Vector2f squareSize = getSquareSize(mEntries.at(i).data.texture);
|
Eigen::Vector2f squareSize = getSquareSize(mEntries.at(i).data.texture);
|
||||||
if(i == mCursor)
|
if(i == (unsigned int)mCursor)
|
||||||
{
|
{
|
||||||
image.setColorShift(0xFFFFFFFF);
|
image.setColorShift(0xFFFFFFFF);
|
||||||
image.setResize(squareSize.x() + getPadding().x() * 0.95f, squareSize.y() + getPadding().y() * 0.95f);
|
image.setResize(squareSize.x() + getPadding().x() * 0.95f, squareSize.y() + getPadding().y() * 0.95f);
|
||||||
|
|
|
@ -142,7 +142,8 @@ Font::FontFace::FontFace(ResourceData&& d, int size) : data(d)
|
||||||
int err = FT_New_Memory_Face(sLibrary, data.ptr.get(), data.length, 0, &face);
|
int err = FT_New_Memory_Face(sLibrary, data.ptr.get(), data.length, 0, &face);
|
||||||
assert(!err);
|
assert(!err);
|
||||||
|
|
||||||
FT_Set_Pixel_Sizes(face, 0, size);
|
if(!err)
|
||||||
|
FT_Set_Pixel_Sizes(face, 0, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
Font::FontFace::~FontFace()
|
Font::FontFace::~FontFace()
|
||||||
|
|
|
@ -107,8 +107,6 @@ void TextureDataManager::load(std::shared_ptr<TextureData> tex, bool block)
|
||||||
size_t size = TextureResource::getTotalMemUsage();
|
size_t size = TextureResource::getTotalMemUsage();
|
||||||
size_t max_texture = (size_t)Settings::getInstance()->getInt("MaxVRAM") * 1024 * 1024;
|
size_t max_texture = (size_t)Settings::getInstance()->getInt("MaxVRAM") * 1024 * 1024;
|
||||||
|
|
||||||
size_t in = size;
|
|
||||||
|
|
||||||
for (auto it = mTextures.rbegin(); it != mTextures.rend(); ++it)
|
for (auto it = mTextures.rbegin(); it != mTextures.rend(); ++it)
|
||||||
{
|
{
|
||||||
if (size < max_texture)
|
if (size < max_texture)
|
||||||
|
|
Loading…
Reference in a new issue