Commit fcb5e9f3 authored by Gerhard Stein's avatar Gerhard Stein

Progressbar/Downloads improvements

parent 42181fa2
......@@ -23,7 +23,7 @@ void GsProgressBar::processRender(const GsRect<float> &RectDispCoordFloat)
float progressWidth = 0.0;
if(mProgress < 0.0 || mProgress > 100.0)
if(mProgress < 0.0 || mProgress > 1000.0)
{
progressWidth = displayRect.w;
}
......@@ -48,13 +48,20 @@ void GsProgressBar::processRender(const GsRect<float> &RectDispCoordFloat)
std::stringstream ss;
if(mProgress < 0.0 || mProgress > 100.0)
if( mProgress < 0.0 )
{
bgColor = SDL_MapRGBA( pBlitsurface->format, 240, 255, 240, 255 );
progressColor = SDL_MapRGBA( pBlitsurface->format, 0, 255, 64, 255 );
progressColor = SDL_MapRGBA( pBlitsurface->format, 0, 255, 128, 255 );
ss << "Fetching ...";
}
else if( mProgress > 1000.0 )
{
bgColor = SDL_MapRGBA( pBlitsurface->format, 240, 255, 240, 255 );
progressColor = SDL_MapRGBA( pBlitsurface->format, 0, 255, 128, 255 );
ss << "Completed!";
}
else
{
bgColor = SDL_MapRGBA( pBlitsurface->format, 240, 255, 240, 255 );
......
......@@ -358,7 +358,9 @@ int GameDownloader::handle()
// Create subdirectory
CreateRecDir( destDir );
const int retVal = unzipFile(downloadGamePath.c_str(), destDir.c_str());
const std::string fullZipPath = JoinPaths(fullDownloadPath, gameFileName);
const int retVal = unzipFile(fullZipPath.c_str(), destDir.c_str());
// If unpacking files fails, we should delete it.
if(retVal != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment