mirror of https://github.com/odrling/Aegisub
Use GetScriptInfoAsInt in AssFile::GetResolution
Originally committed to SVN as r5777.
This commit is contained in:
parent
af19dad6ea
commit
7476dfd9c6
|
@ -659,25 +659,8 @@ void AssFile::SetScriptInfo(wxString const& key, wxString const& value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssFile::GetResolution(int &sw,int &sh) {
|
void AssFile::GetResolution(int &sw,int &sh) {
|
||||||
wxString temp = GetScriptInfo("PlayResY");
|
sw = GetScriptInfoAsInt("PlayResX");
|
||||||
if (temp.IsEmpty() || !temp.IsNumber()) {
|
sh = GetScriptInfoAsInt("PlayResY");
|
||||||
sh = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
long templ;
|
|
||||||
temp.ToLong(&templ);
|
|
||||||
sh = templ;
|
|
||||||
}
|
|
||||||
|
|
||||||
temp = GetScriptInfo("PlayResX");
|
|
||||||
if (temp.IsEmpty() || !temp.IsNumber()) {
|
|
||||||
sw = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
long templ;
|
|
||||||
temp.ToLong(&templ);
|
|
||||||
sw = templ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Gabest logic?
|
// Gabest logic?
|
||||||
if (sw == 0 && sh == 0) {
|
if (sw == 0 && sh == 0) {
|
||||||
|
|
Loading…
Reference in New Issue