Commit 72ff5998 authored by Gerhard Stein's avatar Gerhard Stein

Cleanups

parent 664ca6a9
......@@ -113,7 +113,17 @@ bool CSDLVideo::resizeDisplayScreen(const GsRect<Uint16>& newDim)
#if SDL_VERSION_ATLEAST(2, 0, 0)
if(renderer != nullptr)
{
SDL_RenderSetLogicalSize(renderer, mActiveAreaRect.w, mActiveAreaRect.h);
SDL_RenderSetLogicalSize(renderer,
mActiveAreaRect.w,
mActiveAreaRect.h);
/*
SDL_RenderSetLogicalSize(renderer,
mActiveAreaRect.w*2,
mActiveAreaRect.h*2);
*/
SDL_RenderSetViewport(renderer, nullptr);
}
#else
......@@ -232,7 +242,16 @@ void CSDLVideo::transformScreenToDisplay()
255);
// TODO:
//SDL_Point midPt;
const Vector2D<int> rotPt(mActiveAreaRect.x+mActiveAreaRect.w/2,
mActiveAreaRect.y+mActiveAreaRect.h/2);
/*midPt.x = rotPt.x;
midPt.y = rotPt.y;*/
auto RenderCopy = [&] (SDL_Renderer * local_renderer,
SDL_Texture * local_texture,
const SDL_Rect * local_srcrect,
......@@ -264,8 +283,7 @@ void CSDLVideo::transformScreenToDisplay()
mainDstrect.x = mActiveAreaRect.x;
mainDstrect.y = mActiveAreaRect.y;
mainDstrect.w = mActiveAreaRect.w;
mainDstrect.h = mActiveAreaRect.h;
mainDstrect.h = mActiveAreaRect.h;
RenderCopy(renderer, mpMainScreenTexture.get(), nullptr, &mainDstrect);
......@@ -281,8 +299,6 @@ void CSDLVideo::transformScreenToDisplay()
const GsRect<Uint16> &dst = std::get<2>(triple);
// TODO: Tilt here!
if(src.empty())
{
if(dst.empty())
......@@ -297,6 +313,11 @@ void CSDLVideo::transformScreenToDisplay()
dstSDL.y += mActiveAreaRect.y;
dstSDL.x += mActiveAreaRect.x;
if(tiltVideo)
{
dstSDL = tilt(dstSDL, rotPt).SDLRect();
}
RenderCopy(renderer, texture, nullptr, &dstSDL);
}
}
......@@ -317,7 +338,6 @@ void CSDLVideo::transformScreenToDisplay()
mRenderTexturePtrs.pop();
}
SDL_RenderPresent(renderer);
......
......@@ -171,8 +171,20 @@ void CVideoEngine::updateActiveArea(const GsRect<Uint16>& displayRes,
mActiveAreaRect.w = displayRes.w;
mActiveAreaRect.h = (displayRes.w*aspHeight)/aspWidth;
}
/*
mActiveAreaRect.x = (displayRes.w-mActiveAreaRect.w)/2;
mActiveAreaRect.y = (displayRes.h-mActiveAreaRect.h)/2;
*/
mActiveAreaRect.x = (displayRes.w-mActiveAreaRect.w)/2;
mActiveAreaRect.y = (displayRes.h-mActiveAreaRect.h)/2;
/*
mActiveAreaRect.x = 0;
mActiveAreaRect.y = 0;
*/
}
......
......@@ -48,6 +48,12 @@ void CGameLauncher::verifyGameStore()
GsButton *downloadBtn = new GsButton( "+ More", new GMDownloadDlgOpen() );
mLauncherDialog.addControl( downloadBtn, GsRect<float>(0.125f, 0.865f, 0.25f, 0.07f) );
}
else
{
GsButton *cataLogBtn = new GsButton( "Catalogue", new GMDownloadDlgOpen() );
mLauncherDialog.addControl( cataLogBtn, GsRect<float>(0.125f, 0.865f, 0.25f, 0.07f) );
}
mGameCatalogue = gameDownloader.getGameCatalogue();
}
......
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