Use GetScriptInfoAsInt in AssFile::GetResolution

Originally committed to SVN as r5777.
This commit is contained in:
Thomas Goyne 2011-10-25 01:16:56 +00:00
parent af19dad6ea
commit 7476dfd9c6
1 changed files with 2 additions and 19 deletions

View File

@ -659,25 +659,8 @@ void AssFile::SetScriptInfo(wxString const& key, wxString const& value) {
}
void AssFile::GetResolution(int &sw,int &sh) {
wxString temp = GetScriptInfo("PlayResY");
if (temp.IsEmpty() || !temp.IsNumber()) {
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;
}
sw = GetScriptInfoAsInt("PlayResX");
sh = GetScriptInfoAsInt("PlayResY");
// Gabest logic?
if (sw == 0 && sh == 0) {