]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/iphone/utils.mm
better surviving 0 width / height bitmap sizes
[wxWidgets.git] / src / osx / iphone / utils.mm
index 6f1cb5dc33d205a46bacc1a79e55e388f65e73ac..8c780ac93dd28caa61bfc5bf24716cce53548400 100644 (file)
@@ -82,6 +82,15 @@ int wxApp::OnRun()
     return 1;
 }
 
+bool wxApp::DoInitGui()
+{
+    return true;
+}
+
+void wxApp::DoCleanUp()
+{
+}
+
 void wxMacWakeUp()
 {
     // TODO
@@ -251,10 +260,11 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
     // get OS version
     int major, minor;
 
-    wxString release = wxCFStringRef( [ [UIDevice currentDevice] systemVersion] ).AsString() ;
+    wxString release = wxCFStringRef( wxCFRetain( [ [UIDevice currentDevice] systemVersion] ) ).AsString() ;
 
     if ( release.empty() ||
-         wxSscanf(release.c_str(), wxT("%d.%d"), &major, &minor) != 2 )
+        // TODO use wx method
+         scanf(release.c_str(), wxT("%d.%d"), &major, &minor) != 2 )
     {
         // failed to get version string or unrecognized format
         major =
@@ -271,7 +281,7 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
 
 wxString wxGetOsDescription()
 {
-    wxString release = wxCFStringRef( [ [UIDevice currentDevice] systemName] ).AsString() ;
+    wxString release = wxCFStringRef( wxCFRetain([ [UIDevice currentDevice] systemName] )).AsString() ;
 
     return release;
 }