sdk: const correctness
[sdk] / ecere / src / gui / drivers / AndroidInterface.ec
index 16c1cc1..6764e72 100644 (file)
@@ -574,6 +574,20 @@ class AndroidInterface : Interface
 
       if(androidActivity.ident < 0)
          androidActivity.ident = (LooperID)ALooper_pollAll(0, null, &androidActivity.events, (void**)&androidActivity.source);
+
+      if(gotInit && androidActivity.window)
+      {
+         int w = ANativeWindow_getWidth(androidActivity.window);
+         int h = ANativeWindow_getHeight(androidActivity.window);
+         if(desktopW != w || desktopH != h)
+         {
+            guiApp.SetDesktopPosition(0, 0, w, h, true);
+            desktopW = w;
+            desktopH = h;
+            guiApp.desktop.Update(null);
+         }
+      }
+
       while(androidActivity.ident >= 0)
       {
          AndroidPollSource source = androidActivity.source;
@@ -594,18 +608,6 @@ class AndroidInterface : Interface
             }
          }
          */
-         if(gotInit && androidActivity.window)
-         {
-            int w = ANativeWindow_getWidth(androidActivity.window);
-            int h = ANativeWindow_getHeight(androidActivity.window);
-            if(desktopW != w || desktopH != h)
-            {
-               guiApp.SetDesktopPosition(0, 0, w, h, true);
-               desktopW = w;
-               desktopH = h;
-               guiApp.desktop.Update(null);
-            }
-         }
 
          eventAvailable = true;
          if(androidActivity.destroyRequested)
@@ -638,11 +640,11 @@ class AndroidInterface : Interface
 
    }
 
-   char ** GraphicsDrivers(int * numDrivers)
+   const char ** GraphicsDrivers(int * numDrivers)
    {
-      static char *graphicsDrivers[] = { "OpenGL" };
+      static const char *graphicsDrivers[] = { "OpenGL" };
       *numDrivers = sizeof(graphicsDrivers) / sizeof(char *);
-      return (char **)graphicsDrivers;
+      return (const char **)graphicsDrivers;
    }
 
    void GetCurrentMode(bool * fullScreen, int * resolution, int * colorDepth, int * refreshRate)
@@ -675,7 +677,7 @@ class AndroidInterface : Interface
 
    // -- Window manipulation ---
 
-   void SetRootWindowCaption(Window window, char * name)
+   void SetRootWindowCaption(Window window, const char * name)
    {
 
    }
@@ -777,7 +779,7 @@ class AndroidInterface : Interface
 
    // -- Mouse cursor ---
 
-   void SetMouseCursor(int cursor)
+   void SetMouseCursor(Window window, int cursor)
    {
       if(cursor == -1)
       {