fix latent viewport bug

This commit is contained in:
Glenn Maynard
2003-05-22 08:37:15 +00:00
parent 52b6b76bee
commit 84bcc3146a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ void RageDisplay::SetViewport(int shift_left, int shift_down)
/* left and down are on a 0..SCREEN_WIDTH, 0..SCREEN_HEIGHT scale.
* Scale them to the actual viewport range. */
shift_left = int( shift_left * float(g_CurrentWidth) / SCREEN_WIDTH );
shift_down = int( shift_down * float(g_CurrentWidth) / SCREEN_WIDTH );
shift_down = int( shift_down * float(g_CurrentHeight) / SCREEN_HEIGHT );
D3DVIEWPORT8 viewData = { shift_left, -shift_down, g_CurrentWidth, g_CurrentHeight, 0.f, 1.f };
g_pd3dDevice->SetViewport( &viewData );
+1 -1
View File
@@ -293,7 +293,7 @@ void RageDisplay::SetViewport(int shift_left, int shift_down)
/* left and down are on a 0..SCREEN_WIDTH, 0..SCREEN_HEIGHT scale.
* Scale them to the actual viewport range. */
shift_left = int( shift_left * float(wind->GetWidth()) / SCREEN_WIDTH );
shift_down = int( shift_down * float(wind->GetWidth()) / SCREEN_WIDTH );
shift_down = int( shift_down * float(wind->GetHeight()) / SCREEN_HEIGHT );
glViewport(shift_left, -shift_down, wind->GetWidth(), wind->GetHeight());
}