|
|
@ -55,13 +55,8 @@ void MainWindow::paintEvent(QPaintEvent *e) { |
|
|
|
float device_aspect = width() / (float)height(); |
|
|
|
float desired_aspect = videoState->aspect(); |
|
|
|
|
|
|
|
if(fabsf(device_aspect - desired_aspect) < 0.0001f) { |
|
|
|
r.setWidth(width()); |
|
|
|
r.setHeight(height()); |
|
|
|
}else{ |
|
|
|
r.setWidth(videoState->baseWidth() * (height() / videoState->baseHeight())); |
|
|
|
r.setHeight(videoState->baseHeight() * (height() / videoState->baseHeight())); |
|
|
|
} |
|
|
|
r.setWidth(videoState->baseWidth() * (height() / videoState->baseHeight())); |
|
|
|
r.setHeight(videoState->baseHeight() * (height() / videoState->baseHeight())); |
|
|
|
|
|
|
|
r.moveCenter(rect().center()); |
|
|
|
|
|
|
|