fix latent viewport bug
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user