Hi again! Time for more fun with archos tablets
The archos 101 doesn’t have the usual 4 hardware buttons common on android devices (back, search, home & options). Instead, there are software buttons that appear on the side of the screen, as you see here:
However, nativeInit is called with screen values that are reported from getWindowManager().getDefaultDisplay().getMetrics(dm). These are the total size of the screen, and include the software buttons. However, the Cocos2dxGLSurfaceView is automatically initialised by the SDK, and reports different values to those from the windowmanager. If the nativeInit is called with the windowmanager values, the cocos2d-x app becomes cropped, with the software buttons squeezing out about 100 pixels.
Anyway, the following code added to Cocos2dxGLSurfaceView.java fixes this problem:
protected void onSizeChanged (int w, int h, int oldw, int oldh)
Cocos2dxActivity.screenWidth = w;
Cocos2dxActivity.screenHeight = h;
This function is called before nativeInit, so overriding the activity’s recorded screen values allows the correct values to be passed to nativeInit. However, this might not be the most robust fix. At least, removing the initial call to getMetics is probably acceptable.