mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
commit
997ee7b940
|
@ -197,7 +197,6 @@ bool SystemData::loadConfig()
|
|||
for(pugi::xml_node system = systemList.child("system"); system; system = system.next_sibling("system"))
|
||||
{
|
||||
std::string name, fullname, path, cmd, themeFolder;
|
||||
PlatformIds::PlatformId platformId = PlatformIds::PLATFORM_UNKNOWN;
|
||||
|
||||
name = system.child("name").text().get();
|
||||
fullname = system.child("fullname").text().get();
|
||||
|
|
|
@ -55,7 +55,6 @@ void GuiGamelistFilter::addFiltersToMenu()
|
|||
|
||||
FilterIndexType type = (*it).type; // type of filter
|
||||
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::shared_ptr< OptionListComponent<std::string> > optionList;
|
||||
|
||||
|
|
|
@ -313,7 +313,6 @@ int main(int argc, char* argv[])
|
|||
int ps_time = SDL_GetTicks();
|
||||
|
||||
bool running = true;
|
||||
bool ps_standby = false;
|
||||
|
||||
while(running)
|
||||
{
|
||||
|
|
|
@ -258,7 +258,7 @@ bool resizeImage(const std::string& path, int maxWidth, int maxHeight)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool saved = FreeImage_Save(format, imageRescaled, path.c_str());
|
||||
bool saved = (FreeImage_Save(format, imageRescaled, path.c_str()) != 0);
|
||||
FreeImage_Unload(imageRescaled);
|
||||
|
||||
if(!saved)
|
||||
|
|
|
@ -117,7 +117,7 @@ HttpReq::Status HttpReq::status()
|
|||
|
||||
int msgs_left;
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,6 @@ std::vector<unsigned char> ImageIO::loadFromMemoryRGBA32(const unsigned char * d
|
|||
if (fiBitmap != nullptr)
|
||||
{
|
||||
//loaded. convert to 32bit if necessary
|
||||
FIBITMAP * fiConverted = nullptr;
|
||||
if (FreeImage_GetBPP(fiBitmap) != 32)
|
||||
{
|
||||
FIBITMAP * fiConverted = FreeImage_ConvertTo32Bits(fiBitmap);
|
||||
|
@ -36,7 +35,6 @@ std::vector<unsigned char> ImageIO::loadFromMemoryRGBA32(const unsigned char * d
|
|||
{
|
||||
width = FreeImage_GetWidth(fiBitmap);
|
||||
height = FreeImage_GetHeight(fiBitmap);
|
||||
unsigned int pitch = FreeImage_GetPitch(fiBitmap);
|
||||
//loop through scanlines and add all pixel data to the return vector
|
||||
//this is necessary, because width*height*bpp might not be == pitch
|
||||
unsigned char * tempData = new unsigned char[width * height * 4];
|
||||
|
|
|
@ -275,14 +275,14 @@ void ThemeData::parseIncludes(const pugi::xml_node& root)
|
|||
if(!result)
|
||||
throw error << "Error parsing file: \n " << result.description();
|
||||
|
||||
pugi::xml_node root = includeDoc.child("theme");
|
||||
if(!root)
|
||||
pugi::xml_node theme = includeDoc.child("theme");
|
||||
if(!theme)
|
||||
throw error << "Missing <theme> tag!";
|
||||
|
||||
parseVariables(root);
|
||||
parseIncludes(root);
|
||||
parseViews(root);
|
||||
parseFeatures(root);
|
||||
parseVariables(theme);
|
||||
parseIncludes(theme);
|
||||
parseViews(theme);
|
||||
parseFeatures(theme);
|
||||
|
||||
mPaths.pop_back();
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ void ComponentList::render(const Eigen::Affine3f& parentTrans)
|
|||
for(unsigned int i = 0; i < mEntries.size(); 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++)
|
||||
{
|
||||
if(drawAll || it->invert_when_selected)
|
||||
|
|
|
@ -218,7 +218,6 @@ void ImageGridComponent<T>::updateImages()
|
|||
Eigen::Vector2i gridSize = getGridSize();
|
||||
|
||||
int cursorRow = mCursor / gridSize.x();
|
||||
int cursorCol = mCursor % 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);
|
||||
if(i == mCursor)
|
||||
if(i == (unsigned int)mCursor)
|
||||
{
|
||||
image.setColorShift(0xFFFFFFFF);
|
||||
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);
|
||||
assert(!err);
|
||||
|
||||
FT_Set_Pixel_Sizes(face, 0, size);
|
||||
if(!err)
|
||||
FT_Set_Pixel_Sizes(face, 0, size);
|
||||
}
|
||||
|
||||
Font::FontFace::~FontFace()
|
||||
|
|
|
@ -107,8 +107,6 @@ void TextureDataManager::load(std::shared_ptr<TextureData> tex, bool block)
|
|||
size_t size = TextureResource::getTotalMemUsage();
|
||||
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)
|
||||
{
|
||||
if (size < max_texture)
|
||||
|
|
Loading…
Reference in a new issue