mirror of https://github.com/odrling/Aegisub
Added some more Gabest logic to AssFile::GetResolution()
Originally committed to SVN as r1158.
This commit is contained in:
parent
e9284e5f88
commit
9aceffb576
|
@ -727,7 +727,7 @@ void AssFile::GetResolution(int &sw,int &sh) {
|
|||
// Height
|
||||
wxString temp = GetScriptInfo(_T("PlayResY"));
|
||||
if (temp.IsEmpty() || !temp.IsNumber()) {
|
||||
sh = 288;
|
||||
sh = 0;
|
||||
}
|
||||
else {
|
||||
long templ;
|
||||
|
@ -738,13 +738,29 @@ void AssFile::GetResolution(int &sw,int &sh) {
|
|||
// Width
|
||||
temp = GetScriptInfo(_T("PlayResX"));
|
||||
if (temp.IsEmpty() || !temp.IsNumber()) {
|
||||
sw = 384;
|
||||
sw = 0;
|
||||
}
|
||||
else {
|
||||
long templ;
|
||||
temp.ToLong(&templ);
|
||||
sw = templ;
|
||||
}
|
||||
|
||||
// Gabest logic?
|
||||
if (sw == 0 && sh == 0) {
|
||||
sw = 384;
|
||||
sh = 288;
|
||||
} else if (sw == 0) {
|
||||
if (sh == 1024)
|
||||
sw = 1280;
|
||||
else
|
||||
sw = sh * 4 / 3;
|
||||
} else if (sh == 0) {
|
||||
if (sw == 1280)
|
||||
sh = 1024;
|
||||
else
|
||||
sh = sw * 3 / 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue